]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-on-netbsd6.rst
zebra: Cleanup lines over 80 columns
[mirror_frr.git] / doc / developer / building-frr-on-netbsd6.rst
1 NetBSD 6
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 without
9 MPLS
10
11 Install required packages
12 -------------------------
13
14 Configure Package location:
15
16 ::
17
18 PKG_PATH="ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/`uname -m`/`uname -r`/All"
19 export PKG_PATH
20
21 Add packages:
22
23 ::
24
25 sudo pkg_add git autoconf automake libtool gmake gawk openssl \
26 pkg-config json-c python27 py27-test python35 py-sphinx
27
28 Install SSL Root Certificates (for git https access):
29
30 ::
31
32 sudo pkg_add mozilla-rootcerts
33 sudo touch /etc/openssl/openssl.cnf
34 sudo mozilla-rootcerts install
35
36 Select default Python and py.test
37
38 ::
39
40 sudo ln -s /usr/pkg/bin/python2.7 /usr/bin/python
41 sudo ln -s /usr/pkg/bin/py.test-2.7 /usr/bin/py.test
42
43 Get FRR, compile it and install it (from Git)
44 ---------------------------------------------
45
46 Add frr groups and user
47 ~~~~~~~~~~~~~~~~~~~~~~~
48
49 ::
50
51 sudo groupadd -g 92 frr
52 sudo groupadd -g 93 frrvty
53 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
54 -d /nonexistent -s /sbin/nologin frr
55
56 Download Source, configure and compile it
57 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58
59 (You may prefer different options on configure statement. These are just
60 an example)
61
62 ::
63
64 git clone https://github.com/frrouting/frr.git frr
65 cd frr
66 ./bootstrap.sh
67 MAKE=gmake
68 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
69 export CPPFLAGS="-I/usr/pkg/include"
70 ./configure \
71 --sysconfdir=/usr/pkg/etc/frr \
72 --enable-exampledir=/usr/pkg/share/examples/frr \
73 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
74 --localstatedir=/var/run/frr \
75 --enable-ospfclient=yes \
76 --enable-ospfapi=yes \
77 --enable-multipath=64 \
78 --enable-user=frr \
79 --enable-group=frr \
80 --enable-vty-group=frrvty \
81 --enable-configfile-mask=0640 \
82 --enable-logfile-mask=0640 \
83 --enable-rtadv \
84 --enable-fpm \
85 --with-pkg-git-version \
86 --with-pkg-extra-version=-MyOwnFRRVersion
87 gmake
88 gmake check
89 sudo gmake install
90
91 Create empty FRR configuration files
92 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93
94 ::
95
96 sudo mkdir /var/log/frr
97 sudo mkdir /usr/pkg/etc/frr
98 sudo touch /usr/pkg/etc/frr/zebra.conf
99 sudo touch /usr/pkg/etc/frr/bgpd.conf
100 sudo touch /usr/pkg/etc/frr/ospfd.conf
101 sudo touch /usr/pkg/etc/frr/ospf6d.conf
102 sudo touch /usr/pkg/etc/frr/isisd.conf
103 sudo touch /usr/pkg/etc/frr/ripd.conf
104 sudo touch /usr/pkg/etc/frr/ripngd.conf
105 sudo touch /usr/pkg/etc/frr/pimd.conf
106 sudo chown -R frr:frr /usr/pkg/etc/frr
107 sudo touch /usr/local/etc/frr/vtysh.conf
108 sudo chown frr:frrvty /usr/pkg/etc/frr/*.conf
109 sudo chmod 640 /usr/pkg/etc/frr/*.conf
110
111 Enable IP & IPv6 forwarding
112 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
113
114 Add the following lines to the end of ``/etc/sysctl.conf``:
115
116 ::
117
118 # Routing: We need to forward packets
119 net.inet.ip.forwarding=1
120 net.inet6.ip6.forwarding=1
121
122 **Reboot** or use ``sysctl`` to apply the same config to the running
123 system
124
125 Install rc.d init files
126 ~~~~~~~~~~~~~~~~~~~~~~~
127
128 ::
129
130 cp pkgsrc/*.sh /etc/rc.d/
131 chmod 555 /etc/rc.d/*.sh
132
133 Enable FRR processes
134 ~~~~~~~~~~~~~~~~~~~~
135
136 (Enable the required processes only)
137
138 ::
139
140 echo "zebra=YES" >> /etc/rc.conf
141 echo "bgpd=YES" >> /etc/rc.conf
142 echo "ospfd=YES" >> /etc/rc.conf
143 echo "ospf6d=YES" >> /etc/rc.conf
144 echo "isisd=YES" >> /etc/rc.conf
145 echo "ripngd=YES" >> /etc/rc.conf
146 echo "ripd=YES" >> /etc/rc.conf
147 echo "pimd=YES" >> /etc/rc.conf