]> git.proxmox.com Git - mirror_frr.git/blame - doc/developer/building-frr-for-opensuse.rst
Merge pull request #13122 from rgirada/mgmtd_codecov
[mirror_frr.git] / doc / developer / building-frr-for-opensuse.rst
CommitLineData
f5b17d20
JG
1openSUSE
2========
3
4This document describes installation from source.
5
6These instructions have been tested on openSUSE Tumbleweed in a Raspberry Pi 400.
7
8Installing Dependencies
9-----------------------
10
11.. code-block:: console
12
13 zypper in git autoconf automake libtool make \
14 readline-devel texinfo net-snmp-devel groff pkgconfig libjson-c-devel\
15 pam-devel python3-pytest bison flex c-ares-devel python3-devel\
ab140d61 16 python3-Sphinx perl patch libcap-devel libyang-devel \
5b08f6f9 17 libelf-devel libunwind-devel protobuf-c
afb8fe93
DL
18
19.. include:: building-libunwind-note.rst
f5b17d20
JG
20
21Building & Installing FRR
22-------------------------
23
24Add FRR user and groups
25^^^^^^^^^^^^^^^^^^^^^^^
26
27.. code-block:: console
28
29 sudo groupadd -g 92 frr
30 sudo groupadd -r -g 85 frrvty
31 sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
32 -c "FRR FRRouting suite" -d /var/run/frr frr
33
34Compile
35^^^^^^^
36
37.. include:: include-compile.rst
38
39Install FRR configuration files
40^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
42.. code-block:: console
43
44 sudo install -m 775 -o frr -g frr -d /var/log/frr
45 sudo install -m 775 -o frr -g frrvty -d /etc/frr
46 sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
47 sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
48 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
49 sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
50
51.. note::
52
53 In some platforms like raspberry for performance reasons
54 some directories are in file systems (/var/run, ...) mounted with tempfs
55 so will disapear after every reboot.
56 In frr the /var/run/frr is used to store pid files for every daemon.
57
58Tweak sysctls
59^^^^^^^^^^^^^
60
61Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
62MPLS (if supported by your platform). If your platform does not support MPLS,
63skip the MPLS related configuration in this section.
64
65Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the following
66content:
67
68::
69
70 #
71 # Enable packet forwarding
72 #
73 net.ipv4.conf.all.forwarding=1
74 net.ipv6.conf.all.forwarding=1
75 #
76 # Enable MPLS Label processing on all interfaces
77 #
78 #net.mpls.conf.eth0.input=1
79 #net.mpls.conf.eth1.input=1
80 #net.mpls.conf.eth2.input=1
81 #net.mpls.platform_labels=100000
82
83.. note::
84
85 MPLS must be invidividually enabled on each interface that requires it. See
86 the example in the config block above.
87
eaf59d27 88Load the modified sysctls on the system:
f5b17d20
JG
89
90.. code-block:: console
91
92 sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
93
94Create a new file ``/etc/modules-load.d/mpls.conf`` with the following content:
95
96::
97
98 # Load MPLS Kernel Modules
99 mpls-router
100 mpls-iptunnel
101
102And load the kernel modules on the running system:
103
104.. code-block:: console
105
106 sudo modprobe mpls-router mpls-iptunnel
107
108
109.. note::
110 The ``firewalld`` service could be enabled. You may run into some
111 issues with the iptables rules it installs by default. If you wish to just
112 stop the service and clear `ALL` rules do these commands:
113
114 .. code-block:: console
115
116 sudo systemctl disable firewalld.service
117 sudo systemctl stop firewalld.service
118 sudo iptables -F
119
120Install frr Service
121^^^^^^^^^^^^^^^^^^^
122
123.. code-block:: console
124
125 sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
126 sudo systemctl enable frr
127
128Enable daemons
129^^^^^^^^^^^^^^
130
131Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
132section with ``bgpd=no`` etc. Enable the daemons
133as required by changing the value to ``yes``.
134
135Start FRR
136^^^^^^^^^
137
138.. code-block:: console
139
140 sudo systemctl start frr
141
142Check the starting messages of frr with
143
144.. code-block:: console
145
146 journalctl -u frr --follow