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