For example, I will install FRRouting on Ubuntu 18.04
Switch to root user:
sudo -i
Install the necessary components:
apt update
apt-get install \
git autoconf automake libtool make libreadline-dev texinfo \
pkg-config libpam0g-dev libjson-c-dev bison flex \
libc-ares-dev python3-dev python3-sphinx \
install-info build-essential libsnmp-dev perl libcap-dev \
libelf-dev
Install libyang:
apt install cmake libpcre2-dev
git clone https://github.com/CESNET/libyang.git
cd libyang
git checkout v2.0.0
mkdir build; cd build
cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr -D CMAKE_BUILD_TYPE:String="Release" ..
make
make install
Install Protobuf:
apt-get install protobuf-c-compiler libprotobuf-c-dev
Install ZeroMQ:
apt-get install libzmq5 libzmq3-dev
Create a system user and group for FRR:
groupadd -r -g 92 frr
groupadd -r -g 85 frrvty
adduser --system --ingroup frr --home /var/run/frr/ --gecos "FRR suite" --shell /sbin/nologin frr
usermod -a -G frrvty frr
Let’s install FRR:
git clone https://github.com/frrouting/frr.git frr
cd frr
./bootstrap.sh
./configure \
--prefix=/usr \
--includedir=\${prefix}/include \
--bindir=\${prefix}/bin \
--sbindir=\${prefix}/lib/frr \
--libdir=\${prefix}/lib/frr \
--libexecdir=\${prefix}/lib/frr \
--localstatedir=/var/run/frr \
--sysconfdir=/etc/frr \
--with-moduledir=\${prefix}/lib/frr/modules \
--with-libyang-pluginsdir=\${prefix}/lib/frr/libyang_plugins \
--enable-configfile-mask=0640 \
--enable-logfile-mask=0640 \
--enable-snmp=agentx \
--enable-multipath=64 \
--enable-user=frr \
--enable-group=frr \
--enable-vty-group=frrvty \
--with-pkg-git-version \
--with-pkg-extra-version=-MyOwnFRRVersion
make
make install
Let’s install the configuration files:
install -m 775 -o frr -g frr -d /var/log/frr
install -m 775 -o frr -g frrvty -d /etc/frr
install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
Allow packet forwarding for IPv4 and optionally for IPv6:
nano /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
sysctl -p
Install the service file:
install -m 644 tools/frr.service /etc/systemd/system/frr.service
systemctl enable frr
Load MPLS kernel modules:
modprobe mpls-router mpls-iptunnel
And also we will specify them in the /etc/modules-load.d/modules.conf file so that they are launched when the operating system starts:
mpls_router
mpls_iptunnel
Let’s indicate the interfaces that use MPLS:
nano /etc/sysctl.conf
net.mpls.conf.eth0.input=1
net.mpls.conf.eth1.input=1
net.mpls.platform_labels=100000
sysctl -p
Let’s indicate “yes” next to the required daemons to activate them:
nano /etc/frr/daemons
Now you can start FRR:
systemctl start frr
See also my article:
Installing Quagga on Ubuntu Server 18