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 without
11 Install required packages
12 -------------------------
14 Configure Package location:
18 PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
25 sudo pkg_add git autoconf automake libtool gmake gawk openssl \
26 pkg-config json-c python27 py27-test python35 py-sphinx
28 Install SSL Root Certificates (for git https access):
32 sudo pkg_add mozilla-rootcerts
33 sudo touch /etc/openssl/openssl.cnf
34 sudo mozilla-rootcerts install
36 Select default Python and py.test
40 sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
41 sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
43 Get FRR, compile it and install it (from Git)
44 ---------------------------------------------
46 Add frr groups and user
47 ~~~~~~~~~~~~~~~~~~~~~~~
51 sudo groupadd -g 92 frr
52 sudo groupadd -g 93 frrvty
53 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
54 -d /nonexistent -s /sbin/nologin frr
56 Download Source, configure and compile it
57 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59 (You may prefer different options on configure statement. These are just
64 git clone https://github.com/frrouting/frr.git frr
68 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
69 export CPPFLAGS="-I/usr/pkg/include"
71 --sysconfdir=/usr/pkg/etc/frr \
72 --enable-exampledir=/usr/pkg/share/examples/frr \
73 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
74 --localstatedir=/var/run/frr \
75 --enable-ospfclient=yes \
76 --enable-ospfapi=yes \
77 --enable-multipath=64 \
80 --enable-vty-group=frrvty \
81 --enable-configfile-mask=0640 \
82 --enable-logfile-mask=0640 \
85 --with-pkg-git-version \
86 --with-pkg-extra-version=-MyOwnFRRVersion
91 Create empty FRR configuration files
92 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96 sudo mkdir /var/log/frr
97 sudo mkdir /usr/pkg/etc/frr
98 sudo touch /usr/pkg/etc/frr/zebra.conf
99 sudo touch /usr/pkg/etc/frr/bgpd.conf
100 sudo touch /usr/pkg/etc/frr/ospfd.conf
101 sudo touch /usr/pkg/etc/frr/ospf6d.conf
102 sudo touch /usr/pkg/etc/frr/isisd.conf
103 sudo touch /usr/pkg/etc/frr/ripd.conf
104 sudo touch /usr/pkg/etc/frr/ripngd.conf
105 sudo touch /usr/pkg/etc/frr/pimd.conf
106 sudo chown -R frr:frr /usr/pkg/etc/frr
107 sudo touch /usr/local/etc/frr/vtysh.conf
108 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
109 sudo chmod 640 /usr/pkg/etc/frr/*.conf
111 Enable IP & IPv6 forwarding
112 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
114 Add the following lines to the end of ``/etc/sysctl.conf``:
118 # Routing: We need to forward packets
119 net.inet.ip.forwarding=1
120 net.inet6.ip6.forwarding=1
122 **Reboot** or use ``sysctl`` to apply the same config to the running
125 Install rc.d init files
126 ~~~~~~~~~~~~~~~~~~~~~~~
130 cp pkgsrc/*.sh /etc/rc.d/
131 chmod 555 /etc/rc.d/*.sh
136 (Enable the required processes only)
140 echo "zebra=YES" >> /etc/rc.conf
141 echo "bgpd=YES" >> /etc/rc.conf
142 echo "ospfd=YES" >> /etc/rc.conf
143 echo "ospf6d=YES" >> /etc/rc.conf
144 echo "isisd=YES" >> /etc/rc.conf
145 echo "ripngd=YES" >> /etc/rc.conf
146 echo "ripd=YES" >> /etc/rc.conf
147 echo "pimd=YES" >> /etc/rc.conf