]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-freebsd11.rst
Merge pull request #3093 from donaldsharp/bgp_node_continued
[mirror_frr.git] / doc / developer / building-frr-for-freebsd11.rst
1 FreeBSD 11
2 ==========
3
4 FreeBSD 11 restrictions:
5 ------------------------
6
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
10
11 Install required packages
12 -------------------------
13
14 Add packages: (Allow the install of the package managment tool if this
15 is first package install and asked)
16
17 .. code-block:: shell
18
19 pkg install git autoconf automake libtool gmake gawk json-c pkgconf \
20 bison flex py27-pytest c-ares python3 py36-sphinx texinfo libyang
21
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 .. code-block:: shell
27
28 rm -f /usr/bin/flex
29
30 Get FRR, compile it and install it (from Git)
31 ---------------------------------------------
32
33 **This assumes you want to build and install FRR from source and not using any
34 packages**
35
36 Add frr group and user
37 ^^^^^^^^^^^^^^^^^^^^^^
38
39 .. code-block:: shell
40
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
46
47 Download Source, configure and compile it
48 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
50 (You may prefer different options on configure statement. These are just
51 an example)
52
53 .. code-block:: shell
54
55 git clone https://github.com/frrouting/frr.git frr
56 cd frr
57 ./bootstrap.sh
58 setenv MAKE gmake
59 setenv LDFLAGS -L/usr/local/lib
60 setenv CPPFLAGS -I/usr/local/include
61 ln -s /usr/local/bin/sphinx-build-3.6 /usr/local/bin/sphinx-build
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 \
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 \
73 --enable-fpm \
74 --with-pkg-git-version \
75 --with-pkg-extra-version=-MyOwnFRRVersion
76 gmake
77 gmake check
78 sudo gmake install
79
80 Create empty FRR configuration files
81 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
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
98
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
118
119 Enable IP & IPv6 forwarding
120 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
121
122 Add the following lines to the end of ``/etc/sysctl.conf``:
123
124 ::
125
126 # Routing: We need to forward packets
127 net.inet.ip.forwarding=1
128 net.inet6.ip6.forwarding=1
129
130 **Reboot** or use ``sysctl`` to apply the same config to the running system.