]>
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 \ |
650c6322 | 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 |
eb651bbc | 18 | |
fc5a4adc RW |
19 | .. include:: building-libyang.rst |
20 | ||
650c6322 QY |
21 | Building & Installing FRR |
22 | ------------------------- | |
d1890d04 | 23 | |
650c6322 | 24 | Add FRR user and groups |
75ca3b11 | 25 | ^^^^^^^^^^^^^^^^^^^^^^^ |
278fb111 | 26 | |
650c6322 | 27 | .. code-block:: console |
278fb111 | 28 | |
650c6322 QY |
29 | sudo groupadd -r -g 92 frr |
30 | sudo groupadd -r -g 85 frrvty | |
31 | sudo adduser --system --ingroup frr --home /var/run/frr/ \ | |
32 | --gecos "FRR suite" --shell /sbin/nologin frr | |
33 | sudo usermod -a -G frrvty frr | |
278fb111 | 34 | |
650c6322 QY |
35 | Compile |
36 | ^^^^^^^ | |
d1890d04 | 37 | |
650c6322 | 38 | .. include:: include-compile.rst |
eb651bbc | 39 | |
650c6322 QY |
40 | Install FRR configuration files |
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
d1890d04 | 42 | |
650c6322 | 43 | .. code-block:: console |
d1890d04 | 44 | |
650c6322 QY |
45 | sudo install -m 775 -o frr -g frr -d /var/log/frr |
46 | sudo install -m 775 -o frr -g frrvty -d /etc/frr | |
47 | sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf | |
48 | sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf | |
49 | sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf | |
50 | sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons | |
278fb111 | 51 | |
650c6322 QY |
52 | Tweak sysctls |
53 | ^^^^^^^^^^^^^ | |
54 | ||
55 | Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and | |
56 | MPLS (if supported by your platform). If your platform does not support MPLS, | |
57 | skip the MPLS related configuration in this section. | |
58 | ||
59 | Edit :file:`/etc/sysctl.conf` and uncomment the following values (ignore the | |
60 | other settings): | |
278fb111 | 61 | |
d1890d04 QY |
62 | :: |
63 | ||
650c6322 QY |
64 | # Uncomment the next line to enable packet forwarding for IPv4 |
65 | net.ipv4.ip_forward=1 | |
66 | ||
67 | # Uncomment the next line to enable packet forwarding for IPv6 | |
68 | # Enabling this option disables Stateless Address Autoconfiguration | |
69 | # based on Router Advertisements for this host | |
70 | net.ipv6.conf.all.forwarding=1 | |
278fb111 | 71 | |
650c6322 | 72 | Reboot or use ``sysctl -p`` to apply the same config to the running system. |
278fb111 | 73 | |
650c6322 QY |
74 | Add MPLS kernel modules |
75 | """"""""""""""""""""""" | |
76 | ||
77 | .. warning:: | |
78 | ||
79 | MPLS is not supported on Ubuntu 16.04 with the default kernel. MPLS requires | |
80 | kernel 4.5 or higher. LDPD can be built, but may have limited use without | |
81 | MPLS. For an updated Ubuntu Kernel, see | |
82 | http://kernel.ubuntu.com/~kernel-ppa/mainline/ | |
278fb111 | 83 | |
650c6322 QY |
84 | Ubuntu 18.04 ships with kernel 4.15. MPLS modules are present by default. To |
85 | enable, add the following lines to :file:`/etc/modules-load.d/modules.conf`: | |
d1890d04 QY |
86 | |
87 | :: | |
278fb111 | 88 | |
650c6322 QY |
89 | # Load MPLS Kernel Modules |
90 | mpls_router | |
91 | mpls_iptunnel | |
278fb111 | 92 | |
d1890d04 | 93 | |
650c6322 | 94 | And load the kernel modules on the running system: |
278fb111 | 95 | |
650c6322 | 96 | .. code-block:: console |
278fb111 | 97 | |
650c6322 | 98 | sudo modprobe mpls-router mpls-iptunnel |
278fb111 | 99 | |
650c6322 QY |
100 | Enable MPLS Forwarding |
101 | """""""""""""""""""""" | |
8399fd9d | 102 | |
650c6322 QY |
103 | Edit :file:`/etc/sysctl.conf` and the following lines. Make sure to add a line |
104 | equal to :file:`net.mpls.conf.eth0.input` for each interface used with MPLS. | |
8399fd9d | 105 | |
d1890d04 | 106 | :: |
8399fd9d | 107 | |
650c6322 QY |
108 | # Enable MPLS Label processing on all interfaces |
109 | net.mpls.conf.eth0.input=1 | |
110 | net.mpls.conf.eth1.input=1 | |
111 | net.mpls.conf.eth2.input=1 | |
112 | net.mpls.platform_labels=100000 | |
8399fd9d | 113 | |
650c6322 QY |
114 | Install service files |
115 | ^^^^^^^^^^^^^^^^^^^^^ | |
d1890d04 | 116 | |
650c6322 | 117 | .. code-block:: console |
8399fd9d | 118 | |
650c6322 QY |
119 | sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service |
120 | sudo systemctl enable frr | |
8399fd9d | 121 | |
650c6322 QY |
122 | Enable daemons |
123 | ^^^^^^^^^^^^^^ | |
8399fd9d | 124 | |
650c6322 QY |
125 | Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the |
126 | section with ``watchfrr_enable=...`` and ``zebra=...`` etc. Enable the daemons | |
127 | as required by changing the value to ``yes``. | |
d1890d04 | 128 | |
650c6322 QY |
129 | Start FRR |
130 | ^^^^^^^^^ | |
d1890d04 | 131 | |
650c6322 | 132 | .. code-block:: console |
8399fd9d | 133 | |
650c6322 | 134 | systemctl start frr |