1 Building FRR on CentOS 7 from Git Source
2 ========================================
4 (As an alternative to this installation, you may prefer to create a FRR
5 rpm package yourself and install that package instead. See instructions
6 in redhat/README.rpm_build.md on how to build a rpm package)
11 - MPLS is not supported on `CentOS 7` with default kernel. MPLS requires
12 Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
15 Install required packages
16 -------------------------
20 sudo yum install git autoconf automake libtool make gawk \
21 readline-devel texinfo net-snmp-devel groff pkgconfig \
22 json-c-devel pam-devel bison flex pytest c-ares-devel \
25 Get FRR, compile it and install it (from Git)
26 ---------------------------------------------
28 **This assumes you want to build and install FRR from source and not using
31 ### Add frr groups and user
33 sudo groupadd -g 92 frr
34 sudo groupadd -r -g 85 frrvt
35 sudo useradd -u 92 -g 92 -M -r -G frrvt -s /sbin/nologin \
36 -c "FRR FRRouting suite" -d /var/run/frr frr
38 ### Download Source, configure and compile it
39 (You may prefer different options on configure statement. These are just
42 git clone https://github.com/frrouting/frr.git frr
44 git checkout stable/3.0
48 --sbindir=/usr/lib/frr \
49 --sysconfdir=/etc/frr \
50 --libdir=/usr/lib/frr \
51 --libexecdir=/usr/lib/frr \
52 --localstatedir=/var/run/frr \
53 --with-moduledir=/usr/lib/frr/modules \
55 --enable-snmp=agentx \
56 --enable-multipath=64 \
57 --enable-ospfclient=yes \
58 --enable-ospfapi=yes \
61 --enable-vty-group=frrvt \
63 --disable-exampledir \
68 --with-pkg-git-version \
69 --with-pkg-extra-version=-MyOwnFRRVersion
74 ### Create empty FRR configuration files
75 sudo mkdir /var/log/frr
77 sudo touch /etc/frr/zebra.conf
78 sudo touch /etc/frr/bgpd.conf
79 sudo touch /etc/frr/ospfd.conf
80 sudo touch /etc/frr/ospf6d.conf
81 sudo touch /etc/frr/isisd.conf
82 sudo touch /etc/frr/ripd.conf
83 sudo touch /etc/frr/ripngd.conf
84 sudo touch /etc/frr/pimd.conf
85 sudo touch /etc/frr/nhrpd.conf
86 sudo chown -R frr:frr /etc/frr/
87 sudo touch /etc/frr/vtysh.conf
88 sudo chown frr:frrvt /etc/frr/vtysh.conf
89 sudo chmod 640 /etc/frr/*.conf
91 ### Install daemon config file
92 sudo install -p -m 644 redhat/daemons /etc/frr/
93 sudo chown frr:frr /etc/frr/daemons
95 ### Edit /etc/frr/daemons as needed to select the required daemons
97 Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
98 Enable the daemons as required by changing the value to `yes`
100 ### Enable IP & IPv6 forwarding
102 Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
107 # Routing: We need to forward packets
108 net.ipv4.conf.all.forwarding=1
109 net.ipv6.conf.all.forwarding=1
111 Load the modifed sysctl's on the system:
113 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
115 ### Install frr Service and redhat init files
116 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
117 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
119 ### Register the systemd files
120 sudo systemctl preset frr.service
122 ### Enable required frr at startup
123 sudo systemctl enable frr
125 ### Reboot or start FRR manually
126 sudo systemctl start frr