]> git.proxmox.com Git - mirror_frr.git/blob - doc/Building_FRR_on_NetBSD6.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_NetBSD6.md
1 Building FRR on NetBSD 6 from Git Source
2 ========================================
3
4 NetBSD 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
11 Install required packages
12 -------------------------
13 Configure Package location:
14
15 PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
16 export PKG_PATH
17
18 Add packages:
19
20 sudo pkg_add git autoconf automake libtool gmake gawk openssl \
21 pkg-config json-c p5-XML-LibXML python27 py27-test
22
23 Install SSL Root Certificates (for git https access):
24
25 sudo pkg_add mozilla-rootcerts
26 sudo touch /etc/openssl/openssl.cnf
27 sudo mozilla-rootcerts install
28
29 Select default Python and py.test
30
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
33
34 Get FRR, compile it and install it (from Git)
35 ------------------------------------------------
36
37 ### Add frr groups and user
38
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
44 ### Download Source, configure and compile it
45 (You may prefer different options on configure statement. These are just
46 an example)
47
48 git clone https://github.com/freerangerouting/frr.git frr
49 cd frr
50 git checkout stable/2.0
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 \
69 --enable-tcp-zebra \
70 --enable-fpm \
71 --with-pkg-git-version \
72 --with-pkg-extra-version=-MyOwnFRRVersion
73 gmake
74 gmake check
75 sudo gmake install
76
77 ### Create empty FRR configuration files
78 sudo mkdir /var/log/frr
79 sudo mkdir /usr/pkg/etc/frr
80 sudo touch /usr/pkg/etc/frr/zebra.conf
81 sudo touch /usr/pkg/etc/frr/bgpd.conf
82 sudo touch /usr/pkg/etc/frr/ospfd.conf
83 sudo touch /usr/pkg/etc/frr/ospf6d.conf
84 sudo touch /usr/pkg/etc/frr/isisd.conf
85 sudo touch /usr/pkg/etc/frr/ripd.conf
86 sudo touch /usr/pkg/etc/frr/ripngd.conf
87 sudo touch /usr/pkg/etc/frr/pimd.conf
88 sudo chown -R frr:frr /usr/pkg/etc/frr
89 sudo touch /usr/local/etc/frr/vtysh.conf
90 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
91 sudo chmod 640 /usr/pkg/etc/frr/*.conf
92
93 ### Enable IP & IPv6 forwarding
94
95 Add the following lines to the end of `/etc/sysctl.conf`:
96
97 # Routing: We need to forward packets
98 net.inet.ip.forwarding=1
99 net.inet6.ip6.forwarding=1
100
101 **Reboot** or use `sysctl` to apply the same config to the running system
102
103 ### Install rc.d init files
104 cp pkgsrc/*.sh /etc/rc.d/
105 chmod 555 /etc/rc.d/*.sh
106
107 ### Enable FRR processes
108 (Enable the required processes only)
109
110 echo "zebra=YES" >> /etc/rc.conf
111 echo "bgpd=YES" >> /etc/rc.conf
112 echo "ospfd=YES" >> /etc/rc.conf
113 echo "ospf6d=YES" >> /etc/rc.conf
114 echo "isisd=YES" >> /etc/rc.conf
115 echo "ripngd=YES" >> /etc/rc.conf
116 echo "ripd=YES" >> /etc/rc.conf
117 echo "pimd=YES" >> /etc/rc.conf