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