2 =========================================
4 FreeBSD 9 restrictions:
5 -----------------------
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
11 Install required packages
12 -------------------------
14 Add packages: (Allow the install of the package management tool if this
15 is first package install and asked)
19 pkg install -y git autoconf automake libtool gmake \
20 pkgconf texinfo json-c bison flex py36-pytest c-ares \
21 python3 py36-sphinx libexecinfo
23 Make sure there is no /usr/bin/flex preinstalled (and use the newly
24 installed in /usr/local/bin): (FreeBSD frequently provides a older flex
25 as part of the base OS which takes preference in path)
31 For building with clang (instead of gcc), upgrade clang from 3.4 default
32 to 3.6 *This is needed to build FreeBSD packages as well - for packages
33 clang is default* (Clang 3.4 as shipped with FreeBSD 9 crashes during
40 mv /usr/bin/clang /usr/bin/clang34
41 ln -s /usr/local/bin/clang36 /usr/bin/clang
43 .. include:: building-libyang.rst
45 Get FRR, compile it and install it (from Git)
46 ---------------------------------------------
48 **This assumes you want to build and install FRR from source and not
51 Add frr group and user
52 ^^^^^^^^^^^^^^^^^^^^^^
56 pw groupadd frr -g 101
57 pw groupadd frrvty -g 102
58 pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
59 -d /usr/local/etc/frr -s /usr/sbin/nologin
61 (You may prefer different options on configure statement. These are just
66 git clone https://github.com/frrouting/frr.git frr
70 export LDFLAGS="-L/usr/local/lib"
71 export CPPFLAGS="-I/usr/local/include"
73 --sysconfdir=/usr/local/etc/frr \
74 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
75 --localstatedir=/var/run/frr \
77 --enable-multipath=64 \
80 --enable-vty-group=frrvty \
81 --enable-configfile-mask=0640 \
82 --enable-logfile-mask=0640 \
84 --with-pkg-git-version \
85 --with-pkg-extra-version=-MyOwnFRRVersion
90 Create empty FRR configuration files
91 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 sudo mkdir /usr/local/etc/frr
97 For integrated config file:
101 sudo touch /usr/local/etc/frr/frr.conf
103 For individual config files:
105 .. note:: Integrated config is preferred to individual config.
107 .. code-block:: shell
109 sudo touch /usr/local/etc/frr/babeld.conf
110 sudo touch /usr/local/etc/frr/bfdd.conf
111 sudo touch /usr/local/etc/frr/bgpd.conf
112 sudo touch /usr/local/etc/frr/eigrpd.conf
113 sudo touch /usr/local/etc/frr/isisd.conf
114 sudo touch /usr/local/etc/frr/ldpd.conf
115 sudo touch /usr/local/etc/frr/nhrpd.conf
116 sudo touch /usr/local/etc/frr/ospf6d.conf
117 sudo touch /usr/local/etc/frr/ospfd.conf
118 sudo touch /usr/local/etc/frr/pbrd.conf
119 sudo touch /usr/local/etc/frr/pimd.conf
120 sudo touch /usr/local/etc/frr/ripd.conf
121 sudo touch /usr/local/etc/frr/ripngd.conf
122 sudo touch /usr/local/etc/frr/staticd.conf
123 sudo touch /usr/local/etc/frr/zebra.conf
124 sudo chown -R frr:frr /usr/local/etc/frr/
125 sudo touch /usr/local/etc/frr/vtysh.conf
126 sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
127 sudo chmod 640 /usr/local/etc/frr/*.conf
129 Enable IP & IPv6 forwarding
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
132 Add the following lines to the end of ``/etc/sysctl.conf``:
136 # Routing: We need to forward packets
137 net.inet.ip.forwarding=1
138 net.inet6.ip6.forwarding=1
140 **Reboot** or use ``sysctl`` to apply the same config to the running system.