cc/td/doc/product/software/ios121/121cgcr/fun_r
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Connection, Menu, and System Banner Commands

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.

Defaults

No banner is displayed.

Command Modes

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

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.

Examples

The following example sets an EXEC banner. The dollar sign ($) is used as a delimiting character.

banner exec $
Session activated. Enter commands at the prompt.
$

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.

exec-banner

Displays EXEC and MOTD banners.

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.

Defaults

No banner is displayed.

Command Modes

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

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.

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

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.

Defaults

No login banner is displayed.

Command Modes

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

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.

Examples

The following example sets a login banner. The dollar sign ($) is used as a delimiting character.

banner login $
Access for authorized users only. Please enter your username and password.
$
 

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

Defaults

No MOTD banner is specified.

Command Modes

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

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.

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

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.

exec-banner

Displays EXEC and MOTD banners.

motd-banner

Displays MOTD banners.

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.

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

line 7
 no exec

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 9 summarizes the effects of the exec-banner command and the motd-banner command.


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


Table 10: 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:

line vty 0 4
 no exec-banner

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
menu Access1 default 9

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

To specify the menu item to use as the default, use the menu line-mode global configuration command to require the user to specify the menu item to use as the default.

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:

menu Access1 line-mode

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
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 line-mode

Requires the user to press Enter after specifying an item.

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 prompt

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

menu name prompt d prompt d

Syntax Description

name

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

d

Delimiting characters that mark the beginning and end of the prompt. Text delimiters are characters that do not ordinarily appear within the text of a title, such as slash (/), double quote ("), and tilde (~). Ctrl-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

The following example configures the prompt 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 interface menus.

menu default

Specifies the menu item to use as the default.

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 single-space

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

menu name single-space

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

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

The following example displays single-spaced menu items for the menu named Access1:

menu Access1 single-spaced

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 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 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 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 name status-line

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

The following example displays the status information using the status-line option 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 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 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 text

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

menu name text item text

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 items. When the tenth item is added to the menu, the menu line-mode and menu single-space commands are activated automatically.

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

The following example specifies the descriptive text for the three entries 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 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 title

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

menu title

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

menu name title d title d

Syntax Description

name

The configuration 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 (~). Ctrl-C is reserved for special use and should not be used in the text of the title.

title

The 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 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

The following example specifies the title that will be displayed 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 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.

no menu

To delete the specified menu from the configuration, use the no menu global configuration command.

no menu name

Syntax Description

name

The configuration name of the menu.

Defaults

menu commands, if any, remain in the configuration.

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.

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

motd-banner

To display message-of-the-day (MOTD) banners, use the motd-banner line configuration command. Use the no form of this command to suppress the MOTD banners.

motd-banner

no motd-banner

Syntax Description

This command has no arguments or keywords.

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. The MOTD banner is defined with the banner motd command. By default, the MOTD banner is enabled on all lines. Disable the MOTD banner using the no motd-banner command.

The MOTD banners can also be disabled by the no exec-banner line configuration command, which disables both MOTD banners and EXEC banners on a line. If the no exec-banner command is configured on a line, the MOTD banner will be disabled regardless of whether the motd-banner command is enabled or disabled. Table 11 summarizes the effects of the exec-banner command and the motd-banner command.


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


Table 12: Banners Displayed
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 virtual terminal lines 0 to 4:

line vty 0 4
 no motd-banner

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

Displays MOTD banners.

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 a line-in-use message, use the refuse-message line configuration command. Use the no form of this command to disable the message.

refuse-message d message d

no refuse-message

Syntax Description

d

Delimiting character of your choice---a pound sign (#) for example. You cannot use the delimiting character in the message.

message

Message text.

Defaults

No line-in-use message is defined.

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 procedure:

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

aux number

Sends a message to the AUX port.

console number

Sends a message to the console port.

tty number

Sends a message to an asynchronous line.

vty number

Sends a message to a VTY.

Defaults

No messages are sent.

Command Modes

EXEC

Command History
Release Modification

11.2

This command was introduced.

Usage Guidelines

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

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. Use the no form of this command to disable this function.

service linenumber

no service linenumber

Syntax Description

This command has no arguments or keywords.

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. Use the no form of this command to remove the default vacant message or any other vacant message that may have been set.

vacant-message [d message d]

no vacant-message

Syntax Description

d

(Optional) A delimiting character of your choice---a pound sign (#), for example. You cannot use the delimiting character in the banner message.

message

(Optional) Vacant terminal message.

d

(Optional) A delimiting character of your choice.

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 only need to define 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.

hometocprevnextglossaryfeedbacksearchhelp
Posted: Thu Mar 30 15:21:47 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.