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