]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/setup.rst
staticd: Fix recursive routes for certain types of nexthops
[mirror_frr.git] / doc / user / setup.rst
CommitLineData
717b4866
QY
1.. _basic-setup:
2
3Basic Setup
4============
5
6After installing FRR, some basic configuration must be completed before it is
7ready to use.
8
9Daemons File
10------------
11After a fresh install, starting FRR will do nothing. This is because daemons
12must be explicitly enabled by editing a file in your configuration directory.
13This file is usually located at :file:`/etc/frr/daemons` and determines which
14daemons are activated when issuing a service start / stop command via init or
15systemd. The file initially looks like this:
16
17::
18
19 zebra=no
20 bgpd=no
21 ospfd=no
22 ospf6d=no
23 ripd=no
24 ripngd=no
25 isisd=no
26 pimd=no
27 ldpd=no
28 nhrpd=no
29 eigrpd=no
30 babeld=no
31 sharpd=no
32 pbrd=no
33
34To enable a particular daemon, simply change the corresponding 'no' to 'yes'.
35Subsequent service restarts should start the daemon.
36
37Daemons Configuration File
38--------------------------
39There is another file that controls the default options passed to daemons when
40starting FRR as a service. This file is located in your configuration
41directory, usually at :file:`/etc/frr/daemons.conf`.
42
43This file has several parts. Here is an example:
44
45::
46
47 #
48 # If this option is set the /etc/init.d/frr script automatically loads
49 # the config via "vtysh -b" when the servers are started.
50 # Check /etc/pam.d/frr if you intend to use "vtysh"!
51 #
52 vtysh_enable=yes
da7e1a92 53 zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
717b4866
QY
54 bgpd_options=" --daemon -A 127.0.0.1"
55 ospfd_options=" --daemon -A 127.0.0.1"
56 ospf6d_options=" --daemon -A ::1"
57 ripd_options=" --daemon -A 127.0.0.1"
58 ripngd_options=" --daemon -A ::1"
59 isisd_options=" --daemon -A 127.0.0.1"
60 pimd_options=" --daemon -A 127.0.0.1"
61 ldpd_options=" --daemon -A 127.0.0.1"
62 nhrpd_options=" --daemon -A 127.0.0.1"
63 eigrpd_options=" --daemon -A 127.0.0.1"
64 babeld_options=" --daemon -A 127.0.0.1"
65 sharpd_options=" --daemon -A 127.0.0.1"
66 pbrd_options=" --daemon -A 127.0.0.1"
67
68 # The list of daemons to watch is automatically generated by the init script.
69 watchfrr_enable=yes
70 watchfrr_options=(-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB)
71
72 # If valgrind_enable is 'yes' the frr daemons will be started via valgrind.
73 # The use case for doing so is tracking down memory leaks, etc in frr.
74 valgrind_enable=no
75 valgrind=/usr/bin/valgrind
76
77Breaking this file down:
78
79::
80
81 vtysh_enable=yes
82
83As the comment says, this causes :ref:`VTYSH <vty-shell>` to apply
84configuration when starting the daemons. This is useful for a variety of
85reasons touched on in the VTYSH documentation and should generally be enabled.
86
87::
88
da7e1a92 89 zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
717b4866
QY
90 bgpd_options=" --daemon -A 127.0.0.1"
91 ...
92
93The next set of lines controls what options are passed to daemons when started
94from the service script. Usually daemons will have ``--daemon`` and ``-A
95<address>`` specified in order to daemonize and listen for VTY commands on a
96particular address.
97
98::
99
100 # The list of daemons to watch is automatically generated by the init script.
101 watchfrr_enable=yes
102 watchfrr_options=(-d -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB)
103
104Options for the ``watchfrr``, the watchdog daemon.
105
106::
107
108 valgrind_enable=no
109 valgrind=/usr/bin/valgrind
110
111Whether or not to start FRR daemons under Valgrind. This is primarily useful
112for gathering information for bug reports and for developers.
113``valgrind_enable`` should be ``no`` for production use.
114
115Services
116--------
117FRR daemons have their own terminal interface or VTY. After installation, it's
118a good idea to setup each daemon's port number to connect to them. To do this
119add the following entries to :file:`/etc/services`.
120
121::
122
123 zebrasrv 2600/tcp # zebra service
124 zebra 2601/tcp # zebra vty
125 ripd 2602/tcp # RIPd vty
126 ripngd 2603/tcp # RIPngd vty
127 ospfd 2604/tcp # OSPFd vty
128 bgpd 2605/tcp # BGPd vty
129 ospf6d 2606/tcp # OSPF6d vty
130 ospfapi 2607/tcp # ospfapi
131 isisd 2608/tcp # ISISd vty
132 babeld 2609/tcp # BABELd vty
133 nhrpd 2610/tcp # nhrpd vty
134 pimd 2611/tcp # PIMd vty
135 ldpd 2612/tcp # LDPd vty
136 eigprd 2613/tcp # EIGRPd vty
137
138
139If you use a FreeBSD newer than 2.2.8, the above entries are already added to
140:file:`/etc/services` so there is no need to add it. If you specify a port
141number when starting the daemon, these entries may not be needed.
142
143You may need to make changes to the config files in |INSTALL_PREFIX_ETC|.
144
145systemd
146-------
147Although not installed when installing from source, FRR provides a service file
148for use with ``systemd``. It is located in :file:`tools/frr.service` in the Git
149repository. If ``systemctl status frr.service`` indicates that the FRR service
150is not found, copy the service file from the Git repository into your preferred
151location. A good place is usually ``/etc/systemd/system/``.
152
153After issuing a ``systemctl daemon-reload``, you should be able to start the
154FRR service via ``systemctl start frr``. If this fails, or no daemons are
155started. check the ``journalctl`` logs for an indication of what went wrong.