]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-freebsd10.rst
Merge pull request #12797 from jvidalallende/ubi8_minimal_dockerfile
[mirror_frr.git] / doc / developer / building-frr-for-freebsd10.rst
1 FreeBSD 10
2 ==========================================
3
4 FreeBSD 10 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 management tool if this
15 is first package install and asked)
16
17 ::
18
19 pkg install git autoconf automake libtool gmake json-c pkgconf \
20 bison flex py36-pytest c-ares python3.6 py36-sphinx libunwind \
21 protobuf-c
22
23 .. include:: building-libunwind-note.rst
24
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
29 .. include:: building-libyang.rst
30
31 ::
32
33 rm -f /usr/bin/flex
34
35 Get FRR, compile it and install it (from Git)
36 ---------------------------------------------
37
38 **This assumes you want to build and install FRR from source and not
39 using any packages**
40
41 Add frr group and user
42 ^^^^^^^^^^^^^^^^^^^^^^
43
44 ::
45
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
51 (You may prefer different options on configure statement. These are just
52 an example)
53
54 ::
55
56 git clone https://github.com/frrouting/frr.git frr
57 cd frr
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 \
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.