Next: , Up: Config Commands   [Contents][Index]


3.1.1 Basic Config Commands

Command: hostname hostname

Set hostname of the router.

Command: password password

Set password for vty interface. If there is no password, a vty won’t accept connections.

Command: enable password password

Set enable password.

Command: log trap level
Command: no log trap

These commands are deprecated and are present only for historical compatibility. The log trap command sets the current logging level for all enabled logging destinations, and it sets the default for all future logging commands that do not specify a level. The normal default logging level is debugging. The no form of the command resets the default level for future logging commands to debugging, but it does not change the logging level of existing logging destinations.

Command: log stdout
Command: log stdout level
Command: no log stdout

Enable logging output to stdout. If the optional second argument specifying the logging level is not present, the default logging level (typically debugging, but can be changed using the deprecated log trap command) will be used. The no form of the command disables logging to stdout. The level argument must have one of these values: emergencies, alerts, critical, errors, warnings, notifications, informational, or debugging. Note that the existing code logs its most important messages with severity errors.

Command: log file filename
Command: log file filename level
Command: no log file

If you want to log into a file, please specify filename as in this example:

log file /var/log/quagga/bgpd.log informational

If the optional second argument specifying the logging level is not present, the default logging level (typically debugging, but can be changed using the deprecated log trap command) will be used. The no form of the command disables logging to a file.

Note: if you do not configure any file logging, and a daemon crashes due to a signal or an assertion failure, it will attempt to save the crash information in a file named /var/tmp/quagga.<daemon name>.crashlog. For security reasons, this will not happen if the file exists already, so it is important to delete the file after reporting the crash information.

Command: log syslog
Command: log syslog level
Command: no log syslog

Enable logging output to syslog. If the optional second argument specifying the logging level is not present, the default logging level (typically debugging, but can be changed using the deprecated log trap command) will be used. The no form of the command disables logging to syslog.

Command: log monitor
Command: log monitor level
Command: no log monitor

Enable logging output to vty terminals that have enabled logging using the terminal monitor command. By default, monitor logging is enabled at the debugging level, but this command (or the deprecated log trap command) can be used to change the monitor logging level. If the optional second argument specifying the logging level is not present, the default logging level (typically debugging, but can be changed using the deprecated log trap command) will be used. The no form of the command disables logging to terminal monitors.

Command: log facility facility
Command: no log facility

This command changes the facility used in syslog messages. The default facility is daemon. The no form of the command resets the facility to the default daemon facility.

Command: log record-priority
Command: no log record-priority

To include the severity in all messages logged to a file, to stdout, or to a terminal monitor (i.e. anything except syslog), use the log record-priority global configuration command. To disable this option, use the no form of the command. By default, the severity level is not included in logged messages. Note: some versions of syslogd (including Solaris) can be configured to include the facility and level in the messages emitted.

Command: log timestamp precision <0-6>
Command: no log timestamp precision

This command sets the precision of log message timestamps to the given number of digits after the decimal point. Currently, the value must be in the range 0 to 6 (i.e. the maximum precision is microseconds). To restore the default behavior (1-second accuracy), use the no form of the command, or set the precision explicitly to 0.

log timestamp precision 3

In this example, the precision is set to provide timestamps with millisecond accuracy.

Command: log commands

This command enables the logging of all commands typed by a user to all enabled log destinations. The note that logging includes full command lines, including passwords. Once set, command logging can only be turned off by restarting the daemon.

Command: service password-encryption

Encrypt password.

Command: service advanced-vty

Enable advanced mode VTY.

Command: service terminal-length <0-512>

Set system wide line configuration. This configuration command applies to all VTY interfaces.

Command: line vty

Enter vty configuration mode.

Command: banner motd default

Set default motd string.

Command: no banner motd

No motd banner string will be printed.

Line Command: exec-timeout minute
Line Command: exec-timeout minute second

Set VTY connection timeout value. When only one argument is specified it is used for timeout value in minutes. Optional second argument is used for timeout value in seconds. Default timeout value is 10 minutes. When timeout value is zero, it means no timeout.

Line Command: no exec-timeout

Do not perform timeout at all. This command is as same as exec-timeout 0 0.

Line Command: access-class access-list

Restrict vty connections with an access list.


Next: , Up: Config Commands   [Contents][Index]