]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-netbsd7.rst
Merge pull request #13141 from mjstapp/fix_ospf_json_keys
[mirror_frr.git] / doc / developer / building-frr-for-netbsd7.rst
CommitLineData
d1890d04 1NetBSD 7
278fb111
MW
2========================================
3
4NetBSD 7 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
11Install required packages
12-------------------------
13
d1890d04
QY
14::
15
7d9a2e6d 16 sudo pkgin install git autoconf automake libtool gmake openssl \
5b08f6f9
PS
17 pkg-config json-c python36 py36-test py36-sphinx \
18 protobuf-c
278fb111
MW
19
20Install SSL Root Certificates (for git https access):
21
d1890d04
QY
22::
23
eb651bbc
MW
24 sudo pkgin install mozilla-rootcerts
25 sudo touch /etc/openssl/openssl.cnf
26 sudo mozilla-rootcerts install
278fb111 27
fc5a4adc
RW
28.. include:: building-libyang.rst
29
278fb111 30Get FRR, compile it and install it (from Git)
d1890d04
QY
31---------------------------------------------
32
33Add frr groups and user
75ca3b11 34^^^^^^^^^^^^^^^^^^^^^^^
278fb111 35
d1890d04 36::
278fb111 37
eb651bbc
MW
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
278fb111 42
d1890d04 43Download Source, configure and compile it
75ca3b11 44^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04 45
eb651bbc
MW
46(You may prefer different options on configure statement. These are just
47an example)
48
d1890d04
QY
49::
50
d6180888 51 git clone https://github.com/frrouting/frr.git frr
eb651bbc 52 cd frr
eb651bbc
MW
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 \
eb651bbc
MW
59 --enable-pkgsrcrcdir=/usr/pkg/share/examples/rc.d \
60 --localstatedir=/var/run/frr \
eb651bbc
MW
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 \
eb651bbc
MW
67 --enable-fpm \
68 --with-pkg-git-version \
76bd1499 69 --with-pkg-extra-version=-MyOwnFRRVersion
eb651bbc
MW
70 gmake
71 gmake check
72 sudo gmake install
278fb111 73
d1890d04 74Create empty FRR configuration files
75ca3b11 75^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
76
77::
78
eb651bbc
MW
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
278fb111 92
d1890d04 93Enable IP & IPv6 forwarding
75ca3b11 94^^^^^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
95
96Add the following lines to the end of ``/etc/sysctl.conf``:
278fb111 97
d1890d04 98::
278fb111 99
eb651bbc
MW
100 # Routing: We need to forward packets
101 net.inet.ip.forwarding=1
102 net.inet6.ip6.forwarding=1
278fb111 103
d1890d04
QY
104**Reboot** or use ``sysctl`` to apply the same config to the running
105system
106
107Install rc.d init files
75ca3b11 108^^^^^^^^^^^^^^^^^^^^^^^
d1890d04
QY
109
110::
278fb111 111
eb651bbc
MW
112 cp pkgsrc/*.sh /etc/rc.d/
113 chmod 555 /etc/rc.d/*.sh
278fb111 114
d1890d04 115Enable FRR processes
75ca3b11 116^^^^^^^^^^^^^^^^^^^^
d1890d04 117
278fb111
MW
118(Enable the required processes only)
119
d1890d04
QY
120::
121
eb651bbc
MW
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