1 Building FRR on Ubuntu 16.04LTS from Git Source
2 ===============================================
4 - MPLS is not supported on `Ubuntu 16.04` with default kernel. MPLS requires
5 Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
7 For an updated Ubuntu Kernel, see
8 http://kernel.ubuntu.com/~kernel-ppa/mainline/
10 Install required packages
11 -------------------------
15 apt-get install git autoconf automake libtool make gawk libreadline-dev \
16 texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
17 python-pytest libc-ares-dev python3-dev
19 Get FRR, compile it and install it (from Git)
20 ---------------------------------------------
22 **This assumes you want to build and install FRR from source and not using
25 ### Add frr groups and user
27 sudo groupadd -g 92 frr
28 sudo groupadd -r -g 85 frrvty
29 sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
30 --gecos "FRR suite" --shell /sbin/nologin frr
32 ### Download Source, configure and compile it
33 (You may prefer different options on configure statement. These are just
36 git clone https://github.com/frrouting/frr.git frr
40 --enable-exampledir=/usr/share/doc/frr/examples/ \
41 --localstatedir=/var/run/frr \
42 --sbindir=/usr/lib/frr \
43 --sysconfdir=/etc/frr \
46 --enable-ospfclient=yes \
47 --enable-ospfapi=yes \
48 --enable-multipath=64 \
51 --enable-vty-group=frrvty \
52 --enable-configfile-mask=0640 \
53 --enable-logfile-mask=0640 \
57 --with-pkg-git-version \
58 --with-pkg-extra-version=-MyOwnFRRVersion
63 ### Create empty FRR configuration files
65 sudo mkdir /var/log/frr
66 sudo chown frr:fee /var/log/frr
68 sudo touch /etc/frr/etc/zebra.conf
69 sudo touch /etc/frr/etc/bgpd.conf
70 sudo touch /etc/frr/etc/ospfd.conf
71 sudo touch /etc/frr/etc/ospf6d.conf
72 sudo touch /etc/frr/etc/isisd.conf
73 sudo touch /etc/frr/etc/ripd.conf
74 sudo touch /etc/frr/etc/ripngd.conf
75 sudo touch /etc/frr/etc/pimd.conf
76 sudo touch /etc/frr/etc/ldpd.conf
77 sudo chown frr:frr /etc/frr/
78 sudo touch /etc/frr/etc/vtysh.conf
79 sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
80 sudo chmod 640 /etc/frr/*.conf
82 ### Enable IP & IPv6 forwarding
84 Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
87 # Uncomment the next line to enable packet forwarding for IPv4
90 # Uncomment the next line to enable packet forwarding for IPv6
91 # Enabling this option disables Stateless Address Autoconfiguration
92 # based on Router Advertisements for this host
93 net.ipv6.conf.all.forwarding=1
95 ### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
97 Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line
98 equal to `net.mpls.conf.eth0.input` or each interface used with MPLS
100 # Enable MPLS Label processing on all interfaces
101 net.mpls.conf.eth0.input=1
102 net.mpls.conf.eth1.input=1
103 net.mpls.conf.eth2.input=1
104 net.mpls.platform_labels=100000
106 ### Add MPLS kernel modules
108 Add the following lines to `/etc/modules-load.d/modules.conf`:
110 # Load MPLS Kernel Modules
114 **Reboot** or use `sysctl` to apply the same config to the running system