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 Zebra 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 Zebra 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 Zebra to implement a routing looking glass. One
245 machine can be used to collect differing routing views from differing
246 points in the network.
249 @itemx --vty_port=@var{port}
250 Set the VTY port number.
254 Print program version.
260 @node Virtual Terminal Interfaces, , Common Invocation Options, Basic commands
261 @comment node-name, next, previous, up
262 @section Virtual Terminal Interfaces
264 VTY -- Virtual Terminal [aka TeletYpe] Interface is a command line
265 interface (CLI) for user interaction with the routing daemon.
268 * VTY Overview:: Basics about VTYs
269 * VTY Modes:: View, Enable, and Other VTY modes
270 * VTY CLI Commands:: Commands for movement, edition, and management
275 @node VTY Overview, VTY Modes, Virtual Terminal Interfaces, Virtual Terminal Interfaces
276 @comment node-name, next, previous, up
277 @subsection VTY Overview
280 VTY stands for Virtual TeletYpe interface. It means you can connect to
281 the daemon via the telnet protocol.
283 To enable a VTY interface, you have to setup a VTY password. If there
284 is no VTY password, one cannot connect to the VTY interface at all.
288 % telnet localhost 2601
290 Connected to localhost.
291 Escape character is '^]'.
293 Hello, this is zebra (version @value{VERSION})
294 Copyright 1997-2000 Kunihiro Ishiguro
297 User Access Verification
301 enable Turn on privileged commands
302 exit Exit current mode and down to previous mode
303 help Description of the interactive help system
304 list Print command list
305 show Show running system information
306 who Display who is on a vty
309 Router# configure terminal
310 Router(config)# interface eth0
311 Router(config-if)# ip address 10.0.0.1/8
312 Router(config-if)# ^Z
317 '?' is very useful for looking up commands.
321 @node VTY Modes, VTY CLI Commands, VTY Overview, Virtual Terminal Interfaces
322 @comment node-name, next, previous, up
323 @subsection VTY Modes
326 There are three basic VTY modes:
329 * VTY View Mode:: Mode for read-only interaction
330 * VTY Enable Mode:: Mode for read-write interaction
331 * VTY Other Modes:: Special modes (tftp, etc)
334 There are commands that may be restricted to specific VTY modes.
338 @node VTY View Mode, VTY Enable Mode, VTY Modes, VTY Modes
339 @comment node-name, next, previous, up
340 @subsubsection VTY View Mode
341 @c to be written (gpoul)
344 This mode is for read-only access to the CLI. One may exit the mode by
345 leaving the system, or by entering @code{enable} mode.
349 @node VTY Enable Mode, VTY Other Modes, VTY View Mode, VTY Modes
350 @comment node-name, next, previous, up
351 @subsubsection VTY Enable Mode
354 @c to be written (gpoul)
355 This mode is for read-write access to the CLI. One may exit the mode by
356 leaving the system, or by escaping to view mode.
360 @node VTY Other Modes, , VTY Enable Mode, VTY Modes
361 @comment node-name, next, previous, up
362 @subsubsection VTY Other Modes
365 @c to be written (gpoul)
366 This page is for describing other modes.
368 @node VTY CLI Commands, , VTY Modes, Virtual Terminal Interfaces
369 @comment node-name, next, previous, up
370 @subsection VTY CLI Commands
373 Commands that you may use at the command-line are described in the following three subsubsections.
376 * CLI Movement Commands:: Commands for moving the cursor about
377 * CLI Editing Commands:: Commands for changing text
378 * CLI Advanced Commands:: Other commands, session management and so on
383 @node CLI Movement Commands, CLI Editing Commands, VTY CLI Commands, VTY CLI Commands
384 @comment node-name, next, previous, up
385 @subsubsection CLI Movement Commands
388 These commands are used for moving the CLI cursor. The @key{C} character
389 means press the Control Key.
397 Move forward one character.
403 Move backward one character.
407 Move forward one word.
411 Move backward one word.
415 Move to the beginning of the line.
419 Move to the end of the line.
425 @node CLI Editing Commands, CLI Advanced Commands, CLI Movement Commands, VTY CLI Commands
426 @comment node-name, next, previous, up
427 @subsubsection CLI Editing Commands
430 These commands are used for editing text on a line. The @key{C}
431 character means press the Control Key.
439 Delete the character before point.
443 Delete the character after point.
455 Kill to the end of the line.
459 Kill line from the beginning, erasing input.
469 @node CLI Advanced Commands, , CLI Editing Commands, VTY CLI Commands
470 @comment node-name, next, previous, up
471 @subsubsection CLI Advanced Commands
474 There are several additional CLI commands for command line completions,
475 insta-help, and VTY session management.
481 Interrupt current input and moves to the next line.
485 End current configuration session and move to top node.
492 Move down to next line in the history buffer.
498 Move up to previous line in the history buffer.
502 Use command line completion by typing @key{TAB}.
506 You can use command line help by typing @code{help} at the beginning of
507 the line. Typing @kbd{?} at any point in the line will show possible