]>
Commit | Line | Data |
---|---|---|
650c6322 QY |
1 | Ubuntu 16.04 LTS |
2 | ================ | |
278fb111 | 3 | |
650c6322 QY |
4 | This document describes installation from source. If you want to build a |
5 | ``deb``, see :ref:`packaging-debian`. | |
eb651bbc | 6 | |
650c6322 QY |
7 | Installing Dependencies |
8 | ----------------------- | |
278fb111 | 9 | |
650c6322 | 10 | .. code-block:: console |
d1890d04 | 11 | |
650c6322 | 12 | apt-get update |
b0252580 | 13 | 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 \ |
ab140d61 DL |
16 | libc-ares-dev python3-dev python-ipaddress python3-sphinx \ |
17 | install-info build-essential libsnmp-dev perl libcap-dev \ | |
5b08f6f9 | 18 | libelf-dev libprotobuf-c-dev protobuf-c-compiler |
eb651bbc | 19 | |
fc5a4adc RW |
20 | .. include:: building-libyang.rst |
21 | ||
5b08f6f9 PS |
22 | Protobuf |
23 | ^^^^^^^^ | |
24 | ||
25 | .. code-block:: console | |
26 | ||
27 | sudo apt-get install protobuf-c-compiler libprotobuf-c-dev | |
28 | ||
650c6322 QY |
29 | Building & Installing FRR |
30 | ------------------------- | |
d1890d04 | 31 | |
650c6322 | 32 | Add FRR user and groups |
75ca3b11 | 33 | ^^^^^^^^^^^^^^^^^^^^^^^ |
278fb111 | 34 | |
650c6322 | 35 | .. code-block:: console |
278fb111 | 36 | |
650c6322 QY |
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 | |
278fb111 | 42 | |
650c6322 QY |
43 | Compile |
44 | ^^^^^^^ | |
d1890d04 | 45 | |
650c6322 | 46 | .. include:: include-compile.rst |
eb651bbc | 47 | |
650c6322 QY |
48 | Install FRR configuration files |
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
d1890d04 | 50 | |
650c6322 | 51 | .. code-block:: console |
d1890d04 | 52 | |
650c6322 QY |
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 | |
278fb111 | 59 | |
650c6322 QY |
60 | Tweak sysctls |
61 | ^^^^^^^^^^^^^ | |
62 | ||
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. | |
66 | ||
67 | Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the | |
68 | other settings): | |
278fb111 | 69 | |
d1890d04 QY |
70 | :: |
71 | ||
650c6322 QY |
72 | # Uncomment the next line to enable packet forwarding for IPv4 |
73 | net.ipv4.ip_forward=1 | |
74 | ||
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 | |
278fb111 | 79 | |
650c6322 | 80 | Reboot or use ``sysctl -p`` to apply the same config to the running system. |
278fb111 | 81 | |
650c6322 QY |
82 | Add MPLS kernel modules |
83 | """"""""""""""""""""""" | |
84 | ||
85 | .. warning:: | |
86 | ||
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/ | |
278fb111 | 91 | |
650c6322 QY |
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`: | |
d1890d04 QY |
94 | |
95 | :: | |
278fb111 | 96 | |
650c6322 QY |
97 | # Load MPLS Kernel Modules |
98 | mpls_router | |
99 | mpls_iptunnel | |
278fb111 | 100 | |
d1890d04 | 101 | |
650c6322 | 102 | And load the kernel modules on the running system: |
278fb111 | 103 | |
650c6322 | 104 | .. code-block:: console |
278fb111 | 105 | |
650c6322 | 106 | sudo modprobe mpls-router mpls-iptunnel |
278fb111 | 107 | |
650c6322 QY |
108 | Enable MPLS Forwarding |
109 | """""""""""""""""""""" | |
8399fd9d | 110 | |
650c6322 QY |
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. | |
8399fd9d | 113 | |
d1890d04 | 114 | :: |
8399fd9d | 115 | |
650c6322 QY |
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 | |
8399fd9d | 121 | |
650c6322 QY |
122 | Install service files |
123 | ^^^^^^^^^^^^^^^^^^^^^ | |
d1890d04 | 124 | |
650c6322 | 125 | .. code-block:: console |
8399fd9d | 126 | |
650c6322 QY |
127 | sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service |
128 | sudo systemctl enable frr | |
8399fd9d | 129 | |
650c6322 QY |
130 | Enable daemons |
131 | ^^^^^^^^^^^^^^ | |
8399fd9d | 132 | |
650c6322 QY |
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``. | |
d1890d04 | 136 | |
650c6322 QY |
137 | Start FRR |
138 | ^^^^^^^^^ | |
d1890d04 | 139 | |
650c6322 | 140 | .. code-block:: console |
8399fd9d | 141 | |
650c6322 | 142 | systemctl start frr |