]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/setup.rst
bgpd, lib: Remove SO_MARK
[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
610b5328
DS
9Daemons Configuration File
10--------------------------
717b4866
QY
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
614aa5c1 32 staticd=no
717b4866 33 pbrd=no
c44032c1 34 bfdd=no
f3c7b99d 35 fabricd=no
717b4866 36
717b4866
QY
37 #
38 # If this option is set the /etc/init.d/frr script automatically loads
39 # the config via "vtysh -b" when the servers are started.
40 # Check /etc/pam.d/frr if you intend to use "vtysh"!
41 #
42 vtysh_enable=yes
da7e1a92 43 zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
717b4866
QY
44 bgpd_options=" --daemon -A 127.0.0.1"
45 ospfd_options=" --daemon -A 127.0.0.1"
46 ospf6d_options=" --daemon -A ::1"
47 ripd_options=" --daemon -A 127.0.0.1"
48 ripngd_options=" --daemon -A ::1"
49 isisd_options=" --daemon -A 127.0.0.1"
50 pimd_options=" --daemon -A 127.0.0.1"
51 ldpd_options=" --daemon -A 127.0.0.1"
52 nhrpd_options=" --daemon -A 127.0.0.1"
53 eigrpd_options=" --daemon -A 127.0.0.1"
54 babeld_options=" --daemon -A 127.0.0.1"
55 sharpd_options=" --daemon -A 127.0.0.1"
614aa5c1 56 staticd_options=" --daemon -A 127.0.0.1"
717b4866 57 pbrd_options=" --daemon -A 127.0.0.1"
c44032c1 58 bfdd_options=" --daemon -A 127.0.0.1"
f3c7b99d 59 fabricd_options=" --daemon -A 127.0.0.1"
717b4866 60
610b5328 61 #MAX_FDS=1024
717b4866 62 # The list of daemons to watch is automatically generated by the init script.
bd2893d5 63 #watchfrr_options=""
717b4866 64
bd2893d5
DL
65 # for debugging purposes, you can specify a "wrap" command to start instead
66 # of starting the daemon directly, e.g. to use valgrind on ospfd:
67 # ospfd_wrap="/usr/bin/valgrind"
68 # or you can use "all_wrap" for all daemons, e.g. to use perf record:
69 # all_wrap="/usr/bin/perf record --call-graph -"
70 # the normal daemon command is added to this at the end.
717b4866
QY
71
72Breaking this file down:
73
610b5328
DS
74::
75
76 bgpd=yes
77
78To enable a particular daemon, simply change the corresponding 'no' to 'yes'.
79Subsequent service restarts should start the daemon.
80
717b4866
QY
81::
82
83 vtysh_enable=yes
84
85As the comment says, this causes :ref:`VTYSH <vty-shell>` to apply
86configuration when starting the daemons. This is useful for a variety of
87reasons touched on in the VTYSH documentation and should generally be enabled.
88
610b5328
DS
89::
90
91 MAX_FDS=1024
92
93This allows the operator to control the number of open file descriptors
94each daemon is allowed to start with. The current assumed value on
95most operating systems is 1024. If the operator plans to run bgp with
96several thousands of peers than this is where we would modify FRR to
97allow this to happen.
98
717b4866
QY
99::
100
da7e1a92 101 zebra_options=" -s 90000000 --daemon -A 127.0.0.1"
717b4866
QY
102 bgpd_options=" --daemon -A 127.0.0.1"
103 ...
104
105The next set of lines controls what options are passed to daemons when started
106from the service script. Usually daemons will have ``--daemon`` and ``-A
107<address>`` specified in order to daemonize and listen for VTY commands on a
108particular address.
109
bd2893d5
DL
110The remaining file content regarding `watchfrr_options` and `*_wrap` settings
111should not normally be needed; refer to the comments in case they are.
717b4866
QY
112
113Services
114--------
115FRR daemons have their own terminal interface or VTY. After installation, it's
116a good idea to setup each daemon's port number to connect to them. To do this
117add the following entries to :file:`/etc/services`.
118
119::
120
121 zebrasrv 2600/tcp # zebra service
122 zebra 2601/tcp # zebra vty
123 ripd 2602/tcp # RIPd vty
124 ripngd 2603/tcp # RIPngd vty
125 ospfd 2604/tcp # OSPFd vty
126 bgpd 2605/tcp # BGPd vty
127 ospf6d 2606/tcp # OSPF6d vty
128 ospfapi 2607/tcp # ospfapi
129 isisd 2608/tcp # ISISd vty
130 babeld 2609/tcp # BABELd vty
131 nhrpd 2610/tcp # nhrpd vty
132 pimd 2611/tcp # PIMd vty
133 ldpd 2612/tcp # LDPd vty
134 eigprd 2613/tcp # EIGRPd vty
c44032c1 135 bfdd 2617/tcp # bfdd vty
f3c7b99d 136 fabricd 2618/tcp # fabricd vty
717b4866
QY
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.