1ZEBRA(8) FRR ZEBRA(8)
2
3
4
6 zebra - a routing manager for use with associated FRRouting components.
7
9 zebra [-h] [-v]
10
11 zebra [-d|-t|-dt] [-C] [-f config-file] [-i pid-file] [-z zclient-path]
12 [-u user] [-g group] [-A vty-addr] [-P vty-port] [-M module[:options]]
13 [-N pathspace] [--vty_socket vty-path] [--moduledir module-path]
14
16 zebra is a routing manager that implements the zebra route engine.
17 zebra supports all protocol daemons in the FRRouting suite.
18
20 OPTIONS available for the zebra command:
21
22 HELP AND VERSION
23 -h, --help
24 Print a short description of the daemon's command line options.
25
26 -v, --version
27 Print version and build information for the daemon.
28
29 Both of these options inhibit normal operation and will immediately
30 exit.
31
32 PROCESS CONTROL
33 These options control background operation:
34
35 -d, --daemon
36 Launches the process in background/daemon mode, forking and
37 detaching from the terminal.
38
39 The parent process will delay its exit until the daemon/child
40 has finished its initialization and has entered its main loop.
41 This is important for zebra startup because the other daemons
42 will attempt to connect to zebra. A return from zebra -d guaran‐
43 tees its readiness to accept these connections.
44
45 -t, --terminal
46 Opens an interactive VTY session on the terminal, allowing for
47 both state and configuration operations. Note that the terminal
48 starts operating after startup has completed and the configura‐
49 tion file has been loaded.
50
51 The process will exit when end of file is detected on the termi‐
52 nal. It is possible to daemonize a process started with -t (but
53 without -d) by sending SIGQUIT to the process (normally mapped
54 to a ^keypress.)
55
56 The combination of --daemon and --terminal will delay the daemon from
57 going into background until the terminal session ends (by end of file.)
58
59 If the process receives SIGINT (e.g. a ^C keypress) in this mode, it
60 will exit instead of daemonizing.
61
62 It is safe to suspend (SIGTSTP / ^Z) the terminal session opened by the
63 previous two options; this will only stop the terminal but not the
64 protocol daemon itself (which runs in a separate second process.)
65
66 CONFIGURATION AND PATHS
67 The following options control configuration and file system locations
68 for frr processes:
69
70 -f, --config_file config-file
71 Specify a configuration file to be used instead of the default
72 /etc/frr/<daemon>.conf file.
73
74 Note that the daemon will attempt to write to this file if the
75 write file command is issued on its VTY interface or through
76 vtysh.
77
78 -C, --dryrun
79 Load the configuration file and check its validity, then exit.
80
81 -i, --pid_file pid-file
82 Output a pid file to a location other than the default
83 /var/run/frr/<daemon>.pid.
84
85 -z, --socket zclient-path
86 Override the path of the ZAPI socket used to communicate between
87 zebra and the various protocol daemons. The default is
88 /var/run/frr/zserv.api. The value of this option must be the
89 same across all daemons.
90
91 -N, --pathspace pathspace
92 Insert pathspace into all default paths, changing the defaults
93 to:
94
95 /etc/frr/pathspace/<daemon>.conf /var/run/frr/pathspace/<dae‐
96 mon>.pid /var/run/frr/pathspace/<daemon>.vty
97 /var/run/frr/pathspace/zserv.api
98
99 ´.´ and ´/´ characters will not be accepted in pathspace, but
100 the empty string will be accepted.
101
102 Note that this only changes the respective defaults, it has no
103 effect on the respective path if the -f, -i, -z or --vty_socket
104 options are used.
105
106 The purpose of this option is to easily group all file system
107 related bits together for running multiple fully-separate "logi‐
108 cal routers" on a system, particularly with Linux network names‐
109 paces. Groups of daemons running with distinct pathspace values
110 will be completely unaware of each other and not interact in any
111 way.
112
113 This option does not do any system setup (like network names‐
114 paces.) This must be done by the user, for example by running:
115
116 ip netns exec namespace <daemon> -N namespace
117
118 PROCESS CREDENTIALS
119 -u, --user user
120 (default: frr)
121
122 -g, --group group
123 (default: frr)
124
125 Change the user/group which the daemon will switch to.
126
127 -S, --skip_runas
128 Skip setting the process effective user and group.
129
130 Note that there is an additional group, frrvty, which controls group
131 ownership of the VTY sockets. The name of this group cannot currently
132 be changed, and user must be a member of this group.
133
134 VTY SETUP
135 These following options control the daemon's VTY (interactive command
136 line) interface. The interface is available over TCP, using the telnet
137 protocol, as well as through the vtysh frontend.
138
139 -A, --vty_addr vty-addr
140 Specify an IP/IPv6 address to bind the TCP VTY interface to. It
141 is generally recommended to specify ::1 or 127.0.0.1. For rea‐
142 sons of backwards compatibility, the default is to listen on all
143 interfaces.
144
145 -P, --vty_port vty-port
146 Override the daemon's default TCP VTY port (each daemon has a
147 different default value upwards of 2600, listed below.) Speci‐
148 fying 0 disables the TCP VTY interface.
149
150 Default ports are::
151
152 zebra 2601
153 ripd 2602
154 ripngd 2603
155 ospfd 2604
156 bgpd 2605
157 ospf6d 2606
158 isisd 2608
159 babeld 2609
160 nhrpd 2610
161 pimd 2611
162 ldpd 2612
163 eigrpd 2613
164 pbrd 2615
165 staticd 2616
166 bfdd 2617
167 fabricd 2618
168
169 Port 2607 is used for ospfd's Opaque LSA API.
170
171 --vty_socket vty-path
172 Overrides the directory used for the <daemon>.vty sockets.
173 vtysh connects to these sockets in order to access each daemon's
174 VTY. Default: /var/run/frr[/<pathspace>]
175
176 NB: Unlike the other options, this option specifies a directory,
177 not a full path.
178
179 This option is primarily used by the SNAP packaging system, its
180 semantics may change. It should not be necessary in most other
181 scenarios.
182
183 MODULE LOADING
184 frr supports optional dynamically loadable modules, although these can
185 only be loaded at startup. The set of available modules may vary
186 across distributions and packages, and modules may be available for
187 installation as separate packages.
188
189 -M, --module module[:options]
190 Load a module named module, optionally passing options to it.
191
192 If there is a ´/´ character in module, the value is assumed to
193 be a pathname to a module.
194
195 If there is no ´/´ character, the module directory (see next
196 option) is searched first for a module named "<daemon>_<mod‐
197 ule>.so", then for "<module>.so". This allows for a module to
198 exist in variations appropriate for particular daemons, e.g.
199 zebra_snmp and bgp_snmp, with the correct one selected by -M
200 snmp.
201
202 The meaning of options is specific to the module being loaded.
203 Most modules currently ignore it.
204
205 Modules are loaded in the order as listed on the command line.
206 This is not generally relevant.
207
208 --moduledir module-path
209 Look for modules in the module-path directory instead of the
210 default /usr/lib/frr/modules. (This path is not affected by the
211 -N option.)
212
213 The list of loaded modules can be inspected at runtime with the show
214 modules VTY command.
215
216 -b, --batch
217 Runs in batch mode, zebra parses its config and exits.
218
219 -k, --keep_kernel
220 On startup, don't delete self inserted routes.
221
222 -s, --nl-bufsize <netlink-buffer-size>
223 Set netlink receive buffer size. There are cases where zebra
224 daemon can't handle flood of netlink messages from kernel. If
225 you ever see "recvmsg overrun" messages in zebra log, you are in
226 trouble.
227
228 Solution is to increase receive buffer of netlink socket. Note
229 that kernel < 2.6.14 doesn't allow increasing it over maximum
230 value defined in /proc/sys/net/core/rmem_max. If you want to do
231 it, you have to increase maximum before starting zebra.
232
233 Note that this affects Linux only.
234
235 -n, --vrfwnetns
236 Enable namespace VRF backend. By default, the VRF backend relies
237 on VRF-lite support from the Linux kernel. This option permits
238 discovering Linux named network namespaces and mapping it to FRR
239 VRF contexts.
240
241 ROUTES
242 -r, --retain
243 When the program terminates, do not flush routes installed by
244 zebra from the kernel.
245
247 /usr/lib/frr/zebra
248 The default location of the zebra binary.
249
250 /etc/frr/zebra.conf
251 The default location of the zebra config file.
252
253 $(PWD)/zebra.log
254 If the zebra process is configured to output logs to a file,
255 then you will find this file in the directory where you started
256 zebra.
257
259 This man page is intended to be a quick reference for command line
260 options. The definitive document is the info file frr 7.1 or the docu‐
261 mentation available on the project website at https://frrouting.org/.
262
264 The daemon may log to standard output, to a VTY, to a log file, or
265 through syslog to the system logs. FRR supports many debugging options,
266 see the Info file, web docs or source for details.
267
269 zebra(8), vtysh(1), ripd(8), ripngd(8), ospfd(8), ospf6d(8), bgpd(8),
270 isisd(8), babeld(8), nhrpd(8), pimd(8), pbrd(8), ldpd(8), eigrpd(8),
271 staticd(8), fabricd(8), mtracebis(8) https://frrouting.org/
272
274 FRR eats bugs for breakfast. If you have food for the maintainers,
275 please email <dev@lists.frrouting.org>.
276
278 2019, FRR
279
280
281
282
2837.1 Oct 07, 2019 ZEBRA(8)