paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 1 | @node Basic commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 2 | @chapter Basic commands |
| 3 | |
| 4 | There are five routing daemons in use, and there is one manager daemon. |
| 5 | These daemons may be located on separate machines from the manager |
| 6 | daemon. Each of these daemons will listen on a particular port for |
| 7 | incoming VTY connections. The routing daemons are: |
| 8 | |
| 9 | @itemize @bullet |
| 10 | @item @command{ripd}, @command{ripngd}, @command{ospfd}, @command{ospf6d}, @command{bgpd} |
| 11 | @item @command{zebra} |
| 12 | @end itemize |
| 13 | |
| 14 | The following sections discuss commands common to all the routing |
| 15 | daemons. |
| 16 | |
| 17 | @menu |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 18 | * Terminal Mode Commands:: Common commands used in a VTY |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 19 | * Config Commands:: Commands used in config files |
| 20 | * Common Invocation Options:: Starting the daemons |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 21 | * Virtual Terminal Interfaces:: Interacting with the daemons |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 22 | @end menu |
| 23 | |
| 24 | |
| 25 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 26 | @node Config Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 27 | @section Config Commands |
| 28 | |
| 29 | @cindex Configuration files for running the software |
| 30 | @c A -not configuration files for installing the software |
| 31 | @cindex Files for running configurations |
| 32 | @cindex Modifying the herd's behavior |
| 33 | @cindex Getting the herd running |
| 34 | |
| 35 | |
| 36 | @menu |
| 37 | * Basic Config Commands:: Some of the generic config commands |
| 38 | * Sample Config File:: An example config file |
| 39 | @end menu |
| 40 | |
| 41 | |
| 42 | In a config file, you can write the debugging options, a vty's password, |
| 43 | routing daemon configurations, a log file name, and so forth. This |
| 44 | information forms the initial command set for a routing beast as it is |
| 45 | starting. |
| 46 | |
| 47 | Config files are generally found in: |
| 48 | |
Paul Jakma | a20a406 | 2012-03-08 16:42:31 +0000 | [diff] [blame] | 49 | @itemize @w{} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 50 | @item @file{@value{INSTALL_PREFIX_ETC}/*.conf} |
| 51 | @end itemize |
| 52 | |
| 53 | Each of the daemons has its own |
| 54 | config file. For example, zebra's default config file name is: |
| 55 | |
Paul Jakma | a20a406 | 2012-03-08 16:42:31 +0000 | [diff] [blame] | 56 | @itemize @w{} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 57 | @item @file{@value{INSTALL_PREFIX_ETC}/zebra.conf} |
| 58 | @end itemize |
| 59 | |
| 60 | The daemon name plus @file{.conf} is the default config file name. You |
| 61 | can specify a config file using the @kbd{-f} or @kbd{--config-file} |
| 62 | options when starting the daemon. |
| 63 | |
| 64 | |
| 65 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 66 | @node Basic Config Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 67 | @subsection Basic Config Commands |
| 68 | |
| 69 | @deffn Command {hostname @var{hostname}} {} |
| 70 | Set hostname of the router. |
| 71 | @end deffn |
| 72 | |
| 73 | @deffn Command {password @var{password}} {} |
| 74 | Set password for vty interface. If there is no password, a vty won't |
| 75 | accept connections. |
| 76 | @end deffn |
| 77 | |
| 78 | @deffn Command {enable password @var{password}} {} |
| 79 | Set enable password. |
| 80 | @end deffn |
| 81 | |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 82 | @deffn Command {log trap @var{level}} {} |
| 83 | @deffnx Command {no log trap} {} |
| 84 | These commands are deprecated and are present only for historical compatibility. |
| 85 | The log trap command sets the current logging level for all enabled |
| 86 | logging destinations, and it sets the default for all future logging commands |
| 87 | that do not specify a level. The normal default |
| 88 | logging level is debugging. The @code{no} form of the command resets |
| 89 | the default level for future logging commands to debugging, but it does |
| 90 | not change the logging level of existing logging destinations. |
| 91 | @end deffn |
| 92 | |
| 93 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 94 | @deffn Command {log stdout} {} |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 95 | @deffnx Command {log stdout @var{level}} {} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 96 | @deffnx Command {no log stdout} {} |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 97 | Enable logging output to stdout. |
| 98 | If the optional second argument specifying the |
| 99 | logging level is not present, the default logging level (typically debugging, |
| 100 | but can be changed using the deprecated @code{log trap} command) will be used. |
| 101 | The @code{no} form of the command disables logging to stdout. |
| 102 | The @code{level} argument must have one of these values: |
| 103 | emergencies, alerts, critical, errors, warnings, notifications, informational, or debugging. Note that the existing code logs its most important messages |
| 104 | with severity @code{errors}. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 105 | @end deffn |
| 106 | |
| 107 | @deffn Command {log file @var{filename}} {} |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 108 | @deffnx Command {log file @var{filename} @var{level}} {} |
| 109 | @deffnx Command {no log file} {} |
| 110 | If you want to log into a file, please specify @code{filename} as |
| 111 | in this example: |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 112 | @example |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 113 | log file /var/log/quagga/bgpd.log informational |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 114 | @end example |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 115 | If the optional second argument specifying the |
| 116 | logging level is not present, the default logging level (typically debugging, |
| 117 | but can be changed using the deprecated @code{log trap} command) will be used. |
| 118 | The @code{no} form of the command disables logging to a file. |
ajs | c70257d | 2005-02-03 17:12:01 +0000 | [diff] [blame] | 119 | |
| 120 | Note: if you do not configure any file logging, and a daemon crashes due |
| 121 | to a signal or an assertion failure, it will attempt to save the crash |
| 122 | information in a file named /var/tmp/quagga.<daemon name>.crashlog. |
| 123 | For security reasons, this will not happen if the file exists already, so |
| 124 | it is important to delete the file after reporting the crash information. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 125 | @end deffn |
| 126 | |
| 127 | @deffn Command {log syslog} {} |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 128 | @deffnx Command {log syslog @var{level}} {} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 129 | @deffnx Command {no log syslog} {} |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 130 | Enable logging output to syslog. |
| 131 | If the optional second argument specifying the |
| 132 | logging level is not present, the default logging level (typically debugging, |
| 133 | but can be changed using the deprecated @code{log trap} command) will be used. |
| 134 | The @code{no} form of the command disables logging to syslog. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 135 | @end deffn |
| 136 | |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 137 | @deffn Command {log monitor} {} |
| 138 | @deffnx Command {log monitor @var{level}} {} |
| 139 | @deffnx Command {no log monitor} {} |
| 140 | Enable logging output to vty terminals that have enabled logging |
| 141 | using the @code{terminal monitor} command. |
| 142 | By default, monitor logging is enabled at the debugging level, but this |
| 143 | command (or the deprecated @code{log trap} command) can be used to change |
| 144 | the monitor logging level. |
| 145 | If the optional second argument specifying the |
| 146 | logging level is not present, the default logging level (typically debugging, |
| 147 | but can be changed using the deprecated @code{log trap} command) will be used. |
| 148 | The @code{no} form of the command disables logging to terminal monitors. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 149 | @end deffn |
| 150 | |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 151 | @deffn Command {log facility @var{facility}} {} |
| 152 | @deffnx Command {no log facility} {} |
| 153 | This command changes the facility used in syslog messages. The default |
| 154 | facility is @code{daemon}. The @code{no} form of the command resets |
| 155 | the facility to the default @code{daemon} facility. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 156 | @end deffn |
| 157 | |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 158 | @deffn Command {log record-priority} {} |
| 159 | @deffnx Command {no log record-priority} {} |
| 160 | To include the severity in all messages logged to a file, to stdout, or to |
| 161 | a terminal monitor (i.e. anything except syslog), |
| 162 | use the @code{log record-priority} global configuration command. |
| 163 | To disable this option, use the @code{no} form of the command. By default, |
| 164 | the severity level is not included in logged messages. Note: some |
| 165 | versions of syslogd (including Solaris) can be configured to include |
| 166 | the facility and level in the messages emitted. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 167 | @end deffn |
| 168 | |
Andrew J. Schorr | d3d7e23 | 2007-04-29 15:24:15 +0000 | [diff] [blame] | 169 | @deffn Command {log timestamp precision @var{<0-6>}} {} |
| 170 | @deffnx Command {no log timestamp precision} {} |
| 171 | This command sets the precision of log message timestamps to the |
| 172 | given number of digits after the decimal point. Currently, |
| 173 | the value must be in the range 0 to 6 (i.e. the maximum precision |
| 174 | is microseconds). |
| 175 | To restore the default behavior (1-second accuracy), use the |
| 176 | @code{no} form of the command, or set the precision explicitly to 0. |
| 177 | |
| 178 | @example |
| 179 | @group |
| 180 | log timestamp precision 3 |
| 181 | @end group |
| 182 | @end example |
| 183 | |
| 184 | In this example, the precision is set to provide timestamps with |
| 185 | millisecond accuracy. |
| 186 | @end deffn |
| 187 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 188 | @deffn Command {service password-encryption} {} |
| 189 | Encrypt password. |
| 190 | @end deffn |
| 191 | |
| 192 | @deffn Command {service advanced-vty} {} |
| 193 | Enable advanced mode VTY. |
| 194 | @end deffn |
| 195 | |
| 196 | @deffn Command {service terminal-length @var{<0-512>}} {} |
| 197 | Set system wide line configuration. This configuration command applies |
| 198 | to all VTY interfaces. |
| 199 | @end deffn |
| 200 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 201 | @deffn Command {line vty} {} |
| 202 | Enter vty configuration mode. |
| 203 | @end deffn |
| 204 | |
| 205 | @deffn Command {banner motd default} {} |
| 206 | Set default motd string. |
| 207 | @end deffn |
| 208 | |
| 209 | @deffn Command {no banner motd} {} |
| 210 | No motd banner string will be printed. |
| 211 | @end deffn |
| 212 | |
| 213 | @deffn {Line Command} {exec-timeout @var{minute}} {} |
| 214 | @deffnx {Line Command} {exec-timeout @var{minute} @var{second}} {} |
| 215 | Set VTY connection timeout value. When only one argument is specified |
| 216 | it is used for timeout value in minutes. Optional second argument is |
| 217 | used for timeout value in seconds. Default timeout value is 10 minutes. |
| 218 | When timeout value is zero, it means no timeout. |
| 219 | @end deffn |
| 220 | |
| 221 | @deffn {Line Command} {no exec-timeout} {} |
| 222 | Do not perform timeout at all. This command is as same as |
| 223 | @command{exec-timeout 0 0}. |
| 224 | @end deffn |
| 225 | |
| 226 | @deffn {Line Command} {access-class @var{access-list}} {} |
| 227 | Restrict vty connections with an access list. |
| 228 | @end deffn |
| 229 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 230 | @node Sample Config File |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 231 | @subsection Sample Config File |
| 232 | |
| 233 | |
| 234 | Below is a sample configuration file for the zebra daemon. |
| 235 | |
| 236 | @example |
| 237 | @group |
| 238 | ! |
| 239 | ! Zebra configuration file |
| 240 | ! |
| 241 | hostname Router |
| 242 | password zebra |
| 243 | enable password zebra |
| 244 | ! |
| 245 | log stdout |
| 246 | ! |
| 247 | ! |
| 248 | @end group |
| 249 | @end example |
| 250 | |
| 251 | '!' and '#' are comment characters. If the first character of the word |
| 252 | is one of the comment characters then from the rest of the line forward |
| 253 | will be ignored as a comment. |
| 254 | |
| 255 | @example |
| 256 | password zebra!password |
| 257 | @end example |
| 258 | |
| 259 | If a comment character is not the first character of the word, it's a |
| 260 | normal character. So in the above example '!' will not be regarded as a |
| 261 | comment and the password is set to 'zebra!password'. |
| 262 | |
| 263 | |
| 264 | |
ajs | 274a4a4 | 2004-12-07 15:39:31 +0000 | [diff] [blame] | 265 | @node Terminal Mode Commands |
| 266 | @section Terminal Mode Commands |
| 267 | |
| 268 | @deffn Command {write terminal} {} |
| 269 | Displays the current configuration to the vty interface. |
| 270 | @end deffn |
| 271 | |
| 272 | @deffn Command {write file} {} |
| 273 | Write current configuration to configuration file. |
| 274 | @end deffn |
| 275 | |
| 276 | @deffn Command {configure terminal} {} |
| 277 | Change to configuration mode. This command is the first step to |
| 278 | configuration. |
| 279 | @end deffn |
| 280 | |
| 281 | @deffn Command {terminal length @var{<0-512>}} {} |
| 282 | Set terminal display length to @var{<0-512>}. If length is 0, no |
| 283 | display control is performed. |
| 284 | @end deffn |
| 285 | |
| 286 | @deffn Command {who} {} |
| 287 | Show a list of currently connected vty sessions. |
| 288 | @end deffn |
| 289 | |
| 290 | @deffn Command {list} {} |
| 291 | List all available commands. |
| 292 | @end deffn |
| 293 | |
| 294 | @deffn Command {show version} {} |
| 295 | Show the current version of @value{PACKAGE_NAME} and its build host information. |
| 296 | @end deffn |
| 297 | |
| 298 | @deffn Command {show logging} {} |
| 299 | Shows the current configuration of the logging system. This includes |
| 300 | the status of all logging destinations. |
| 301 | @end deffn |
| 302 | |
| 303 | @deffn Command {logmsg @var{level} @var{message}} {} |
| 304 | Send a message to all logging destinations that are enabled for messages |
| 305 | of the given severity. |
| 306 | @end deffn |
| 307 | |
| 308 | |
| 309 | |
| 310 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 311 | @node Common Invocation Options |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 312 | @section Common Invocation Options |
| 313 | @c COMMON_OPTIONS |
| 314 | @c OPTIONS section of the man page |
| 315 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 316 | These options apply to all @value{PACKAGE_NAME} daemons. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 317 | |
| 318 | @table @samp |
| 319 | |
| 320 | @item -d |
| 321 | @itemx --daemon |
| 322 | Runs in daemon mode. |
| 323 | |
| 324 | @item -f @var{file} |
| 325 | @itemx --config_file=@var{file} |
| 326 | Set configuration file name. |
| 327 | |
| 328 | @item -h |
| 329 | @itemx --help |
| 330 | Display this help and exit. |
| 331 | |
| 332 | @item -i @var{file} |
| 333 | @itemx --pid_file=@var{file} |
| 334 | |
| 335 | Upon startup the process identifier of the daemon is written to a file, |
| 336 | typically in @file{/var/run}. This file can be used by the init system |
| 337 | to implement commands such as @command{@dots{}/init.d/zebra status}, |
| 338 | @command{@dots{}/init.d/zebra restart} or @command{@dots{}/init.d/zebra |
| 339 | stop}. |
| 340 | |
| 341 | The file name is an run-time option rather than a configure-time option |
| 342 | so that multiple routing daemons can be run simultaneously. This is |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 343 | useful when using @value{PACKAGE_NAME} to implement a routing looking glass. One |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 344 | machine can be used to collect differing routing views from differing |
| 345 | points in the network. |
| 346 | |
paul | 971a449 | 2003-06-20 01:18:07 +0000 | [diff] [blame] | 347 | @item -A @var{address} |
| 348 | @itemx --vty_addr=@var{address} |
| 349 | Set the VTY local address to bind to. If set, the VTY socket will only |
| 350 | be bound to this address. |
| 351 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 352 | @item -P @var{port} |
| 353 | @itemx --vty_port=@var{port} |
paul | 971a449 | 2003-06-20 01:18:07 +0000 | [diff] [blame] | 354 | Set the VTY TCP port number. If set to 0 then the TCP VTY sockets will not |
| 355 | be opened. |
| 356 | |
| 357 | @item -u @var{user} |
| 358 | @itemx --vty_addr=@var{user} |
| 359 | Set the user and group to run as. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 360 | |
| 361 | @item -v |
| 362 | @itemx --version |
| 363 | Print program version. |
| 364 | |
| 365 | @end table |
| 366 | |
| 367 | |
| 368 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 369 | @node Virtual Terminal Interfaces |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 370 | @section Virtual Terminal Interfaces |
| 371 | |
| 372 | VTY -- Virtual Terminal [aka TeletYpe] Interface is a command line |
| 373 | interface (CLI) for user interaction with the routing daemon. |
| 374 | |
| 375 | @menu |
| 376 | * VTY Overview:: Basics about VTYs |
| 377 | * VTY Modes:: View, Enable, and Other VTY modes |
| 378 | * VTY CLI Commands:: Commands for movement, edition, and management |
| 379 | @end menu |
| 380 | |
| 381 | |
| 382 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 383 | @node VTY Overview |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 384 | @subsection VTY Overview |
| 385 | |
| 386 | |
| 387 | VTY stands for Virtual TeletYpe interface. It means you can connect to |
| 388 | the daemon via the telnet protocol. |
| 389 | |
| 390 | To enable a VTY interface, you have to setup a VTY password. If there |
| 391 | is no VTY password, one cannot connect to the VTY interface at all. |
| 392 | |
| 393 | @example |
| 394 | @group |
| 395 | % telnet localhost 2601 |
| 396 | Trying 127.0.0.1... |
| 397 | Connected to localhost. |
| 398 | Escape character is '^]'. |
| 399 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 400 | Hello, this is @value{PACKAGE_NAME} (version @value{VERSION}) |
| 401 | @value{COPYRIGHT_STR} |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 402 | |
| 403 | User Access Verification |
| 404 | |
| 405 | Password: XXXXX |
| 406 | Router> ? |
| 407 | enable Turn on privileged commands |
| 408 | exit Exit current mode and down to previous mode |
| 409 | help Description of the interactive help system |
| 410 | list Print command list |
| 411 | show Show running system information |
| 412 | who Display who is on a vty |
| 413 | Router> enable |
| 414 | Password: XXXXX |
| 415 | Router# configure terminal |
| 416 | Router(config)# interface eth0 |
| 417 | Router(config-if)# ip address 10.0.0.1/8 |
| 418 | Router(config-if)# ^Z |
| 419 | Router# |
| 420 | @end group |
| 421 | @end example |
| 422 | |
| 423 | '?' is very useful for looking up commands. |
| 424 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 425 | @node VTY Modes |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 426 | @subsection VTY Modes |
| 427 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 428 | There are three basic VTY modes: |
| 429 | |
| 430 | @menu |
| 431 | * VTY View Mode:: Mode for read-only interaction |
| 432 | * VTY Enable Mode:: Mode for read-write interaction |
| 433 | * VTY Other Modes:: Special modes (tftp, etc) |
| 434 | @end menu |
| 435 | |
| 436 | There are commands that may be restricted to specific VTY modes. |
| 437 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 438 | @node VTY View Mode |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 439 | @subsubsection VTY View Mode |
| 440 | @c to be written (gpoul) |
| 441 | |
| 442 | |
| 443 | This mode is for read-only access to the CLI. One may exit the mode by |
| 444 | leaving the system, or by entering @code{enable} mode. |
| 445 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 446 | @node VTY Enable Mode |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 447 | @subsubsection VTY Enable Mode |
| 448 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 449 | @c to be written (gpoul) |
| 450 | This mode is for read-write access to the CLI. One may exit the mode by |
| 451 | leaving the system, or by escaping to view mode. |
| 452 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 453 | @node VTY Other Modes |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 454 | @subsubsection VTY Other Modes |
| 455 | |
| 456 | |
| 457 | @c to be written (gpoul) |
| 458 | This page is for describing other modes. |
| 459 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 460 | @node VTY CLI Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 461 | @subsection VTY CLI Commands |
| 462 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 463 | Commands that you may use at the command-line are described in the following |
| 464 | three subsubsections. |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 465 | |
| 466 | @menu |
| 467 | * CLI Movement Commands:: Commands for moving the cursor about |
| 468 | * CLI Editing Commands:: Commands for changing text |
| 469 | * CLI Advanced Commands:: Other commands, session management and so on |
| 470 | @end menu |
| 471 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 472 | @node CLI Movement Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 473 | @subsubsection CLI Movement Commands |
| 474 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 475 | These commands are used for moving the CLI cursor. The @key{C} character |
| 476 | means press the Control Key. |
| 477 | |
| 478 | @table @kbd |
| 479 | |
| 480 | @item C-f |
| 481 | @itemx @key{RIGHT} |
| 482 | @kindex C-f |
| 483 | @kindex @key{RIGHT} |
| 484 | Move forward one character. |
| 485 | |
| 486 | @item C-b |
| 487 | @itemx @key{LEFT} |
| 488 | @kindex C-b |
| 489 | @kindex @key{LEFT} |
| 490 | Move backward one character. |
| 491 | |
| 492 | @item M-f |
| 493 | @kindex M-f |
| 494 | Move forward one word. |
| 495 | |
| 496 | @item M-b |
| 497 | @kindex M-b |
| 498 | Move backward one word. |
| 499 | |
| 500 | @item C-a |
| 501 | @kindex C-a |
| 502 | Move to the beginning of the line. |
| 503 | |
| 504 | @item C-e |
| 505 | @kindex C-e |
| 506 | Move to the end of the line. |
| 507 | |
| 508 | @end table |
| 509 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 510 | @node CLI Editing Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 511 | @subsubsection CLI Editing Commands |
| 512 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 513 | These commands are used for editing text on a line. The @key{C} |
| 514 | character means press the Control Key. |
| 515 | |
| 516 | @table @kbd |
| 517 | |
| 518 | @item C-h |
| 519 | @itemx @key{DEL} |
| 520 | @kindex C-h |
| 521 | @kindex @key{DEL} |
| 522 | Delete the character before point. |
| 523 | |
| 524 | @item C-d |
| 525 | @kindex C-d |
| 526 | Delete the character after point. |
| 527 | |
| 528 | @item M-d |
| 529 | @kindex M-d |
| 530 | Forward kill word. |
| 531 | |
| 532 | @item C-w |
| 533 | @kindex C-w |
| 534 | Backward kill word. |
| 535 | |
| 536 | @item C-k |
| 537 | @kindex C-k |
| 538 | Kill to the end of the line. |
| 539 | |
| 540 | @item C-u |
| 541 | @kindex C-u |
| 542 | Kill line from the beginning, erasing input. |
| 543 | |
| 544 | @item C-t |
| 545 | @kindex C-t |
| 546 | Transpose character. |
| 547 | |
| 548 | @end table |
| 549 | |
paul | 76b89b4 | 2004-11-06 17:13:09 +0000 | [diff] [blame] | 550 | @node CLI Advanced Commands |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 551 | @subsubsection CLI Advanced Commands |
| 552 | |
paul | 718e374 | 2002-12-13 20:15:29 +0000 | [diff] [blame] | 553 | There are several additional CLI commands for command line completions, |
| 554 | insta-help, and VTY session management. |
| 555 | |
| 556 | @table @kbd |
| 557 | |
| 558 | @item C-c |
| 559 | @kindex C-c |
| 560 | Interrupt current input and moves to the next line. |
| 561 | |
| 562 | @item C-z |
| 563 | @kindex C-z |
| 564 | End current configuration session and move to top node. |
| 565 | |
| 566 | |
| 567 | @item C-n |
| 568 | @itemx @key{DOWN} |
| 569 | @kindex C-n |
| 570 | @kindex @key{DOWN} |
| 571 | Move down to next line in the history buffer. |
| 572 | |
| 573 | @item C-p |
| 574 | @itemx @key{UP} |
| 575 | @kindex C-p |
| 576 | @kindex @key{UP} |
| 577 | Move up to previous line in the history buffer. |
| 578 | |
| 579 | @item TAB |
| 580 | @kindex @key{TAB} |
| 581 | Use command line completion by typing @key{TAB}. |
| 582 | |
| 583 | @item |
| 584 | @kindex ? |
| 585 | You can use command line help by typing @code{help} at the beginning of |
| 586 | the line. Typing @kbd{?} at any point in the line will show possible |
| 587 | completions. |
| 588 | |
| 589 | @end table |