2 =========================================
4 Install required packages
5 -------------------------
11 export PKG_PATH=http://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/
17 pkg_add git autoconf-2.69p2 automake-1.15.1 libtool bison
18 pkg_add gmake gawk dejagnu openssl json-c py-test py-sphinx
20 Select Python2.7 as default (required for pytest)
24 ln -s /usr/local/bin/python2.7 /usr/local/bin/python
26 Get FRR, compile it and install it (from Git)
27 ---------------------------------------------
29 **This assumes you want to build and install FRR from source and not
32 Add frr group and user
33 ^^^^^^^^^^^^^^^^^^^^^^
38 groupadd -g 526 _frrvty
39 useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
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
52 export AUTOCONF_VERSION="2.69"
53 export AUTOMAKE_VERSION="1.15"
55 export LDFLAGS="-L/usr/local/lib"
56 export CPPFLAGS="-I/usr/local/include"
58 --sysconfdir=/etc/frr \
59 --localstatedir=/var/frr \
61 --enable-ospfclient=yes \
62 --enable-ospfapi=yes \
63 --enable-multipath=64 \
66 --enable-vty-group=_frrvty \
67 --enable-configfile-mask=0640 \
68 --enable-logfile-mask=0640 \
71 --with-pkg-git-version \
72 --with-pkg-extra-version=-MyOwnFRRVersion
77 Create empty FRR configuration files
78 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 doas chown _frr:_frr /var/frr
84 doas chmod 755 /var/frr
86 doas touch /etc/frr/zebra.conf
87 doas touch /etc/frr/bgpd.conf
88 doas touch /etc/frr/ospfd.conf
89 doas touch /etc/frr/ospf6d.conf
90 doas touch /etc/frr/isisd.conf
91 doas touch /etc/frr/ripd.conf
92 doas touch /etc/frr/ripngd.conf
93 doas touch /etc/frr/pimd.conf
94 doas touch /etc/frr/ldpd.conf
95 doas touch /etc/frr/nhrpd.conf
96 doas chown -R _frr:_frr /etc/frr
97 doas touch /etc/frr/vtysh.conf
98 doas chown -R _frr:_frrvty /etc/frr/vtysh.conf
99 doas chmod 750 /etc/frr
100 doas chmod 640 /etc/frr/*.conf
102 Enable IP & IPv6 forwarding
103 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
105 Add the following lines to the end of ``/etc/rc.conf``:
109 net.inet6.ip6.forwarding=1 # 1=Permit forwarding of IPv6 packets
110 net.inet6.ip6.mforwarding=1 # 1=Permit forwarding of IPv6 multicast packets
111 net.inet6.ip6.multipath=1 # 1=Enable IPv6 multipath routing
113 **Reboot** to apply the config to the system
115 Enable MPLS Forwarding
116 ^^^^^^^^^^^^^^^^^^^^^^
118 To enable MPLS forwarding on a given interface, use the following
123 doas ifconfig em0 mpls
125 Alternatively, to make MPLS forwarding persistent across reboots, add
126 the "mpls" keyword in the hostname.\* files of the desired interfaces.
131 cat /etc/hostname.em0
132 inet 10.0.1.1 255.255.255.0 mpls
134 Install rc.d init files
135 ^^^^^^^^^^^^^^^^^^^^^^^
137 (create them in /etc/rc.d - no example are included at this time with
140 Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``)
146 # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
148 daemon="/usr/local/sbin/zebra -d"
157 (Enable the required processes only)
161 echo "frr_zebra=YES" >> /etc/rc.conf
162 echo "frr_bgpd=YES" >> /etc/rc.conf
163 echo "frr_ospfd=YES" >> /etc/rc.conf
164 echo "frr_ospf6d=YES" >> /etc/rc.conf
165 echo "frr_isisd=YES" >> /etc/rc.conf
166 echo "frr_ripngd=YES" >> /etc/rc.conf
167 echo "frr_ripd=YES" >> /etc/rc.conf
168 echo "frr_pimd=YES" >> /etc/rc.conf
169 echo "frr_ldpd=YES" >> /etc/rc.conf