|
|
Cisco IOS commands can be entered at a terminal connected to the access server or router using the command line interface (CLI). Commands may also be entered using the Cisco Web browser interface. This chapter describes how to use the Cisco IOS command line interface and Web page interface. It describes command modes, help features, command editing and history features, and menus.
For a complete description of the user interface commands in this chapter, refer to the "Basic Command Line Interface Commands" chapter of the Configuration Fundamentals Command Reference. To locate documentation of specific commands, use the command reference index or search online.
You can perform the tasks in the following sections to familiarize yourself with the Cisco IOS user interface. If you are not familiar with the Cisco IOS command line interface, read the first six sections to gain a basic understanding of the user interface.
The Cisco IOS user interface is divided into many different modes. The commands available to you at any given time depend on which mode you are currently in. Entering a question mark (?) at the system prompt allows you to obtain a list of commands available for each command mode.
When you start a session on the router, you begin in user mode, often called EXEC mode. Only a limited subset of the commands are available in EXEC mode. In order to have access to all commands, you must enter privileged EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. From privileged mode, you can enter any EXEC command or enter global configuration mode. Most of the EXEC commands are one-time commands, such as show commands, which show the current status of something, and clear commands, which clear counters or interfaces. The EXEC commands are not saved across reboots of the router.
The configuration modes allow you to make changes to the running configuration. If you later save the configuration, these commands are stored across router reboots. In order to get to the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode, subinterface configuration mode, and a variety of protocol-specific modes.
ROM monitor mode is a separate mode used when the router cannot boot properly. If your router or access server does not find a valid system image when it is booting, or if its configuration file is corrupted at startup, the system might enter read-only memory (ROM) monitor mode.
The following sections describe how to access each of the Cisco IOS command modes:
After you log in to the router or access server, you are automatically in user EXEC command mode. The EXEC commands available at the user level are a subset of those available at the privileged level. In general, the user EXEC commands allow you to connect to remote devices, change terminal settings on a temporary basis, perform basic tests, and list system information.
To list the user EXEC commands, complete the following task:
| Task | Command |
|---|---|
| List the user EXEC commands. | ? |
The user-level prompt consists of the host name followed by the angle bracket (>):
Router>
The default host name is Router unless it has been changed during initial configuration using the setup command. Refer to the product user guide for information on the setup facility. You can also change the host name using the hostname global configuration command described in the "Basic System Management Commands" chapter in the Configuration Fundamentals Command Reference.
To list the commands available in user EXEC mode, enter a question mark (?) as shown in the following example:
Router>?Exec commands:<1-99> Session number to resumeconnect Open a terminal connection disconnect Disconnect an existing telnet session enable Turn on privileged commands exit Exit from the EXEC help Description of the interactive help systemlat Open a lat connectionlock Lock the terminal login Log in as a particular user logout Exit from the EXEC menu Start a menu-based user interface mbranch Trace multicast route for branch of tree mrbranch Trace reverse multicast route to branch of tree mtrace Trace multicast route to group name-connectionName an existing telnet connectionpad Open a X.29 PAD connectionping Send echo messages resume Resume an active telnet connection show Show running system information systat Display information about terminal lines telnet Open a telnet connection terminal Set terminal line parameterstn3270 Open a tn3270 connectiontrace Trace route to destinationwhere List active telnet connectionsx3 Set X.3 parameters on PADxremote Enter XRemote mode
The list of commands might vary slightly from this example, depending on the software feature set and configuration of your Cisco routing product.
Because many of the privileged commands set operating parameters, privileged access should be password protected to prevent unauthorized use. The privileged command set includes those commands contained in user EXEC mode, as well as the configure command through which you can access the remaining command modes. Privileged EXEC mode also includes high-level testing commands, such as debug. For details on the debug commands, see the Debug Command Reference.
The privileged EXEC mode prompt consists of the devices's host name followed by the pound sign (#). (If the router or access server was named with the hostname command, that name would appear as the prompt instead of "Router.")
Router#
To access and list the privileged EXEC commands, complete the following tasks:
| Task | Command |
|---|---|
| Step 1 Enter the privileged EXEC mode. | enable [password] |
| Step 2 List privileged EXEC commands. | ? |
To return from privileged EXEC mode to user EXEC mode, perform the following task:
| Task | Command |
|---|---|
| Move from privileged EXEC mode to user EXEC mode. | disable |
If the system administrator has set a password, you are prompted to enter it before being allowed access to privileged EXEC mode. The password is not displayed on the screen and is case sensitive. If an enable password has not been set, enable mode can be accessed only from the router console. The system administrator uses the enable password global configuration command to set the password that restricts access to privileged mode. This command is described in the "Passwords and Privileges Commands" chapter in the Security Command Reference.
The following example shows how to access privileged EXEC mode:
Router>enablePassword: Router#
From the privileged level, you can access global configuration mode. For instructions, see the "Global Configuration Mode" section, which follows this section.
Global configuration commands apply to features that affect the system as a whole, rather than just one protocol or interface. Use the configure terminal privileged EXEC command to enter global configuration mode.
Commands to enable a particular routing or bridging function are also global configuration commands. For information on protocol-specific global configuration commands, see the appropriate configuration guide in the Cisco IOS software documentation.
To access and list the global configuration commands, complete the following tasks:
| Task | Command |
|---|---|
| Step 1 At the terminal, from the privileged EXEC mode, enter global configuration mode. | configure terminal |
| Step 2 List the global configuration commands. | ? |
The following example shows how to access global configuration mode:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
To exit global configuration command mode and return to privileged EXEC mode, use one of the following commands:
| Task | Command |
|---|---|
| Exit global configuration mode. | exit end Ctrl-Z |
From global configuration mode, you can access a number of other command modes. These command modes are described in the sections that follow. For a complete list of these modes, see the section "Other Configuration Modes."
Many features are enabled on a per-interface basis. Interface configuration commands modify the operation of an interface such as an Ethernet, FDDI, or serial port. Interface configuration commands always follow an interface global configuration command, which defines the interface type.
For details on interface configuration commands that affect general interface parameters, such as bandwidth, clock rate, and so on, see the "Interface Commands" chapter in the Configuration Fundamentals Command Reference. For protocol-specific commands, see the appropriate Cisco IOS software command reference.
To access and list the interface configuration commands, complete the following tasks:
| Task | Command |
|---|---|
| Step 1 From global configuration mode, enter interface configuration mode. | interface type number |
| Step 2 List the interface configuration commands. | ? |
In the following example, serial interface 0 is about to be configured. The new prompt Router(config-if)# indicates interface configuration mode.
Router(config)# interface serial 0 <CR>
Router(config-if)#
To exit interface configuration mode and return to global configuration mode, enter the exit command. To exit configuration mode and return to privileged EXEC mode, use the end command or press Ctrl-Z.
You can configure multiple virtual interfaces (called subinterfaces) on a single physical interface. Subinterfaces appear to be distinct physical interfaces to the various protocols. For example, Frame Relay networks provide multiple point-to-point links called permanent virtual circuits (PVCs). PVCs can be grouped under separate subinterfaces that in turn are configured on a single physical interface. From a bridging spanning-tree viewpoint, each subinterface is a separate bridge port, and a frame arriving on one subinterface can be sent out on a another subinterface.
Subinterfaces also allow multiple encapsulations for a protocol on a single interface. For example, a router or access server can receive an ARPA-framed IPX packet and forward the packet back out the same physical interface as a SNAP-framed IPX packet.
For detailed information on how to configure subinterfaces, see the appropriate module for a specific protocol in the Cisco IOS software documentation.
To access and list the subinterface configuration commands, complete the following tasks:
| Task | Command |
|---|---|
| Step 1 From interface configuration mode, configure a virtual interface. | See the example that follows. For information on interface commands that allow subinterface implementation, see the protocol specific chapter later in this publication. |
| Step 2 List the subinterface configuration commands. | ? |
In the following example, a subinterface is configured for serial line 2, which is configured for Frame Relay encapsulation. The subinterface is called 2.1 to indicate that it is subinterface 1 of serial interface 2. The new prompt Router(config-subif)# indicates that you are in subinterface configuration mode. The subinterface can be configured to support one or more Frame Relay PVCs.
Router(config)#interface serial 2Router(config-if)#encapsulation frame-relayRouter(config-if)#interface serial 2.1Router(config-subif)#
To exit subinterface configuration mode and return to global configuration mode, enter the exit command. To exit configuration mode and return to privileged EXEC mode, press Ctrl-Z.
If your router or access server does not find a valid system image, or if you interrupt the boot sequence, the system might enter read-only memory (ROM) monitor mode. From ROM monitor mode, you can boot the device or perform diagnostic tests.
You can also enter ROM monitor mode by entering the reload EXEC command and then pressing the Break key during the first 60 seconds of startup. If you have changed the configuration, use the copy running-config startup-config command and then issue the reload command to save your configuration changes.
To access and list the ROM monitor configuration commands, complete the following tasks:
| Task | Command |
|---|---|
| Enter ROM monitor mode from privileged EXEC mode. | reload Press the Break key during the first 60 seconds while the system is booting. |
| List the ROM monitor commands. | ? |
The ROM monitor prompt is the angle bracket (>):
> ?
$ state Toggle cache state (? for help)
B [filename] [TFTP Server IP address | TFTP Server Name]
Load and execute system image from ROM or from TFTP server
C [address] Continue execution [optional address]
D /S M L V Deposit value V of size S into location L with modifier M
E /S M L Examine location L with size S with modifier M
G [address] Begin execution
H Help for commands
I Initialize
K Stack trace
L [filename] [TFTP Server IP address | TFTP Server Name]
Load system image from ROM or from TFTP server, but do not
begin execution
O Show configuration register option settings
P Set the break point
S Single step next instruction
T function Test device (? for help)
Deposit and Examine sizes may be B (byte), L (long) or S (short).
Modifiers may be R (register) or S (byte swap).
Register names are: D0-D7, A0-A6, SS, US, SR, and PC
To return to user EXEC mode, type continue. To initialize the router or access server, enter the i command. The i command causes the bootstrap program to reinitialize the hardware, clear the contents of memory, and boot the system. (It is best to issue the i command before you run any tests or boot software.) To boot the system image file, use the b command (see the "Rebooting a Router" chapter). For details on ROM monitor mode commands, refer to the appropriate hardware installation guide.
Table 1 summarizes the main command modes of the Cisco IOS software.
| Command Mode | Access Method | Prompt | Exit Method |
|---|---|---|---|
| User EXEC | Log in. | Router>
| Use the logout command. |
| Privileged EXEC | From user EXEC mode, use the enable EXEC command. | Router#
| To exit back to user EXEC mode, use the disable command.
To enter global configuration mode, use the configure terminal privileged EXEC command. |
| Global configuration | From privileged EXEC mode, use the configure terminal privileged EXEC command. | Router(config)#
| To exit to privileged EXEC mode, use the exit or end command or press Ctrl-Z.
To enter interface configuration mode, enter an interface configuration command. |
| Interface configuration | From global configuration mode, enter by specifying an interface with an interface command. | Router(config-if)#
| To exit to global configuration mode, use the exit command.
To exit to privileged EXEC mode, use the exit command or press Ctrl-Z. To enter subinterface configuration mode, specify a subinterface with the interface command. |
| Subinterface configuration | From interface configuration mode, specify a subinterface with an interface command. | Router(config-subif)#
| To exit to global configuration mode, use the exit command.
To enter privileged EXEC mode, use the end command or press Ctrl-Z. |
| ROM monitor | From privileged EXEC mode, use the reload EXEC command. Press the Break key during the first 60 seconds while the system is booting. | >
| To exit to user EXEC mode, type continue. |
The following sections describe the other configuration modes:
Most of these modes can be entered from global configuration mode. In these modes, the exit command returns you to the global configuration mode. Other modes must be entered from another configuration mode. Entering the exit command in one of these modes returns you to the configuration mode you used to enter the mode.
In any configuration mode, to enter privileged EXEC mode and leave configuration mode entirely, use the end command or press Ctrl-Z.
Table 2 in the "Summary of Configuration Command Modes" section lists how to enter each mode.
All IP and IPX access lists can be identified by a number. Alternatively, some IP and IPX access lists can be identified by a name. Use access-list configuration mode when you are creating a named IP or IPX access list.
For information on creating a named IP access list, refer to the "Configuring IP Services" chapter in the Network Protocols Configuration Guide, Part 1. For information on creating a named IPX access list, refer to the "Configuring Novell IPX" chapter in the Network Protocols Configuration Guide, Part 2.
Advanced Peer-to-Peer Networking (APPN) is the second generation of SNA. APPN provides support for client/server applications and offers more dynamics than traditional hierarchical SNA, such as dynamic directory and routing services.
APPN allows you to define attributes of the APPN network that can become quite complex. To easily manage the details of APPN, special configuration command modes and conventions have been developed.
Because APPN offers a large number of configuration options, specific configuration dialogs are used for each major APPN configuration item. When you define the major item, you will automatically enter the detailed configuration mode for that item. There are two options to exit the detailed configuration mode. Use the complete command to exit the detailed configuration mode and update the APPN subsystem with the changes. Use the exit command to leave the definition in "no complete" state without updating the APPN subsystem.
Refer to the "APPN Configuration Commands" chapter in the Bridging and IBM Networking Command Reference for information on the following APPN modes:
You can configure channelized T1 in the controller configuration mode. Refer to the "Configuring Channelized E1 and Channelized T1" chapter in the Dial Solutions Configuration Guide for more information.
Use crypto map configuration mode to create or alter the definition of a crypto-map. Crypto-maps are part of an authentication/encryption router configuration. For more information, refer to the "Network Data Encryption Commands" chapter in the Security Command Reference.
Use hex input mode to enter a public key for an encrypting peer router. The public key data is entered in hexadecimal form, and it will take more than one command line to enter. To continue entering the public key data on a new line, press Return. When the public key is completely entered, press Return to get a new line, then type quit to return to the global configuration mode. For more information, refer to the "Network Data Encryption Commands" chapter in the Security Command Reference.
Hub configuration commands configure hub functionality for an Ethernet interface on the Cisco 2500. They always follow a hub global configuration command. Refer to the "Configuring LAN Interfaces" chapter in this publication and the "Interface Commands" chapter in the Configuration Fundamentals Command Reference.
The Channel Interface Processor (CIP) supports the IBM channel attach feature. This configuration is an ideal connectivity hub for large corporate networks that provide routing services between mainframes and LANs.
Before you configure your channel attach interface, you must select an interface. The following mode is valid only for port 2 on a CIP board. Ports 0 and 1 represent real, physical ports. Port 2 is an internal, virtual port. Refer to the "IBM Channel Attach Commands" chapter in the Bridging and IBM Networking Command Reference.
Use the IBM channel internal LAN configuration mode to configure an internal LAN on a CIP interface and configure Cisco Systems Network Architecture (CSNA) parameters. Refer to the "IBM Channel Attach Commands" chapter in the Bridging and IBM Networking Command Reference.
Internal adapter commands allow you to configure the link characteristics for the internal LAN adapter and name the internal LAN adapter. Refer to the "IBM Channel Attach Commands" chapter in the Bridging and IBM Networking Command Reference.
To configure an internal adapter interface, you must first use the bridge-group internal LAN configuration command or the source-bridge internal LAN configuration command to configure bridging type. These commands are documented in the "Source-Route Bridging Commands" chapter of the Bridging and IBM Networking Command Reference.
Internet Packet Exchange (IPX) is a Novell network-layer protocol. The IPX-router configuration mode is used to configure IPX routing. Refer to the "Novell IPX Commands" chapter in the Network Protocols Command Reference, Part 2
From key chain configuration mode, you can manage authentication keys. For details on how to use key chain configuration commands, consult the "Configuring IP Routing Protocol-Independent Features" chapter of the Network Protocols Configuration Guide, Part 1.
Key management controls the authentication keys that routing protocols use. To enter key chain configuration mode, identify or define a key chain using the keychain command. From key chain configuration mode, you can identify or define key numbers.
Once you define a key chain, use the key chain key configuration mode to configure the keys on the key chain. Refer to the "IP Routing Protocol-Independent Commands" chapter in the Network Protocols Command Reference, Part 1.
LAN emulation (LANE) clients consult the LANE configuration server for information such as the location of the LANE server. The configuration server looks up the configuration information in its name database.
A LANE database contains entries that bind an emulated LAN name to the ATM address of the LANE server, bind LANE client MAC addresses to an emulated LAN name, and bind LANE client ATM address templates to an emulated LAN name.
In LANE database configuration mode, you can use the client-atm-address name, default name, mac-address name, and name server-atm-address commands to create entries in the specified database.
Refer to the "LAN Emulation Commands" chapter of the Cisco IOS Switching Services Command Reference.
Line configuration commands modify the operation of an auxiliary, console, physical, or virtual terminal line. Line configuration commands always follow a line command, which defines a line number. These commands are generally used to connect to remote routers or access servers, change terminal parameter settings either on a line-by-line basis or for a range of line, and set up the auxiliary port modem configuration to support dial-on-demand routing (DDR). See the "Configuring Modem Support and Asynchronous Devices" chapter in the Dial Solutions Configuration Guide.
Cisco IOS software allows you to specify parameters that control the traffic that the source router will send over a switched virtual circuit (SVC). See the "Configuring ATM on the AIP for Cisco 7000 and 7500 Series Routers" and "Configuring ATM on the NPM for Cisco 4500 and 4700 Routers" chapters in the Wide-Area Networking Configuration Guide.
Cisco IOS ATM and Frame Relay software supports static mapping schemes that identify the protocol addresses of remote hosts or routers. For a listing of which Cisco platforms support ATM and Frame Relay, see the "Platform Support" appendix in the Configuration Fundamentals Command Reference.
Map-list configuration commands configure a map list. They always follow a map-list global configuration command. See the "ATM Commands" chapter in the Wide-Area Networking Command Reference.
Use the response time reporter configuration mode to configure a probe to measure response times and availability. Refer to the "Monitoring the Router and Network" chapter in the Configuration Fundamentals Configuration Guide.
Use the route-map configuration mode to configure routing table and source and destination information. See the "Configuring IP Routing Protocol-Independent Features" chapter in the Network Protocols Configuration Guide, Part 1.
Router configuration commands configure an IP routing protocol and always follow a router command. See the relevant chapter on your IP routing protocol in the Network Protocols Configuration Guide, Part 1.
The TN3270 server provides a set of command modes. The TN3270 server can be configured only on Port 2, the internal LAN port, of a Channel Interface Processor (CIP) card.
The following are the TN3270 server command modes:
Table 2 lists the command modes, how to access and exit each mode, the prompt while in each mode, and an example of how to get to the mode. The exit method is only listed if the exit command does not return you to global configuration mode or you must use a different command to exit the mode. The prompts listed assume that the default device name is "Router."
| Command Mode | Access and Exit Method | Prompt | Example |
|---|---|---|---|
| Access-list configuration | From global configuration mode, use the ip access-list or ipx access-list command. ip access-list {standard | extended} name
or ipx access-list {standard | extended | sap | summary} name | Router(config-std-nacl)# or Router(config-ext-nacl)# | Router(config)# ip access-list extended flag
|
| APPN configuration | From global configuration mode, use the appn mode command. | Router(appn)#
| Router(config)# appn mode
|
| Controller configuration | From global configuration mode, use the controller t1 slot/port command to configure a channelized T1 interface. | Router(config-controller)#
| Router(config)# controller t1 0/0
|
| Crypto map configuration | From global configuration mode, use the crypto map map-name [seq-num] command. | Router(config-crypto-map)# | Router(config)# crypto map Research 10
|
| Hex input | From global configuration mode, use the crypto public-key command. crypto public-key key-name serial-number
To exit hex input mode, use the quit command. | Router(config-pubkey)# | Router(config)# crypto public-key BananaCryptoEngine 01709644
|
| Hub configuration | From global configuration mode, enter by specifying a hub with the hub number port [port] command. | Router(config-hub)#
| Router(config)# hub ethernet 0 1 3
|
| Interface channel configuration | From global configuration mode, use the interface channel slot/port command. | Router(config)#
| Router(config)# interface channel 0/1
|
| Internal LAN configuration | From interface configuration mode, use the lan [ethernet | tokenring | fddi] lan-id command.
To exit to interface configuration mode, use the exit command. | Router(config-if)#
| Router(config)# lan ethernet 10
|
| Internal adapter configuration | From internal LAN configuration mode, enter the adapter adapter-number mac-address command.
To exit to Internal LAN configuration mode, use the exit command. | Router(config-lan)#
| Router(config)# lan ethernet 10
|
| IPX-router configuration | From global configuration mode, enter by issuing the ipx routing command, then a command that begins with ipx router (such as ipx router eigrp). ipx router {eigrp autonomous-system-number | nlsp [tag] | rip} | Router(config-ipx-router)#
| Router(config)# ipx router rip
|
| Key chain configuration | From global configuration mode, use the keychain command. keychain name-of-chain
| Router(config-keychain)#
| Router(config)# keychain blue
Router(config-keychain)# |
| Key chain key configuration | From key chain configuration mode, use the key number command.
To exit to key chain configuration mode, use the exit command. | Router(config-keychain-key)#
| Router(config)# keychain blue
Router(config-keychain)# key 10 |
| LANE database configuration | From global configuration mode, use the lane database command. lane database [database-name] | Router(lane-config-datab)#
| Router(config)# lane database red
|
| Line configuration | From global configuration mode, enter by specifying a line with a line {aux | con | tty | vty} line-number [ending-line-number] command. | Router(config-line)#
| Router(config)# line vty 0 4
|
| Map-class configuration | From global configuration mode, configure a map class with the map-class encapsulation class-name command. | Router(config-map-class)#
| Router(config)# map-class atm aaa
|
| Map-list configuration | From global configuration mode, define a map list with the map-list name command. | Router(config-map-list)#
| Router(config)# map-list atm
|
| Response time reporter configuration | From global configuration mode, use the rtr command. rtr probe | Router(config-rtr)# | Router(config)# rtr 1
|
| Route-map configuration | From global configuration mode, enter by specifying the route-map [map-tag] command. | Router(config-route-map)#
| Router(config)# route-map arizona
|
| Router configuration | From global configuration mode, enter by issuing the router [keyword] command (such as router igrp). | Router(config-router)#
| Router(config)# router rip
|
| TN3270 server configuration | From interface configuration mode, use the tn3270-server command.
To exit to interface configuration mode, use the exit command. | Router(tn3270-server)#
| Router(config)# tn3270-server
|
| DLUR configuration | From TN3270 configuration mode, use the dlur command.
To exit to TN3270 configuration mode, use the exit command. | Router(tn3270-dlur)#
| Router(config)# tn3270-server
|
| DLUR SAP configuration | From DLUR configuration mode, use the lsap command.
To exit to DLUR configuration mode, use the exit command. | Router(tn3270-dlur-sap)#
| Router(config)# tn3270-server
|
| PU configuration | From TN3270 server configuration mode or from DLUR configuration mode, use the PU command.
To exit PU configuration mode, use the exit command. | Router(tn3270-pu)#
| Router(config)# tn3270-server
|
Almost every configuration command also has a no form. In general, use the no form to disable a feature or function. Use the command without the keyword no to reenable a disabled feature or to enable a feature that is disabled by default. For example, IP routing is enabled by default. To disable IP routing, specify the no ip routing command and specify ip routing to reenable it. The Cisco IOS software command references provides the complete syntax for the configuration commands and describes what the no form of a command does.
Configuration commands can also have a default form. The default form of a command returns the command setting to its default. Most command are disabled by default, so the default form is the same as the no form. However, some commands are enabled by default and have variables set to certain default values. In these cases, the default command enables the command and sets variables to their default values. The Cisco IOS software command references describe what the default form of a command does if the command is not the same as the no form.
Entering a question mark (?) at the system prompt displays a list of commands available for each command mode. You can also get a list of any command's associated keywords and arguments with the context-sensitive help feature.
To get help specific to a command mode, a command, a keyword, or arguments, perform one of the following tasks:
| Task | Command |
|---|---|
| Obtain a brief description of the help system in any command mode. | help |
| Obtain a list of commands that begin with a particular character string. | abbreviated-command-entry? |
| Complete a partial command name. | abbreviated-command-entry<Tab> |
| List all commands available for a particular command mode. | ? |
| List a command's associated keywords. | command ? |
| List a keyword's associated arguments. | command keyword ? |
When using context-sensitive help, the space (or lack of a space) before the question mark (?) is significant. To obtain a list of commands that begin with a particular character sequence, type in those characters followed immediately by the question mark (?). Do not include a space. This form of help is called word help, because it completes a word for you.
To list keywords or arguments, enter a question mark (?) in place of a keyword or argument. Include a space before the ?. This form of help is called command syntax help, because it reminds you which keywords or arguments are applicable based on the command, keywords, and arguments you already have entered.
You can abbreviate commands and keywords to the number of characters that allow a unique abbreviation. For example, you can abbreviate the show command to sh.
Enter the help command (which is available in any command mode) for a brief description of the help system:
Router#helpHelp may be requested at any point in a command by enteringa question mark '?'. If nothing matches, the help list willbe empty and you must back up until entering a '?' shows theavailable options.Two styles of help are provided:1. Full help is available when you are ready to enter acommand argument (e.g. 'show ?') and describes each possibleargument.2. Partial help is provided when an abbreviated argument is enteredand you want to know what arguments match the input(e.g. 'show pr?'.)
As described in the help command output, you can enter a partial command name and a question mark (?) to obtain a list of commands beginning with a particular character set. (See the section "Complete a Partial Command Name" later in this chapter for more details.)
The following example illustrates how the context-sensitive help feature enables you to create an access list from configuration mode.
Enter the letters co at the system prompt followed by a question mark (?). Do not leave a space between the last letter and the question mark (?). The system provides the commands that begin with co.
Router# co?
configure connect copy
Enter the configure command followed by a space and a question mark (?) to list the command's keywords and a brief explanation:
Router# configure ?
memory Configure from NV memory
network Configure from a TFTP network host
terminal Configure from the terminal
<cr>
Enter the terminal keyword to enter configuration mode from the terminal:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
Enter the access-list command followed by a space and a question mark (?) to list the command's keywords:
Router(config)# access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1000-1099> IPX SAP access list
<1100-1199> Extended 48-bit MAC address access list
<200-299> Protocol type-code access list
<300-399> DECnet access list
<400-499> XNS standard access list
<500-599> XNS extended access list
<600-699> Appletalk access list
<700-799> 48-bit MAC address access list
<800-899> IPX standard access list
<900-999> IPX extended access list
The two numbers within the angle brackets represent an inclusive range. Enter the access list number 99 and then enter another question mark (?) to see the arguments that apply to the keyword and brief explanations:
Router(config)# access-list 99 ?
deny Specify packets to reject
permit Specify packets to forward
Enter the deny argument followed by a question mark (?) to list additional options:
Router(config)# access-list 99 deny ?
A.B.C.D Address to match
Generally, uppercase letters represent variables, though this is not always the case. Enter the IP address followed by a question mark (?) to list additional options:
Router(config)# access-list 99 deny 131.108.134.0 ?
A.B.C.D Mask of bits to ignore
<cr>
The <cr> symbol appears in the list to indicate that one of your options is to press Return to execute the command.
The other option is to add a wildcard mask. Enter the wildcard mask followed by a question mark (?) to list further options.
Router(config)#access-list 99 deny 131.108.134.0 0.0.0.255 ?<cr> Router(config)#access-list 99 deny 131.108.134.0 0.0.0.255
The <cr> symbol by itself indicates there are no more keywords or arguments. Press Return to execute the command. The system adds an entry to access list 99 that denies access to all hosts on subnet 131.108.134.0.
To configure a line to display help for the full set of user-level commands during all sessions, perform the following tasks in line configuration mode:
| Task | Command |
|---|---|
| Configure a line or lines to receive help for the full set of user-level commands when a user presses ?. | full-help |
To configure the current session to display help for the full set of user-level commands, perform the following task in user exec mode:
| Task | Command |
|---|---|
| Configure this session to provide help for the full set of user-level commands. | terminal full-help |
The full-help and terminal full-help commands enable (or disable) a display of all help messages available from the terminal. They are used with the show command.
The following example is output for show ? with terminal full-help disabled and then enabled:
Router> show ? bootflash Boot Flash information calendar Display the hardware calendar clock Display the system clock context Show context information dialer Dialer parameters and statistics history Display the session command history hosts IP domain-name, lookup style, nameservers, and host table isdn ISDN information kerberos Show Kerberos Values modemcap Show Modem Capabilities database ppp PPP parameters and statistics rmon rmon statistics sessions Information about Telnet connections snmp snmp statistics terminal Display terminal configuration parameters users Display information about terminal lines version System hardware and software status Router> terminal full-help Router> show ? access-expression List access expression access-lists List access lists aliases Display alias commands apollo Apollo network information appletalk AppleTalk information arp ARP table async Information on terminal lines used as router interfaces bootflash Boot Flash information bridge Bridge Forwarding/Filtering Database [verbose] bsc BSC interface information bstun BSTUN interface information buffers Buffer pool statistics calendar Display the hardware calendar cdp CDP information clns CLNS network information clock Display the system clock cls DLC user information cmns Connection-Mode networking services (CMNS) information ... x25 X.25 information xns XNS information xremote XRemote statistics
The user interface provides error isolation in the form of an error indicator, a caret symbol (^). The ^ symbol appears at the point in the command string where you have entered an incorrect command, keyword, or argument.
In the following example, suppose you want to set the clock. Use context-sensitive help to check the syntax for setting the clock.
Router#clock ?set Set the time and date Router#clock
The help output shows that the set keyword is required. Check the syntax for entering the time:
Router#clock set ?hh:mm:ss Current time Router#clock set
Enter the current time:
Router# clock set 13:32:00
% Incomplete command.
The system indicates that you need to provide additional arguments to complete the command. Press Ctrl-P (see the next section, "Use the Command History Features") to automatically repeat the previous command entry. Then add a space and question mark (?) to reveal the additional arguments:
Router# clock set 13:32:00 ?
<1-31> Day of the month
January Month of the year
February
March
April
May
June
July
August
September
October
November
December
Now you can complete the command entry:
Router# clock set 13:32:00 23 February 97
^
% Invalid input detected at '^' marker.
The caret symbol (^) and help response indicate an error at 97. To list the correct syntax, enter the command up to the point where the error occurred and then enter a question mark (?):
Router# clock set 13:32:00 23 February ?
<1993-2035> Year
Router# clock set 13:32:00 23 February
Enter the year using the correct syntax and press Return to execute the command.
Router# clock set 13:32:00 23 February 1997
With the current Cisco IOS release, the user interface provides a history or record of commands that you have entered. This feature is particularly useful for recalling long or complex commands or entries, including access lists. With the command history feature, you can complete the tasks in the following sections:
By default, the system records 10 command lines in its history buffer. To set the number of command lines that the system will record during the current terminal session, complete the following task in EXEC mode:
| Task | Command |
|---|---|
| Enable the command history feature for the current terminal session. | terminal history [size number-of-lines] |
The terminal no history size command resets the number of lines saved in the history buffer to the default of 10 lines.
To configure the number of command lines the system will record for all sessions on a particular line, complete the following task in line configuration mode:
| Task | Command |
|---|---|
| Enable the command history feature. | history [size number-of-lines]1 |
To recall commands from the history buffer, perform one of the following tasks:
| Task | Key Sequence/Command |
|---|---|
| Recall commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands. | Press Ctrl-P or the up arrow key.1 |
| Return to more recent commands in the history buffer after recalling commands with Ctrl-P or the up arrow key. Repeat the key sequence to recall successively more recent commands. | Press Ctrl-N or the down arrow key.1 |
| While in EXEC mode, list the last several commands you have just entered. | show history |
The command history feature is automatically enabled. To disable it during the current terminal session, complete the following task in EXEC mode:
| Task | Command |
|---|---|
| Disable the command history feature for the current session. | terminal no history |
To configure a specific line so that the command history feature is disabled, complete the following task in line configuration mode:
| Task | Command |
|---|---|
| Configure the line so that the command history feature is disabled. | no history |
The current software release includes an enhanced editing mode that provides a set of editing key functions similar to those of the Emacs editor.
You can enter commands in uppercase, lowercase, or a mix of both. Only passwords are case sensitive. You can abbreviate commands and keywords to the number of characters that allow a unique abbreviation. For example, you can abbreviate the show command to sh. After entering the command line at the system prompt, press the Return key to execute the command.
The following subsections are included in this section:
Although enhanced editing mode is automatically enabled with the current Cisco IOS release, you can disable it and revert to the editing mode of previous Cisco IOS releases. (See the section "Disable Enhanced Editing Mode" later in this chapter.)
To reenable the enhanced editing mode for the current terminal session, complete the following task in EXEC mode:
| Task | Command |
|---|---|
| Enable the enhanced editing features for the current terminal session. | terminal editing |
To reconfigure a specific line to have enhanced editing mode, complete the following task in line configuration mode:
| Task | Command |
|---|---|
| Enable the enhanced editing features. | editing |
Perform the following tasks to move the cursor around on the command line to make corrections or changes:
| Task | Keystrokes |
|---|---|
| Move the cursor back one character. | Press Ctrl-B or press the left arrow key.1 |
| Move the cursor forward one character. | Press Ctrl-F or press the right arrow key.1 |
| Move the cursor to the beginning of the command line. | Press Ctrl-A. |
| Move the cursor to the end of the command line. | Press Ctrl-E. |
| Move the cursor back one word. | Press Esc B. |
| Move the cursor forward one word. | Press Esc F. |
If you cannot remember a complete command name, press the Tab key to allow the system to complete a partial entry. To do so, perform the following task:
| Task | Keystrokes |
|---|---|
| Complete a command name. | Enter the first few letters and press the Tab key. |
If your keyboard does not have a Tab key, press Ctrl-I instead.
In the following example, when you enter the letters conf and press the Tab key, the system provides the complete command:
Router#conf<Tab>Router#configure
If you enter a set of characters that could indicate more than one command, the system beeps to indicate an error. Enter a question mark (?) to obtain a list of commands that begin with that set of characters. Do not leave a space between the last letter you enter and the question mark (?).
For example, there are three commands in privileged mode that start with co. To see what they are, type co? at the privileged EXEC prompt:
Router#co?configure connect copy Router#co
The system provides a buffer that contains the last 10 items you deleted. To recall these items and paste them in the command line, perform the following tasks:
| Task | Keystrokes |
|---|---|
| Step 1 Recall the most recent entry in the buffer. | Press Ctrl-Y. |
| Step 2 Recall the next buffer entry. | Press Esc Y. |
The buffer contains only the last 10 items you have deleted or cut. If you press Esc Y more than 10 times, you will cycle back to the first buffer entry.
The new editing command set provides a wraparound feature for commands that extend beyond a single line on the screen. When the cursor reaches the right margin, the command line shifts 10 spaces to the left. You cannot see the first ten characters of the line, but you can scroll back and check the syntax at the beginning of the command. To scroll back, perform the following task:
| Task | Keystrokes |
|---|---|
| Return to the beginning of a command line to verify that you have entered a lengthy command correctly. | Press Ctrl-B or the left arrow key repeatedly until you scroll back to the beginning of the command entry, or press Ctrl-A to return directly to the beginning of the line.1 |
In the following example, the access-list command entry extends beyond one line. When the cursor first reaches the end of the line, the line is shifted 10 spaces to the left and redisplayed. The dollar sign ($) indicates that the line has been scrolled to the left. Each time the cursor reaches the end of the line, the line is again shifted 10 spaces to the left.
Router(config)#access-list 101 permit tcp 131.108.2.5 255.255.255.0 131.108.1Router(config)#$ 101 permit tcp 131.108.2.5 255.255.255.0 131.108.1.20 255.25Router(config)#$t tcp 131.108.2.5 255.255.255.0 131.108.1.20 255.255.255.0 eqRouter(config)#$108.2.5 255.255.255.0 131.108.1.20 255.255.255.0 eq 45
When you have completed the entry, press Ctrl-A to check the complete syntax before pressing the Return key to execute the command. The dollar sign ($) appears at the end of the line to indicate that the line has been scrolled to the right:
Router(config)# access-list 101 permit tcp 131.108.2.5 255.255.255.0 131.108.1$
The Cisco IOS software assumes you have a terminal screen that is 80 columns wide. If you have a width other than that, use the terminal width command to set the width of your terminal.
Use line wrapping in conjunction with the command history feature to recall and modify previous complex command entries. See the section "Recall Commands" in this chapter for information about recalling previous command entries.
Perform any of the following tasks to delete command entries if you make a mistake or change your mind:
| Task | Keystrokes |
|---|---|
| Erase the character to the left of the cursor. | Press the Delete or Backspace key. |
| Delete the character at the cursor. | Press Ctrl-D. |
| Delete all characters from the cursor to the end of the command line. | Press Ctrl-K. |
| Delete all characters from the cursor to the beginning of the command line. | Press Ctrl-U or Ctrl-X. |
| Delete the word to the left of the cursor. | Press Ctrl-W. |
| Delete from the cursor to the end of the word. | Press Esc D. |
When you use the help facility to list the commands available in a particular mode, the list is often longer than the terminal screen can display. In such cases, a ---More--- prompt is displayed at the bottom of the screen. To view the next line or screen, complete the following tasks:
| Task | Keystrokes |
|---|---|
| Scroll down one line. | Press the Return key. |
| Scroll down one screen. | Press the Space bar. |
---More--- prompt is used for any output that has more lines than can be displayed on the terminal screen, including show command output. You can use the keystrokes listed above whenever you see the ---More--- prompt.
If you are entering a command and the system suddenly sends a message to your screen, you can easily recall your current command line entry. To do so, perform the following task:
| Task | Keystrokes |
|---|---|
| Redisplay the current command line. | Press Ctrl-L or Ctrl-R. |
If you have mistyped a command entry, you can transpose the mistyped characters by performing the following task:
| Task | Keystrokes |
|---|---|
| Transpose the character to the left of the cursor with the character located at the cursor. | Press Ctrl-T. |
You can capitalize or lowercase words or capitalize a set of letters with simple keystroke sequences. To do so, perform the following tasks:
| Task | Keystrokes |
|---|---|
| Capitalize at the cursor. | Press Esc C. |
| Change the word at the cursor to lowercase. | Press Esc L. |
| Capitalize letters from the cursor to the end of the word. | Press Esc U. |
Sometimes you might want to use a particular keystroke as an executable command, perhaps as a shortcut. Complete the following task to insert a system code for this purpose:
| Task | Keystrokes |
|---|---|
| Insert a code to indicate to the system that the keystroke immediately following should be treated as a command entry, not an editing key. | Press Ctrl-V or Esc Q. |
To globally disable enhanced editing mode and revert to the editing mode of previous software releases, perform the following task in line configuration mode:
| Task | Command |
|---|---|
| Disable the enhanced editing features for a particular line. | no editing |
To disable enhanced editing mode and revert to the editing mode of software releases before Cisco IOS release 9.21 for the current terminal session, perform the following task in EXEC mode:
| Task | Command |
|---|---|
| Disable the enhanced editing features for the local line. | terminal no editing |
For example, you might disable enhanced editing if you have prebuilt scripts that conflict when enhanced editing is enabled. You can re-enable enhanced editing mode with the editing command or terminal editing command.
The editing keys and functions of software releases before 9.21 are listed in Table 3.
A menu is a displayed list of actions from which you can select without having to know anything about the underlying command-level details. A menu system effectively controls which functions a user can access. Figure 2 illustrates the parts that make up a typical menu.

To create menus, perform the tasks in the following sections:
Anyone who can enter configuration mode can create these menus. Keep the following guidelines in mind when you create menus:
You can specify an identifying title for the menu. To specify the menu title, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the title for the menu. | menu name title delimiter title delimiter |
The following example specifies the title that is displayed when the OnRamp menu is selected. The following four main elements create the title:
The following example shows the command used to create the title for the menu shown in Figure 3, at the beginning of this section:
Router(config)# menu OnRamp title /^[[H^[[JEnter TEXT message. End with the character '/'.Welcome to OnRamp Internet ServicesType a number to select an option;Type 9 to exit the menu./ Router(config)#
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.
In this example, the title text consists of the following:
Title text must be enclosed within text delimiter characters--the slash character (/) in this example. Title text delimiters are characters that do not ordinarily appear within the text of a title, such as slash (/), double quote ("), or tilde (~). You can use any character that is not likely to be used within the text of the title as delimiter characters. Ctrl-C is reserved for special use and should not be used in the text of the title.
This title text example also includes an escape character sequence to clear the screen before displaying the menu. In this case the string ^[[H^[[J is an escape string used by many VT100-compatible terminals to clear the screen. To enter it, you must enter Ctrl-V before each escape character (^[).
You can also 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. This option uses a terminal-independent mechanism based on termcap entries defined in the router and the terminal type configured for the user's terminal. The menu clear-screen 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 inserts 24 new lines, causing all existing text to scroll off the top of the terminal screen.
To clear the screen before displaying the menu, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify screen clearing before displaying menus and submenus. | menu name clear-screen |
The following example clears the screen before displacing the OnRamp menu or a submenu:
Router(config)# menu OnRamp clear-screen
You can specify a prompt for the menu. To specify the menu prompt, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the prompt for the menu. | menu name prompt delimiter prompt delimiter |
Each displayed menu entry consists of the selection key (number, letter, or string) and the text describing the action to be performed. You can specify descriptive text for a maximum of 18 menu items. Because each menu entry represents a single user interface command, you must specify the menu item text one entry at a time. To specify the menu item text, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the text for the menu item. | menu name text item text |
The following example specifies the text that is displayed for the three entries in the OnRamp menu:
Router(config)#menu OnRamp text 1 Read emailRouter(config)#menu OnRamp text 2 UNIX Internet AccessRouter(config)#menu OnRamp text 9 Exit menu system
You can provide access to context-sensitive help by creating a "help server" host and use a menu entry to make a connection to that host.
Menu selection keys do not need to be contiguous. You can provide consistency across menus by assigning a particular number, letter, or string to a special function--such as Help or Exit--regardless of the number of menu entries in a given menu. For example, menu entry H could be reserved for help across all menus.
When more than nine menu items are defined in a menu, the menu line-mode and menu single-space commands are activated automatically. The commands can be configured explicitly for menus of nine items or fewer. For more information on these commands, refer to the section "Specify Menu Display Configuration Options" later in this chapter.
Each displayed menu entry issues a user interface command when the user enters its key. Each menu entry can have only a single command associated with it. To specify the menu item command, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the command to be performed when the menu item is selected. | menu name command item command |
The following example specifies the commands that are associated with the three entries in the OnRamp menu:
Router(config)#menu OnRamp command 1 rlogin mailsysRouter(config)#menu OnRamp command 2 rlogin unix.cisco.comRouter(config)#menu OnRamp command 9 menu-exit
When a menu item allows connections (their normal use), the menu item should also contain entries that can be used to resume connections; otherwise, when a user escapes from a connection and returns to the menu, there is no way to resume the session and it will sit idle until the user logs off.
You can build the resume connection EXEC command into a menu entry so that the user can resume a connection, or you can configure the line using the escape-char none command to prevent users from escaping their sessions.
To specify connection resumption as part of the menu item command, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the command to be performed when the menu item is selected. | menu name command item resume [connection] /connect [connect string] |
You can use the resume command in the following menu entries:
In the following example, the resume command is embedded in the menu command so that selecting the menu item either starts the specified connection session (if one is not already open) or resumes the session (if one is already open):
Router(config)#menu Duluth text 1 Read emailRouter(config)#menu Duluth command 1 resume mailsys /connect rlogin mailsys
In the following example, the resume command is used in a separate menu entry (entry 3) to resume a specific connection:
Router(config)#menu Duluth text 3 Resume UNIX Internet AccessRouter(config)#menu Duluth command 3 resume unix.cisco.com
| Task | Command |
|---|---|
| Specify resume/next connection resumption. | menu name command item resume /next |
The following example shows a menu entry (entry 6) created to step through all of the user's connections:
Router(config)#menu Duluth text 6 Resume next connectionRouter(config)#menu Duluth command 6 resume /next
When a user presses Enter without specifying an item, the router performs the command for the default item. To specify the default item, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the command to be performed when no item is specified. | menu name default item |
To create submenus that are opened by selecting a higher-level menu entry, use the menu command to invoke a menu in a line menu entry. To specify a submenu item command, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Step 1 Specify the menu item that invokes the submenu. | menu name text item text |
| Step 2 Specify the command to be performed when the menu item is selected. | menu name command item menu name2 |
| Step 3 Specify the title for the submenu. | menu name2 title delimiter title2 delimiter |
| Step 4 Specify the submenu item. | menu name2 text item text |
| Step 5 Specify the commands to be performed when the submenu item is selected. | menu name2 command item command |
The following example specifies that the menu item (entry 8) activates the submenu in the OnRamp menu:
Router(config)# menu OnRamp text 8 Set terminal type
The following example specifies the command that is performed when the menu item (entry 8) is selected in the OnRamp menu:
Router(config)# menu OnRamp command 8 menu Terminals
The following example specifies the title for the Terminals submenu:
Router(config)#menu Terminals title /Supported Terminal TypesType a number to select an option;Type 9 to return to the previous menu.
The following example specifies the submenu items for the Terminals submenu:
Router(config)#menu Terminals text 1 DEC VT420 or similarRouter(config)#menu Terminals text 2 Heath H-19Router(config)#menu Terminals text 3 IBM 3051 or equivalentRouter(config)#menu Terminals text 4 Macintosh with gterm emulatorRouter(config)#menu Terminals text 9 Return to previous menu
The following example specifies the commands associated with the items in the Terminals submenu:
Router(config)#menu Terminals command 1 term terminal-type vt420Router(config)#menu Terminals command 2 term terminal-type h19Router(config)#menu Terminals command 3 term terminal-type ibm3051Router(config)#menu Terminals command 4 term terminal-type gtermRouter(config)#menu Terminals command 9 menu-exit
When you select entry 8 on the main menu, the Terminals submenu appears:
Supported Terminal Types
Type a number to select an option;
Type 9 to return to the previous menu.
1 DEC VT420 or similar
2 Heath H-19
3 IBM 3051 or equivalent
4 Macintosh with gterm emulator
9 Return to previous menu
A hidden menu entry is a menu item that contains a selection key but no associated text describing the action to be performed. Include this type of menu entry to aid system administrators who help users. The normal procedure is to specify a menu command but omit specifying any text for the item. To specify a hidden menu item, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify the command to be performed when the hidden menu entry is selected. | menu name command item command |
The following example shows the command associated with the submenu entry in the OnRamp menu:
Router(config)# menu OnRamp command 7 show whoami
Comm Server "cs101", Line 0 at 0 bps. Location "Second floor, West" Additional data: Terminals submenu of OnRamp Internet Access menu
To prevent the information from being lost if the menu display clears the screen, this command always displays a More prompt before returning.
In addition to the menu clear-screen command, described in the section "Specify the Menu Title," the following are the three other menu commands that define menu functions:
In a menu of nine or fewer items, you ordinarily select a menu item by entering the item number or a letter. In line mode, you select a menu entry by entering the item key and pressing Enter. The line mode allows you to backspace over the selection and enter another before pressing Enter to issue the command. This function allows you to change the selection before you invoke the command.
To invoke the line-mode option, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify line-mode operation. | menu name line-mode |
The line-mode option is invoked automatically when more than nine menu items are defined, but it can also be configured explicitly for menus of nine items or fewer.
In order to use strings as selection keys, you must enable the menu line-mode command.
If there are nine or fewer menu items, the Cisco IOS software ordinarily displays the menu items double-spaced. In a menu of more than nine items, the single-space option is activated automatically to fit the menu into a normal 24-line terminal screen. However, the single-space option also can be configured explicitly for menus of nine or fewer items.
To invoke the single-space option, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Specify single-space operation. | menu name single-space |
The status-line option displays a line of status information about the current user at the top of the terminal 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).
To display the status-line option, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Display a status line when using a menu. | menu name status-line |
To configure per-item options, perform either or both of the following tasks in global configuration mode:
| Task | Command |
|---|---|
| After the command is issued, pause before redrawing the menu. Enter this command once for each menu item that pauses. | menu name options item pause |
| Require a login before the command. Enter this command once for each menu item that requires a login. | menu name options item login |
To invoke the menu, perform the following task at the EXEC prompt:
| Task | Command |
|---|---|
| Invoke the menu by specifying the name of the menu. | menu name |
You can define menus containing privileged EXEC commands, but users must have privileged access when they start up the menu.
To ensure that a menu is automatically invoked on a line, make sure the menu does not have any exit paths that leave users in an interface they cannot operate, then configure that line with the command autocommand menu menu_name.
Menus also can be invoked on a per-user basis by defining an autocommand for that local username.
The following example invokes the OnRamp menu:
Router>menu OnRampWelcome to OnRamp Internet ServicesType a number to select an option;Type 9 to exit the menu.1 Read email 2 UNIX Internet access 3 Resume UNIX connection 6 Resume next connection 9 Exit menu system
To delete the menu from the configuration, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Delete the menu by specifying the menu name. | no menu name |
The following example deletes the OnRamp menu from the configuration:
Router(config)# no menu OnRamp
The following example allows menu users to Telnet to one of three different machines. The user can also view the output of the show user command and exit the menu. One hidden menu item, specified by the selection here, allows system administrators to view the current software version.
menu new title ^C
Telnet Menu
^C
menu new prompt ^C
Please enter your selection: ^C
menu new text 1 telnet system1
menu new command 1 telnet system1
menu new options 1 pause
menu new text 2 telnet system2
menu new command 2 telnet system2
menu new options 2 pause
menu new text b telnet systemblue
menu new command b telnet systemblue
menu new options b pause
menu new text me show user
menu new command me show user
menu new options me pause
menu new command here show version
menu new text Exit Exit
menu new command Exit menu-exit
menu new clear-screen
menu new status-line
menu new default me
menu new line-mode
!
You can issue most of the Cisco IOS commands using a Web browser. This Cisco IOS feature is accessed by using the Cisco Web browser interface, which is accessed from the router's home page. (All Cisco routers and access servers loaded with the latest version of Cisco IOS software have a home page, which is password protected.)
From the router's home page, you click on a hypertext link titled "Monitor the Router." This link takes you to a Web page that has a "Command" field. You can type commands in this field as if you were entering commands at a terminal connected to the router. The page also displays a list of commands. You can execute these commands by clicking on them, as if you were clicking on hypertext links.
To use the Cisco Web browser interface to issue commands, perform the tasks in the following sections:
You can enable the Cisco Web browser interface on any router running Cisco IOS Release 11.0(6) or later software. Once enabled, you will be able to issue Cisco IOS commands to your router using a Web browser.
The Web browser interface is automatically enabled when you use ClickStart to configure a Cisco 1003, Cisco 1004, or Cisco 1005 router.
If you have any other Cisco router, you must enable the Web browser interface by altering the routers' configuration. To do this, perform the tasks in the following list. The first task is required; the remaining are optional.
To enable a Cisco router to be configured from a browser using the Cisco Web browser interface, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Enable a router to be reconfigured using the Cisco Web browser interface. | ip http server |
Now that the Cisco Web browser interface is enabled, you can perform any of the optional tasks or proceed to configure a router using the Cisco Web browser interface.
By default, the Cisco Web browser interface uses port 80 on the router. To assign the Cisco Web browser interface to a different port, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Assign a port number to be used by the Cisco Web browser interface. | ip http port number |
To control which hosts can access the http server used by the Cisco Web browser interface, perform the following task in global configuration mode:
| Task | Command |
|---|---|
| Control access to the http server used by the Cisco Web browser interface. | ip http access-class {access-list-number | name} |
| Task | Command |
|---|---|
| Specify how HTTP server users are authenticated. | ip http authentication {aaa | enable | local | tacacs} |
To use the Cisco Web browser interface, your computer must have a World Wide Web browser. The Cisco Web browser interface works with most browsers, including Netscape Navigator. Your Web browser must be able read and submit forms. The original versions of Mosaic might have problems using the Cisco Web browser interface, because they either cannot submit forms or have difficulty doing so.
The computer must be connected to the same network that the router or access server is on.
Cisco IOS Release 11.0(6) or later software allows users with a default privilege level of 15 to access a predefined home page for a router or access server. If you have been assigned a privilege level other than 15, Cisco IOS Release 11.3 or later software allows you to issue Cisco IOS commands from a Web page where the commands defined for your specific user privilege level will be displayed.
To access the home page for your router or access server with a default privilege level of 15, perform the following steps:
Step 1 Enter the following command in the URL field of your Web browser and press return: http://router-name/. (For example, to access a Cisco router named cacophony with a default privilege level of 15, type http://cacophony/.)The browser then prompts you for the password.
Step 2 Enter the password.
The browser should display the home page for your router or access server.
The router's home page looks something like the Cisco 7200 home page shown in Figure 3.

Step 1 Enter the following command in the URL field of your Web browser and press return: http://router-name/level/level/mode/command. (For example, to request a user privilege level of 12 on a Cisco router named cacophony, type http://cacophony/level/12/exec).The browser then prompts you for the username and/or password.
Step 2 Depending on your authentication method, enter your username and/or password and press return. The Web browser should display a Web page specific to your user privilege level, mode, and the command you have requested.
Table 4 lists the URL arguments you must use when requesting a Web page.
| Argument | Description |
|---|---|
| router-name | Name of the router being configured. |
| level | The privilege level you are requesting. |
| mode | The mode the command will be executed in, such as exec, configure, and interface. |
| command | (Optional) The command you want to execute. If you specify a command, your browser will display a Web page showing the results of the requested command. If you do not specify a command in the URL, your browser will display a Web page listing all of the commands available for your privilege level. |
To issue commands using the Cisco Web browser interface, click the link "Monitor the router" in the first list of hypertext links on the home page. This displays the Web page shown in Figure 4.

To enter a command using hypertext links, scroll through the commands listed at the bottom of the screen and click the one you want to execute. If the link is a complete command, it is executed. If the command has more parameters, another list of command hypertext links is displayed. Scroll through this second list and click the one you want to execute.
If the command is a request for information, like a show command, the information is displayed in the Web browser window.
If the command requires a variable, a form in which you can enter the variable is displayed.
Entering the command in the command field is just like entering it at a terminal console. Enter the command using the syntax documented in the Cisco IOS command reference. If you are uncertain of the options available for a particular command, type a question mark (?).
For example, entering show ? in the command field displays the parameters for the show command. The Cisco Web browser interface displays the parameters as hypertext links. To select a parameter, you can either click on one of the links, or you can enter the parameter in the command field.
You can issue a command using the URL window for the Web browser.
For example, to execute a show configuration command on a router named example, you would enter the following in the URL window:
http://example/exec/show/configuration
The Web browser then displays the configuration for the "example" router. To save effort, modify the URL in the URL window in the browser control bar instead of retyping the entire URL.
The difference between entering a command in the command field and entering a command in the URL window is that in the URL window, command modes, keywords, and options should be separated by slashes, not spaces.
You can customize HTML pages to display Cisco IOS command output and Cisco IOS platform-specific variables (for example, a router host name or router address typically used in router setup pages) for a Web browser. You can display this information using HTML formatted Server Side Includes (SSIs) that you insert into your custom HTML pages. SSIs are a Cisco IOS software feature described in the following sections.
SSIs are HTML formatted commands or variables that you insert into HTML pages when you customize Cisco IOS platform configuration pages for a Web browser. These SSI commands and SSI variables display Cisco IOS command output and Cisco IOS platform-specific variables.
The Cisco IOS software supports two HTML SSI commands defined for customizing HTML pages: the SSI EXEC command and the SSI ECHO command. The HTML format of the SSI EXEC command is <!--#exec cmd="xxx"-->, and the HTML format of the SSI ECHO command is <!--#echo var="yyy"-->. (See the section "Customize HTML Pages Using SSIs" later in this chapter for a description of how to use these commands).
In addition to the two SSI commands, the Cisco IOS software supports several SSI variables defined for customizing HTML pages. SSI variables are used with the SSI ECHO command. There is one SSI variable defined for all Cisco IOS platforms (SERVER_NAME) and other SSI variables specifically defined for ISDN, Frame Relay, and asynchronous serial platforms. The format and a description of all the available SSI variables are provided in Table 5. (See the section "Customize HTML Pages Using SSIs" later in this chapter for a description of how to use these SSI variables with the SSI ECHO command).
The SSI EXEC command is supported on all platforms. The SSI ECHO command, used with SSI variables, is supported on all platforms listed in Table 5.
| HTML Format of SSI Variable | Description of Variable Displayed on Browser Page | Cisco IOS Platform(s) This SSI Is Supported On |
|---|---|---|
| SERVER_NAME | Host name of the HTTP server. | All Cisco IOS platforms |
| EZSETUP_PASSWORD | Enable password (currently left blank). | Cisco 1000 series |
| EZSETUP_PASSWORD_VERIFY | Repeat of the enable password to verify accuracy (currently left blank). | Cisco 1000 series |
| EZSETUP_ETHERNET0_ADDRESS | IP address of the Ethernet 0 interface. | Cisco 1000 series |
| EZSETUP_ETHERNET0_MASK | IP mask of the Ethernet 0 interface. | Cisco 1000 series |
| EZSETUP_DNS_ADDRESS | DNS address used by the router. | Cisco 1000 series |
| EZSETUP_STANDARD_DEBUG_Y | Standard debug variable. Returns CHECKED if set to TRUE; otherwise, it is blank. | Cisco 1000 series |
| EZSETUP_STANDARD_DEBUG_N | Standard debug variable. Returns CHECKED if set to FALSE; otherwise, it is blank. | Cisco 1000 series |
| EZSETUP_ISDN_SWITCHTYPE | ISDN Switch type. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_REMOTE_NAME | Name of remote ISDN system. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_REMOTE_NUMBER | Phone number of remote ISDN system. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_CHAP_PASSWORD | CHAP password of remote ISDN system. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_SPID1 | ISDN SPID 1. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_SPID2 | ISDN SPID 2. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_SPEED_56 | Speed of ISDN interface. Returns CHECKED if set to 56k; otherwise, it is blank. | Cisco 1003 and Cisco 1004 |
| EZSETUP_ISDN_SPEED_64 | Speed of ISDN interface. Returns CHECKED if set to 64k; otherwise, it is blank. | Cisco 1003 and Cisco 1004 |
| EZSETUP_FR_ADDRESS | Frame-Relay IP address. | Cisco 1005 |
| EZSETUP_FR_MASK | Frame-Relay IP mask. | Cisco 1005 |
| EZSETUP_FR_DLCI | Frame-Relay DLCI. | Cisco 1005 |
| EZSETUP_ASYNC_REMOTE_NAME | Name of remote system. | Cisco 1005 |
| EZSETUP_ASYNC_REMOTE_NUMBER | Phone number of remote system. | Cisco 1005 |
| EZSETUP_ASYNC_CHAP_PASSWORD | CHAP password for remote system. | Cisco 1005 |
| EZSETUP_ASYNC_LINE_PASSWORD | Async line password. | Cisco 1005 |
| EZSETUP_ASYNC_MODEM_SPEED | Speed of async modem (either 14.4k or 28.8k). | Cisco 1005 |
| EZSETUP_ASYNC_MODEM_SPEED_144K | Returns CHECKED if async modem speed is 14.4k; otherwise it is blank. | Cisco 1005 |
| EZSETUP_ASYNC_MODEM_SPEED_288K | Returns CHECKED if async modem speed is 28.8k; otherwise it is blank. | Cisco 1005 |
Once you have designed a set of HTML pages that include SSIs, you can copy these pages to a Cisco IOS platform's Flash memory. (See the section "Copy HTML Pages to Flash Memory" for instructions on storing HTML pages in Flash memory later in this section.) When you retrieve these pages from Flash memory and display them using a Web browser, any SSI command that was designed into these pages will either display Cisco IOS command output or display a current variable or identifier defined in Table 5. For example, the SSI ECHO command with the variable SERVER_NAME will display the current host name of the HTTP server you are using, and the SSI ECHO command with the variable EZSETUP_ISDN_SWITCHTYPE will display the current ISDN switch type you are using.
Using SSIs, you can customize one set of international HTML pages (for example, in Japanese) and copy these pages to Flash memory on multiple Cisco IOS platforms. When you retrieve these pages from the Flash memory of a Cisco IOS platform, current variables and identifiers associated with the platform you are currently using are displayed. SSIs save you from having to duplicate these international pages (considered relatively large images that contain 8-bit or multibyte characters) and store them in the source code for each platform you are using. (Refer to Table 5 to determine which Cisco IOS platforms support which SSIs variables.)
To customize your HTML pages and view them for the user interface, perform the tasks in the following sections:
When you are customizing an HTML page for a Web browser, type <!--#exec cmd="xxx"--> in your HTML file where you want Cisco IOS command output to appear on the browser page. Replace xxx with a Cisco IOS command that can be executed in the router's EXEC mode. (See the "SSI EXEC Command Example" section later in this chapter.)
When you are customizing an HTML page for a Web browser, type <!--#echo var="yyy"--> in your HTML file where you want a value or identifier associated with a particular Cisco IOS platform (for example, an ISDN or Frame Relay platform) to appear on the browser page. Replace yyy with an SSI variable described in Table 5. (See the "SSI ECHO Command Example" section later in this chapter.)
| Task | Command |
|---|---|
| Enable the Cisco Web browser interface. | ip http server |
Refer to the section "Configure the Cisco Web Browser Interface" earlier in this chapter for further information on configuring the Cisco Web browser interface.
Once the Cisco Web browser interface is enabled, you can retrieve your HTML page from Flash memory and view it on the Cisco Web browser by typing the URL http://router/flash/filename in the URL window. Replace router with the host name or IP address of the current Cisco IOS platform you are using, and replace filename with the name of the file you created with ".shtml" appended. For example, http://myrouter/flash/ssi_file.shtml.
This section provides the following configuration examples:
Contents of the HTML file in Flash memory:
<HTML> <HEAD> <TITLE> SSI EXEC Command Example</TITLE> </HEAD> <BODY> This is an example of the SSI EXEC command <HR> <PRE> <!--#exec cmd="show users"--> </PRE> <HR> </BODY> </HTML>
Contents that the Web browser receives when the HTML file is retrieved from Flash memory:
<HTML> <HEAD> <TITLE> SSI EXEC Command Example</TITLE> </HEAD> <BODY> This is an example of the SSI EXEC command <HR> <PRE> Line User Host(s) Idle Location 0 con 0 idle 12 2 vty 0 idle 0 router.cisco.com </PRE> <HR> </BODY> </HTML>
The following is an example of the HTML SSI ECHO command used with the SSI variable SERVER_NAME (see Table 5) to display the Cisco IOS platform host name rain:
Contents of the HTML file in Flash memory:
<HTML> <HEAD> <TITLE>SSI Echo Command Example</TITLE> </HEAD> <BODY> This is an example of the SSI echo command <HR> <!--#echo var="SERVER_NAME"--> <HR> </BODY> </HTML>
Contents that the Web browser receives when the HTML file is retrieved from Flash memory:
<HTML> <HEAD> <TITLE>SSI Echo Command Example</TITLE> </HEAD> <BODY> This is an example of the SSI echo command <HR> rain <HR> </BODY> </HTML>
Your Cisco IOS platform will automatically display 8-bit and multibyte character sets and print the ESC character as a single character instead of as the caret and bracket symbols (^[) when the Cisco Web browser interface is enabled with the ip http server command. (Refer to the section "Configure the Cisco Web Browser Interface" for further information on configuring the Cisco Web browser interface.)
If you are Telneting to a Cisco IOS platform, perform the following task in line configuration mode to display 8-bit and multibyte international character sets and print the ESC character as a single character instead of "^[":
If you are Telneting to a Cisco IOS platform, perform the following task in EXEC mode to display 8-bit and multibyte international characters sets and print the ESC character as a single character instead of "^[" for the current Telnet session:
|
|