]>
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 | 14 | apt-get install git autoconf automake libtool make gawk libreadline-dev \ |
ae32b152 | 15 | texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \ |
c740f7d3 | 16 | libjson0-dev flex python-pip libc-ares-dev python3-dev |
eb651bbc MW |
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 | ||
783c4c8f MW |
54 | Install pytest: |
55 | ||
56 | pip install pytest | |
57 | ||
278fb111 MW |
58 | Get FRR, compile it and install it (from Git) |
59 | --------------------------------------------- | |
60 | ||
eb651bbc MW |
61 | **This assumes you want to build and install FRR from source and not using |
62 | any packages** | |
278fb111 MW |
63 | |
64 | ### Add frr groups and user | |
65 | ||
eb651bbc MW |
66 | sudo groupadd -g 92 frr |
67 | sudo groupadd -r -g 85 frrvty | |
02f3b051 | 68 | sudo adduser --system --ingroup frr --home /var/run/frr/ \ |
278fb111 | 69 | --gecos "FRR suite" --shell /sbin/nologin frr |
02f3b051 | 70 | sudo usermod -a -G frrvty frr |
278fb111 MW |
71 | |
72 | ### Download Source, configure and compile it | |
eb651bbc MW |
73 | (You may prefer different options on configure statement. These are just |
74 | an example.) | |
75 | ||
d6180888 | 76 | git clone https://github.com/frrouting/frr.git frr |
eb651bbc | 77 | cd frr |
eb651bbc MW |
78 | ./bootstrap.sh |
79 | ./configure \ | |
362de4a6 | 80 | --prefix=/usr \ |
eb651bbc MW |
81 | --enable-exampledir=/usr/share/doc/frr/examples/ \ |
82 | --localstatedir=/var/run/frr \ | |
83 | --sbindir=/usr/lib/frr \ | |
84 | --sysconfdir=/etc/frr \ | |
85 | --enable-pimd \ | |
86 | --enable-watchfrr \ | |
87 | --enable-ospfclient=yes \ | |
88 | --enable-ospfapi=yes \ | |
89 | --enable-multipath=64 \ | |
90 | --enable-user=frr \ | |
91 | --enable-group=frr \ | |
92 | --enable-vty-group=frrvty \ | |
93 | --enable-configfile-mask=0640 \ | |
94 | --enable-logfile-mask=0640 \ | |
95 | --enable-rtadv \ | |
eb651bbc | 96 | --enable-fpm \ |
eb651bbc MW |
97 | --with-pkg-git-version \ |
98 | --with-pkg-extra-version=-MyOwnFRRVersion | |
99 | make | |
100 | make check | |
101 | sudo make install | |
278fb111 MW |
102 | |
103 | ### Create empty FRR configuration files | |
104 | ||
aa1322f9 PH |
105 | sudo install -m 755 -o frr -g frr -d /var/log/frr |
106 | sudo install -m 775 -o frr -g frrvty -d /etc/frr | |
107 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf | |
108 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf | |
109 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf | |
110 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf | |
111 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf | |
112 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf | |
113 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf | |
114 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf | |
115 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf | |
97b02007 | 116 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf |
aa1322f9 | 117 | sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.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 | 131 | |
02f3b051 | 132 | **Reboot** or use `sysctl -p` to apply the same config to the running system |
362de4a6 HWC |
133 | |
134 | ### Install the init.d service | |
135 | ||
17fd4846 QY |
136 | sudo install -m 755 tools/frr /etc/init.d/frr |
137 | sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons | |
138 | sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf | |
139 | sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf | |
362de4a6 HWC |
140 | |
141 | ### Enable daemons | |
142 | Edit `/etc/frr/daemons` and change the value from "no" to "yes" for those daemons you want to start by systemd. | |
143 | For example. | |
144 | ||
145 | zebra=yes | |
146 | bgpd=yes | |
147 | ospfd=yes | |
148 | ospf6d=yes | |
149 | ripd=yes | |
150 | ripngd=yes | |
151 | isisd=yes | |
152 | ||
153 | ### Start the init.d service | |
154 | - /etc/init.d/frr start | |
155 | - use `/etc/init.d/frr status` to check its status. |