|
|
This chapter describes the command-line interface (CLI) you use to configure the Catalyst 6000 family switches and Ethernet modules. For descriptions of all switch and ROM monitor commands, refer to the Catalyst 6000 Family Command Reference publication.
![]() |
Note For a description of the ATM IOS CLI and commands, refer to the ATM Software Configuration Guide and Command Reference---Catalyst 5000 Family and 6000 Family Switches publication. For a description of the Multilayer Switch Feature Card (MSFC) IOS CLI and commands, refer to the Catalyst 6000 Family Multilayer Switch Feature Card and Policy Feature Card Configuration Guide. For a description of the Multilayer Switch Module (MSM) IOS CLI and commands, refer to the Multilayer Switch Module Installation and Configuration Note. |
This chapter consists of these sections:
The ROM monitor is a ROM-based program that executes upon platform power-up, reset, or when a fatal exception occurs. The system enters ROM monitor mode if the switch does not find a valid system image, if the NVRAM configuration is corrupted, or if the configuration register is set to enter ROM monitor mode. From the ROM monitor mode, you can load a system image manually from Flash memory, from a network server file, or from bootflash.
You can enter ROM monitor mode by restarting the switch and pressing the Break key during the first 60 seconds of startup.
![]() |
Note The Break key is always enabled for 60 seconds after rebooting the system, regardless of whether the Break key is configured to be off by configuration register settings. |
To access the ROM monitor through a terminal server, you can escape to the Telnet prompt and enter the send break command for your terminal emulation program to break into ROM monitor mode.
Once you are in ROM monitor mode, the prompt changes to rommon>. Use the ? command to see the available ROM monitor commands.
The switch CLI is a basic command-line interpreter, similar to the UNIX C shell.
These sections describe how to use the switch CLI:
You can access the CLI through the supervisor engine console port or through a Telnet session.
These sections describe how to access the switch CLI:
To access the switch CLI through the console port, you must connect a console terminal to the console port through an EIA/TIA-232 (RS-232) cable.
![]() |
Note For complete information on how to connect to the supervisor engine console port, refer to the hardware documentation for your switch. |
To access the switch through the console port, perform this task:
| Task | Command | |
|---|---|---|
Step 1 | Initiate a connection from the terminal to the switch console prompt and press Return. |
|
Step 2 | At the prompt, enter the system password. The Console> prompt appears, indicating that you have accessed the CLI in normal mode. |
|
Step 3 | If necessary, enter privileged mode (you must enter privileged mode to change the switch configuration). | enable |
Step 4 | Enter the necessary commands to complete the desired tasks. |
|
Step 5 | When finished, exit the session. | exit |
After accessing the switch through the console port, you see this display:
Cisco Systems Console Enter password: Console>
Before you can open a Telnet session to the switch, you must first set the IP address for the switch. For information about setting the IP address, see the "Setting the In-Band (sc0) Interface IP Address" section. Up to eight simultaneous Telnet sessions are supported. Telnet sessions disconnect automatically after remaining idle for a set time period.
To access the switch CLI from a remote host using Telnet, perform this task:
| Task | Command | |
|---|---|---|
Step 1 | From the remote host, enter the telnet command and the name or IP address of the switch you want to access. | telnet {hostname | ip_addr} |
Step 2 | At the prompt, enter the password for the CLI. If no password has been configured, press Return. |
|
Step 3 | Enter the necessary commands to complete your desired tasks. |
|
Step 4 | When finished, exit the Telnet session. | exit |
This example shows how to open a Telnet session to the switch:
unix_host% telnet Catalyst_1
Trying 172.16.10.10...
Connected to Catalyst_1.
Escape character is '^]'.
Cisco Systems Console
Enter password:
Catalyst_1>
These sections describe how to work with the switch CLI:
The switch CLI supports two modes of operation: normal and privileged. Both modes are password protected. Enter normal-mode commands for everyday system monitoring. Enter privileged-mode commands to configure the system and perform basic troubleshooting.
After you log in, the system enters normal mode automatically, which gives you access to normal-mode commands only. You can access privileged mode by entering the enable command followed by the privileged-mode password. To return to normal mode, enter the disable command at the prompt.
This example shows how to enter privileged mode:
Console> enable Enter Password: <password> Console> (enable)
Switch commands are not case sensitive. You can abbreviate commands and parameters as long as they contain enough letters to be distinguished from any other currently available commands or parameters.
The Catalyst 6000 family switches are multimodule systems. Commands you enter from the CLI might apply to the entire system or to a specific module, port, or VLAN.
Modules, ports, and VLANs are numbered starting with 1. The supervisor engine is module 1, residing in slot 1. If your switch has a redundant supervisor engine, the supervisor engines reside in slots 1 and 2.
To designate a specific module, use the module number.
Port 1 is always the left-most port. To designate a specific port on a specific module, the command syntax is mod_num/port_num. For example, 3/1 denotes module 3, port 1. In some commands, such as set trunk and set port channel, you can enter lists of ports.
To specify a range of ports, use a comma-separated list (do not insert spaces) to specify individual ports or a hyphen (-) between the port numbers to specify a range of ports. Hyphens take precedence over commas.
Table 2-1 shows examples of how to designate ports and port ranges.
| Example | Function |
|---|---|
| Specifies port 1 on module 2 |
| Specifies ports 4, 5, 6, 7, and 8 on module 3 |
| Specifies ports 2 and 4 on module 5 and port 10 on module 6 |
3/1-2,4/8 | Specifies ports 1 and 2 on module 3 and port 8 on module 4 |
VLANs are identified using the VLAN ID, a single number associated with the VLAN. To specify a list of VLANs, use a comma-separated list (do not insert spaces) to specify individual VLANs or a hyphen (-) between the VLAN numbers to specify a range of VLANs.
Table 2-2 shows examples of how to designate VLANs and VLAN ranges.
| Example | Function |
|---|---|
| Specifies VLAN 10 |
| Specifies VLANs 5, 10, and 15 |
10-50,500 | Specifies VLANs 10 through 50, inclusive, and VLAN 500 |
Some commands require a MAC address, IP address, or IP alias, which must be designated in a standard format. The MAC address format must be six hexadecimal numbers separated by hyphens, as shown in the following example:
00-00-0c-24-d2-fe
The IP address format is 32 bits, written as 4 octets separated by periods (dotted decimal format) that are made up of a network section, an optional subnet section, and a host section, as shown in the following example:
126.2.54.1
If you have configured IP aliases on the switch, you can use IP aliases in place of the dotted decimal IP address. This is true for most commands that use an IP address, except for commands that define the IP address or IP alias. For information on using IP aliases, see the "Defining IP Aliases" section.
If DNS is configured on the switch, you can use DNS host names in place of IP addresses. For information on configuring DNS, see "Configuring DNS."
You can scroll through the last 20 commands stored in the history buffer, and enter or edit the command at the prompt. Table 2-3 lists the keyboard shortcuts to use when entering and editing switch commands.
| Keystroke | Function |
|---|---|
Ctrl-A | Jumps to the first character of the command line. |
Ctrl-B or the left arrow key | Moves the cursor back one character. |
Ctrl-C | Escapes and terminates prompts and tasks. |
Ctrl-D | Deletes the character at the cursor. |
Ctrl-E | Jumps to the end of the current command line. |
Ctrl-F or the right arrow key1 | Moves the cursor forward one character. |
Ctrl-K | Deletes from the cursor to the end of the command line. |
Ctrl-L; Ctrl-R | Repeats current command line on a new line. |
Ctrl-N or the down arrow key1 | Enters next command line in the history buffer. |
Ctrl-P or the up arrow key1 | Enters previous command line in the history buffer. |
Ctrl-U; Ctrl-X | Deletes from the cursor to the beginning of the command line. |
Ctrl-W | Deletes last word typed. |
Esc B | Moves the cursor back one word. |
Esc D | Deletes from the cursor to the end of the word. |
Esc F | Moves the cursor forward one word. |
Delete key or Backspace key | Erases mistake when entering a command; reenter command after using this key. |
| 1The arrow keys function only on ANSI-compatible terminals such as VT100s. |
The history buffer stores the last 20 commands you entered during a terminal session. History substitution allows you to access these commands without retyping them, by using special abbreviated commands. Table 2-4 lists the history substitution commands.
| Command | Function |
|---|---|
| Repeating recent commands: | |
| !! | Repeat the most recent command. |
| !-nn | Repeat the nnth most recent command. |
| !n | Repeat command n. |
| !aaa | Repeat the command beginning with string aaa. |
| !?aaa | Repeat the command containing the string aaa. |
| To modify and repeat the most recent command: | |
| ^aaa^bbb | Replace the string aaa with the string bbb in the most recent command. |
| To add a string to the end of a previous command and repeat it: | |
| !!aaa | Add string aaa to the end of the most recent command. |
| !n aaa | Add string aaa to the end of command n. |
| !aaa bbb | Add string bbb to the end of the command beginning with string aaa. |
| !?aaa bbb | Add string bbb to the end of the command containing the string aaa. |
Enter help or ? in normal or privileged mode to see the commands available in those modes. On selected commands, entering help or ? after a command provides additional information, such as a command usage description. Command usage, the help menu, and when appropriate, parameter ranges are provided if you enter a command using the wrong number of arguments or inappropriate arguments. Additionally, appending help or ? to a command category displays a list of commands in that category.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Sun Jun 11 03:19:49 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.