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 -------------------------
16 sudo pkgin install git autoconf automake libtool gmake openssl \
17 pkg-config json-c python36 py36-test py36-sphinx
19 Install SSL Root Certificates (for git https access):
23 sudo pkgin install mozilla-rootcerts
24 sudo touch /etc/openssl/openssl.cnf
25 sudo mozilla-rootcerts install
27 .. include:: building-libyang.rst
29 Get FRR, compile it and install it (from Git)
30 ---------------------------------------------
32 Add frr groups and user
33 ^^^^^^^^^^^^^^^^^^^^^^^
37 sudo groupadd -g 92 frr
38 sudo groupadd -g 93 frrvty
39 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
40 -d /nonexistent -s /sbin/nologin frr
42 Download Source, configure and compile it
43 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45 (You may prefer different options on configure statement. These are just
50 git clone https://github.com/frrouting/frr.git frr
54 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
55 export CPPFLAGS="-I/usr/pkg/include"
57 --sysconfdir=/usr/pkg/etc/frr \
58 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
59 --localstatedir=/var/run/frr \
60 --enable-multipath=64 \
63 --enable-vty-group=frrvty \
64 --enable-configfile-mask=0640 \
65 --enable-logfile-mask=0640 \
67 --with-pkg-git-version \
68 --with-pkg-extra-version=-MyOwnFRRVersion
73 Create empty FRR configuration files
74 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78 sudo mkdir /usr/pkg/etc/frr
79 sudo touch /usr/pkg/etc/frr/zebra.conf
80 sudo touch /usr/pkg/etc/frr/bgpd.conf
81 sudo touch /usr/pkg/etc/frr/ospfd.conf
82 sudo touch /usr/pkg/etc/frr/ospf6d.conf
83 sudo touch /usr/pkg/etc/frr/isisd.conf
84 sudo touch /usr/pkg/etc/frr/ripd.conf
85 sudo touch /usr/pkg/etc/frr/ripngd.conf
86 sudo touch /usr/pkg/etc/frr/pimd.conf
87 sudo chown -R frr:frr /usr/pkg/etc/frr
88 sudo touch /usr/local/etc/frr/vtysh.conf
89 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
90 sudo chmod 640 /usr/pkg/etc/frr/*.conf
92 Enable IP & IPv6 forwarding
93 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 Add the following lines to the end of ``/etc/sysctl.conf``:
99 # Routing: We need to forward packets
100 net.inet.ip.forwarding=1
101 net.inet6.ip6.forwarding=1
103 **Reboot** or use ``sysctl`` to apply the same config to the running
106 Install rc.d init files
107 ^^^^^^^^^^^^^^^^^^^^^^^
111 cp pkgsrc/*.sh /etc/rc.d/
112 chmod 555 /etc/rc.d/*.sh
117 (Enable the required processes only)
121 echo "zebra=YES" >> /etc/rc.conf
122 echo "bgpd=YES" >> /etc/rc.conf
123 echo "ospfd=YES" >> /etc/rc.conf
124 echo "ospf6d=YES" >> /etc/rc.conf
125 echo "isisd=YES" >> /etc/rc.conf
126 echo "ripngd=YES" >> /etc/rc.conf
127 echo "ripd=YES" >> /etc/rc.conf
128 echo "pimd=YES" >> /etc/rc.conf