2 ========================================
7 - MPLS is not supported on ``Debian 8`` with default kernel. MPLS
8 requires Linux Kernel 4.5 or higher (LDP can be built, but may have
9 limited use without MPLS)
11 Install required packages
12 -------------------------
18 sudo apt-get install git autoconf automake libtool make gawk \
19 libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
20 python-pip libc-ares-dev python3-dev python3-sphinx
22 Install newer pytest (>3.0) from pip
26 sudo pip install pytest
28 .. include:: building-libyang.rst
30 Get FRR, compile it and install it (from Git)
31 ---------------------------------------------
33 **This assumes you want to build and install FRR from source and not
36 Add frr groups and user
37 ^^^^^^^^^^^^^^^^^^^^^^^
41 sudo addgroup --system --gid 92 frr
42 sudo addgroup --system --gid 85 frrvty
43 sudo adduser --system --ingroup frr --home /var/run/frr/ \
44 --gecos "FRR suite" --shell /bin/false frr
45 sudo usermod -a -G frrvty frr
47 Download Source, configure and compile it
48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 (You may prefer different options on configure statement. These are just
55 git clone https://github.com/frrouting/frr.git frr
59 --enable-exampledir=/usr/share/doc/frr/examples/ \
60 --localstatedir=/var/run/frr \
61 --sbindir=/usr/lib/frr \
62 --sysconfdir=/etc/frr \
63 --enable-multipath=64 \
66 --enable-vty-group=frrvty \
67 --enable-configfile-mask=0640 \
68 --enable-logfile-mask=0640 \
70 --with-pkg-git-version \
71 --with-pkg-extra-version=-MyOwnFRRVersion
76 Create empty FRR configuration files
77 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 sudo install -m 755 -o frr -g frr -d /var/log/frr
82 sudo install -m 775 -o frr -g frrvty -d /etc/frr
83 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
84 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
85 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
86 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
87 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
88 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
89 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
90 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
91 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
92 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
93 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
95 Enable IP & IPv6 forwarding
96 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
98 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
103 # Uncomment the next line to enable packet forwarding for IPv4
104 net.ipv4.ip_forward=1
106 # Uncomment the next line to enable packet forwarding for IPv6
107 # Enabling this option disables Stateless Address Autoconfiguration
108 # based on Router Advertisements for this host
109 net.ipv6.conf.all.forwarding=1
111 **Reboot** or use ``sysctl -p`` to apply the same config to the running
117 **Local state directory**
119 The local state directory must exist and have the correct permissions
120 applied for the frrouting daemons to start. In the above ./configure
121 example the local state directory is set to /var/run/frr
122 (--localstatedir=/var/run/frr) Debian considers /var/run/frr to be
123 temporary and this is removed after a reboot.
125 When using a different local state directory you need to create the new
126 directory and change the ownership to the frr user, for example:
131 chown frr /var/opt/frr
133 **Shared library error**
135 If you try and start any of the frrouting daemons you may see the below
136 error due to the frrouting shared library directory not being found:
140 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open shared object file: No such file or directory
142 The fix is to add the following line to /etc/ld.so.conf which will
143 continue to reference the library directory after the system reboots. To
144 load the library directory path immediately run the ldconfig command
145 after adding the line to the file eg:
149 echo include /usr/local/lib >> /etc/ld.so.conf