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 json-c py-test py-sphinx libexecinfo
20 Select Python2.7 as default (required for pytest)
24 ln -s /usr/local/bin/python2.7 /usr/local/bin/python
26 .. include:: building-libyang.rst
28 Get FRR, compile it and install it (from Git)
29 ---------------------------------------------
31 **This assumes you want to build and install FRR from source and not
34 Add frr group and user
35 ^^^^^^^^^^^^^^^^^^^^^^
40 groupadd -g 526 _frrvty
41 useradd -g 525 -u 525 -c "FRR suite" -G _frrvty \
42 -d /nonexistent -s /sbin/nologin _frr
44 Download Source, configure and compile it
45 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 (You may prefer different options on configure statement. These are just
52 git clone https://github.com/frrouting/frr.git frr
54 export AUTOCONF_VERSION="2.69"
55 export AUTOMAKE_VERSION="1.15"
57 export LDFLAGS="-L/usr/local/lib"
58 export CPPFLAGS="-I/usr/local/include"
60 --sysconfdir=/etc/frr \
61 --localstatedir=/var/frr \
62 --enable-multipath=64 \
65 --enable-vty-group=_frrvty \
66 --enable-configfile-mask=0640 \
67 --enable-logfile-mask=0640 \
69 --with-pkg-git-version \
70 --with-pkg-extra-version=-MyOwnFRRVersion
75 Create empty FRR configuration files
76 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81 doas chown _frr:_frr /var/frr
82 doas chmod 755 /var/frr
84 doas touch /etc/frr/zebra.conf
85 doas touch /etc/frr/bgpd.conf
86 doas touch /etc/frr/ospfd.conf
87 doas touch /etc/frr/ospf6d.conf
88 doas touch /etc/frr/isisd.conf
89 doas touch /etc/frr/ripd.conf
90 doas touch /etc/frr/ripngd.conf
91 doas touch /etc/frr/pimd.conf
92 doas touch /etc/frr/ldpd.conf
93 doas touch /etc/frr/nhrpd.conf
94 doas chown -R _frr:_frr /etc/frr
95 doas touch /etc/frr/vtysh.conf
96 doas chown -R _frr:_frrvty /etc/frr/vtysh.conf
97 doas chmod 750 /etc/frr
98 doas chmod 640 /etc/frr/*.conf
100 Enable IP & IPv6 forwarding
101 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 Add the following lines to the end of ``/etc/rc.conf``:
107 net.inet6.ip6.forwarding=1 # 1=Permit forwarding of IPv6 packets
108 net.inet6.ip6.mforwarding=1 # 1=Permit forwarding of IPv6 multicast packets
109 net.inet6.ip6.multipath=1 # 1=Enable IPv6 multipath routing
111 **Reboot** to apply the config to the system
113 Enable MPLS Forwarding
114 ^^^^^^^^^^^^^^^^^^^^^^
116 To enable MPLS forwarding on a given interface, use the following
121 doas ifconfig em0 mpls
123 Alternatively, to make MPLS forwarding persistent across reboots, add
124 the "mpls" keyword in the hostname.\* files of the desired interfaces.
129 cat /etc/hostname.em0
130 inet 10.0.1.1 255.255.255.0 mpls
132 Install rc.d init files
133 ^^^^^^^^^^^^^^^^^^^^^^^
135 (create them in /etc/rc.d - no example are included at this time with
138 Example (for zebra - store as ``/etc/rc.d/frr_zebra.sh``)
144 # $OpenBSD: frr_zebra.rc,v 1.1 2013/04/18 20:29:08 sthen Exp $
146 daemon="/usr/local/sbin/zebra -d"
155 (Enable the required processes only)
159 echo "frr_zebra=YES" >> /etc/rc.conf
160 echo "frr_bgpd=YES" >> /etc/rc.conf
161 echo "frr_ospfd=YES" >> /etc/rc.conf
162 echo "frr_ospf6d=YES" >> /etc/rc.conf
163 echo "frr_isisd=YES" >> /etc/rc.conf
164 echo "frr_ripngd=YES" >> /etc/rc.conf
165 echo "frr_ripd=YES" >> /etc/rc.conf
166 echo "frr_pimd=YES" >> /etc/rc.conf
167 echo "frr_ldpd=YES" >> /etc/rc.conf