]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Ubuntu1604.md
Merge branch 'stable/2.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
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 --groups frrvty --home /var/run/frr/ \
30 --gecos "FRR suite" --shell /sbin/nologin frr
31
32 ### Download Source, configure and compile it
33 (You may prefer different options on configure statement. These are just
34 an example.)
35
36 git clone https://github.com/frrouting/frr.git frr
37 cd frr
38 ./bootstrap.sh
39 ./configure \
40 --enable-exampledir=/usr/share/doc/frr/examples/ \
41 --localstatedir=/var/run/frr \
42 --sbindir=/usr/lib/frr \
43 --sysconfdir=/etc/frr \
44 --enable-pimd \
45 --enable-watchfrr \
46 --enable-ospfclient=yes \
47 --enable-ospfapi=yes \
48 --enable-multipath=64 \
49 --enable-user=frr \
50 --enable-group=frr \
51 --enable-vty-group=frrvty \
52 --enable-configfile-mask=0640 \
53 --enable-logfile-mask=0640 \
54 --enable-rtadv \
55 --enable-tcp-zebra \
56 --enable-fpm \
57 --with-pkg-git-version \
58 --with-pkg-extra-version=-MyOwnFRRVersion
59 make
60 make check
61 sudo make install
62
63 ### Create empty FRR configuration files
64
65 sudo mkdir /var/log/frr
66 sudo chown frr:fee /var/log/frr
67 sudo mkdir /etc/frr
68 sudo touch /etc/frr/etc/zebra.conf
69 sudo touch /etc/frr/etc/bgpd.conf
70 sudo touch /etc/frr/etc/ospfd.conf
71 sudo touch /etc/frr/etc/ospf6d.conf
72 sudo touch /etc/frr/etc/isisd.conf
73 sudo touch /etc/frr/etc/ripd.conf
74 sudo touch /etc/frr/etc/ripngd.conf
75 sudo touch /etc/frr/etc/pimd.conf
76 sudo touch /etc/frr/etc/ldpd.conf
77 sudo chown frr:frr /etc/frr/
78 sudo touch /etc/frr/etc/vtysh.conf
79 sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
80 sudo chmod 640 /etc/frr/*.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` to apply the same config to the running system