]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-ubuntu1804.rst
doc: remove non-existent configure option
[mirror_frr.git] / doc / developer / building-frr-for-ubuntu1804.rst
CommitLineData
f448f914
QY
1Ubuntu 18.04 LTS
2================
d4c798b3 3
ae999ff8
QY
4This document describes installation from source. If you want to build a
5``deb``, see :ref:`packaging-debian`.
f448f914 6
ae999ff8
QY
7Installing Dependencies
8-----------------------
d4c798b3 9
ae999ff8 10.. code-block:: console
d4c798b3 11
ae999ff8 12 sudo apt update
f448f914 13 sudo apt-get install \
7d9a2e6d 14 git autoconf automake libtool make libreadline-dev texinfo \
77f3acb4
CH
15 pkg-config libpam0g-dev libjson-c-dev bison flex \
16 libc-ares-dev python3-dev python3-sphinx \
ab140d61 17 install-info build-essential libsnmp-dev perl libcap-dev \
afb8fe93
DL
18 libelf-dev libunwind-dev
19
20.. include:: building-libunwind-note.rst
d4c798b3 21
fc5a4adc
RW
22.. include:: building-libyang.rst
23
47f64e34 24Protobuf
ae999ff8 25^^^^^^^^
47f64e34 26
ae999ff8 27.. code-block:: console
d0648b3e 28
ae999ff8 29 sudo apt-get install protobuf-c-compiler libprotobuf-c-dev
47f64e34
JO
30
31ZeroMQ
ae999ff8 32^^^^^^
d0648b3e 33
ae999ff8 34.. code-block:: console
47f64e34 35
ae999ff8 36 sudo apt-get install libzmq5 libzmq3-dev
d4c798b3 37
ae999ff8
QY
38Building & Installing FRR
39-------------------------
d4c798b3 40
ae999ff8 41Add FRR user and groups
75ca3b11 42^^^^^^^^^^^^^^^^^^^^^^^
d4c798b3 43
ae999ff8 44.. code-block:: console
d4c798b3 45
79871dbf 46 sudo groupadd -r -g 92 frr
f448f914
QY
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
d4c798b3 51
140b0a5e
JO
52Compile
53^^^^^^^
54
ae999ff8 55.. include:: include-compile.rst
d4c798b3 56
ae999ff8
QY
57Install FRR configuration files
58^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d5c82832 59
ae999ff8 60.. code-block:: console
f448f914 61
ae999ff8 62 sudo install -m 775 -o frr -g frr -d /var/log/frr
f448f914 63 sudo install -m 775 -o frr -g frrvty -d /etc/frr
ae999ff8
QY
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
d5c82832 68
ae999ff8
QY
69Tweak sysctls
70^^^^^^^^^^^^^
d5c82832 71
ae999ff8
QY
72Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
73MPLS (if supported by your platform). If your platform does not support MPLS,
74skip the MPLS related configuration in this section.
d4c798b3 75
f448f914
QY
76Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the
77other settings):
d4c798b3
MW
78
79::
80
f448f914
QY
81 # Uncomment the next line to enable packet forwarding for IPv4
82 net.ipv4.ip_forward=1
d4c798b3 83
f448f914
QY
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
d4c798b3 88
ae999ff8
QY
89Reboot or use ``sysctl -p`` to apply the same config to the running system.
90
a500c91a 91Add MPLS kernel modules
ae999ff8 92"""""""""""""""""""""""
a500c91a 93
f448f914
QY
94Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. To
95enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`:
a500c91a
JO
96
97::
98
f448f914
QY
99 # Load MPLS Kernel Modules
100 mpls_router
101 mpls_iptunnel
a500c91a 102
ae999ff8
QY
103
104And load the kernel modules on the running system:
105
106.. code-block:: console
107
108 sudo modprobe mpls-router mpls-iptunnel
a500c91a 109
44f3760c 110If the above command returns an error, you may need to install the appropriate
111or latest linux-modules-extra-<kernel-version>-generic package. For example
112``apt-get install linux-modules-extra-`uname -r`-generic``
113
bd938314 114Enable MPLS Forwarding
ae999ff8 115""""""""""""""""""""""
d4c798b3 116
f448f914
QY
117Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line
118equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS.
d4c798b3
MW
119
120::
121
f448f914
QY
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
d4c798b3 127
ae999ff8
QY
128Install service files
129^^^^^^^^^^^^^^^^^^^^^
d4c798b3 130
ae999ff8 131.. code-block:: console
d4c798b3 132
f448f914 133 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
ae999ff8 134 sudo systemctl enable frr
d4c798b3
MW
135
136Enable daemons
75ca3b11 137^^^^^^^^^^^^^^
d4c798b3 138
ae999ff8
QY
139Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
140section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons
141as required by changing the value to ``yes``.
d4c798b3 142
ae999ff8
QY
143Start FRR
144^^^^^^^^^
d4c798b3 145
f448f914
QY
146.. code-block:: shell
147
148 systemctl start frr