]> git.proxmox.com Git - mirror_frr.git/blame - doc/Building_FRR_on_NetBSD6.md
Merge pull request #1329 from opensourcerouting/debian9-pkg
[mirror_frr.git] / doc / Building_FRR_on_NetBSD6.md
CommitLineData
278fb111
MW
1Building FRR on NetBSD 6 from Git Source
2========================================
3
4NetBSD 6 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-------------------------
13Configure Package location:
14
eb651bbc
MW
15 PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
16 export PKG_PATH
278fb111
MW
17
18Add packages:
19
eb651bbc 20 sudo pkg_add git autoconf automake libtool gmake gawk openssl \
ae32b152 21 pkg-config json-c p5-XML-LibXML python27 py27-test python35
eb651bbc 22
278fb111
MW
23Install SSL Root Certificates (for git https access):
24
eb651bbc
MW
25 sudo pkg_add mozilla-rootcerts
26 sudo touch /etc/openssl/openssl.cnf
27 sudo mozilla-rootcerts install
278fb111
MW
28
29Select default Python and py.test
30
eb651bbc
MW
31 sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
32 sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
278fb111
MW
33
34Get FRR, compile it and install it (from Git)
35------------------------------------------------
36
37### Add frr groups and user
38
eb651bbc
MW
39 sudo groupadd -g 92 frr
40 sudo groupadd -g 93 frrvty
41 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
42 -d /nonexistent -s /sbin/nologin frr
43
278fb111 44### Download Source, configure and compile it
eb651bbc
MW
45(You may prefer different options on configure statement. These are just
46an example)
47
d6180888 48 git clone https://github.com/frrouting/frr.git frr
eb651bbc 49 cd frr
d300f570 50 git checkout stable/3.0
eb651bbc
MW
51 ./bootstrap.sh
52 MAKE=gmake
53 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
54 export CPPFLAGS="-I/usr/pkg/include"
55 ./configure \
56 --sysconfdir=/usr/pkg/etc/frr \
57 --enable-exampledir=/usr/pkg/share/examples/frr \
58 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
59 --localstatedir=/var/run/frr \
60 --enable-ospfclient=yes \
61 --enable-ospfapi=yes \
62 --enable-multipath=64 \
63 --enable-user=frr \
64 --enable-group=frr \
65 --enable-vty-group=frrvty \
66 --enable-configfile-mask=0640 \
67 --enable-logfile-mask=0640 \
68 --enable-rtadv \
eb651bbc
MW
69 --enable-fpm \
70 --with-pkg-git-version \
71 --with-pkg-extra-version=-MyOwnFRRVersion
72 gmake
73 gmake check
74 sudo gmake install
278fb111
MW
75
76### Create empty FRR configuration files
eb651bbc
MW
77 sudo mkdir /var/log/frr
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
278fb111
MW
91
92### Enable IP & IPv6 forwarding
93
94Add the following lines to the end of `/etc/sysctl.conf`:
95
eb651bbc
MW
96 # Routing: We need to forward packets
97 net.inet.ip.forwarding=1
98 net.inet6.ip6.forwarding=1
278fb111
MW
99
100**Reboot** or use `sysctl` to apply the same config to the running system
101
102### Install rc.d init files
eb651bbc
MW
103 cp pkgsrc/*.sh /etc/rc.d/
104 chmod 555 /etc/rc.d/*.sh
278fb111
MW
105
106### Enable FRR processes
107(Enable the required processes only)
108
eb651bbc
MW
109 echo "zebra=YES" >> /etc/rc.conf
110 echo "bgpd=YES" >> /etc/rc.conf
111 echo "ospfd=YES" >> /etc/rc.conf
112 echo "ospf6d=YES" >> /etc/rc.conf
113 echo "isisd=YES" >> /etc/rc.conf
114 echo "ripngd=YES" >> /etc/rc.conf
115 echo "ripd=YES" >> /etc/rc.conf
116 echo "pimd=YES" >> /etc/rc.conf