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
14 git autoconf automake libtool make libreadline-dev texinfo \
15 pkg-config libpam0g-dev libjson-c-dev bison flex python3-pytest \
16 libc-ares-dev python3-dev python-ipaddress python3-sphinx \
17 install-info build-essential libsnmp-dev perl libcap-dev \
18 libelf-dev libprotobuf-c-dev protobuf-c-compiler
20 .. include:: building-libyang.rst
25 .. code-block:: console
27 sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
29 Building & Installing FRR
30 -------------------------
32 Add FRR user and groups
33 ^^^^^^^^^^^^^^^^^^^^^^^
35 .. code-block:: console
37 sudo groupadd -r -g 92 frr
38 sudo groupadd -r -g 85 frrvty
39 sudo adduser --system --ingroup frr --home /var/run/frr/ \
40 --gecos "FRR suite" --shell /sbin/nologin frr
41 sudo usermod -a -G frrvty frr
46 .. include:: include-compile.rst
48 Install FRR configuration files
49 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 .. code-block:: console
53 sudo install -m 775 -o frr -g frr -d /var/log/frr
54 sudo install -m 775 -o frr -g frrvty -d /etc/frr
55 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
56 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
57 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
58 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
63 Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
64 MPLS (if supported by your platform). If your platform does not support MPLS,
65 skip the MPLS related configuration in this section.
67 Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the
72 # Uncomment the next line to enable packet forwarding for IPv4
75 # Uncomment the next line to enable packet forwarding for IPv6
76 # Enabling this option disables Stateless Address Autoconfiguration
77 # based on Router Advertisements for this host
78 net.ipv6.conf.all.forwarding=1
80 Reboot or use ``sysctl -p`` to apply the same config to the running system.
82 Add MPLS kernel modules
83 """""""""""""""""""""""
87 MPLS is not supported on Ubuntu 16.04 with the default kernel. MPLS requires
88 kernel 4.5 or higher. LDPD can be built, but may have limited use without
89 MPLS. For an updated Ubuntu Kernel, see
90 http://kernel.ubuntu.com/~kernel-ppa/mainline/
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 Enable MPLS Forwarding
109 """"""""""""""""""""""
111 Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line
112 equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS.
116 # Enable MPLS Label processing on all interfaces
117 net.mpls.conf.eth0.input=1
118 net.mpls.conf.eth1.input=1
119 net.mpls.conf.eth2.input=1
120 net.mpls.platform_labels=100000
122 Install service files
123 ^^^^^^^^^^^^^^^^^^^^^
125 .. code-block:: console
127 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
128 sudo systemctl enable frr
133 Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
134 section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
135 as required by changing the value to ``yes``.
140 .. code-block:: console