Cisco IOS Configuration Fundamentals Command�Reference, Release�12.2
Connection, Menu, and System Banner Commands
Downloads: This chapterpdf (PDF - 433.0KB) The complete bookPDF (PDF - 7.32MB) | Feedback

Connection, Menu, and System Banner Commands

Table Of Contents

Connection, Menu, and System Banner Commands

banner exec

banner incoming

banner login

banner motd

banner slip-ppp

clear tcp

exec

exec-banner

exec-timeout

lock

menu clear-screen

menu command

menu default

menu line-mode

menu options

menu prompt

menu single-space

menu status-line

menu text

menu title

no menu

motd-banner

name-connection

refuse-message

send

service linenumber

vacant-message


Connection, Menu, and System Banner Commands


This chapter describes commands used for connection management, and the commands used to configure user menus and banners.

For connection and system banner task information and examples, refer to the "Managing Connections, Menus, and System Banners" chapter in the Release 12.2 Cisco IOS Configuration Fundamentals Configuration Guide.

banner exec

To specify and enable a message to be displayed when an EXEC process is created (an EXEC banner), use the banner exec global configuration command. To delete the existing EXEC banner, use the no form of this command.

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. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable. Tokens are described in Table 9.


Defaults

Disabled (no EXEC banner is displayed).

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.

11.3(7.5) AA

Token functionality was introduced.

12.0(3) T

Token functionality was integrated in the 12.0 T release train.


Usage Guidelines

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). 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 a user connects to a router, the message-of-the-day (MOTD) banner appears first, followed by the login banner and prompts. After the user 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 or lines, use the no exec-banner line configuration command.

To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current Cisco IOS configuration variables, such as the router's host name and IP address. The tokens are described in Table 9.

Table 9 banner exec Tokens 

Token
Information Displayed in the Banner

$(hostname)

Displays the host name for the router.

$(domain)

Displays the domain name for the router.

$(line)

Displays the vty or tty (asynchronous) line number.

$(line-desc)

Displays the description attached to the line.


Examples

The following example sets an EXEC banner that uses tokens. The percent sign (%) is used as a delimiting character. Notice that the $(token) syntax is replaced by the corresponding configuration variable.

Router(config)# banner exec %
Enter TEXT message.  End with the character '%'.
Session activated on line $(line), $(line-desc). Enter commands at the prompt. 
% 

When a user logs on to the system, the following output is displayed:

User Access Verification

Username: joeuser
Password: <password>

 Session activated on line 50, vty default line. Enter commands at the prompt.

Router>

Related Commands

Command
Description

banner incoming

Defines a customized banner to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner login

Defines a customized banner to be displayed before the username and password login prompts.

banner motd

Defines a customized message-of-the-day banner.

banner slip-ppp

Defines a customized banner to be displayed when a Serial-line IP or Point-to-Point connection is made.

exec-banner

Controls (enables or disables) the display of EXEC banners and message-of-the-day banners on a specified line or lines.


banner incoming

To define and enable a banner to be displayed when there is an incoming connection to a terminal line from a host on the network, use the banner incoming global configuration command. To delete the incoming connection banner, use the no form of this command.

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. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable. Tokens are described in Table 10.


Defaults

Disabled (no incoming banner is displayed).

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.

11.3(7.5) AA

Token functionality was introduced.

12.0(3) T

Token functionality was integrated in the 12.0 T release train.


Usage Guidelines

Follow the banner incoming 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 message-of-the-day (MOTD) banner (if configured) appears first, 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.

To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current Cisco IOS configuration variables, such as the router's host name and IP address. The tokens are described in Table 10.

Table 10 banner incoming Tokens

Token
Information Displayed in the Banner

$(hostname)

Displays the host name for the router.

$(domain)

Displays the domain name for the router.

$(line)

Displays the vty or tty (asynchronous) line number.

$(line-desc)

Displays the description attached to the line.


Examples

The following example sets an incoming connection banner. The pound sign (#) is used as a delimiting character.

Router# banner incoming #
This is the Reuses router.
#

The following example sets an incoming connection banner that uses several tokens. The percent sign (%) is used as a delimiting character.


darkstar(config)# banner incoming %
Enter TEXT message.  End with the character '%'.
You have entered $(hostname).$(domain) on line $(line) ($(line-desc)) %
 

When the incoming connection banner is executed, the user will see the following banner. Notice that the $(token) syntax is replaced by the corresponding configuration variable.

You have entered darkstar.ourdomain.com on line 5 (Dialin Modem)

Related Commands

Command
Description

banner exec

Defines a customized banner to be displayed whenever the EXEC process is initiated.

banner login

Defines a customized banner to be displayed before the username and password login prompts.

banner motd

Defines a customized message-of-the-day banner.

banner slip-ppp

Defines a customized banner to be displayed when a Serial-line IP or Point-to-Point connection is made.


banner login

To define and enable a customized banner to be displayed before the username and password login prompts, use the banner login global configuration command. To disable the login banner, use no form of this command.

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. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable. Tokens are described in Table 11.


Defaults

Disabled (no login banner is displayed).

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.

11.3(7.5) AA

Token functionality was introduced.

12.0(3) T

Token functionality was integrated in the 12.0 T release train.


Usage Guidelines

Follow the banner login 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 a user connects to the router, the message-of-the-day (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.

To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current Cisco IOS configuration variables, such as the router's host name and IP address. The tokens are described in Table 11.

Table 11 banner login Tokens 

Token
Information Displayed in the Banner

$(hostname)

Displays the host name for the router.

$(domain)

Displays the domain name for the router.

$(line)

Displays the vty or tty (asynchronous) line number.

$(line-desc)

Displays the description attached to the line.


Examples

The following example sets a login banner. Double quotes (") are used as the delimiting character.

Router# banner login " Access for authorized users only. Please enter your username and 
password. "

The following example sets a login banner that uses several tokens. The percent sign (%) is used as the delimiting character.

darkstar(config)# banner login %
Enter TEXT message. End with the character '%'.
You have entered $(hostname).$(domain) on line $(line) ($(line-desc)) %
 

When the login banner is executed, the user will see the following banner. Notice that the $(token) syntax is replaced by the corresponding configuration variable.

You have entered darkstar.ourdomain.com on line 5 (Dialin Modem)

Related Commands

Command
Description

banner exec

Defines a customized banner to be displayed whenever the EXEC process is initiated.

banner incoming

Defines a customized message to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner motd

Defines a customized message-of-the-day banner.

banner slip-ppp

Defines a customized banner to be displayed when a Serial-line IP or Point-to-Point connection is made.


banner motd

To define and enable a message-of-the-day (MOTD) banner, use the banner motd global configuration command. To delete the MOTD banner, use the no form of this command.

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. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable.


Defaults

Disabled (no MOTD banner is displayed).

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.

11.3(7.5) AA

Token functionality was introduced.

12.0(3) T

Token functionality was integrated in the 12.0 T release train.


Usage Guidelines

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 a user connects to the router, the MOTD banner appears before the login prompt. After the user 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 customize the banner, use tokens in the form $(token) in the message text. Tokens will display current Cisco IOS configuration variables, such as the router's host name and IP address. The tokens are described in Table 12.

Table 12 banner motd Tokens

Token
Information Displayed in the Banner

$(hostname)

Displays the host name for the router.

$(domain)

Displays the domain name for the router.

$(line)

Displays the vty or tty (asynchronous) line number.

$(line-desc)

Displays the description attached to the line.


Examples

The following example configures an MOTD banner. The pound sign (#) is used as a delimiting character.

Router# banner motd # Building power will be off from 7:00 AM until 9:00 AM this coming 
Tuesday. #

The following example configures an MOTD banner with a token. The percent sign (%) is used as a delimiting character.

darkstar(config)# banner motd %
Enter TEXT message.  End with the character '%'.
Notice: all routers in $(domain) will be upgraded beginning April 20
%
 

When the MOTD banner is executed, the user will see the following. Notice that the $(token) syntax is replaced by the corresponding configuration variable.

Notice: all routers in ourdomain.com will be upgraded beginning April 20

Related Commands

Command
Description

banner exec

Defines and enables a customized banner to be displayed whenever the EXEC process is initiated.

banner incoming

Defines and enables a customized message to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner login

Defines and enables a customized banner to be displayed before the username and password login prompts.

banner slip-ppp

Defines and enables a customized banner to be displayed when a Serial-line IP or Point-to-Point connection is made.

exec-banner

Controls (enables or disables) the display of EXEC banners and message-of-the-day banners on a specified line or lines.

motd-banner

Controls (enables or disables) the display of message-of-the-day banners on a specified line or lines.


banner slip-ppp

To customize the banner that is displayed when a SLIP or PPP connection is made, use the banner slip-ppp global configuration command. To restore the default SLIP or PPP banner, use the no form of this command.

banner slip-ppp d message d

no banner slip-ppp

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. You can include tokens in the form $(token) in the message text. Tokens will be replaced with the corresponding configuration variable.


Defaults

The default SLIP or PPP banner message is:

Entering encapsulation mode. 
Async interface address is unnumbered (Ethernet0) 
Your IP address is 10.000.0.0 MTU is 1500 bytes

The banner message when using the service old-slip-prompt command is:

Entering encapsulation mode.
Your IP address is 10.100.0.0 MTU is 1500 bytes

where encapsulation is SLIP or PPP.

Command Modes

Global configuration

Command History

Release
Modification

12.0(3)T

This command was introduced.


Usage Guidelines

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.

Use this command to define a custom SLIP or PPP connection message. This is useful when legacy client applications require a specialized connection string. To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current Cisco IOS configuration variables, such as the routers host name, IP address, encapsulation type, and MTU size. The banner tokens are described in Table 13.

Table 13 banner slip-ppp Tokens 

Token
Information Displayed in the Banner

$(hostname)

Displays the host name of the router.

$(domain)

Displays the domain name of the router.

$(peer-ip)

Displays the IP address of the peer machine.

$(gate-ip)

Displays the IP address of the gateway machine.

$(encap)

Displays the encapsulation type (SLIP, PPP, and so on).

$(encap-alt)

Displays the encapsulation type as SL/IP instead of SLIP.

$(mtu)

Displays the Maximum Transmission Unit (MTU) size.


Examples

The following example sets the SLIP/PPP banner using several tokens and the percent sign (%) as the delimiting character:


Router(config)# banner slip-ppp %
Enter TEXT message.  End with the character '%'.
Starting $(encap) connection from $(gate-ip) to $(peer-ip) using a maximum packet size of 
$(mtu) bytes... %

The new SLIP/PPP banner will now be displayed when the slip EXEC command is used. Notice that the $(token) syntax is replaced by the corresponding configuration variable.


Router# slip
Starting SLIP connection from 172.16.69.96 to 192.168.1.200 using a maximum packet size of 
1500 bytes...

Related Commands

Command
Description

banner exec

Defines and enables a customized banner to be displayed whenever the EXEC process is initiated.

banner incoming

Defines and enables a customized message to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner motd

Defines and enables a customized message-of-the-day banner.

slip

Initiates a connection to a remote host using Serial Line Internet Protocol (SLIP).

ppp

Initiates a connection to a remote host using Point-to-Point Protocol (PPP).


clear tcp

To clear a TCP connection, use the clear tcp privileged EXEC command.

clear tcp {line line-number | local hostname port remote hostname port | tcb address}

Syntax Description

line line-number

Line number of the TCP connection to clear.

local hostname port
remote hostname port

Host name of the local router and port and host name of the remote router 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 endpoint.


Command Modes

Privileged EXEC

Command History

Release
Modification

11.1

This command was introduced.


Usage Guidelines

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 hostname port remote hostname port command terminates the specific TCP connection identified by the host name and 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.

Router# show tcp
 
    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
    Retrans             4          0             0x0
    TimeWait            0          0             0x0
    AckHold             7          4             0x0
       SendWnd             0          0             0x0
    KeepAlive           0          0             0x0
    GiveUp              0          0             0x0
    PmtuAger            0          0             0x0
 
    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
 
Router# clear tcp line 2
    [confirm]
     [OK]

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.

Router# show tcp brief

TCB       Local Address           Foreign Address        (state)
    60A34E9C  router1.cisco.com.23      router20.cisco.1055  ESTAB
 
Router# clear tcp local router1 23 remote router20 1055
    [confirm]
     [OK]

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.

Router# show tcp brief

    TCB       Local Address           Foreign Address        (state)
    60B75E48  router1.cisco.com.23      router20.cisco.1054  ESTAB
 
Router# clear tcp tcb 60B75E48
    [confirm]
     [OK]

Related Commands

Command
Description

show tcp

Displays the status of TCP connections.

show tcp brief

Displays a concise description of TCP connection endpoints.


exec

To allow an EXEC process on a line, use the exec line configuration command. To turn off the EXEC process for the specified line, use the no form of this command.

exec

no exec

Syntax Description

This command has no arguments or keywords.

Defaults

The EXEC processes start is activated automatically on all lines.

Command Modes

Line configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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.

Examples

The following example turns off the EXEC process 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.

line 7 
 no exec

exec-banner

To reenable the display of EXEC and message-of-the-day (MOTD) banners on the specified line or lines, use the exec-banner line configuration command. To suppress the banners on the specified line or lines, use the no form of this command.

exec-banner

no exec-banner

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled on all lines

Command Modes

Line configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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 global configuration 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. Table 14 summarizes the effects of the exec-banner command and the motd-banner command.

Table 14 Banners Displayed Based On exec-banner and motd-banner Combinations

 
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. Table 15 summarizes the effects of the exec-banner command and the motd-banner command for reverse Telnet connections.

Table 15 Banners Displayed Based On exec-banner and motd-banner Combinations
for Reverse Telnet Sessions 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


Examples

The following example suppresses the EXEC and MOTD banners on virtual terminal lines 0 to 4:

line vty 0 4
 no exec-banner

Related Commands

Command
Description

banner exec

Defines and enables a customized banner to be displayed whenever the EXEC process is initiated.

banner incoming

Defines and enables a customized message to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner motd

Defines and enables a customized message-of-the-day banner.

motd-banner

Controls (enables or disables) the display of message-of-the-day banners on a specified line or lines.


exec-timeout

To set the interval that the EXEC command interpreter waits until user input is detected, use the exec-timeout line configuration command. To remove the timeout definition, use the no form of this command.

exec-timeout minutes [seconds]

no exec-timeout

Syntax Description

minutes

Integer that specifies the number of minutes.

seconds

(Optional) Additional time intervals in seconds.


Defaults

10 minutes

Command Modes

Line configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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

lock

To configure a temporary password on a line, use the lock EXEC command.

lock

Syntax Description

This command has no arguments or keywords.

Defaults

Not locked

Command Modes

EXEC

Command History

Release
Modification

10.0

This command was introduced in a release prior to Cisco IOS Release 10.0.


Usage Guidelines

You can prevent access to your session while keeping your connection open by setting up a temporary password. To lock access to the terminal, perform the following steps:


Step 1 Enter the lock command. The system prompts you for a password.

Step 2 Enter a password, which can be any arbitrary string. The system will prompt you to confirm the password. The screen then clears and displays the message "Locked."

Step 3 To regain access to your sessions, reenter the password.


The Cisco IOS software honors session timeouts on a locked lines. You must clear the line to remove this feature. The system administrator must set the line up to allow use of the temporary locking feature by using the lockable line configuration command.

Examples

The following example shows configuring the router as lockable, saving the configuration, and then locking the current session for the user:

Router(config-line)# lockable
Router(config-line)# ^Z
Router# copy system:running-config nvram:startup-config
Building configuration...
OK
Router# lock 
Password: <password>
Again: <password>
                      Locked
Password: <password>
Router#

Related Commands

Command
Description

lockable

Enables the lock EXEC command.

login (EXEC)

Enables or changes a login username.


menu clear-screen

To clear the terminal screen before displaying a menu, use the menu clear-screen global configuration command.

menu menu-name clear-screen

Syntax Description

menu-name

Name of the menu this command should be applied to.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

This command uses a terminal-independent mechanism based on termcap entries defined in the router and the configured terminal type for the user. This command allows the same menu to be used on multiple types of terminals instead of having terminal-specific strings embedded within menu titles. If the termcap entry does not contain a clear string, the menu system enters 24 new lines, causing all existing text to scroll off the top of the terminal screen.

Examples

In the following example, the terminal screen is cleared before displaying the menu named Access1:

menu Access1 clear-screen

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.

no menu

Deletes a specified menu from a menu configuration.


menu command

To specify underlying commands for user menus, use the menu command global configuration command.

menu menu-name command menu-item {command | menu-exit}

Syntax Description

menu-name

Name of the menu. You can specify a maximum of 20 characters.

menu-item

Number, character, or string used as the key for the item. The key is displayed to the left of the menu item text. You can specify a maximum of 18 menu entries. When the tenth item is added to the menu, the line-mode and single-space options are activated automatically.

command

Command to issue when the user selects an item.

menu-exit

Provides a way for menu users to return to a higher-level menu or exit the menu system.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use this command to assign actions to items in a menu. Use the menu text global configuration command to assign text to items. These commands must use the same menu name and menu selection key.

The menu command command has a special keyword for the command argument, menu-exit, that is available only within menus. It is used to exit a submenu and return to the previous menu level, or to exit the menu altogether and return to the EXEC command prompt.

You can create submenus that are opened by selecting entries in another menu. Use the menu EXEC command as the command for the submenu item.


Note If you nest too many levels of menus, the system prints an error message on the terminal and returns to the previous menu level.


When a menu allows connections (their normal use), the command for an entry activating the connection should contain a resume command, or the line should be configured to prevent users from escaping their sessions with the escape-char none command. Otherwise, when they escape from a connection and return to the menu, there will be no way to resume the session and it will sit idle until the user logs out.

Specifying the resume command as the action that is performed for a selected menu entry permits a user to resume a named connection or connect using the specified name, if there is no active connection by that name. As an option, you can also supply the connect string needed to connect initially. When you do not supply this connect string, the command uses the specified connection name.

You can also use the resume/next command, which resumes the next connection in the user's list of connections. This function allows you to create a single menu entry that steps through all of the user's connections.


Note A menu should not contain any exit paths that leave users in an unfamiliar interface environment.


When a particular line should always display a menu, that line can be configured with an autocommand line configuration command. Menus can be run on a per-user basis by defining a similar autocommand command for that local username. For more information about the autocommand command, refer to the Cisco IOS Dial Technologies Configuration Guide.

Examples

In the following example, the commands to be issued when the menu user selects option 1, 2, or 3 are specified for the menu named Access1:

menu Access1 command 1 tn3270 vms.cisco.com
menu Access1 command 2 rlogin unix.cisco.com
menu Access1 command 3 menu-exit

The following example allows a menu user to exit a menu by entering Exit at the menu prompt:

menu Access1 text Exit Exit

menu Access1 command Exit menu-exit

Related Commands

Command
Description

autocommand

Configures the Cisco IOS software to automatically execute a command when a user connects to a particular line.

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu default

To specify the menu item to use as the default, use the menu default global configuration command.

menu menu-name default menu-item

Syntax Description

menu-name

Name of the menu. You can specify a maximum of 20 characters.

menu-item

Number, character, or string key of the item to use as the default.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use this command to specify which menu entry is used when the user presses Enter without specifying an item. The menu entries are defined by the menu command and menu text global configuration commands.

Examples

In the following example, the menu user exits the menu when pressing Enter without selecting an item:

menu Access1 9 text Exit the menu
menu Access1 9 command menu-exit
menu Access1 default 9

Related Commands

Command
Description

menu (EXEC)

Invokes a preconfigured user menu.

menu command

Specifies underlying commands for user menus.

menu prompt

Specifies the prompt for a user menu.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu line-mode

To require the user to press Enter after specifying an item, use the menu line-mode global configuration command.

menu menu-name line-mode

Syntax Description

menu-name

Name of the menu this command should be applied to.


Defaults

Enabled for menus with more than nine items. Disabled for menus with nine or fewer items.

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

In a menu of nine or fewer items, you ordinarily select a menu item by entering the item number. In line mode, you select a menu entry by entering the item number and pressing Enter. Line mode allows you to backspace over the selected number and enter another number before pressing Enter to issue the command.

This option is activated automatically when more than nine menu items are defined but also can be configured explicitly for menus of nine or fewer items.

In order to use strings as keys for items, the menu line-mode command must be configured.

Examples

In the following example, the line-mode option is enabled for the menu named Access1:

menu Access1 line-mode

Related Commands

Command
Description

menu (EXEC)

Invokes a preconfigured user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for a user menu.

menu default

Specifies the menu item to use as the default.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu

menu text

Specifies the text of a menu item in a user menu.


menu options

To set options for items in user menus, use the menu options global configuration command.

menu menu-name options menu-item {login | pause}

Syntax Description

menu-name

The name of the menu. You can specify a maximum of 20 characters.

menu-item

Number, character, or string key of the item affected by the option.

login

Requires a login before issuing the command.

pause

Pauses after the command is entered before redrawing the menu.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use the menu command and menu text global configuration commands to define a menu entry.

Examples

In the following example, a login is required before issuing the command specified by menu entry 3 of the menu named Access1:

menu Access1 options 3 login

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu prompt

To specify the prompt for a user menu, use the menu prompt global configuration command.

menu menu-name prompt d prompt d

Syntax Description

menu-name

Name of the menu. You can specify a maximum of 20 characters.

d

A delimiting character that marks the beginning and end of a title. Text delimiters are characters that do not ordinarily appear within the text of a title, such as slash ( / ), double quote ("), and tilde (~). ^C is reserved for special use and should not be used in the text of the title.

prompt

Prompt string for the menu.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Press Enter after entering the first delimiter. The router will prompt you for the text of the prompt. Enter the text followed by the delimiter, and press Enter.

Use the menu command and menu text commands to define the menu selections.

Examples

In the following example, the prompt for the menu named Access1 is configured as "Select an item.":

Router(config)# menu Access1 prompt /
Enter TEXT message.  End with the character '/'.
Select an item. /
Router(config)#

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu single-space

To display menu items single-spaced rather than double-spaced, use the menu single-space global configuration command.

menu menu-name single-space

Syntax Description

menu-name

Name of the menu this command should be applied to.


Defaults

Enabled for menus with more than nine items; disabled for menus with nine or fewer items.

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

When more than nine menu items are defined, the menu is displayed single-spaced. To configure the menus with nine or fewer items to display single-spaced, use this command.

Examples

In the following example, single-spaced menu items are displayed for the menu named Access1:

menu Access1 single-space

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu status-line

Displays a line of status information about the current user at the top of a menu.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu status-line

To display a line of status information about the current user at the top of a menu, use the menu status-line global configuration command.

menu menu-name status-line

Syntax Description

menu-name

Name of the menu this command should be applied to.


Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

This command displays the status information at the top of the screen before the menu title is displayed. This status line includes the router's host name, the user's line number, and the current terminal type and keymap type (if any).

Examples

In the following example, status information is enabled for the menu named Access1:

menu Access1 status-line

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item in a menu.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


menu text

To specify the text of a menu item in a user menu, use the menu text global configuration command.

menu menu-name text menu-item menu-text

Syntax Description

menu-name

Name of the menu. You can specify a maximum of 20 characters.

menu-item

Number, character, or string used as the key for the item. The key is displayed to the left of the menu item text. You can specify a maximum of 18 menu items. When the tenth item is added to the menu, the menu line-mode and menu single-space commands are activated automatically.

menu-text

Text of the menu item.


Defaults

No text appears for the menu item.

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use this command to assign text to items in a menu. Use the menu command command to assign actions to items. These commands must use the same menu name and menu selection key.

You can specify a maximum of 18 items in a menu.

Examples

In the following example, the descriptive text for the three entries is specified for options 1, 2, and 3 in the menu named Access1:

menu Access1 text 1 IBM Information Systems
menu Access1 text 2 UNIX Internet Access
menu Access1 text 3 Exit menu system

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu

menu title

Creates a title, or banner, for a user menu.


menu title

To create a title (banner) for a user menu, use the menu title global configuration command.

menu menu-name title d menu-title d

Syntax Description

menu-name

Name of the menu. You can specify a maximum of 20 characters.

d

A delimiting character that marks the beginning and end of a title. Text delimiters are characters that do not ordinarily appear within the text of a title, such as slash ( / ), double quote ("), and tilde (~). ^C is reserved for special use and should not be used in the text of the title.

menu-title

Lines of text to appear at the top of the menu.


Defaults

The menu does not have a title.

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

The menu title command must use the same menu name used with the menu text and menu command commands used to create a menu.

You can position the title of the menu horizontally by preceding the title text with blank characters. You can also add lines of space above and below the title by pressing Enter.

Follow the title keyword with one or more blank characters and a delimiting character of your choice. Then enter one or more lines of text, ending the title with the same delimiting character. You cannot use the delimiting character within the text of the message.

When you are configuring from a terminal and are attempting to include special control characters, such as a screen-clearing string, you must use Ctrl-V before the special control characters so that they are accepted as part of the title string. The string ^[[H^[[J is an escape string used by many VT100-compatible terminals to clear the screen. To use a special string, you must enter Ctrl-V before each escape character.

You also can use the menu clear-screen global configuration command to clear the screen before displaying menus and submenus, instead of embedding a terminal-specific string in the menu title. The menu clear-screen command allows the same menu to be used on different types of terminals.

Examples

In the following example, the title that will be displayed is specified when the menu named Access1 is invoked. Press Enter after the second slash (/) to display the prompt.

Router(config)# menu Access1 title /^[[H^[[J
Enter TEXT message.  End with the character '/'.
               Welcome to Access1 Internet Services
               
                  Type a number to select an option;
                           Type 9 to exit the menu.
/
Router(config)# 

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu clear-screen

Clears the terminal screen before displaying a menu.

menu command

Specifies underlying commands for user menus.

menu default

Specifies the menu item to use as the default.

menu line-mode

Requires the user to press Enter after specifying an item.

menu options

Sets options for items in user menus.

menu prompt

Specifies the prompt for a user menu.

menu single-space

Displays menu items single-spaced rather than double-spaced.

menu status-line

Displays a line of status information about the current user at the top of a menu

menu text

Specifies the text of a menu item in a user menu.


no menu

To delete a user menu from the configuration file, use the no menu global configuration command.

no menu menu-name

Syntax Description

menu-name

Name of the menu to delete from the configuration file.


Defaults

None

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

Use this command to remove any menu commands for a particular menu from the configuration file.

As with all global configuration commands, this command will only effect the startup configuration file when you save the running configuration using the copy running-config startup-config EXEC command.

Examples

The following example deletes the menu named Access1:

no menu Access1

Related Commands

Command
Description

menu (EXEC)

Invokes a user menu.

menu command

Specifies underlying commands for user menus.

menu prompt

Specifies the prompt for a user menu.

menu text

Specifies the text of a menu item in a user menu.

menu title

Creates a title, or banner, for a user menu.


motd-banner

To enable the display of message-of-the-day (MOTD) banners on the specified line or lines, use the motd-banner line configuration command. To suppress the MOTD banners on the specified line or lines, use the no form of this command.

motd-banner

no motd-banner

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled on all lines.

Command Modes

Line configuration

Command History

Release
Modification

11.1

This command was introduced.


Usage Guidelines

This command determines whether the router will display the MOTD banner when an EXEC session is created on the specified line or lines. The MOTD banner is defined with the banner motd global configuration command. By default, the MOTD banner is enabled on all lines. Disable the MOTD banner on specific lines using the no motd-banner line configuration 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. Table 16 summarizes the effects of the exec-banner command and the motd-banner command.

Table 16 Banners Displayed Based On exec-banner and motd-banner Combinations

 
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. Table 17 summarizes the effects of the exec-banner command and the motd-banner command for reverse Telnet connections.

Table 17 Banners Displayed Based On exec-banner and motd-banner Combinations
for Reverse Telnet Sessions 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


Examples

The following example suppresses the MOTD banner on vty lines 0 through 4:

line vty 0 4
 no motd-banner

Related Commands

Command
Description

banner exec

Defines and enables a customized banner to be displayed whenever the EXEC process is initiated.

banner incoming

Defines and enables a customized message to be displayed when there is an incoming connection to a terminal line from a host on the network.

banner motd

Defines and enables a customized message-of-the-day banner.

motd-banner

Controls (enables or disables) the display of message-of-the-day banners on a specified line or lines.


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.

Defaults

No logical name is defined.

Command Modes

User EXEC

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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.

Examples

The following example assigns the logical name blue to the connection:

Router> where
Conn Host                Address             Byte  Idle Conn Name
*  1 doc-2509            172.30.162.131         0     0 doc-2509

Router> name-connection
Connection number: 1
Enter logical name: blue
Connection 1 to doc-2509 will be named "BLUE" [confirm]

Related Commands

Command
Description

where

Lists open sessions associated with the current terminal line.


refuse-message

To define and enable a line-in-use message, use the refuse-message line configuration command. To disable the message, use the no form of this command.

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.


Defaults

Disabled (no line-in-use message is displayed).

Command Modes

Line configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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 performs the following steps:

1. Accepts the connection.

2. Prints the custom message.

3. Clears the connection.

Examples

In the following example, line 5 is configured with a line-in-use message, and the user is instructed to try again later:

line 5
refuse-message  /The dial-out modem is currently in use.

Please try again later./

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 lines.

aux number

Sends a message to the specified AUX port.

console number

Sends a message to the specified console port.

tty number

Sends a message to the specified asynchronous line.

vty number

Sends a message to the specified virtual asynchronous line.


Defaults

No messages are sent.

Command Modes

EXEC

Command History

Release
Modification

11.2

This command was introduced.


Usage Guidelines

After entering this command, the system prompts for the message to be sent, which can be up to 500 characters long. Enter Ctrl-Z to end the message. Enter Ctrl-C to abort this command.


Caution Be aware that in some circumstances text sent using the send command may be interpreted as an executable command by the receiving device. For example, if the receiving device is Unix workstation, and the receiving device is in a state (shell) where commands can be executed, the incoming text (if a valid Unix command) will be interpreted as a command. For this reason you should limit your use of any unmonitored connection to a router that uses an interactive shell.

Examples

The following example sends a message to all lines:

2509# send *
Enter message, end with CTRL/Z; abort with CTRL/C:
The system 2509 will be shut down in 10 minutes for repairs.^Z
Send message? [confirm]
2509#


***
***
*** Message from tty0 to all terminals:
***
The system 2509 will be shut down in 10 minutes for repairs.


2509#

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. To disable this function, use the no form of this command.

service linenumber

no service linenumber

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Global configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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.

Examples

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.

Router1> telnet Router2

Trying Router2 (172.30.162.131)... Open

Welcome to Router2.

User Access Verification

Password:
Router2> enable
Password:
Router2# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)# service linenumber
Router2(config)# end
Router2# logout

[Connection to Router2 closed by foreign host]
Router1> telnet Router2
Trying Router2 (172.30.162.131)... Open

Welcome to Router2.

Router2 line 10


User Access Verification

Password:
Router2>

Related Commands

Command
Description

show users

Displays information about the active lines on the router.


vacant-message

To display an idle terminal message, use the vacant-message line configuration command. To remove the default vacant message or any other vacant message that may have been set, use the no form of this command.

vacant-message [d message d]

no vacant-message

Syntax Description

d

(Optional) Delimiting character that marks the beginning and end of the vacant-message. Text delimiters are characters that do not ordinarily appear within the text of a title, such as slash ( / ), double quote ("), or tilde (~). ^C is reserved for special use and should not be used in the message.

message

(Optional) Vacant terminal message.


Defaults

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 Modes

Line configuration

Command History

Release
Modification

10.0

This command was introduced.


Usage Guidelines

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 need to define only the message for the first line in the group.


Examples

The following example turns on the system banner and displays this message:

line 0
vacant-message #
                Welcome to Cisco Systems, Inc.
                 Press Return to get started.