]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_NetBSD7.md
tests: fix warnings by removing dead code
[mirror_frr.git] / doc / Building_FRR_on_NetBSD7.md
1 Building FRR on NetBSD 7 from Git Source
2 ========================================
3
4 NetBSD 7 restrictions:
5 ----------------------
6
7 - MPLS is not supported on `NetBSD`. MPLS requires a Linux Kernel
8 (4.5 or higher). LDP can be built, but may have limited use
9 without MPLS
10
11 Install required packages
12 -------------------------
13
14 sudo pkgin install git autoconf automake libtool gmake gawk openssl \
15 pkg-config json-c python27 py27-test python35
16
17 Install SSL Root Certificates (for git https access):
18
19 sudo pkgin install mozilla-rootcerts
20 sudo touch /etc/openssl/openssl.cnf
21 sudo mozilla-rootcerts install
22
23 Select default Python and py.test
24
25 sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
26 sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
27
28 Get FRR, compile it and install it (from Git)
29 ------------------------------------------------
30
31 ### Add frr groups and user
32
33 sudo groupadd -g 92 frr
34 sudo groupadd -g 93 frrvty
35 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
36 -d /nonexistent -s /sbin/nologin frr
37
38 ### Download Source, configure and compile it
39 (You may prefer different options on configure statement. These are just
40 an example)
41
42 git clone https://github.com/frrouting/frr.git frr
43 cd frr
44 ./bootstrap.sh
45 MAKE=gmake
46 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
47 export CPPFLAGS="-I/usr/pkg/include"
48 ./configure \
49 --sysconfdir=/usr/pkg/etc/frr \
50 --enable-exampledir=/usr/pkg/share/examples/frr \
51 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
52 --localstatedir=/var/run/frr \
53 --enable-ospfclient=yes \
54 --enable-ospfapi=yes \
55 --enable-multipath=64 \
56 --enable-user=frr \
57 --enable-group=frr \
58 --enable-vty-group=frrvty \
59 --enable-configfile-mask=0640 \
60 --enable-logfile-mask=0640 \
61 --enable-rtadv \
62 --enable-fpm \
63 --with-pkg-git-version \
64 --with-pkg-extra-version=-MyOwnFRRVersion
65 gmake
66 gmake check
67 sudo gmake install
68
69 ### Create empty FRR configuration files
70 sudo mkdir /usr/pkg/etc/frr
71 sudo touch /usr/pkg/etc/frr/zebra.conf
72 sudo touch /usr/pkg/etc/frr/bgpd.conf
73 sudo touch /usr/pkg/etc/frr/ospfd.conf
74 sudo touch /usr/pkg/etc/frr/ospf6d.conf
75 sudo touch /usr/pkg/etc/frr/isisd.conf
76 sudo touch /usr/pkg/etc/frr/ripd.conf
77 sudo touch /usr/pkg/etc/frr/ripngd.conf
78 sudo touch /usr/pkg/etc/frr/pimd.conf
79 sudo chown -R frr:frr /usr/pkg/etc/frr
80 sudo touch /usr/local/etc/frr/vtysh.conf
81 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
82 sudo chmod 640 /usr/pkg/etc/frr/*.conf
83
84 ### Enable IP & IPv6 forwarding
85
86 Add the following lines to the end of `/etc/sysctl.conf`:
87
88 # Routing: We need to forward packets
89 net.inet.ip.forwarding=1
90 net.inet6.ip6.forwarding=1
91
92 **Reboot** or use `sysctl` to apply the same config to the running system
93
94 ### Install rc.d init files
95 cp pkgsrc/*.sh /etc/rc.d/
96 chmod 555 /etc/rc.d/*.sh
97
98 ### Enable FRR processes
99 (Enable the required processes only)
100
101 echo "zebra=YES" >> /etc/rc.conf
102 echo "bgpd=YES" >> /etc/rc.conf
103 echo "ospfd=YES" >> /etc/rc.conf
104 echo "ospf6d=YES" >> /etc/rc.conf
105 echo "isisd=YES" >> /etc/rc.conf
106 echo "ripngd=YES" >> /etc/rc.conf
107 echo "ripd=YES" >> /etc/rc.conf
108 echo "pimd=YES" >> /etc/rc.conf