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