1 Building FRR on NetBSD 7 from Git Source
2 ========================================
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
11 Install required packages
12 -------------------------
14 sudo pkgin install git autoconf automake libtool gmake gawk openssl \
15 pkg-config json-c python27 py27-test python35
17 Install SSL Root Certificates (for git https access):
19 sudo pkgin install mozilla-rootcerts
20 sudo touch /etc/openssl/openssl.cnf
21 sudo mozilla-rootcerts install
23 Select default Python and py.test
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
28 Get FRR, compile it and install it (from Git)
29 ------------------------------------------------
31 ### Add frr groups and user
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
38 ### Download Source, configure and compile it
39 (You may prefer different options on configure statement. These are just
42 git clone https://github.com/frrouting/frr.git frr
46 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
47 export CPPFLAGS="-I/usr/pkg/include"
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 \
58 --enable-vty-group=frrvty \
59 --enable-configfile-mask=0640 \
60 --enable-logfile-mask=0640 \
63 --with-pkg-git-version \
64 --with-pkg-extra-version=-MyOwnFRRVersion
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
84 ### Enable IP & IPv6 forwarding
86 Add the following lines to the end of `/etc/sysctl.conf`:
88 # Routing: We need to forward packets
89 net.inet.ip.forwarding=1
90 net.inet6.ip6.forwarding=1
92 **Reboot** or use `sysctl` to apply the same config to the running system
94 ### Install rc.d init files
95 cp pkgsrc/*.sh /etc/rc.d/
96 chmod 555 /etc/rc.d/*.sh
98 ### Enable FRR processes
99 (Enable the required processes only)
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