1 Building FRR on Debian 8 from Git Source
2 ========================================
7 - MPLS is not supported on `Debian 8` with default kernel. MPLS requires
8 Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
11 Install required packages
12 -------------------------
16 sudo apt-get install git autoconf automake libtool make gawk \
17 libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
18 python-pip libc-ares-dev python3-dev
20 Install newer pytest (>3.0) from pip
22 sudo pip install pytest
24 Get FRR, compile it and install it (from Git)
25 ---------------------------------------------
27 **This assumes you want to build and install FRR from source and not using
30 ### Add frr groups and user
32 sudo addgroup --system --gid 92 frr
33 sudo addgroup --system --gid 85 frrvty
34 sudo adduser --system --ingroup frr --home /var/run/frr/ \
35 --gecos "FRR suite" --shell /bin/false frr
36 sudo usermod -a -G frrvty 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
46 --enable-exampledir=/usr/share/doc/frr/examples/ \
47 --localstatedir=/var/run/frr \
48 --sbindir=/usr/lib/frr \
49 --sysconfdir=/etc/frr \
54 --enable-ospfclient=yes \
55 --enable-ospfapi=yes \
56 --enable-multipath=64 \
59 --enable-vty-group=frrvty \
60 --enable-configfile-mask=0640 \
61 --enable-logfile-mask=0640 \
65 --with-pkg-git-version \
66 --with-pkg-extra-version=-MyOwnFRRVersion
71 ### Create empty FRR configuration files
73 sudo install -m 755 -o frr -g frr -d /var/log/frr
74 sudo install -m 775 -o frr -g frrvty -d /etc/frr
75 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
76 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
77 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
80 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
81 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
82 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
83 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
84 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
85 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
87 ### Enable IP & IPv6 forwarding
89 Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
92 # Uncomment the next line to enable packet forwarding for IPv4
95 # Uncomment the next line to enable packet forwarding for IPv6
96 # Enabling this option disables Stateless Address Autoconfiguration
97 # based on Router Advertisements for this host
98 net.ipv6.conf.all.forwarding=1
100 **Reboot** or use `sysctl -p` to apply the same config to the running system
104 **Local state directory**
106 The local state directory must exist and have the correct permissions applied
107 for the frrouting daemons to start. In the above ./configure example the
108 local state directory is set to /var/run/frr (--localstatedir=/var/run/frr)
109 Debian considers /var/run/frr to be temporary and this is removed after a
112 When using a different local state directory you need to create the new
113 directory and change the ownership to the frr user, for example:
116 chown frr /var/opt/frr
118 **Shared library error**
120 If you try and start any of the frrouting daemons you may see the below error
121 due to the frrouting shared library directory not being found:
123 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
125 The fix is to add the following line to /etc/ld.so.conf which will continue to
126 reference the library directory after the system reboots. To load the library
127 directory path immediately run the ldconfig command after adding the line to
130 echo include /usr/local/lib >> /etc/ld.so.conf