]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_Fedora24.md
Merge pull request #1690 from dslicenc/bgpd-vrf-show-cm17377
[mirror_frr.git] / doc / Building_FRR_on_Fedora24.md
CommitLineData
278fb111
MW
1Building FRR on Fedora 24 from Git Source
2=========================================
3
a63edb35
MW
4(As an alternative to this installation, you may prefer to create a FRR
5rpm package yourself and install that package instead. See instructions
6in redhat/README.rpm_build.md on how to build a rpm package)
7
278fb111
MW
8Install required packages
9-------------------------
eb651bbc 10
278fb111
MW
11Add packages:
12
eb651bbc 13 sudo dnf install git autoconf automake libtool make gawk \
a63edb35
MW
14 readline-devel texinfo net-snmp-devel groff pkgconfig \
15 json-c-devel pam-devel perl-XML-LibXML pytest bison flex \
16 c-ares-devel python3-devel
278fb111
MW
17
18Get FRR, compile it and install it (from Git)
19---------------------------------------------
20
eb651bbc
MW
21**This assumes you want to build and install FRR from source and not
22using any packages**
278fb111
MW
23
24### Add frr groups and user
25
26 sudo groupadd -g 92 frr
27 sudo groupadd -r -g 85 frrvt
28 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
447a8fe9 29 -c "FRR FRRouting suite" -d /var/run/frr frr
278fb111
MW
30
31### Download Source, configure and compile it
eb651bbc
MW
32(You may prefer different options on configure statement. These are just
33an example.)
278fb111 34
d6180888 35 git clone https://github.com/frrouting/frr.git frr
eb651bbc 36 cd frr
278fb111
MW
37 ./bootstrap.sh
38 ./configure \
a63edb35
MW
39 --bindir=/usr/bin \
40 --sbindir=/usr/lib/frr \
eb651bbc 41 --sysconfdir=/etc/frr \
a63edb35
MW
42 --libdir=/usr/lib/frr \
43 --libexecdir=/usr/lib/frr \
eb651bbc 44 --localstatedir=/var/run/frr \
a63edb35 45 --with-moduledir=/usr/lib/frr/modules \
eb651bbc
MW
46 --enable-pimd \
47 --enable-snmp=agentx \
48 --enable-multipath=64 \
49 --enable-ospfclient=yes \
50 --enable-ospfapi=yes \
51 --enable-user=frr \
52 --enable-group=frr \
53 --enable-vty-group=frrvt \
54 --enable-rtadv \
55 --disable-exampledir \
56 --enable-watchfrr \
a63edb35 57 --enable-ldpd \
eb651bbc 58 --enable-fpm \
a63edb35
MW
59 --enable-nhrpd \
60 --enable-eigrpd \
61 --enable-babeld \
eb651bbc
MW
62 --with-pkg-git-version \
63 --with-pkg-extra-version=-MyOwnFRRVersion
278fb111
MW
64 make
65 make check
66 sudo make install
67
68### Create empty FRR configuration files
eb651bbc
MW
69 sudo mkdir /var/log/frr
70 sudo mkdir /etc/frr
71 sudo touch /etc/frr/zebra.conf
72 sudo touch /etc/frr/bgpd.conf
73 sudo touch /etc/frr/ospfd.conf
74 sudo touch /etc/frr/ospf6d.conf
75 sudo touch /etc/frr/isisd.conf
76 sudo touch /etc/frr/ripd.conf
77 sudo touch /etc/frr/ripngd.conf
78 sudo touch /etc/frr/pimd.conf
79 sudo touch /etc/frr/ldpd.conf
97b02007 80 sudo touch /etc/frr/nhrpd.conf
a63edb35
MW
81 sudo touch /etc/frr/eigrpd.conf
82 sudo touch /etc/frr/babeld.conf
eb651bbc
MW
83 sudo chown -R frr:frr /etc/frr/
84 sudo touch /etc/frr/vtysh.conf
85 sudo chown frr:frrvt /etc/frr/vtysh.conf
86 sudo chmod 640 /etc/frr/*.conf
278fb111 87
a63edb35
MW
88### Install daemon config file
89 sudo install -p -m 644 redhat/daemons /etc/frr/
90 sudo chown frr:frr /etc/frr/daemons
91
92### Edit /etc/frr/daemons as needed to select the required daemons
93
94Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
95Enable the daemons as required by changing the value to `yes`
96
278fb111
MW
97### Enable IP & IPv6 forwarding (and MPLS)
98
eb651bbc
MW
99Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
100following content:
101(Please make sure to list all interfaces with required MPLS similar
102to `net.mpls.conf.eth0.input=1`)
278fb111
MW
103
104 # Sysctl for routing
105 #
106 # Routing: We need to forward packets
107 net.ipv4.conf.all.forwarding=1
108 net.ipv6.conf.all.forwarding=1
eb651bbc
MW
109 #
110 # Enable MPLS Label processing on all interfaces
111 net.mpls.conf.eth0.input=1
112 net.mpls.conf.eth1.input=1
113 net.mpls.conf.eth2.input=1
114 net.mpls.platform_labels=100000
278fb111 115
a63edb35
MW
116Load the modifed sysctl's on the system:
117
118 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
119
278fb111
MW
120Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
121
eb651bbc
MW
122 # Load MPLS Kernel Modules
123 mpls-router
124 mpls-iptunnel
278fb111 125
a63edb35
MW
126And load the kernel modules on the running system:
127
128 sudo modprobe mpls-router mpls-iptunnel
129
130### Install frr Service and redhat init files
131 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
132 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
133
134### Enable required frr at startup
135 sudo systemctl enable frr
136
137### Reboot or start FRR manually
138 sudo systemctl start frr