Table Of Contents
Connection and System Banner Commands
banner exec
banner incoming
banner login
banner motd
busy-message
clear tcp
exec
exec-banner
exec-timeout
motd-banner
name-connection
refuse-message
send
service linenumber
show hosts
systat
vacant-message
Connection and System Banner Commands
This chapter describes the connection and system banner commands.
For connection and system banner task information and examples, refer to the "Managing Connections and System Banners" chapter in the Configuration Fundamentals Configuration Guide.
banner exec
To display a banner on terminals with an interactive EXEC, use the banner exec global configuration command. This command specifies a message to be displayed when an EXEC process is created (a line is activated, or an incoming connection is made to a VTY line). The no form of this command deletes the EXEC banner.
banner exec d message d
no banner exec
Syntax Description
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the banner message.
|
message
|
Message text.
|
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
When someone connects to the router, the MOTD banner appears before the login prompt. After the user successfully logs in to the router, the EXEC banner or incoming banner will be displayed, depending on the type of connection. For a reverse Telnet login, the incoming banner will be displayed. For all other connections, the router will display the EXEC banner.
To disable the EXEC banner on a particular line, use the no exec-banner line configuration command.
Example
The following example sets an EXEC banner. The dollar sign ($) is used as a delimiting character.
Session activated. Enter commands at the prompt.
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner incoming
banner login
banner motd
exec-banner
banner incoming
To specify a banner used when you have an incoming connection to a line from a host on the network, use the banner incoming global configuration command. The no form of this command deletes the incoming connection banner.
banner incoming d message d
no banner incoming
Syntax Description
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the banner message.
|
message
|
Message text.
|
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
An incoming connection is one initiated from the network side of the router. Incoming connections are also called reverse Telnet sessions. These sessions can display MOTD banners and incoming banners, but they do not display EXEC banners. Use the no motd-banner line configuration command to disable the MOTD banner for reverse Telnet sessions on asynchronous lines.
When a user connects to the router, the MOTD banner appears before the login prompt. After the user successfully logs in to the router, the EXEC banner or incoming banner will be displayed, depending on the type of connection. For a reverse Telnet login, the incoming banner will be displayed. For all other connections, the router will display the EXEC banner.
Incoming banners cannot be suppressed. If you do not want the incoming banner to appear, you must delete it with the no banner incoming command.
Example
The following example sets an incoming connection banner. The pound sign (#) is used as a delimiting character.
banner incoming #
Welcome to Reuses.
#
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner exec
banner login
banner motd
motd-banner
banner login
To display a login banner, use the banner login global configuration command. This command specifies a message to be displayed before the username and password login prompts. The no form of this command deletes the login banner.
banner login d message d
no banner login
Syntax Description
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the banner message.
|
message
|
Message text.
|
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
When someone connects to the router, the MOTD banner (if configured) appears first, followed by the login banner and prompts. After the user successfully logs in to the router, the EXEC banner or incoming banner will be displayed, depending on the type of connection. For a reverse Telnet login, the incoming banner will be displayed. For all other connections, the router will display the EXEC banner.
Example
The following example sets a login banner. The dollar sign ($) is used as a delimiting character.
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner exec
banner incoming
banner motd
banner motd
To specify a message-of-the-day (MOTD) banner, use the banner motd global configuration command. The no form of this command deletes the MOTD banner.
banner motd d message d
no banner motd
Syntax Description
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the banner message.
|
message
|
Message text.
|
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
This MOTD banner is displayed to all terminals connected and is useful for sending messages that affect all users (such as impending system shutdowns). Use the no exec-banner or no motd-banner command to disable the MOTD banner on a line. The no exec-banner command also disables the EXEC banner on the line.
When someone connects to the router, the MOTD banner appears before the login prompt. After the user successfully logs in to the router, the EXEC banner or incoming banner will be displayed, depending on the type of connection. For a reverse Telnet login, the incoming banner will be displayed. For all other connections, the router will display the EXEC banner.
The banner command without any keywords specified defaults to the banner motd command. When a new banner motd command is added to the configuration, it overwrites the existing banner command if no keyword is specified. Similarly, if a banner command is added to the configuration, any existing banner motd command is overwritten.
Example
The following example sets a MOTD banner. The pound sign (#) is used as a delimiting character.
banner motd #
Building power will be off from 7:00 AM until 9:00 AM this coming Tuesday.
#
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner exec
banner incoming
banner login
exec-banner
motd-banner
busy-message
To create a "host failed" message that displays when a connection fails, use the busy-message global configuration command. Use the no form of this command to disable the "host failed" message from displaying on the specified host.
busy-message hostname d message d
no busy-message hostname
Syntax Description
hostname
|
Name of the host that cannot be reached.
|
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the message.
|
message
|
Message text.
|
Default
None
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
This command applies only to Telnet connections.
Follow the busy-message command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
Defining a "host failed" message for a host prevents all Cisco IOS software-initiated user messages, including the initial message that indicates the connection is "Trying..." The busy-message command can be used in the autocommand command to suppress these messages.
Example
The following example displays a message on the terminal whenever an attempt to connect to the host named dross fails. The pound sign (#) is used as a delimiting character.
busy-message dross #
Cannot connect to host. Contact the computer center.
#
clear tcp
To clear a TCP connection, use the clear tcp privileged EXEC command.
clear tcp {line line-number | local host-name port remote host-name port | tcb address}
Syntax Description
line line-number
|
TTY line number of the TCP connection to clear.
|
local host-name port remote host-name port
|
Local router's host name and port and remote router's host name and port of the TCP connection to clear.
|
tcb address
|
Transmission Control Block (TCB) address of the TCP connection to clear. The TCB address is an internal identifier for the end point.
|
Command Mode
Privileged EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
The clear tcp command is particularly useful for clearing hung TCP connections.
The clear tcp line line-number command terminates the TCP connection on the specified TTY line. Additionally, all TCP sessions initiated from that TTY line are terminated.
The clear tcp local host-name port remote host-name port command terminates the specific TCP connection identified by the host name/port pair of the local and remote router.
The clear tcp tcb address command terminates the specific TCP connection identified by the TCB address.
Examples
The following example clears a TCP connection using its TTY line number. The show tcp command displays the line number (tty2) that is used in the clear tcp command.
tty2, virtual tty from host router20.cisco.com
Connection state is ESTAB, I/O status: 1, unread input bytes: 0
Local host: 171.69.233.7, Local port: 23
Foreign host: 171.69.61.75, Foreign port: 1058
Enqueued packets for retransmit: 0, input: 0, saved: 0
Event Timers (current time is 0x36144):
Timer Starts Wakeups Next
iss: 4151109680 snduna: 4151109752 sndnxt: 4151109752 sndwnd: 24576
irs: 1249472001 rcvnxt: 1249472032 rcvwnd: 4258 delrcvwnd: 30
SRTT: 710 ms, RTTO: 4442 ms, RTV: 1511 ms, KRTT: 0 ms
minRTT: 0 ms, maxRTT: 300 ms, ACK hold: 300 ms
The following example clears a TCP connection by specifying its local router host name and port and its remote router host name and port. The show tcp brief command displays the local (Local Address) and remote (Foreign Address) host names and ports to use in the clear tcp command.
TCB Local Address Foreign Address (state)
60A34E9C router1.cisco.com.23 router20.cisco.1055 ESTAB
Router# clear tcp local router1 23 remote router20 1055
The following example clears a TCP connection using its TCB address. The show tcp brief command displays the TCB address to use in the clear tcp command.
TCB Local Address Foreign Address (state)
60B75E48 router1.cisco.com.23 router20.cisco.1054 ESTAB
Router# clear tcp tcb 60B75E48
Related Commands
You can use the master indexes or search online to find documentation of related commands.
show tcp
show tcp brief
exec
To allow an EXEC process on a line, use the exec line configuration command. Use the no form of this command to turn off the EXEC process for the specified line.
exec
no exec
Syntax Description
This command has no arguments or keywords.
Default
The EXEC processes start is activated automatically on all lines.
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
When you want to allow an outgoing connection only for a line, use the no exec command. When a user tries to Telnet to a line with the no exec command configured, the user will get no response when pressing the Return key at the login screen.
Example
The following example illustrates how to turn off the EXEC on line 7. You might want to do this on the auxiliary port if the attached device (for example, the control port of a rack of modems) sends unsolicited data. If this happens, an EXEC process starts, which makes the line unavailable.
exec-banner
To display EXEC and MOTD banners, use the exec-banner line configuration command. Use the no form of this command to suppress the banners.
exec-banner
no exec-banner
Syntax Description
This command has no arguments or keywords.
Default
Enabled on all lines.
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
This command determines whether the router will display the EXEC banner and the message-of-the-day (MOTD) banner when an EXEC session is created. These banners are defined with the banner exec and banner motd commands. By default, these banner are enabled on all lines. Disable the EXEC and MOTD banners using the no exec-banner command.
This command has no effect on the incoming banner, which is controlled by the banner incoming command.
The MOTD banners can also be disabled by the no motd-banner line configuration command, which disables MOTD banners on a line. If the no exec-banner command is configured on a line, the MOTD banner will be disabled regardless of whether the motd-banner command is enabled or disabled. summarizes the effects of the exec-banner command and the motd-banner command.
Table 8 Banners Displayed
| |
exec-banner (default)
|
no exec-banner
|
motd-banner (default)
|
MOTD banner
EXEC banner
|
None
|
no motd-banner
|
EXEC banner
|
None
|
For reverse Telnet connections, the EXEC banner is never displayed. Instead, the incoming banner is displayed. The MOTD banner is displayed by default, but it is disabled if either the no exec-banner command or no motd-banner command is configured. summarizes the effects of the exec-banner command and the motd-banner command for reverse Telnet connections.
Table 9 Banners Displayed—Reverse Telnet Session to Async Lines
| |
exec-banner (default)
|
no exec-banner
|
motd-banner (default)
|
MOTD banner
incoming banner
|
incoming banner
|
no motd-banner
|
incoming banner
|
incoming banner
|
Example
The following example suppresses the EXEC and MOTD banners on virtual terminal lines 0 to 4:
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner exec
banner incoming
banner motd
motd-banner
exec-timeout
To set the interval that the EXEC command interpreter waits until user input is detected, use the exec-timeout line configuration command. Use the no form of this command to remove the timeout definition.
exec-timeout minutes [seconds]
no exec-timeout
Syntax Description
minutes
|
Integer that specifies the number of minutes.
|
seconds
|
(Optional) Additional time intervals in seconds.
|
Default
10 minutes
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
If no input is detected during the interval, the EXEC facility resumes the current connection. If no connections exist, the EXEC facility returns the terminal to the idle state and disconnects the incoming session.
To specify no timeout, enter the exec-timeout 0 0 command.
Examples
The following example sets a time interval of 2 minutes, 30 seconds:
line console
exec-timeout 2 30
The following example sets a time interval of 10 seconds:
line console
exec-timeout 0 10
motd-banner
To display message-of-the-day (MOTD) banners, use the motd-banner line configuration command. Use the no form of this command to suppress the MOTD banners.
motd-banner
no motd-banner
Syntax Description
This command has no arguments or keywords.
Default
Enabled on all lines.
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 11.1.
This command determines whether the router will display the MOTD banner when an EXEC session is created. The MOTD banner is defined with the banner motd command. By default, the MOTD banner is enabled on all lines. Disable the MOTD banner using the no motd-banner command.
The MOTD banners can also be disabled by the no exec-banner line configuration command, which disables both MOTD banners and EXEC banners on a line. If the no exec-banner command is configured on a line, the MOTD banner will be disabled regardless of whether the motd-banner command is enabled or disabled. summarizes the effects of the exec-banner command and the motd-banner command.
Table 10 Banners Displayed
| |
exec-banner (default)
|
no exec-banner
|
motd-banner (default)
|
MOTD banner
EXEC banner
|
None
|
no motd-banner
|
EXEC banner
|
None
|
For reverse Telnet connections, the EXEC banner is never displayed. Instead, the incoming banner is displayed. The MOTD banner is displayed by default, but it is disabled if either the no exec-banner command or no motd-banner command is configured. summarizes the effects of the exec-banner command and the motd-banner command for reverse Telnet connections.
Table 11 Banners Displayed—Reverse Telnet Session to Async Lines
| |
exec-banner (default)
|
no exec-banner
|
motd-banner (default)
|
MOTD banner
incoming banner
|
incoming banner
|
no motd-banner
|
incoming banner
|
incoming banner
|
Example
The following example suppresses the MOTD banner on virtual terminal lines 0 to 4:
Related Commands
You can use the master indexes or search online to find documentation of related commands.
banner exec
banner incoming
banner motd
motd-banner
name-connection
To assign a logical name to a connection, use the name-connection user EXEC command.
name-connection
Syntax Description
This command has no arguments or keywords.
Default
None
Command Mode
User EXEC
Usage Guidelines
This command first appeared in a release prior to Cisco IOS Release 10.0.
This command can be useful for keeping track of multiple connections.
You are prompted for the connection number and name to assign. The where command displays a list of the assigned logical connection names.
Example
The following example assigns the logical name blue to the connection:
Conn Host Address Byte Idle Conn Name
* 1 doc-2509 172.30.162.131 0 0 doc-2509
Connection 1 to doc-2509 will be named "BLUE" [confirm]
Related Commands
You can use the master indexes or search online to find documentation of related commands.
where
refuse-message
To define a line-in-use message, use the refuse-message line configuration command. Use the no form of this command to disable the message.
refuse-message d message d
no refuse-message
Syntax Description
d
|
Delimiting character of your choice—a pound sign (#) for example. You cannot use the delimiting character in the message.
|
message
|
Message text.
|
Default
No line-in-use message is defined.
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character. You cannot use the delimiting character within the text of the message.
When you define a message using this command, the Cisco IOS software does the following:
1
Accepts the connection.
2
Prints the custom message.
3
Clears the connection.
Example
In the following example, line 5 is configured with a line-in-use message, and the user is instructed to try again later:
refuse-message /The dial-out modem is currently in use.
send
To send messages to one or all terminal lines, use the send EXEC command.
send {line-number | * | aux number | console number | tty number | vty number}
Syntax Description
line-number
|
Line number to which the message will be sent.
|
*
|
Sends a message to all TTY lines.
|
aux number
|
Sends a message to the AUX port.
|
console number
|
Sends a message to the console port.
|
tty number
|
Sends a message to an asynchronous line.
|
vty number
|
Sends a message to a VTY line.
|
Default
None
Command Mode
EXEC
Usage Guidelines
This command first appeared in Cisco IOS Release 11.2.
The system prompts for the message, which can be up to 500 characters long. Enter Ctrl-Z to end the message. Enter Ctrl-C to abort this command.
Example
The following example sends a message to all lines:
Enter message, end with CTRL/Z; abort with CTRL/C:
The system 2509 will be shut down in 10 minutes for repairs.^Z
*** Message from tty0 to all terminals:
The system 2509 will be shut down in 10 minutes for repairs.
service linenumber
To configure the Cisco IOS software to display line number information after the EXEC or incoming banner, use the service linenumber global configuration command. Use the no form of this command to disable this function.
service linenumber
no service linenumber
Syntax Description
This command has no arguments or keywords.
Default
Disabled
Command Mode
Global configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
With the service linenumber command, you can have the Cisco IOS software display the host name, line number, and location each time an EXEC process is started, or an incoming connection is made. The line number banner appears immediately after the EXEC banner or incoming banner. This feature is useful for tracking problems with modems, because the host and line for the modem connection are listed. Modem type information can also be included.
Example
In the following example, a user Telnets to Router2 before and after the service linenumber command is enabled. The second time, information about the line is displayed after the banner.
Trying Router2 (172.30.162.131)... Open
Router2# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)# service linenumber
[Connection to Router2 closed by foreign host]
Trying Router2 (172.30.162.131)... Open
Related Commands
You can use the master indexes or search online to find documentation of related commands.
show users
show hosts
To display the default domain name, the style of name lookup service, a list of name server hosts, and the cached list of host names and addresses on the network to which you can connect, use the show hosts user EXEC command.
show hosts
Syntax Description
This command has no arguments or keywords.
Command Mode
User EXEC
Usage Guidelines
This command first appeared in a release prior to Cisco IOS Release 10.0.
Sample Display
The following is a sample display from the show hosts output:
Default domain is CISCO.COM
Name/address lookup uses domain service
Name servers are 255.255.255.255
Host Flags Age Type Address(es)
SLAG.CISCO.COM (temp, OK) 1 IP 131.108.4.10
CHAR.CISCO.COM (temp, OK) 8 IP 192.31.7.50
CHAOS.CISCO.COM (temp, OK) 8 IP 131.108.1.115
DIRT.CISCO.COM (temp, EX) 8 IP 131.108.1.111
DUSTBIN.CISCO.COM (temp, EX) 0 IP 131.108.1.27
DREGS.CISCO.COM (temp, EX) 24 IP 131.108.1.30
describes significant fields shown in the display.
Table 12 Show Hosts Field Descriptions
Field
|
Description
|
Host
|
Name of server host.
|
Flags
|
A temporary entry is entered by a name server; the server removes the entry after 72 hours of inactivity.
A permanent entry is entered by a configuration command and is not timed out. Entries marked "OK" are believed to be valid. Entries marked "??" are considered suspect and subject to revalidation. Entries marked "EX" are expired.
|
Age
|
Indicates the number of hours since the Cisco IOS software last referred to the cache entry.
|
Type
|
Identifies the type of address (for example, IP, CLNS, or X.121). If you used the ip hp-host global configuration command, the show hosts command displays these host names as type HP-IP.
|
Address(es)
|
Shows the address of the host. One host can have up to eight addresses.
|
systat
The show users command replaces the systat command. Refer to the description of the show users command for more information.
vacant-message
To display an idle terminal message, use the vacant-message line configuration command. Use the no form of this command to remove the default vacant message or any other vacant message that may have been set.
vacant-message [d message d]
no vacant-message
Syntax Description
d
|
(Optional) A delimiting character of your choice—a pound sign (#), for example. You cannot use the delimiting character in the banner message.
|
message
|
(Optional) Vacant terminal message.
|
d
|
(Optional) A delimiting character of your choice.
|
Default
The format of the default vacant message is as follows:
<blank lines>
hostname tty# is now available
<blank lines>
Press RETURN to get started.
This message is generated by the system.
Command Mode
Line configuration
Usage Guidelines
This command first appeared in Cisco IOS Release 10.0.
This command enables the banner to be displayed on the screen of an idle terminal. The vacant-message command without any arguments restores the default message.
Follow this command with one or more blank spaces and a delimiting character of your choice. Then enter one or more lines of text, terminating the message with the second occurrence of the delimiting character.
Note
For a rotary group, you only need to define the message for the first line in the group.
Example
The following example turns on the system banner and displays this message:
Welcome to Cisco Systems, Inc.
Press Return to get started.