]>
Commit | Line | Data |
---|---|---|
278fb111 MW |
1 | Building 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 | ||
9 | Install required packages | |
10 | ------------------------- | |
eb651bbc | 11 | |
278fb111 MW |
12 | Add packages: |
13 | ||
eb651bbc MW |
14 | apt-get install git autoconf automake libtool make gawk libreadline-dev \ |
15 | texinfo libpam0g-dev dejagnu libjson0 pkg-config libpam0g-dev \ | |
16 | libjson0-dev flex python-pytest | |
17 | ||
18 | Install newer bison from 14.04 package source (Ubuntu 12.04 package source | |
19 | is too old) | |
20 | ||
21 | mkdir builddir | |
22 | cd builddir | |
23 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc | |
24 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2 | |
25 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz | |
26 | tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 | |
27 | cd bison-3.0.2.dfsg/ | |
28 | tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz | |
29 | sudo apt-get build-dep bison | |
30 | debuild -b -uc -us | |
31 | cd .. | |
32 | sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb | |
33 | cd .. | |
34 | rm -rf builddir | |
278fb111 MW |
35 | |
36 | Install newer version of autoconf and automake: | |
37 | ||
eb651bbc MW |
38 | wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz |
39 | tar xvf autoconf-2.69.tar.gz | |
40 | cd autoconf-2.69 | |
41 | ./configure --prefix=/usr | |
42 | make | |
43 | sudo make install | |
44 | cd .. | |
45 | ||
46 | wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz | |
47 | tar xvf automake-1.15.tar.gz | |
48 | cd automake-1.15 | |
49 | ./configure --prefix=/usr | |
50 | make | |
51 | sudo make install | |
52 | cd .. | |
53 | ||
278fb111 MW |
54 | Get FRR, compile it and install it (from Git) |
55 | --------------------------------------------- | |
56 | ||
eb651bbc MW |
57 | **This assumes you want to build and install FRR from source and not using |
58 | any packages** | |
278fb111 MW |
59 | |
60 | ### Add frr groups and user | |
61 | ||
eb651bbc MW |
62 | sudo groupadd -g 92 frr |
63 | sudo groupadd -r -g 85 frrvty | |
64 | sudo adduser --system --ingroup frr --groups frrvty --home /var/run/frr/ \ | |
278fb111 MW |
65 | --gecos "FRR suite" --shell /sbin/nologin frr |
66 | ||
67 | ### Download Source, configure and compile it | |
eb651bbc MW |
68 | (You may prefer different options on configure statement. These are just |
69 | an example.) | |
70 | ||
71 | git clone https://github.com/freerangerouting/frr.git frr | |
72 | cd frr | |
73 | git checkout stable/2.0 | |
74 | ./bootstrap.sh | |
75 | ./configure \ | |
76 | --enable-exampledir=/usr/share/doc/frr/examples/ \ | |
77 | --localstatedir=/var/run/frr \ | |
78 | --sbindir=/usr/lib/frr \ | |
79 | --sysconfdir=/etc/frr \ | |
80 | --enable-pimd \ | |
81 | --enable-watchfrr \ | |
82 | --enable-ospfclient=yes \ | |
83 | --enable-ospfapi=yes \ | |
84 | --enable-multipath=64 \ | |
85 | --enable-user=frr \ | |
86 | --enable-group=frr \ | |
87 | --enable-vty-group=frrvty \ | |
88 | --enable-configfile-mask=0640 \ | |
89 | --enable-logfile-mask=0640 \ | |
90 | --enable-rtadv \ | |
91 | --enable-tcp-zebra \ | |
92 | --enable-fpm \ | |
93 | --enable-ldpd \ | |
94 | --with-pkg-git-version \ | |
95 | --with-pkg-extra-version=-MyOwnFRRVersion | |
96 | make | |
97 | make check | |
98 | sudo make install | |
278fb111 MW |
99 | |
100 | ### Create empty FRR configuration files | |
101 | ||
eb651bbc MW |
102 | sudo mkdir /var/log/frr |
103 | sudo chown frr:fee /var/log/frr | |
104 | sudo mkdir /etc/frr | |
105 | sudo touch /etc/frr/etc/zebra.conf | |
106 | sudo touch /etc/frr/etc/bgpd.conf | |
107 | sudo touch /etc/frr/etc/ospfd.conf | |
108 | sudo touch /etc/frr/etc/ospf6d.conf | |
109 | sudo touch /etc/frr/etc/isisd.conf | |
110 | sudo touch /etc/frr/etc/ripd.conf | |
111 | sudo touch /etc/frr/etc/ripngd.conf | |
112 | sudo touch /etc/frr/etc/pimd.conf | |
113 | sudo touch /etc/frr/etc/ldpd.conf | |
114 | sudo chown frr:frr /etc/frr/ | |
115 | sudo touch /etc/frr/etc/vtysh.conf | |
116 | sudo chown frr:frrvty /etc/frr/etc/vtysh.conf | |
117 | sudo chmod 640 /etc/frr/*.conf | |
278fb111 MW |
118 | |
119 | ### Enable IP & IPv6 forwarding | |
120 | ||
eb651bbc MW |
121 | Edit `/etc/sysctl.conf` and uncomment the following values (ignore the |
122 | other settings) | |
278fb111 | 123 | |
eb651bbc MW |
124 | # Uncomment the next line to enable packet forwarding for IPv4 |
125 | net.ipv4.ip_forward=1 | |
278fb111 | 126 | |
eb651bbc MW |
127 | # Uncomment the next line to enable packet forwarding for IPv6 |
128 | # Enabling this option disables Stateless Address Autoconfiguration | |
129 | # based on Router Advertisements for this host | |
130 | net.ipv6.conf.all.forwarding=1 | |
278fb111 MW |
131 | |
132 | **Reboot** or use `sysctl` to apply the same config to the running system |