4 This document describes installation from source. If you want to build a
5 ``deb``, see :ref:`packaging-debian`.
7 Installing Dependencies
8 -----------------------
10 .. code-block:: console
13 sudo apt-get install \
14 git autoconf automake libtool make libreadline-dev texinfo \
15 pkg-config libpam0g-dev libjson-c-dev bison flex \
16 libc-ares-dev python3-dev python3-sphinx \
17 install-info build-essential libsnmp-dev perl libcap-dev \
18 libelf-dev libunwind-dev
20 .. include:: building-libunwind-note.rst
22 .. include:: building-libyang.rst
27 .. code-block:: console
29 sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
34 .. code-block:: console
36 sudo apt-get install libzmq5 libzmq3-dev
38 Building & Installing FRR
39 -------------------------
41 Add FRR user and groups
42 ^^^^^^^^^^^^^^^^^^^^^^^
44 .. code-block:: console
46 sudo groupadd -r -g 92 frr
47 sudo groupadd -r -g 85 frrvty
48 sudo adduser --system --ingroup frr --home /var/run/frr/ \
49 --gecos "FRR suite" --shell /sbin/nologin frr
50 sudo usermod -a -G frrvty frr
55 .. include:: include-compile.rst
57 Install FRR configuration files
58 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 .. code-block:: console
62 sudo install -m 775 -o frr -g frr -d /var/log/frr
63 sudo install -m 775 -o frr -g frrvty -d /etc/frr
64 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
65 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
66 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
67 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
72 Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
73 MPLS (if supported by your platform). If your platform does not support MPLS,
74 skip the MPLS related configuration in this section.
76 Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the
81 # Uncomment the next line to enable packet forwarding for IPv4
84 # Uncomment the next line to enable packet forwarding for IPv6
85 # Enabling this option disables Stateless Address Autoconfiguration
86 # based on Router Advertisements for this host
87 net.ipv6.conf.all.forwarding=1
89 Reboot or use ``sysctl -p`` to apply the same config to the running system.
91 Add MPLS kernel modules
92 """""""""""""""""""""""
94 Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. To
95 enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`:
99 # Load MPLS Kernel Modules
104 And load the kernel modules on the running system:
106 .. code-block:: console
108 sudo modprobe mpls-router mpls-iptunnel
110 If the above command returns an error, you may need to install the appropriate
111 or latest linux-modules-extra-<kernel-version>-generic package. For example
112 ``apt-get install linux-modules-extra-`uname -r`-generic``
114 Enable MPLS Forwarding
115 """"""""""""""""""""""
117 Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line
118 equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS.
122 # Enable MPLS Label processing on all interfaces
123 net.mpls.conf.eth0.input=1
124 net.mpls.conf.eth1.input=1
125 net.mpls.conf.eth2.input=1
126 net.mpls.platform_labels=100000
128 Install service files
129 ^^^^^^^^^^^^^^^^^^^^^
131 .. code-block:: console
133 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
134 sudo systemctl enable frr
139 Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
140 section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
141 as required by changing the value to ``yes``.
146 .. code-block:: shell