]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-freebsd10.rst
Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as
[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 py27-pytest c-ares python3 py-sphinx
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 .. include:: building-libyang.rst
27
28 ::
29
30 rm -f /usr/bin/flex
31
32 Get FRR, compile it and install it (from Git)
33 ---------------------------------------------
34
35 **This assumes you want to build and install FRR from source and not
36 using any packages**
37
38 Add frr group and user
39 ^^^^^^^^^^^^^^^^^^^^^^
40
41 ::
42
43 pw groupadd frr -g 101
44 pw groupadd frrvty -g 102
45 pw adduser frr -g 101 -u 101 -G 102 -c "FRR suite" \
46 -d /usr/local/etc/frr -s /usr/sbin/nologin
47
48 (You may prefer different options on configure statement. These are just
49 an example)
50
51 ::
52
53 git clone https://github.com/frrouting/frr.git frr
54 cd frr
55 ./bootstrap.sh
56 export MAKE=gmake
57 export LDFLAGS="-L/usr/local/lib"
58 export CPPFLAGS="-I/usr/local/include"
59 ./configure \
60 --sysconfdir=/usr/local/etc/frr \
61 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
62 --localstatedir=/var/run/frr \
63 --prefix=/usr/local \
64 --enable-multipath=64 \
65 --enable-user=frr \
66 --enable-group=frr \
67 --enable-vty-group=frrvty \
68 --enable-configfile-mask=0640 \
69 --enable-logfile-mask=0640 \
70 --enable-fpm \
71 --with-pkg-git-version \
72 --with-pkg-extra-version=-MyOwnFRRVersion
73 gmake
74 gmake check
75 sudo gmake install
76
77 Create empty FRR configuration files
78 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79
80 .. code-block:: shell
81
82 sudo mkdir /usr/local/etc/frr
83
84 For integrated config file:
85
86 .. code-block:: shell
87
88 sudo touch /usr/local/etc/frr/frr.conf
89
90 For individual config files:
91
92 .. note:: Integrated config is preferred to individual config.
93
94 .. code-block:: shell
95
96 sudo touch /usr/local/etc/frr/babeld.conf
97 sudo touch /usr/local/etc/frr/bfdd.conf
98 sudo touch /usr/local/etc/frr/bgpd.conf
99 sudo touch /usr/local/etc/frr/eigrpd.conf
100 sudo touch /usr/local/etc/frr/isisd.conf
101 sudo touch /usr/local/etc/frr/ldpd.conf
102 sudo touch /usr/local/etc/frr/nhrpd.conf
103 sudo touch /usr/local/etc/frr/ospf6d.conf
104 sudo touch /usr/local/etc/frr/ospfd.conf
105 sudo touch /usr/local/etc/frr/pbrd.conf
106 sudo touch /usr/local/etc/frr/pimd.conf
107 sudo touch /usr/local/etc/frr/ripd.conf
108 sudo touch /usr/local/etc/frr/ripngd.conf
109 sudo touch /usr/local/etc/frr/staticd.conf
110 sudo touch /usr/local/etc/frr/zebra.conf
111 sudo chown -R frr:frr /usr/local/etc/frr/
112 sudo touch /usr/local/etc/frr/vtysh.conf
113 sudo chown frr:frrvty /usr/local/etc/frr/vtysh.conf
114 sudo chmod 640 /usr/local/etc/frr/*.conf
115
116 Enable IP & IPv6 forwarding
117 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
118
119 Add the following lines to the end of ``/etc/sysctl.conf``:
120
121 ::
122
123 # Routing: We need to forward packets
124 net.inet.ip.forwarding=1
125 net.inet6.ip6.forwarding=1
126
127 **Reboot** or use ``sysctl`` to apply the same config to the running system.