|
|
This chapter describes the command-line interfaces (CLIs) you use to configure a Catalyst 6000 or 6500 series switch and modules.
This chapter contains these sections:
The ROM-monitor is a ROM-based program that executes upon platform power-up, reset, or when a fatal exception occurs. The switch enters ROM-monitor mode if the switch does not find a valid software image, if the nonvolatile RAM (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 software image manually from Flash memory, from a network server file, or from bootflash.
You can also enter ROM-monitor mode by restarting the switch and pressing the Break key during the first 60 seconds of startup.
To access the ROM-monitor mode 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 Catalyst 6000 and 6500 series switch CLI is a command-line interpreter, similar to the UNIX C shell.
You can access the CLI from a console terminal connected to an EIA/TIA-232 port or through Telnet. Telnet disconnects automatically after remaining idle for the period specified with the set logout command.
To access the switch through the EIA/TIA-232 port, perform this task:
| Task | Command |
|---|---|
Step 1 From the console prompt, 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 Enter the necessary commands to complete your desired tasks. | Appropriate commands |
Step 4 When finished, exit the session. | quit |
After accessing the switch through the console port (EIA/TIA-232), you see this display:
Cisco Systems Console Enter password: Console>
Before you can open a Telnet session to the switch, you must set the IP address for the switch.
For information about setting the IP address, refer to the "Setting the Switch IP Address" section. The switch supports up to eight simultaneous Telnet sessions. Telnet sessions disconnect automatically after remaining idle for the period specified with the set logout command.
To access the switch from a remote host with 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. | password |
Step 3 Enter the necessary commands to complete your desired tasks. | Appropriate commands |
Step 4 When finished, exit the Telnet session. | quit |
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>
There are two modes of operation, which are both password protected: normal and privileged. Enter normal-mode commands for everyday system monitoring. Enter privileged-mode commands for system configuration and basic troubleshooting.
After you log in, the switch enters normal mode automatically, which gives you access to normal-mode commands only. You can enter privileged mode by entering the enable command followed by a second 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: Console> (enable)
Switch commands are not case sensitive. You can abbreviate commands and parameters if the abbreviations contain enough letters to be different from any other currently available commands or parameters. You can scroll through the last 20 commands stored in the history buffer, and enter or edit the command at the prompt. Table 2-1 lists the keyboard shortcuts for entering and editing switch commands.
| Keystroke | Function |
|---|---|
Ctrl-A | Jumps to the first character of the command line. |
Ctrl-B or the left arrow key1 | Moves the cursor back one character. |
Ctrl-C | Escapes and terminates prompts and lengthy 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 backward 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-2 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. |
The Catalyst 6000 and 6500 series switches are multimodule systems. Commands you enter from the CLI can apply to the entire switch or to a specific module, port, or virtual LAN (VLAN).
Module slots, ports, and VLANs are numbered starting with 1. The supervisor engine module is module 1, residing in the top slot. If your switch has a redundant supervisor engine, the supervisor engine modules reside in slots 1 and 2. On each module, port 1 is the left-most port. To reference 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, set cam, and set vlan commands, you can enter lists of ports and VLANs.
To designate ports, enter the module and port number pairs, separated by commas. To specify a range of ports, use a hyphen (-) between the port numbers. Hyphens take precedence over commas. The following examples show several ways of designating ports:
Example 1. 2/1,2/3 denotes module 2, port 1 and module 2, port 3.
Example 2. 2/1-12 denotes module 2, ports 1 through 12.
Example 3. 2/1-2/12 is the same as Example 2.
Each VLAN is designated by a single number. You specify lists of VLANs the same way you do for ports. Individual VLANs are separated by commas (,); ranges are separated by hyphens (-). In the following example, VLANs 1 through 10 and VLAN 1000 are specified:
1-10,1000
Some commands require a Media Access Control (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 netmask section, and a host section, as shown in this example:
126.2.54.1
If the IP alias table is configured, 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 more information about the set interface and set ip alias commands, refer to the Catalyst 6000 and 6500 Series Command Reference publication.
|
|