]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_NetBSD7.md
doc: Fixed a few typos on Building Doc's, Changed Tab's to spaces and limited line...
[mirror_frr.git] / doc / Building_FRR_on_NetBSD7.md
CommitLineData
278fb111
MW
1Building FRR on NetBSD 7 from Git Source
2========================================
3
4NetBSD 7 restrictions:
5----------------------
6
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
9 without MPLS
10
11Install required packages
12-------------------------
13
eb651bbc
MW
14 sudo pkgin install git autoconf automake libtool gmake gawk openssl \
15 pkg-config json-c p5-XML-LibXML python27 py27-test
278fb111
MW
16
17Install SSL Root Certificates (for git https access):
18
eb651bbc
MW
19 sudo pkgin install mozilla-rootcerts
20 sudo touch /etc/openssl/openssl.cnf
21 sudo mozilla-rootcerts install
278fb111
MW
22
23Select default Python and py.test
24
eb651bbc
MW
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
278fb111
MW
27
28Get FRR, compile it and install it (from Git)
29------------------------------------------------
30
31### Add frr groups and user
32
eb651bbc
MW
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
278fb111
MW
37
38### Download Source, configure and compile it
eb651bbc
MW
39(You may prefer different options on configure statement. These are just
40an example)
41
42 git clone https://github.com/freerangerouting/frr.git frr
43 cd frr
44 git checkout stable/2.0
45 ./bootstrap.sh
46 MAKE=gmake
47 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
48 export CPPFLAGS="-I/usr/pkg/include"
49 ./configure \
50 --sysconfdir=/usr/pkg/etc/frr \
51 --enable-exampledir=/usr/pkg/share/examples/frr \
52 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
53 --localstatedir=/var/run/frr \
54 --enable-ospfclient=yes \
55 --enable-ospfapi=yes \
56 --enable-multipath=64 \
57 --enable-user=frr \
58 --enable-group=frr \
59 --enable-vty-group=frrvty \
60 --enable-configfile-mask=0640 \
61 --enable-logfile-mask=0640 \
62 --enable-rtadv \
63 --enable-tcp-zebra \
64 --enable-fpm \
65 --with-pkg-git-version \
66 --with-pkg-extra-version=-MyOwnFRRVersion
67 gmake
68 gmake check
69 sudo gmake install
278fb111
MW
70
71### Create empty FRR configuration files
eb651bbc
MW
72 sudo mkdir /usr/pkg/etc/frr
73 sudo touch /usr/pkg/etc/frr/zebra.conf
74 sudo touch /usr/pkg/etc/frr/bgpd.conf
75 sudo touch /usr/pkg/etc/frr/ospfd.conf
76 sudo touch /usr/pkg/etc/frr/ospf6d.conf
77 sudo touch /usr/pkg/etc/frr/isisd.conf
78 sudo touch /usr/pkg/etc/frr/ripd.conf
79 sudo touch /usr/pkg/etc/frr/ripngd.conf
80 sudo touch /usr/pkg/etc/frr/pimd.conf
81 sudo chown -R frr:frr /usr/pkg/etc/frr
82 sudo touch /usr/local/etc/frr/vtysh.conf
83 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
84 sudo chmod 640 /usr/pkg/etc/frr/*.conf
278fb111
MW
85
86### Enable IP & IPv6 forwarding
87
88Add the following lines to the end of `/etc/sysctl.conf`:
89
eb651bbc
MW
90 # Routing: We need to forward packets
91 net.inet.ip.forwarding=1
92 net.inet6.ip6.forwarding=1
278fb111
MW
93
94**Reboot** or use `sysctl` to apply the same config to the running system
95
96### Install rc.d init files
eb651bbc
MW
97 cp pkgsrc/*.sh /etc/rc.d/
98 chmod 555 /etc/rc.d/*.sh
278fb111
MW
99
100### Enable FRR processes
101(Enable the required processes only)
102
eb651bbc
MW
103 echo "zebra=YES" >> /etc/rc.conf
104 echo "bgpd=YES" >> /etc/rc.conf
105 echo "ospfd=YES" >> /etc/rc.conf
106 echo "ospf6d=YES" >> /etc/rc.conf
107 echo "isisd=YES" >> /etc/rc.conf
108 echo "ripngd=YES" >> /etc/rc.conf
109 echo "ripd=YES" >> /etc/rc.conf
110 echo "pimd=YES" >> /etc/rc.conf