]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_Ubuntu1604.md
doc: Add initial set of docs on building FRR on various Distributions
[mirror_frr.git] / doc / Building_FRR_on_Ubuntu1604.md
CommitLineData
278fb111
MW
1Building FRR on Ubuntu 12.04LTS from Git Source
2===============================================
3
4- MPLS is not supported on `Ubuntu 12.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 http://kernel.ubuntu.com/~kernel-ppa/mainline/
8
9Install required packages
10-------------------------
11
12Add packages:
13
14 apt-get install git autoconf automake libtool make gawk libreadline-dev texinfo \
15 dejagnu pkg-config libpam0g-dev libjson-c-dev bison flex python-pytest
16
17Get FRR, compile it and install it (from Git)
18---------------------------------------------
19
20**This assumes you want to build and install FRR from source and not using any packages**
21
22### Add frr groups and user
23
24 sudo groupadd -g 92 frr
25 sudo groupadd -r -g 85 frrvty
26 sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \
27 --gecos "FRR suite" --shell /sbin/nologin frr
28
29### Download Source, configure and compile it
30(You may prefer different options on configure statement. These are just an example.)
31
32 git clone https://github.com/freerangerouting/frr.git frr
33 cd frr
34 git checkout stable/2.0
35 ./bootstrap.sh
36 ./configure \
37 --enable-exampledir=/usr/share/doc/frr/examples/ \
38 --localstatedir=/var/run/frr \
39 --sbindir=/usr/lib/frr \
40 --sysconfdir=/etc/frr \
41 --enable-pimd \
42 --enable-watchfrr \
43 --enable-ospfclient=yes \
44 --enable-ospfapi=yes \
45 --enable-multipath=64 \
46 --enable-user=frr \
47 --enable-group=frr \
48 --enable-vty-group=frrvty \
49 --enable-configfile-mask=0640 \
50 --enable-logfile-mask=0640 \
51 --enable-rtadv \
52 --enable-tcp-zebra \
53 --enable-fpm \
54 --enable-ldpd \
55 --with-pkg-git-version \
56 --with-pkg-extra-version=-MyOwnFRRVersion
57 make
58 make check
59 sudo make install
60
61### Create empty FRR configuration files
62
63 sudo mkdir /var/log/frr
64 sudo chown frr:fee /var/log/frr
65 sudo mkdir /etc/frr
66 sudo touch /etc/frr/etc/zebra.conf
67 sudo touch /etc/frr/etc/bgpd.conf
68 sudo touch /etc/frr/etc/ospfd.conf
69 sudo touch /etc/frr/etc/ospf6d.conf
70 sudo touch /etc/frr/etc/isisd.conf
71 sudo touch /etc/frr/etc/ripd.conf
72 sudo touch /etc/frr/etc/ripngd.conf
73 sudo touch /etc/frr/etc/pimd.conf
74 sudo touch /etc/frr/etc/ldpd.conf
75 sudo chown frr:frr /etc/frr/
76 sudo touch /etc/frr/etc/vtysh.conf
77 sudo chown frr:frrvty /etc/frr/etc/vtysh.conf
78 sudo chmod 640 /etc/frr/*.conf
79
80### Enable IP & IPv6 forwarding
81
82Edit `/etc/sysctl.conf` and uncomment the following values (ignore the other settings)
83
84 # Uncomment the next line to enable packet forwarding for IPv4
85 net.ipv4.ip_forward=1
86
87 # Uncomment the next line to enable packet forwarding for IPv6
88 # Enabling this option disables Stateless Address Autoconfiguration
89 # based on Router Advertisements for this host
90 net.ipv6.conf.all.forwarding=1
91
92### Enable MPLS Forwarding (with Linux Kernel >= 4.5)
93
94Edit `/etc/sysctl.conf` and the following lines. Make sure to add a line equal to
95`net.mpls.conf.eth0.input` or each interface used with MPLS
96
97 # Enable MPLS Label processing on all interfaces
98 net.mpls.conf.eth0.input=1
99 net.mpls.conf.eth1.input=1
100 net.mpls.conf.eth2.input=1
101 net.mpls.platform_labels=100000
102
103### Add MPLS kernel modules
104
105Add the following lines to `/etc/modules-load.d/modules.conf`:
106
107 # Load MPLS Kernel Modules
108 mpls-router
109 mpls-iptunnel
110
111**Reboot** or use `sysctl` to apply the same config to the running system