]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Ubuntu1604.md
Merge remote-tracking branch 'origin/stable/3.0'
[mirror_frr.git] / doc / Building_FRR_on_Ubuntu1604.md
1 Building FRR on Ubuntu 16.04LTS from Git Source
2 ===============================================
3
4 - MPLS is not supported on `Ubuntu 16.04` with default kernel. MPLS requires
5 Linux Kernel 4.5 or higher (LDP can be built, but may have limited use
6 without MPLS)
7 For an updated Ubuntu Kernel, see
8 http://kernel.ubuntu.com/~kernel-ppa/mainline/
9
10 Install required packages
11 -------------------------
12
13 Add packages:
14
15 apt-get install git autoconf automake libtool make gawk libreadline-dev \
16 texinfo dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex \
17 python-pytest libc-ares-dev python3-dev libsystemd-dev
18
19 Get FRR, compile it and install it (from Git)
20 ---------------------------------------------
21
22 **This assumes you want to build and install FRR from source and not using
23 any packages**
24
25 ### Add frr groups and user
26
27 sudo groupadd -g 92 frr
28 sudo groupadd -r -g 85 frrvty
29 sudo adduser --system --ingroup frr --home /var/run/frr/ \
30 --gecos "FRR suite" --shell /sbin/nologin frr
31 sudo usermod -a -G frrvty frr
32
33 ### Download Source, configure and compile it
34 (You may prefer different options on configure statement. These are just
35 an example.)
36
37 git clone https://github.com/frrouting/frr.git frr
38 cd frr
39 ./bootstrap.sh
40 ./configure \
41 --prefix=/usr \
42 --enable-exampledir=/usr/share/doc/frr/examples/ \
43 --localstatedir=/var/run/frr \
44 --sbindir=/usr/lib/frr \
45 --sysconfdir=/etc/frr \
46 --enable-pimd \
47 --enable-watchfrr \
48 --enable-ospfclient=yes \
49 --enable-ospfapi=yes \
50 --enable-multipath=64 \
51 --enable-user=frr \
52 --enable-group=frr \
53 --enable-vty-group=frrvty \
54 --enable-configfile-mask=0640 \
55 --enable-logfile-mask=0640 \
56 --enable-rtadv \
57 --enable-tcp-zebra \
58 --enable-fpm \
59 --enable-systemd=yes \
60 --with-pkg-git-version \
61 --with-pkg-extra-version=-MyOwnFRRVersion
62 make
63 make check
64 sudo make install
65
66 ### Create empty FRR configuration files
67
68 sudo install -m 755 -o frr -g frr -d /var/log/frr
69 sudo install -m 775 -o frr -g frrvty -d /etc/frr
70 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf
71 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf
72 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf
73 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf
74 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf
75 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf
76 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf
77 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf
78 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf
79 sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf
80 sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf
81
82 ### Enable IP & IPv6 forwarding
83
84 Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
85 other settings)
86
87 # Uncomment the next line to enable packet forwarding for IPv4
88 net.ipv4.ip_forward=1
89
90 # Uncomment the next line to enable packet forwarding for IPv6
91 # Enabling this option disables Stateless Address Autoconfiguration
92 # based on Router Advertisements for this host
93 net.ipv6.conf.all.forwarding=1
94
95 ### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
96
97 Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line
98 equal to `net.mpls.conf.eth0.input` or each interface used with MPLS
99
100 # Enable MPLS Label processing on all interfaces
101 net.mpls.conf.eth0.input=1
102 net.mpls.conf.eth1.input=1
103 net.mpls.conf.eth2.input=1
104 net.mpls.platform_labels=100000
105
106 ### Add MPLS kernel modules
107
108 Add the following lines to `/etc/modules-load.d/modules.conf`:
109
110 # Load MPLS Kernel Modules
111 mpls-router
112 mpls-iptunnel
113
114 **Reboot** or use `sysctl -p` to apply the same config to the running system
115
116
117 ### Install the systemd service
118
119 sudo install -m 644 tools/frr.service /etc/systemd/system/frr.service
120 sudo install -m 644 cumulus/etc/default/frr /etc/default/frr
121 sudo install -m 644 cumulus/etc/frr/daemons /etc/frr/daemons
122 sudo install -m 644 cumulus/etc/frr/daemons.conf /etc/frr/daemons.conf
123 sudo install -m 644 cumulus/etc/frr/Frr.conf /etc/frr/Frr.conf
124 sudo install -m 644 -o frr -g frr cumulus/etc/frr/vtysh.conf /etc/frr/vtysh.conf
125
126 ### Enable daemons
127
128 Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd.
129 For example.
130
131 zebra=yes
132 bgpd=yes
133 ospfd=yes
134 ospf6d=yes
135 ripd=yes
136 ripngd=yes
137 isisd=yes
138
139 ### Enable the systemd serivce
140 - systemctl enable frr
141
142 ### Start the systemd service
143 - systemctl start frr
144 - use `systemctl status frr` to check its status.