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