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 libc-ares-dev python3-dev python3-pytest python3-sphinx build-essential \
14 libsnmp-dev libcap-dev libelf-dev libunwind-dev \
15 libprotobuf-c-dev protobuf-c-compiler
17 .. include:: building-libunwind-note.rst
19 .. include:: building-libyang.rst
21 Get FRR, compile it and install it (from Git)
22 ---------------------------------------------
24 **This assumes you want to build and install FRR from source and not
27 Add frr groups and user
28 ^^^^^^^^^^^^^^^^^^^^^^^
32 sudo addgroup --system --gid 92 frr
33 sudo addgroup --system --gid 85 frrvty
34 sudo adduser --system --ingroup frr --home /var/opt/frr/ \
35 --gecos "FRR suite" --shell /bin/false frr
36 sudo usermod -a -G frrvty frr
38 Download Source, configure and compile it
39 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41 (You may prefer different options on configure statement. These are just
46 git clone https://github.com/frrouting/frr.git frr
50 --localstatedir=/var/opt/frr \
51 --sbindir=/usr/lib/frr \
52 --sysconfdir=/etc/frr \
53 --enable-multipath=64 \
56 --enable-vty-group=frrvty \
57 --enable-configfile-mask=0640 \
58 --enable-logfile-mask=0640 \
60 --with-pkg-git-version \
61 --with-pkg-extra-version=-MyOwnFRRVersion
66 Create empty FRR configuration files
67 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71 sudo install -m 755 -o frr -g frr -d /var/log/frr
72 sudo install -m 755 -o frr -g frr -d /var/opt/frr
73 sudo install -m 775 -o frr -g frrvty -d /etc/frr
74 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
75 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
76 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
77 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
80 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
81 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
82 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
83 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
84 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
86 Enable IP & IPv6 forwarding
87 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the
94 # Uncomment the next line to enable packet forwarding for IPv4
97 # Uncomment the next line to enable packet forwarding for IPv6
98 # Enabling this option disables Stateless Address Autoconfiguration
99 # based on Router Advertisements for this host
100 net.ipv6.conf.all.forwarding=1
102 **Reboot** or use ``sysctl -p`` to apply the same config to the running
111 If you try and start any of the frrouting daemons you may see the below
112 error due to the frrouting shared library directory not being found:
116 ./zebra: error while loading shared libraries: libfrr.so.0: cannot open
117 shared object file: No such file or directory
119 The fix is to add the following line to /etc/ld.so.conf which will
120 continue to reference the library directory after the system reboots. To
121 load the library directory path immediately run the ldconfig command
122 after adding the line to the file eg:
126 echo include /usr/local/lib >> /etc/ld.so.conf