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 \
20 .. include:: building-libyang.rst
25 .. code-block:: console
27 sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
32 .. code-block:: console
34 sudo apt-get install libzmq5 libzmq3-dev
36 Building & Installing FRR
37 -------------------------
39 Add FRR user and groups
40 ^^^^^^^^^^^^^^^^^^^^^^^
42 .. code-block:: console
44 sudo groupadd -r -g 92 frr
45 sudo groupadd -r -g 85 frrvty
46 sudo adduser --system --ingroup frr --home /var/run/frr/ \
47 --gecos "FRR suite" --shell /sbin/nologin frr
48 sudo usermod -a -G frrvty frr
53 .. include:: include-compile.rst
55 Install FRR configuration files
56 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
58 .. code-block:: console
60 sudo install -m 775 -o frr -g frr -d /var/log/frr
61 sudo install -m 775 -o frr -g frrvty -d /etc/frr
62 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
63 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
64 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
65 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
70 Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
71 MPLS (if supported by your platform). If your platform does not support MPLS,
72 skip the MPLS related configuration in this section.
74 Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the
79 # Uncomment the next line to enable packet forwarding for IPv4
82 # Uncomment the next line to enable packet forwarding for IPv6
83 # Enabling this option disables Stateless Address Autoconfiguration
84 # based on Router Advertisements for this host
85 net.ipv6.conf.all.forwarding=1
87 Reboot or use ``sysctl -p`` to apply the same config to the running system.
89 Add MPLS kernel modules
90 """""""""""""""""""""""
92 Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. To
93 enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`:
97 # Load MPLS Kernel Modules
102 And load the kernel modules on the running system:
104 .. code-block:: console
106 sudo modprobe mpls-router mpls-iptunnel
108 If the above command returns an error, you may need to install the appropriate
109 or latest linux-modules-extra-<kernel-version>-generic package. For example
110 ``apt-get install linux-modules-extra-`uname -r`-generic``
112 Enable MPLS Forwarding
113 """"""""""""""""""""""
115 Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line
116 equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS.
120 # Enable MPLS Label processing on all interfaces
121 net.mpls.conf.eth0.input=1
122 net.mpls.conf.eth1.input=1
123 net.mpls.conf.eth2.input=1
124 net.mpls.platform_labels=100000
126 Install service files
127 ^^^^^^^^^^^^^^^^^^^^^
129 .. code-block:: console
131 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
132 sudo systemctl enable frr
137 Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
138 section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
139 as required by changing the value to ``yes``.
144 .. code-block:: shell