2 @comment node-name, next, previous, up
3 @chapter Basic commands
5 There are five routing daemons in use, and there is one manager daemon.
6 These daemons may be located on separate machines from the manager
7 daemon. Each of these daemons will listen on a particular port for
8 incoming VTY connections. The routing daemons are:
11 @item @command{ripd}, @command{ripngd}, @command{ospfd}, @command{ospf6d}, @command{bgpd}
15 The following sections discuss commands common to all the routing
19 * Config Commands:: Commands used in config files
20 * Common Invocation Options:: Starting the daemons
21 * Virtual Terminal Interfaces:: Interacting with the daemons
26 @node Config Commands, Common Invocation Options, Basic commands, Basic commands
27 @comment node-name, next, previous, up
28 @section Config Commands
30 @cindex Configuration files for running the software
31 @c A -not configuration files for installing the software
32 @cindex Files for running configurations
33 @cindex Modifying the herd's behavior
34 @cindex Getting the herd running
38 * Basic Config Commands:: Some of the generic config commands
39 * Sample Config File:: An example config file
43 In a config file, you can write the debugging options, a vty's password,
44 routing daemon configurations, a log file name, and so forth. This
45 information forms the initial command set for a routing beast as it is
48 Config files are generally found in:
51 @item @file{@value{INSTALL_PREFIX_ETC}/*.conf}
54 Each of the daemons has its own
55 config file. For example, zebra's default config file name is:
58 @item @file{@value{INSTALL_PREFIX_ETC}/zebra.conf}
61 The daemon name plus @file{.conf} is the default config file name. You
62 can specify a config file using the @kbd{-f} or @kbd{--config-file}
63 options when starting the daemon.
67 @node Basic Config Commands, Sample Config File, Config Commands, Config Commands
68 @comment node-name, next, previous, up
69 @subsection Basic Config Commands
71 @deffn Command {hostname @var{hostname}} {}
72 Set hostname of the router.
75 @deffn Command {password @var{password}} {}
76 Set password for vty interface. If there is no password, a vty won't
80 @deffn Command {enable password @var{password}} {}
84 @deffn Command {log stdout} {}
85 @deffnx Command {no log stdout} {}
86 Set logging output to stdout.
89 @deffn Command {log file @var{filename}} {}
90 If you want to log into a file please specify @code{filename} as
93 log file /usr/local/etc/bgpd.log
97 @deffn Command {log syslog} {}
98 @deffnx Command {no log syslog} {}
99 Set logging output to syslog.
102 @deffn Command {write terminal} {}
103 Displays the current configuration to the vty interface.
106 @deffn Command {write file} {}
107 Write current configuration to configuration file.
110 @deffn Command {configure terminal} {}
111 Change to configuration mode. This command is the first step to
115 @deffn Command {terminal length @var{<0-512>}} {}
116 Set terminal display length to @var{<0-512>}. If length is 0, no
117 display control is performed.
120 @deffn Command {who} {}
123 @deffn Command {list} {}
127 @deffn Command {service password-encryption} {}
131 @deffn Command {service advanced-vty} {}
132 Enable advanced mode VTY.
135 @deffn Command {service terminal-length @var{<0-512>}} {}
136 Set system wide line configuration. This configuration command applies
137 to all VTY interfaces.
140 @deffn Command {show version} {}
141 Show the current version of the Quagga and its build host information.
144 @deffn Command {line vty} {}
145 Enter vty configuration mode.
148 @deffn Command {banner motd default} {}
149 Set default motd string.
152 @deffn Command {no banner motd} {}
153 No motd banner string will be printed.
156 @deffn {Line Command} {exec-timeout @var{minute}} {}
157 @deffnx {Line Command} {exec-timeout @var{minute} @var{second}} {}
158 Set VTY connection timeout value. When only one argument is specified
159 it is used for timeout value in minutes. Optional second argument is
160 used for timeout value in seconds. Default timeout value is 10 minutes.
161 When timeout value is zero, it means no timeout.
164 @deffn {Line Command} {no exec-timeout} {}
165 Do not perform timeout at all. This command is as same as
166 @command{exec-timeout 0 0}.
169 @deffn {Line Command} {access-class @var{access-list}} {}
170 Restrict vty connections with an access list.
175 @node Sample Config File, , Basic Config Commands, Config Commands
176 @comment node-name, next, previous, up
177 @subsection Sample Config File
180 Below is a sample configuration file for the zebra daemon.
185 ! Zebra configuration file
189 enable password zebra
197 '!' and '#' are comment characters. If the first character of the word
198 is one of the comment characters then from the rest of the line forward
199 will be ignored as a comment.
202 password zebra!password
205 If a comment character is not the first character of the word, it's a
206 normal character. So in the above example '!' will not be regarded as a
207 comment and the password is set to 'zebra!password'.
211 @node Common Invocation Options, Virtual Terminal Interfaces, Config Commands, Basic commands
212 @comment node-name, next, previous, up
213 @section Common Invocation Options
215 @c OPTIONS section of the man page
217 These options apply to all Quagga daemons.
226 @itemx --config_file=@var{file}
227 Set configuration file name.
231 Display this help and exit.
234 @itemx --pid_file=@var{file}
236 Upon startup the process identifier of the daemon is written to a file,
237 typically in @file{/var/run}. This file can be used by the init system
238 to implement commands such as @command{@dots{}/init.d/zebra status},
239 @command{@dots{}/init.d/zebra restart} or @command{@dots{}/init.d/zebra
242 The file name is an run-time option rather than a configure-time option
243 so that multiple routing daemons can be run simultaneously. This is
244 useful when using Quagga to implement a routing looking glass. One
245 machine can be used to collect differing routing views from differing
246 points in the network.
248 @item -A @var{address}
249 @itemx --vty_addr=@var{address}
250 Set the VTY local address to bind to. If set, the VTY socket will only
251 be bound to this address.
254 @itemx --vty_port=@var{port}
255 Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not
259 @itemx --vty_addr=@var{user}
260 Set the user and group to run as.
264 Print program version.
270 @node Virtual Terminal Interfaces, , Common Invocation Options, Basic commands
271 @comment node-name, next, previous, up
272 @section Virtual Terminal Interfaces
274 VTY -- Virtual Terminal [aka TeletYpe] Interface is a command line
275 interface (CLI) for user interaction with the routing daemon.
278 * VTY Overview:: Basics about VTYs
279 * VTY Modes:: View, Enable, and Other VTY modes
280 * VTY CLI Commands:: Commands for movement, edition, and management
285 @node VTY Overview, VTY Modes, Virtual Terminal Interfaces, Virtual Terminal Interfaces
286 @comment node-name, next, previous, up
287 @subsection VTY Overview
290 VTY stands for Virtual TeletYpe interface. It means you can connect to
291 the daemon via the telnet protocol.
293 To enable a VTY interface, you have to setup a VTY password. If there
294 is no VTY password, one cannot connect to the VTY interface at all.
298 % telnet localhost 2601
300 Connected to localhost.
301 Escape character is '^]'.
303 Hello, this is zebra (version @value{VERSION})
304 Copyright 1997-2000 Kunihiro Ishiguro
307 User Access Verification
311 enable Turn on privileged commands
312 exit Exit current mode and down to previous mode
313 help Description of the interactive help system
314 list Print command list
315 show Show running system information
316 who Display who is on a vty
319 Router# configure terminal
320 Router(config)# interface eth0
321 Router(config-if)# ip address 10.0.0.1/8
322 Router(config-if)# ^Z
327 '?' is very useful for looking up commands.
331 @node VTY Modes, VTY CLI Commands, VTY Overview, Virtual Terminal Interfaces
332 @comment node-name, next, previous, up
333 @subsection VTY Modes
336 There are three basic VTY modes:
339 * VTY View Mode:: Mode for read-only interaction
340 * VTY Enable Mode:: Mode for read-write interaction
341 * VTY Other Modes:: Special modes (tftp, etc)
344 There are commands that may be restricted to specific VTY modes.
348 @node VTY View Mode, VTY Enable Mode, VTY Modes, VTY Modes
349 @comment node-name, next, previous, up
350 @subsubsection VTY View Mode
351 @c to be written (gpoul)
354 This mode is for read-only access to the CLI. One may exit the mode by
355 leaving the system, or by entering @code{enable} mode.
359 @node VTY Enable Mode, VTY Other Modes, VTY View Mode, VTY Modes
360 @comment node-name, next, previous, up
361 @subsubsection VTY Enable Mode
364 @c to be written (gpoul)
365 This mode is for read-write access to the CLI. One may exit the mode by
366 leaving the system, or by escaping to view mode.
370 @node VTY Other Modes, , VTY Enable Mode, VTY Modes
371 @comment node-name, next, previous, up
372 @subsubsection VTY Other Modes
375 @c to be written (gpoul)
376 This page is for describing other modes.
378 @node VTY CLI Commands, , VTY Modes, Virtual Terminal Interfaces
379 @comment node-name, next, previous, up
380 @subsection VTY CLI Commands
383 Commands that you may use at the command-line are described in the following three subsubsections.
386 * CLI Movement Commands:: Commands for moving the cursor about
387 * CLI Editing Commands:: Commands for changing text
388 * CLI Advanced Commands:: Other commands, session management and so on
393 @node CLI Movement Commands, CLI Editing Commands, VTY CLI Commands, VTY CLI Commands
394 @comment node-name, next, previous, up
395 @subsubsection CLI Movement Commands
398 These commands are used for moving the CLI cursor. The @key{C} character
399 means press the Control Key.
407 Move forward one character.
413 Move backward one character.
417 Move forward one word.
421 Move backward one word.
425 Move to the beginning of the line.
429 Move to the end of the line.
435 @node CLI Editing Commands, CLI Advanced Commands, CLI Movement Commands, VTY CLI Commands
436 @comment node-name, next, previous, up
437 @subsubsection CLI Editing Commands
440 These commands are used for editing text on a line. The @key{C}
441 character means press the Control Key.
449 Delete the character before point.
453 Delete the character after point.
465 Kill to the end of the line.
469 Kill line from the beginning, erasing input.
479 @node CLI Advanced Commands, , CLI Editing Commands, VTY CLI Commands
480 @comment node-name, next, previous, up
481 @subsubsection CLI Advanced Commands
484 There are several additional CLI commands for command line completions,
485 insta-help, and VTY session management.
491 Interrupt current input and moves to the next line.
495 End current configuration session and move to top node.
502 Move down to next line in the history buffer.
508 Move up to previous line in the history buffer.
512 Use command line completion by typing @key{TAB}.
516 You can use command line help by typing @code{help} at the beginning of
517 the line. Typing @kbd{?} at any point in the line will show possible