]> git.proxmox.com Git - mirror_frr.git/blob - doc/developer/building-frr-for-netbsd7.rst
Merge pull request #13546 from LabNConsulting/chopps/pylint-fix
[mirror_frr.git] / doc / developer / building-frr-for-netbsd7.rst
1 NetBSD 7
2 ========================================
3
4 NetBSD 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 without
9 MPLS
10
11 Install required packages
12 -------------------------
13
14 ::
15
16 sudo pkgin install git autoconf automake libtool gmake openssl \
17 pkg-config json-c python36 py36-test py36-sphinx \
18 protobuf-c
19
20 Install SSL Root Certificates (for git https access):
21
22 ::
23
24 sudo pkgin install mozilla-rootcerts
25 sudo touch /etc/openssl/openssl.cnf
26 sudo mozilla-rootcerts install
27
28 .. include:: building-libyang.rst
29
30 Get FRR, compile it and install it (from Git)
31 ---------------------------------------------
32
33 Add frr groups and user
34 ^^^^^^^^^^^^^^^^^^^^^^^
35
36 ::
37
38 sudo groupadd -g 92 frr
39 sudo groupadd -g 93 frrvty
40 sudo useradd -g 92 -u 92 -G frrvty -c "FRR suite" \
41 -d /nonexistent -s /sbin/nologin frr
42
43 Download Source, configure and compile it
44 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45
46 (You may prefer different options on configure statement. These are just
47 an example)
48
49 ::
50
51 git clone https://github.com/frrouting/frr.git frr
52 cd frr
53 ./bootstrap.sh
54 MAKE=gmake
55 export LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"
56 export CPPFLAGS="-I/usr/pkg/include"
57 ./configure \
58 --sysconfdir=/usr/pkg/etc/frr \
59 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
60 --localstatedir=/var/run/frr \
61 --enable-multipath=64 \
62 --enable-user=frr \
63 --enable-group=frr \
64 --enable-vty-group=frrvty \
65 --enable-configfile-mask=0640 \
66 --enable-logfile-mask=0640 \
67 --enable-fpm \
68 --with-pkg-git-version \
69 --with-pkg-extra-version=-MyOwnFRRVersion
70 gmake
71 gmake check
72 sudo gmake install
73
74 Create empty FRR configuration files
75 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
77 ::
78
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
96 Add the following lines to the end of ``/etc/sysctl.conf``:
97
98 ::
99
100 # Routing: We need to forward packets
101 net.inet.ip.forwarding=1
102 net.inet6.ip6.forwarding=1
103
104 **Reboot** or use ``sysctl`` to apply the same config to the running
105 system
106
107 Install rc.d init files
108 ^^^^^^^^^^^^^^^^^^^^^^^
109
110 ::
111
112 cp pkgsrc/*.sh /etc/rc.d/
113 chmod 555 /etc/rc.d/*.sh
114
115 Enable FRR processes
116 ^^^^^^^^^^^^^^^^^^^^
117
118 (Enable the required processes only)
119
120 ::
121
122 echo "zebra=YES" >> /etc/rc.conf
123 echo "bgpd=YES" >> /etc/rc.conf
124 echo "ospfd=YES" >> /etc/rc.conf
125 echo "ospf6d=YES" >> /etc/rc.conf
126 echo "isisd=YES" >> /etc/rc.conf
127 echo "ripngd=YES" >> /etc/rc.conf
128 echo "ripd=YES" >> /etc/rc.conf
129 echo "pimd=YES" >> /etc/rc.conf