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 \
23 perl-XML-LibXML python-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
47 --sbindir=/usr/lib/frr \
48 --sysconfdir=/etc/frr \
49 --libdir=/usr/lib/frr \
50 --libexecdir=/usr/lib/frr \
51 --localstatedir=/var/run/frr \
52 --with-moduledir=/usr/lib/frr/modules \
54 --enable-snmp=agentx \
55 --enable-multipath=64 \
56 --enable-ospfclient=yes \
57 --enable-ospfapi=yes \
60 --enable-vty-group=frrvt \
62 --disable-exampledir \
70 --with-pkg-git-version \
71 --with-pkg-extra-version=-MyOwnFRRVersion
76 ### Create empty FRR configuration files
77 sudo mkdir /var/log/frr
79 sudo touch /etc/frr/zebra.conf
80 sudo touch /etc/frr/bgpd.conf
81 sudo touch /etc/frr/ospfd.conf
82 sudo touch /etc/frr/ospf6d.conf
83 sudo touch /etc/frr/isisd.conf
84 sudo touch /etc/frr/ripd.conf
85 sudo touch /etc/frr/ripngd.conf
86 sudo touch /etc/frr/pimd.conf
87 sudo touch /etc/frr/nhrpd.conf
88 sudo touch /etc/frr/eigrpd.conf
89 sudo touch /etc/frr/babeld.conf
90 sudo chown -R frr:frr /etc/frr/
91 sudo touch /etc/frr/vtysh.conf
92 sudo chown frr:frrvt /etc/frr/vtysh.conf
93 sudo chmod 640 /etc/frr/*.conf
95 ### Install daemon config file
96 sudo install -p -m 644 redhat/daemons /etc/frr/
97 sudo chown frr:frr /etc/frr/daemons
99 ### Edit /etc/frr/daemons as needed to select the required daemons
101 Look for the section with `watchfrr_enable=...` and `zebra=...` etc.
102 Enable the daemons as required by changing the value to `yes`
104 ### Enable IP & IPv6 forwarding
106 Create a new file `/etc/sysctl.d/90-routing-sysctl.conf` with the
111 # Routing: We need to forward packets
112 net.ipv4.conf.all.forwarding=1
113 net.ipv6.conf.all.forwarding=1
115 Load the modifed sysctl's on the system:
117 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
119 ### Install frr Service and redhat init files
120 sudo install -p -m 644 redhat/frr.service /usr/lib/systemd/system/frr.service
121 sudo install -p -m 755 redhat/frr.init /usr/lib/frr/frr
123 ### Register the systemd files
124 sudo systemctl preset frr.service
126 ### Enable required frr at startup
127 sudo systemctl enable frr
129 ### Reboot or start FRR manually
130 sudo systemctl start frr