]>
Commit | Line | Data |
---|---|---|
d1890d04 | 1 | FreeBSD 10 |
278fb111 MW |
2 | ========================================== |
3 | ||
4 | FreeBSD 10 restrictions: | |
5 | ------------------------ | |
6 | ||
d1890d04 QY |
7 | - MPLS is not supported on ``FreeBSD``. MPLS requires a Linux Kernel |
8 | (4.5 or higher). LDP can be built, but may have limited use without | |
9 | MPLS | |
278fb111 MW |
10 | |
11 | Install required packages | |
12 | ------------------------- | |
13 | ||
d1890d04 QY |
14 | Add packages: (Allow the install of the package managment tool if this |
15 | is first package install and asked) | |
16 | ||
17 | :: | |
278fb111 | 18 | |
eb651bbc | 19 | pkg install git autoconf automake libtool gmake gawk json-c pkgconf \ |
fc5a4adc | 20 | bison flex py27-pytest c-ares python3 py-sphinx libyang |
278fb111 | 21 | |
d1890d04 QY |
22 | Make sure there is no /usr/bin/flex preinstalled (and use the newly |
23 | installed in /usr/local/bin): (FreeBSD frequently provides a older flex | |
24 | as part of the base OS which takes preference in path) | |
25 | ||
26 | :: | |
eb651bbc MW |
27 | |
28 | rm -f /usr/bin/flex | |
278fb111 | 29 | |
278fb111 MW |
30 | Get FRR, compile it and install it (from Git) |
31 | --------------------------------------------- | |
32 | ||
d1890d04 | 33 | **This assumes you want to build and install FRR from source and not |
eb651bbc | 34 | using any packages** |
278fb111 | 35 | |
d1890d04 | 36 | Add frr group and user |
75ca3b11 | 37 | ^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
38 | |
39 | :: | |
278fb111 | 40 | |
eb651bbc MW |
41 | pw groupadd frr -g 101 |
42 | pw groupadd frrvty -g 102 | |
43 | pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \ | |
44 | -d /usr/local/etc/frr -s /usr/sbin/nologin | |
45 | ||
d1890d04 | 46 | (You may prefer different options on configure statement. These are just |
eb651bbc MW |
47 | an example) |
48 | ||
d1890d04 QY |
49 | :: |
50 | ||
d6180888 | 51 | git clone https://github.com/frrouting/frr.git frr |
eb651bbc | 52 | cd frr |
eb651bbc MW |
53 | ./bootstrap.sh |
54 | export MAKE=gmake | |
55 | export LDFLAGS="-L/usr/local/lib" | |
56 | export CPPFLAGS="-I/usr/local/include" | |
57 | ./configure \ | |
58 | --sysconfdir=/usr/local/etc/frr \ | |
59 | --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \ | |
60 | --localstatedir=/var/run/frr \ | |
61 | --prefix=/usr/local \ | |
eb651bbc MW |
62 | --enable-multipath=64 \ |
63 | --enable-user=frr \ | |
64 | --enable-group=frr \ | |
65 | --enable-vty-group=frrvty \ | |
66 | --enable-configfile-mask=0640 \ | |
67 | --enable-logfile-mask=0640 \ | |
eb651bbc MW |
68 | --enable-fpm \ |
69 | --with-pkg-git-version \ | |
76bd1499 | 70 | --with-pkg-extra-version=-MyOwnFRRVersion |
eb651bbc MW |
71 | gmake |
72 | gmake check | |
73 | sudo gmake install | |
278fb111 | 74 | |
d1890d04 | 75 | Create empty FRR configuration files |
75ca3b11 | 76 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 | 77 | |
09b67c09 QY |
78 | .. code-block:: shell |
79 | ||
80 | sudo mkdir /usr/local/etc/frr | |
81 | ||
82 | For integrated config file: | |
83 | ||
84 | .. code-block:: shell | |
85 | ||
86 | sudo touch /usr/local/etc/frr/frr.conf | |
87 | ||
88 | For individual config files: | |
89 | ||
90 | .. note:: Integrated config is preferred to individual config. | |
91 | ||
92 | .. code-block:: shell | |
d1890d04 | 93 | |
09b67c09 QY |
94 | sudo touch /usr/local/etc/frr/babeld.conf |
95 | sudo touch /usr/local/etc/frr/bfdd.conf | |
96 | sudo touch /usr/local/etc/frr/bgpd.conf | |
97 | sudo touch /usr/local/etc/frr/eigrpd.conf | |
98 | sudo touch /usr/local/etc/frr/isisd.conf | |
99 | sudo touch /usr/local/etc/frr/ldpd.conf | |
100 | sudo touch /usr/local/etc/frr/nhrpd.conf | |
101 | sudo touch /usr/local/etc/frr/ospf6d.conf | |
102 | sudo touch /usr/local/etc/frr/ospfd.conf | |
103 | sudo touch /usr/local/etc/frr/pbrd.conf | |
104 | sudo touch /usr/local/etc/frr/pimd.conf | |
105 | sudo touch /usr/local/etc/frr/ripd.conf | |
106 | sudo touch /usr/local/etc/frr/ripngd.conf | |
107 | sudo touch /usr/local/etc/frr/staticd.conf | |
108 | sudo touch /usr/local/etc/frr/zebra.conf | |
109 | sudo chown -R frr:frr /usr/local/etc/frr/ | |
110 | sudo touch /usr/local/etc/frr/vtysh.conf | |
111 | sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf | |
112 | sudo chmod 640 /usr/local/etc/frr/*.conf | |
278fb111 | 113 | |
d1890d04 | 114 | Enable IP & IPv6 forwarding |
75ca3b11 | 115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
d1890d04 QY |
116 | |
117 | Add the following lines to the end of ``/etc/sysctl.conf``: | |
278fb111 | 118 | |
d1890d04 | 119 | :: |
278fb111 | 120 | |
09b67c09 QY |
121 | # Routing: We need to forward packets |
122 | net.inet.ip.forwarding=1 | |
123 | net.inet6.ip6.forwarding=1 | |
278fb111 | 124 | |
09b67c09 | 125 | **Reboot** or use ``sysctl`` to apply the same config to the running system. |