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
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 the commands for session management, and the commands used to configure usermenus and banners.
For connection and system banner task information and examples, refer to the "Managing Connections, Menus, and System Banners" chapter in the Cisco IOS 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). Use the no form of this command to delete 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. 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
No banner is displayed.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.3(7.5) AA and 12.0(3) T
|
Token functionality 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.
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.
To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current IOS configuration variables, such as the router's hostname and IP address. The tokens are described in Table 13.
Table 9 banner exec command tokens
Token
|
Information displayed in the banner
|
$(hostname)
|
Displays the router's hostname.
|
$(domain)
|
Displays the router's domain name.
|
$(line)
|
Displays the VTY or TTY (async) line number.
|
$(line-desc)
|
Displays the description attached to the line.
|
Examples
The following example sets an EXEC banner. The dollar sign ($) is used as a delimiting character.
Session activated. Enter commands at the prompt.
The following example sets an EXEC banner that uses several tokens. The percent sign (%) is used as a delimiting character. Notice that the $(token) syntax is replaced by the corresponding configuration variable.
darkstar(config)# banner exec %
Enter TEXT message. End with the character '%'.
Session activated. Enter commands at the prompt.
You have entered $(hostname).$(domain) on line $(line) ($(line-desc)) %
When an EXEC process is created, the user will see the following banner:
You have entered darkstar.ourdomain.com on line 5 (Dialin Modem)
Related Commands
Command
|
Description
|
banner incoming
|
Specifies a banner used when you have an incoming connection to a line from a host on the network.
|
banner login
|
Displays a login banner. This command specifies a message to be displayed before the username and password login prompts.
|
banner motd
|
Specifies an MOTD banner.
|
banner slip-ppp
|
Configures the SLIP-PPP banner to display a customized message.
|
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. Use the no form of this command to delete 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. 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
No banner is displayed.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.3(7.5) AA and 12.0(3) T
|
Token functionality 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.
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.
To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current IOS configuration variables, such as the router's hostname and IP address. The tokens are described in Table 13.
Table 10 banner incoming command tokens
Token
|
Information displayed in the banner
|
$(hostname)
|
Displays the router's hostname.
|
$(domain)
|
Displays the router's domain name.
|
$(line)
|
Displays the VTY or TTY (async) 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.
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
|
Displays a banner on terminals with an interactive EXEC. 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).
|
banner login
|
Displays a login banner. This command specifies a message to be displayed before the username and password login prompts.
|
banner motd
|
Specifies an MOTD banner.
|
banner slip-ppp
|
Configures the SLIP-PPP banner to display a customized message.
|
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. 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
No login banner is displayed.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.3(7.5) AA and 12.0(3) T
|
Token functionality 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.
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.
To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current IOS configuration variables, such as the router's hostname and IP address. The tokens are described in Table 13.
Table 11 banner login command tokens
Token
|
Information displayed in the banner
|
$(hostname)
|
Displays the router's hostname.
|
$(domain)
|
Displays the router's domain name.
|
$(line)
|
Displays the VTY or TTY (async) line number.
|
$(line-desc)
|
Displays the description attached to the line.
|
Examples
The following example sets a login banner. The dollar sign ($) is used as a delimiting character.
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 a 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
|
Displays a banner on terminals with an interactive EXEC. 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).
|
banner incoming
|
Specifies a banner used when you have an incoming connection to a line from a host on the network.
|
banner motd
|
Specifies an MOTD banner.
|
banner slip-ppp
|
Configures the SLIP-PPP banner to display a customized message.
|
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. 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
|
Defaults
No MOTD banner is specified.
Command Modes
Global configuration
Command History
Release
|
Modification
|
10.0
|
This command was introduced.
|
11.3(7.5) AA and 12.0(3) T
|
Token functionality 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.
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.
To customize the banner, use tokens in the form $(token) in the message text. Tokens will display current IOS configuration variables, such as the router's hostname and IP address. The tokens are described in Table 13.
Table 12 banner motd command tokens
Token
|
Information displayed in the banner
|
$(hostname)
|
Displays the router's hostname.
|
$(domain)
|
Displays the router's domain name.
|
$(line)
|
Displays the VTY or TTY (async) line number.
|
$(line-desc)
|
Displays the description attached to the line.
|
Examples
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.
#
The following example sets a MOTD banner. The percent sign (%) is used as a delimiting character.
darkstar(config)# banner motd %
Enter TEXT message. End with the character '%'.
You have entered $(hostname).$(domain) on line $(line) ($(line-desc)) %
When the MOTD banner is executed, the user will see the following. 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
|
Displays a banner on terminals with an interactive EXEC. 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).
|
banner incoming
|
Specifies a banner used when you have an incoming connection to a line from a host on the network.
|
banner login
|
Displays a login banner. This command specifies a message to be displayed before the username and password login prompts.
|
banner slip-ppp
|
Configures the SLIP-PPP banner to display a customized message.
|
exec-banner
|
Displays EXEC and MOTD banners.
|
motd-banner
|
Displays MOTD banners.
|
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. Tokens are described in
|
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.
|
11.3(7.5) AA and 12.0(3) T
|
Token functionality 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 IOS configuration variables, such as the routers hostname, IP address, encapsulation type, and MTU size. The banner tokens are described in Table 13.
Table 13 banner slip-ppp command tokens
Token
|
Information displayed in the banner
|
$(hostname)
|
Displays the router's hostname.
|
$(domain)
|
Displays the router's domain name.
|
$(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, etc.).
|
$(encap-alt)
|
Displays the encapsulation type as SL/IP instead of SLIP.
|
$(mtu)
|
Displays the Maximum Transmission Unit size.
|
Examples
The following example sets the SLIP/PPP banner using several tokens and the percent sign (%) as the delimiting character:
darkstar(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 command is used after the user logs in to the router. Notice that the $(token) syntax is replaced by the corresponding configuration variable.
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
|
Displays a banner on terminals with an interactive EXEC. 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).
|
banner incoming
|
Specifies a banner used when you have an incoming connection to a line from a host on the network.
|
banner motd
|
Specifies an MOTD banner.
|
slip
|
Starts Serial-line IP (SLIP).
|
ppp
|
Starts 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 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
|
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 end point.
|
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 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
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. 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.
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 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 message-of-the-day 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.
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 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
| |
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—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
|
Examples
The following example suppresses the EXEC and MOTD banners on virtual terminal lines 0 to 4:
Related Commands
Command
|
Description
|
banner exec
|
Displays a banner on terminals with an interactive EXEC. 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).
|
banner incoming
|
Specifies a banner used when you have an incoming connection to a line from a host on the network.
|
banner motd
|
Specifies an MOTD banner.
|
motd-banner
|
Display MOTD banners.
|
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.
|
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
menu clear-screen
To clear the terminal screen before displaying a menu, use the menu clear-screen global configuration command.
menu name clear-screen
Syntax Description
name
|
The configuration name of the menu.
|
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 terminal type configured for the user's terminal. 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
The following example clears the terminal screen 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 interface 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 interface menus.
|
menu prompt
|
Specifies the prompt for a user interface 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 interface 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 interface menus, use the menu command global configuration command.
menu name command item {command | menu-exit}
Syntax Description
name
|
The configuration name of the menu. You can specify a maximum of 20 characters.
|
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 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 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 off.
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 autocommand, see the "Modem Support and Asynchronous Commands" chapter of the Cisco IOS Dial Solutions Command Reference publication.
Examples
The following example specifies the commands to be issued when a user enters the selection number associated with the menu entry 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 interface menus.
|
menu prompt
|
Specifies the prompt for a user interface 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 interface 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 name default item
Syntax Description
name
|
The name of the menu. You can specify a maximum of 20 characters.
|
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 commands.
Examples
The following example exits the menu when a user presses Enter without selecting an item:
menu Access1 9 text Exit the menu
menu Access1 9 command menu-exit
Related Commands
Command
|
Description
|
menu (EXEC)
|
Invokes a user menu.
|
menu command
|
Specifies underlying commands for user interface menus.
|
menu prompt
|
Specifies the prompt for a user interface menu.
|
menu text
|
Specifies the text of a menu item in a user interface menu.
|
menu title
|
Creates a title, or banner, for a user menu.
|
menu line-mode
Use the menu line-mode global configuration command to require the user to press Enter after specifying an item.
menu name line-mode
Syntax Description
name
|
The configuration name of the menu.
|
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
The following example enables the line-mode option for the menu named Access1:
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 interface menus.
|
menu default
|
Specifies the menu item to use as the default.
|
menu options
|
Sets options for items in user interface menus.
|
menu prompt
|
Specifies the prompt for a user interface 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 interface menu.
|
menu options
To set options for items in user interface menus, use the menu options global configuration command.
menu name options item {login | pause}
Syntax Description
name
|
The name of the menu. You can specify a maximum of 20 characters.
|
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 commands to define a menu entry.
Examples
The following example requires a login before issuing the command specified by menu entry 3 of the menu named Access1:
menu Access1 options 3 login
Related Commands