]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_Ubuntu1604.md
doc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line...
[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
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/freerangerouting/frr.git frr
37 cd frr
38 git checkout stable/2.0
39 ./bootstrap.sh
40 ./configure \
41 --enable-exampledir=/usr/share/doc/frr/examples/ \
42 --localstatedir=/var/run/frr \
43 --sbindir=/usr/lib/frr \
44 --sysconfdir=/etc/frr \
45 --enable-pimd \
46 --enable-watchfrr \
47 --enable-ospfclient=yes \
48 --enable-ospfapi=yes \
49 --enable-multipath=64 \
50 --enable-user=frr \
51 --enable-group=frr \
52 --enable-vty-group=frrvty \
53 --enable-configfile-mask=0640 \
54 --enable-logfile-mask=0640 \
55 --enable-rtadv \
56 --enable-tcp-zebra \
57 --enable-fpm \
58 --enable-ldpd \
59 --with-pkg-git-version \
60 --with-pkg-extra-version=-MyOwnFRRVersion
61 make
62 make check
63 sudo make install
64
65 ### Create empty FRR configuration files
66
67 sudo mkdir /var/log/frr
68 sudo chown frr:fee /var/log/frr
69 sudo mkdir /etc/frr
70 sudo touch /etc/frr/etc/zebra.conf
71 sudo touch /etc/frr/etc/bgpd.conf
72 sudo touch /etc/frr/etc/ospfd.conf
73 sudo touch /etc/frr/etc/ospf6d.conf
74 sudo touch /etc/frr/etc/isisd.conf
75 sudo touch /etc/frr/etc/ripd.conf
76 sudo touch /etc/frr/etc/ripngd.conf
77 sudo touch /etc/frr/etc/pimd.conf
78 sudo touch /etc/frr/etc/ldpd.conf
79 sudo chown frr:frr /etc/frr/
80 sudo touch /etc/frr/etc/vtysh.conf
81 sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
82 sudo chmod 640 /etc/frr/*.conf
83
84 ### Enable IP & IPv6 forwarding
85
86 Edit `/etc/sysctl.conf` and uncomment the following values (ignore the
87 other settings)
88
89 # Uncomment the next line to enable packet forwarding for IPv4
90 net.ipv4.ip_forward=1
91
92 # Uncomment the next line to enable packet forwarding for IPv6
93 # Enabling this option disables Stateless Address Autoconfiguration
94 # based on Router Advertisements for this host
95 net.ipv6.conf.all.forwarding=1
96
97 ### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
98
99 Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line
100 equal to `net.mpls.conf.eth0.input` or each interface used with MPLS
101
102 # Enable MPLS Label processing on all interfaces
103 net.mpls.conf.eth0.input=1
104 net.mpls.conf.eth1.input=1
105 net.mpls.conf.eth2.input=1
106 net.mpls.platform_labels=100000
107
108 ### Add MPLS kernel modules
109
110 Add the following lines to `/etc/modules-load.d/modules.conf`:
111
112 # Load MPLS Kernel Modules
113 mpls-router
114 mpls-iptunnel
115
116 **Reboot** or use `sysctl` to apply the same config to the running system