]>
Commit | Line | Data |
---|---|---|
d1890d04 | 1 | Ubuntu 12.04LTS |
278fb111 MW |
2 | =============================================== |
3 | ||
d1890d04 QY |
4 | - MPLS is not supported on ``Ubuntu 12.04`` with default kernel. MPLS |
5 | requires Linux Kernel 4.5 or higher (LDP can be built, but may have | |
6 | limited use without MPLS) For an updated Ubuntu Kernel, see | |
7 | http://kernel.ubuntu.com/~kernel-ppa/mainline/ | |
278fb111 MW |
8 | |
9 | Install required packages | |
10 | ------------------------- | |
eb651bbc | 11 | |
278fb111 MW |
12 | Add packages: |
13 | ||
d1890d04 QY |
14 | :: |
15 | ||
eb651bbc | 16 | apt-get install git autoconf automake libtool make gawk libreadline-dev \ |
ae32b152 | 17 | texinfo libpam0g-dev dejagnu libjson0-dev pkg-config libpam0g-dev \ |
b60f68ea | 18 | libjson0-dev flex python-pip libc-ares-dev python3-dev python3-sphinx |
eb651bbc | 19 | |
d1890d04 QY |
20 | Install newer bison from 14.04 package source (Ubuntu 12.04 package |
21 | source is too old) | |
22 | ||
23 | :: | |
eb651bbc MW |
24 | |
25 | mkdir builddir | |
26 | cd builddir | |
27 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.dsc | |
28 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg.orig.tar.bz2 | |
29 | wget http://archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_3.0.2.dfsg-2.debian.tar.gz | |
76bd1499 | 30 | tar -jxvf bison_3.0.2.dfsg.orig.tar.bz2 |
eb651bbc | 31 | cd bison-3.0.2.dfsg/ |
76bd1499 | 32 | tar xzf ../bison_3.0.2.dfsg-2.debian.tar.gz |
eb651bbc MW |
33 | sudo apt-get build-dep bison |
34 | debuild -b -uc -us | |
35 | cd .. | |
76bd1499 | 36 | sudo dpkg -i ./libbison-dev_3.0.2.dfsg-2_amd64.deb ./bison_3.0.2.dfsg-2_amd64.deb |
eb651bbc MW |
37 | cd .. |
38 | rm -rf builddir | |
278fb111 MW |
39 | |
40 | Install newer version of autoconf and automake: | |
41 | ||
d1890d04 QY |
42 | :: |
43 | ||
eb651bbc MW |
44 | wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz |
45 | tar xvf autoconf-2.69.tar.gz | |
46 | cd autoconf-2.69 | |
47 | ./configure --prefix=/usr | |
48 | make | |
49 | sudo make install | |
50 | cd .. | |
d1890d04 | 51 | |
eb651bbc MW |
52 | wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz |
53 | tar xvf automake-1.15.tar.gz | |
54 | cd automake-1.15 | |
55 | ./configure --prefix=/usr | |
56 | make | |
57 | sudo make install | |
58 | cd .. | |
59 | ||
783c4c8f MW |
60 | Install pytest: |
61 | ||
d1890d04 QY |
62 | :: |
63 | ||
783c4c8f MW |
64 | pip install pytest |
65 | ||
278fb111 MW |
66 | Get FRR, compile it and install it (from Git) |
67 | --------------------------------------------- | |
68 | ||
d1890d04 QY |
69 | **This assumes you want to build and install FRR from source and not |
70 | using any packages** | |
71 | ||
72 | Add frr groups and user | |
75ca3b11 | 73 | ^^^^^^^^^^^^^^^^^^^^^^^ |
278fb111 | 74 | |
d1890d04 | 75 | :: |
278fb111 | 76 | |
eb651bbc MW |
77 | sudo groupadd -g 92 frr |
78 | sudo groupadd -r -g 85 frrvty | |
02f3b051 | 79 | sudo adduser --system --ingroup frr --home /var/run/frr/ \ |
278fb111 | 80 | --gecos "FRR suite" --shell /sbin/nologin frr |
02f3b051 | 81 | sudo usermod -a -G frrvty frr |
278fb111 | 82 | |
d1890d04 | 83 | Download Source, configure and compile it |
75ca3b11 | 84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 | 85 | |
eb651bbc MW |
86 | (You may prefer different options on configure statement. These are just |
87 | an example.) | |
88 | ||
d1890d04 QY |
89 | :: |
90 | ||
d6180888 | 91 | git clone https://github.com/frrouting/frr.git frr |
eb651bbc | 92 | cd frr |
eb651bbc MW |
93 | ./bootstrap.sh |
94 | ./configure \ | |
362de4a6 | 95 | --prefix=/usr \ |
eb651bbc MW |
96 | --enable-exampledir=/usr/share/doc/frr/examples/ \ |
97 | --localstatedir=/var/run/frr \ | |
98 | --sbindir=/usr/lib/frr \ | |
99 | --sysconfdir=/etc/frr \ | |
100 | --enable-pimd \ | |
101 | --enable-watchfrr \ | |
102 | --enable-ospfclient=yes \ | |
103 | --enable-ospfapi=yes \ | |
104 | --enable-multipath=64 \ | |
105 | --enable-user=frr \ | |
106 | --enable-group=frr \ | |
107 | --enable-vty-group=frrvty \ | |
108 | --enable-configfile-mask=0640 \ | |
109 | --enable-logfile-mask=0640 \ | |
110 | --enable-rtadv \ | |
eb651bbc | 111 | --enable-fpm \ |
eb651bbc | 112 | --with-pkg-git-version \ |
76bd1499 | 113 | --with-pkg-extra-version=-MyOwnFRRVersion |
eb651bbc MW |
114 | make |
115 | make check | |
116 | sudo make install | |
278fb111 | 117 | |
d1890d04 | 118 | Create empty FRR configuration files |
75ca3b11 | 119 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
120 | |
121 | :: | |
278fb111 | 122 | |
aa1322f9 PH |
123 | sudo install -m 755 -o frr -g frr -d /var/log/frr |
124 | sudo install -m 775 -o frr -g frrvty -d /etc/frr | |
125 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/zebra.conf | |
126 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/bgpd.conf | |
127 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospfd.conf | |
128 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ospf6d.conf | |
129 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/isisd.conf | |
130 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripd.conf | |
131 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ripngd.conf | |
132 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/pimd.conf | |
133 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/ldpd.conf | |
97b02007 | 134 | sudo install -m 640 -o frr -g frr /dev/null /etc/frr/nhrpd.conf |
aa1322f9 | 135 | sudo install -m 640 -o frr -g frrvty /dev/null /etc/frr/vtysh.conf |
278fb111 | 136 | |
d1890d04 | 137 | Enable IP & IPv6 forwarding |
75ca3b11 | 138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
278fb111 | 139 | |
d1890d04 | 140 | Edit ``/etc/sysctl.conf`` and uncomment the following values (ignore the |
eb651bbc | 141 | other settings) |
278fb111 | 142 | |
d1890d04 QY |
143 | :: |
144 | ||
eb651bbc MW |
145 | # Uncomment the next line to enable packet forwarding for IPv4 |
146 | net.ipv4.ip_forward=1 | |
278fb111 | 147 | |
eb651bbc MW |
148 | # Uncomment the next line to enable packet forwarding for IPv6 |
149 | # Enabling this option disables Stateless Address Autoconfiguration | |
150 | # based on Router Advertisements for this host | |
151 | net.ipv6.conf.all.forwarding=1 | |
278fb111 | 152 | |
d1890d04 QY |
153 | **Reboot** or use ``sysctl -p`` to apply the same config to the running |
154 | system | |
362de4a6 | 155 | |
d1890d04 | 156 | Install the init.d service |
75ca3b11 | 157 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
158 | |
159 | :: | |
362de4a6 | 160 | |
17fd4846 QY |
161 | sudo install -m 755 tools/frr /etc/init.d/frr |
162 | sudo install -m 644 tools/etc/frr/daemons /etc/frr/daemons | |
163 | sudo install -m 644 tools/etc/frr/daemons.conf /etc/frr/daemons.conf | |
164 | sudo install -m 644 -o frr -g frr tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf | |
d1890d04 QY |
165 | |
166 | Enable daemons | |
75ca3b11 | 167 | ^^^^^^^^^^^^^^ |
d1890d04 QY |
168 | |
169 | | Edit ``/etc/frr/daemons`` and change the value from "no" to "yes" for | |
170 | those daemons you want to start by systemd. | |
171 | | For example. | |
172 | ||
173 | :: | |
362de4a6 | 174 | |
76bd1499 QY |
175 | zebra=yes |
176 | bgpd=yes | |
177 | ospfd=yes | |
178 | ospf6d=yes | |
179 | ripd=yes | |
180 | ripngd=yes | |
181 | isisd=yes | |
d1890d04 QY |
182 | |
183 | Start the init.d service | |
75ca3b11 | 184 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
185 | |
186 | - /etc/init.d/frr start | |
187 | - use ``/etc/init.d/frr status`` to check its status. |