2 ========================================
4 Install required packages
5 -------------------------
11 sudo apt-get install git autoconf automake libtool make \
12 libreadline-dev texinfo libjson-c-dev pkg-config bison flex \
13 python-pip libc-ares-dev python3-dev python-pytest python3-sphinx
15 Get FRR, compile it and install it (from Git)
16 ---------------------------------------------
18 **This assumes you want to build and install FRR from source and not
21 Add frr groups and user
22 ^^^^^^^^^^^^^^^^^^^^^^^
26 sudo addgroup --system --gid 92 frr
27 sudo addgroup --system --gid 85 frrvty
28 sudo adduser --system --ingroup frr --home /var/opt/frr/ \
29 --gecos "FRR suite" --shell /bin/false frr
30 sudo usermod -a -G frrvty frr
32 Download Source, configure and compile it
33 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 (You may prefer different options on configure statement. These are just
40 git clone https://github.com/frrouting/frr.git frr
42 git checkout stable/3.0
45 --enable-exampledir=/usr/share/doc/frr/examples/ \
46 --localstatedir=/var/opt/frr \
47 --sbindir=/usr/lib/frr \
48 --sysconfdir=/etc/frr \
53 --enable-ospfclient=yes \
54 --enable-ospfapi=yes \
55 --enable-multipath=64 \
58 --enable-vty-group=frrvty \
59 --enable-configfile-mask=0640 \
60 --enable-logfile-mask=0640 \
64 --with-pkg-git-version \
65 --with-pkg-extra-version=-MyOwnFRRVersion
70 Create empty FRR configuration files
71 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75 sudo install -m 755 -o frr -g frr -d /var/log/frr
76 sudo install -m 755 -o frr -g frr -d /var/opt/frr
77 sudo install -m 775 -o frr -g frrvty -d /etc/frr
78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
80 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
81 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
82 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
83 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
84 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
85 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
86 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
87 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
88 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
90 Enable IP & IPv6 forwarding
91 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
98 # Uncomment the next line to enable packet forwarding for IPv4
101 # Uncomment the next line to enable packet forwarding for IPv6
102 # Enabling this option disables Stateless Address Autoconfiguration
103 # based on Router Advertisements for this host
104 net.ipv6.conf.all.forwarding=1
106 **Reboot** or use ``sysctl -p`` to apply the same config to the running
115 If you try and start any of the frrouting daemons you may see the below
116 error due to the frrouting shared library directory not being found:
120 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
121 shared object file: No such file or directory
123 The fix is to add the following line to /etc/ld.so.conf which will
124 continue to reference the library directory after the system reboots. To
125 load the library directory path immediately run the ldconfig command
126 after adding the line to the file eg:
130 echo include /usr/local/lib >> /etc/ld.so.conf