1 Building FRR on Fedora 24 from Git Source
2 =========================================
4 Install required packages
5 -------------------------
9 sudo dnf install git autoconf automake libtool make gawk \
10 readline-devel texinfo net-snmp-devel groff pkgconfig \
11 json-c-devel pam-devel perl-XML-LibXML pytest
13 Get FRR, compile it and install it (from Git)
14 ---------------------------------------------
16 **This assumes you want to build and install FRR from source and not
19 ### Add frr groups and user
21 sudo groupadd -g 92 frr
22 sudo groupadd -r -g 85 frrvt
23 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
24 -c "FRR FreeRangeRouting suite" -d /var/run/frr frr
26 ### Download Source, configure and compile it
27 (You may prefer different options on configure statement. These are just
30 You may want to pay special attention to `/usr/lib64` paths and change
31 them if you are not building on a x86_64 architecture
33 git clone https://github.com/freerangerouting/frr.git frr
35 git checkout stable/2.0
38 --sysconfdir=/etc/frr \
39 --libdir=/usr/lib64/frr \
40 --libexecdir=/usr/lib64/frr \
41 --localstatedir=/var/run/frr \
43 --enable-snmp=agentx \
44 --enable-multipath=64 \
45 --enable-ospfclient=yes \
46 --enable-ospfapi=yes \
49 --enable-vty-group=frrvt \
51 --disable-exampledir \
55 --with-pkg-git-version \
56 --with-pkg-extra-version=-MyOwnFRRVersion
61 ### Create empty FRR configuration files
62 sudo mkdir /var/log/frr
64 sudo touch /etc/frr/zebra.conf
65 sudo touch /etc/frr/bgpd.conf
66 sudo touch /etc/frr/ospfd.conf
67 sudo touch /etc/frr/ospf6d.conf
68 sudo touch /etc/frr/isisd.conf
69 sudo touch /etc/frr/ripd.conf
70 sudo touch /etc/frr/ripngd.conf
71 sudo touch /etc/frr/pimd.conf
72 sudo touch /etc/frr/ldpd.conf
73 sudo chown -R frr:frr /etc/frr/
74 sudo touch /etc/frr/vtysh.conf
75 sudo chown frr:frrvt /etc/frr/vtysh.conf
76 sudo chmod 640 /etc/frr/*.conf
78 ### Enable IP & IPv6 forwarding (and MPLS)
80 Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
82 (Please make sure to list all interfaces with required MPLS similar
83 to `net.mpls.conf.eth0.input=1`)
87 # Routing: We need to forward packets
88 net.ipv4.conf.all.forwarding=1
89 net.ipv6.conf.all.forwarding=1
91 # Enable MPLS Label processing on all interfaces
92 net.mpls.conf.eth0.input=1
93 net.mpls.conf.eth1.input=1
94 net.mpls.conf.eth2.input=1
95 net.mpls.platform_labels=100000
97 Create a new file `/etc/modules-load.d/mpls.conf` with the following content:
99 # Load MPLS Kernel Modules
103 **Reboot** or use `sysctl` to apply the same config to the running system
105 ### Install Service files
106 install -p -m 644 redhat/zebra.service /usr/lib/systemd/system/zebra.service
107 install -p -m 644 redhat/isisd.service /usr/lib/systemd/system/isisd.service
108 install -p -m 644 redhat/ripd.service /usr/lib/systemd/system/ripd.service
109 install -p -m 644 redhat/ospfd.service /usr/lib/systemd/system/ospfd.service
110 install -p -m 644 redhat/bgpd.service /usr/lib/systemd/system/bgpd.service
111 install -p -m 644 redhat/ospf6d.service /usr/lib/systemd/system/ospf6d.service
112 install -p -m 644 redhat/ripngd.service /usr/lib/systemd/system/ripngd.service
113 install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/pimd.service
114 install -p -m 644 redhat/pimd.service /usr/lib/systemd/system/ldpd.service
115 install -p -m 644 redhat/frr.sysconfig /etc/sysconfig/frr
116 install -p -m 644 redhat/frr.logrotate /etc/logrotate.d/frr
118 ### Register the systemd files
119 systemctl preset zebra.service
120 systemctl preset ripd.service
121 systemctl preset ospfd.service
122 systemctl preset bgpd.service
123 systemctl preset ospf6d.service
124 systemctl preset ripngd.service
125 systemctl preset pimd.service
126 systemctl preset ldpd.service
128 ### Enable required daemons at startup
129 Only enable zebra and the daemons which are needed for your setup
131 systemctl enable zebra
132 systemctl enable ospfd
133 systemctl enable bgpd
134 [...] etc (as needed)