1Ubuntu 18.04 LTS 2================ 3 4This document describes installation from source. If you want to build a 5``deb``, see :ref:`packaging-debian`. 6 7Installing Dependencies 8----------------------- 9 10.. code-block:: console 11 12 sudo apt update 13 sudo apt-get install \ 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 libsystemd-dev python-ipaddress python3-sphinx \ 17 install-info build-essential libsystemd-dev libsnmp-dev perl libcap-dev 18 19.. include:: building-libyang.rst 20 21Protobuf 22^^^^^^^^ 23 24.. code-block:: console 25 26 sudo apt-get install protobuf-c-compiler libprotobuf-c-dev 27 28ZeroMQ 29^^^^^^ 30 31.. code-block:: console 32 33 sudo apt-get install libzmq5 libzmq3-dev 34 35Building & Installing FRR 36------------------------- 37 38Add FRR user and groups 39^^^^^^^^^^^^^^^^^^^^^^^ 40 41.. code-block:: console 42 43 sudo groupadd -r -g 92 frr 44 sudo groupadd -r -g 85 frrvty 45 sudo adduser --system --ingroup frr --home /var/run/frr/ \ 46 --gecos "FRR suite" --shell /sbin/nologin frr 47 sudo usermod -a -G frrvty frr 48 49Compile 50^^^^^^^ 51 52.. include:: include-compile.rst 53 54Install FRR configuration files 55^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 56 57.. code-block:: console 58 59 sudo install -m 775 -o frr -g frr -d /var/log/frr 60 sudo install -m 775 -o frr -g frrvty -d /etc/frr 61 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf 62 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf 63 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf 64 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons 65 66Tweak sysctls 67^^^^^^^^^^^^^ 68 69Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and 70MPLS (if supported by your platform). If your platform does not support MPLS, 71skip the MPLS related configuration in this section. 72 73Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the 74other settings): 75 76:: 77 78 # Uncomment the next line to enable packet forwarding for IPv4 79 net.ipv4.ip_forward=1 80 81 # Uncomment the next line to enable packet forwarding for IPv6 82 # Enabling this option disables Stateless Address Autoconfiguration 83 # based on Router Advertisements for this host 84 net.ipv6.conf.all.forwarding=1 85 86Reboot or use ``sysctl -p`` to apply the same config to the running system. 87 88Add MPLS kernel modules 89""""""""""""""""""""""" 90 91Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. To 92enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`: 93 94:: 95 96 # Load MPLS Kernel Modules 97 mpls_router 98 mpls_iptunnel 99 100 101And load the kernel modules on the running system: 102 103.. code-block:: console 104 105 sudo modprobe mpls-router mpls-iptunnel 106 107If the above command returns an error, you may need to install the appropriate 108or latest linux-modules-extra-<kernel-version>-generic package. For example 109``apt-get install linux-modules-extra-`uname -r`-generic`` 110 111Enable MPLS Forwarding 112"""""""""""""""""""""" 113 114Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line 115equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS. 116 117:: 118 119 # Enable MPLS Label processing on all interfaces 120 net.mpls.conf.eth0.input=1 121 net.mpls.conf.eth1.input=1 122 net.mpls.conf.eth2.input=1 123 net.mpls.platform_labels=100000 124 125Install service files 126^^^^^^^^^^^^^^^^^^^^^ 127 128.. code-block:: console 129 130 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service 131 sudo systemctl enable frr 132 133Enable daemons 134^^^^^^^^^^^^^^ 135 136Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the 137section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons 138as required by changing the value to ``yes``. 139 140Start FRR 141^^^^^^^^^ 142 143.. code-block:: shell 144 145 systemctl start frr 146