cc/td/doc/product/lan/cat5000/rel_4_1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Switch Command-Line Interface

Switch Command-Line Interface

You can configure and maintain the Catalyst 5000 series Ethernet, Fast Ethernet, Gigabit Ethernet, CDDI, FDDI, and Token Ring modules by entering commands from the switch CLI. The CLI is a basic command-line interpreter similar to the UNIX C shell. Using the CLI session command, you can access the router configuration software and perform tasks such as history substitution and alias creation.

To configure the ATM module, you must use the ATM module CLI. For more information about the ATM module CLI, refer to the "ATM Command-Line Interface" chapter.


Note The commands listed in the "General Switch Commands," "Switch set Commands," and "Switch show Commands" chapters also apply to the Catalyst 2926 series switches.

Accessing the Switch CLI

You can access the switch CLI from a console terminal connected to an EIA/TIA-232 port or through a Telnet session. The CLI allows fixed baud rates. Telnet sessions automatically disconnect after remaining idle for a user-defined time period.


Note EIA/TIA-232 was known as RS-232 before its acceptance as a standard by the Electronic Industries Association and Telecommunications Industry Association.

Switch CLI Access via the Console Port (EIA/TIA-232)

To access the switch through the console (EIA/TIA-232) port, perform these steps:

Task Command
Step 1 From the Cisco Systems Console prompt, press Return.
Step 2 At the prompt, enter the system password. The Console> prompt indicates that you have accessed the CLI in normal mode. <password>
Step 3 Enter the necessary commands to complete your desired tasks. Appropriate commands
Step 4 When finished, exit the session. quit

After connecting through the console port, you see this display:

Cisco Systems Console
Enter password:
Console>
Console>

Switch CLI Access via Telnet

To access the switch through a Telnet session, you must first set the IP address for the switch. You can open multiple sessions to the switch via Telnet.

To access the switch from a remote host with Telnet, perform these steps:

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

After entering the telnet command, you see this display:

host% telnet cat5000-1.cisco.com
Trying 172.16.44.30 ...
Connected to cat5000-1.
Escape character is '^]'.
Cisco Systems Console
Enter password: <password>
Console> 

Operating the Switch CLI

This section describes how to access the command modes and operate the switch CLI.

Command Modes

The CLI has two modes of operation: normal and privileged. Both are password-protected. Use normal-mode commands for everyday system monitoring. Use privileged commands for system configuration and basic troubleshooting.

After you log in, the system enters normal mode, which gives you access to normal-mode commands only. You can enter privileged mode by entering the enable command followed by the password. Privileged mode is indicated by the word "(enable)" in the system prompt. 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)

Command-Line Processing

Switch commands are not case sensitive. You can abbreviate commands and parameters as long as they contain enough letters to be different from any other currently available commands or parameters.

Table 2-1 shows special keystrokes used for command-line processing:


Table  2-1: Command-Line Processing Keystrokes
Keystroke Function
Ctrl-W Deletes last word typed.
Ctrl-U Deletes entire line.
Ctrl-C Escapes and terminates prompts and lengthy tasks.
Delete key or backspace key Erases mistake when entering a command; reenter command after using this key.

Command Aliases

Table 2-2 lists command aliases. Like regular commands, aliases are not case sensitive. However, unlike regular commands, some aliases cannot be abbreviated.


Table  2-2: Switch CLI Command Aliases
Alias Command
? help
batch configure
di show
earl cam
exit quit
logout quit

History Substitution

Commands that you enter during each terminal session are stored in a history buffer. The history buffer stores the last 20 commands entered during a terminal session. History substitution allows you to access these commands without retyping them, by using special abbreviated commands. Table 2-3 lists the history substitution commands.


Table  2-3: History Substitution Commands
Command Function
Repeating recent commands:
!! Repeat the most recent command.
!-nn Repeat the nnth most recent command.
!nn Repeat command nn.
!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.
!nn aaa Add string aaa to the end of command nn.
!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.

Command Help

To see a list of top-level commands and command categories, type help or ? in normal or privileged mode. Context-sensitive help (usage and syntax information) for individual commands can be seen by appending help or ? to any specific command. If you enter a command using the wrong number of arguments or inappropriate arguments, usage and syntax information for that command is displayed. Additionally, appending help or ? to a command category displays a list of commands in that category.

Displaying Top-Level Commands and Command Categories in Normal Mode

In normal mode, use the ? command to display a list of top-level commands and command categories. The example below displays the top-level commands and categories when your system is equipped with a Supervisor Engine I or II module:

Console> ?
Commands:
----------------------------------------------------------------------
enable              Enable privileged mode
help                Show this message
history             Show contents of history substitution buffer
ping                Send echo packets to hosts
quit                Exit from the Admin session
session             Tunnel to ATM or Router module
set                 Set, use 'set help' for more info
show                Show, use 'show help' for more info
wait                Wait for x seconds
Console>

This example displays the top-level commands and categories when your system is equipped with a Supervisor Engine III module running the applicable software image, for example, cat5000-sup3.4-1-1.bin:

Console> ?
Commands:
----------------------------------------------------------------------
cd                  Set default flash device
dir                 Show list of files on flash device
enable              Enable privileged mode
help                Show this message
history             Show contents of history substitution buffer
ping                Send echo packets to hosts
pwd                 Show default flash device
quit                Exit from the Admin session
session             Tunnel to ATM or Router module
set                 Set, use 'set help' for more info
show                Show, use 'show help' for more info
traceroute          Trace the route to a host
verify              Verify checksum of file on flash device
wait                Wait for x seconds
whichboot           Which file booted
Console>

Displaying Top-Level Commands and Command Categories in Privileged Mode

In privileged mode, enter the ? command to display a list of top-level commands and command categories. The example below displays the top-level commands and categories when your system is equipped with a Supervisor Engine I or II module:

Console> (enable) ?
Commands:
----------------------------------------------------------------------
clear               Clear, use 'clear help' for more info
configure           Configure system from terminal/network
disable             Disable privileged mode
disconnect          Disconnect user session
download            Download code to a processor
enable              Enable privileged mode
help                Show this message
history             Show contents of history substitution buffer
ping                Send echo packets to hosts
quit                Exit from the Admin session
reconfirm           Reconfirm VMPS
reset               Reset system or module
session             Tunnel to ATM or Router module
set                 Set, use 'set help' for more info
show                Show, use 'show help' for more info
slip                Attach/detach Serial Line IP interface
switch              Switch to standby <clock|supervisor>
telnet              Telnet to a remote host
test                Test, use 'test help' for more info
upload              Upload code from a processor
wait                Wait for x seconds
write               Write system configuration to terminal/network
Console> (enable) 

This example displays the privileged mode top-level commands and categories available when your system is equipped with a Supervisor Engine III module running the applicable software image, for example, cat5000-sup3.4-1-1.bin:

Console> (enable) ?
Commands:
----------------------------------------------------------------------
cd                  Set default flash device
clear               Clear, use 'clear help' for more info
configure           Configure system from network
copy                Copy files between TFTP/module/flash devices
delete              Delete a file on flash device
dir                 Show list of files on flash device
disable             Disable privileged mode
disconnect          Disconnect user session
download            Download code to a processor
enable              Enable privileged mode
format              Format a flash device
help                Show this message
history             Show contents of history substitution buffer
ping                Send echo packets to hosts
pwd                 Show default flash device
quit                Exit from the Admin session
reconfirm           Reconfirm VMPS
reload              Force software reload to linecard
reset               Reset system or module
session             Tunnel to ATM or Router module
set                 Set, use 'set help' for more info
show                Show, use 'show help' for more info
slip                Attach/detach Serial Line IP interface
squeeze             Reclaim space used by deleted files
switch              Switch to standby <clock|supervisor>
telnet              Telnet to a remote host
test                Test, use 'test help' for more info
traceroute          Trace the route to a host
undelete            Undelete a file on flash device
upload              Upload code from a processor
verify              Verify checksum of file on flash device
wait                Wait for x seconds
whichboot           Which file booted
write               Write system configuration to terminal/network
Console> (enable)

Context-Sensitive Help

Usage and syntax information for individual commands can be seen by appending help or ? to any specific command.

Command Categories

On some commands (such as clear, set, and show), typing help or ? after the command provides a list of commands in that category. For example, this display shows how to list available clear commands:

Console> (enable) clear help
Clear commands:
----------------------------------------------------------------------------
clear alias         Clear aliases of commands
clear arp           Clear ARP table entries
clear banner        Clear Message Of The Day banner
clear boot          Clear booting environment variable
clear cam           Clear CAM table entries
clear cgmp          Clear CGMP statistics
clear config        Clear configuration and reset system
clear counters      Clear MAC and Port counters
clear drip          Clear DRiP statistics
clear help          Show this message
clear igmp          Clear IGMP statistics
clear ip            Clear IP, use 'clear ip help' for more info
clear log           Clear log information
clear logging       Clear system logging information
clear multicast     Clear multicast router port
clear netflow       Clear netflow information
clear ntp           Clear NTP servers and timezone
clear port          Clear port features
clear snmp          Clear SNMP trap receiver address
clear spantree      Clear spantree parameters
clear tacacs        Clear TACACS server host/key
clear timezone      Clear timezone
clear top           Clear TopN report
clear trunk         Clear trunk ports
clear vlan          Clear a VLAN
clear vmps          Clear VMPS information
clear vtp           Clear VTP statistics

Additional Usage Guidelines

The Catalyst 5000 series switch is a multimodule system. Commands you enter from the CLI can apply to the entire system or to a specific module, port, or VLAN.

The Catalyst 5000 series modules (module slots), ports, and VLANs are numbered starting with 1. The supervisor module is module 1, residing in the top slot. If you are using a Catalyst 5505 or a Catalyst 5500 with a redundant supervisor engine, the supervisor 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, you can enter lists of ports and VLANs.

You can designate ports by entering the module and port number pairs, separated by commas. To specify a range of ports, use a dash (-) between the module number and port number pairs. Dashes 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 also denotes module 2, ports 1 through 12.

Each VLAN is designated by a single number. You can specify lists of VLANs the same way you do for ports. Individual VLANs are separated by commas (,); ranges are separated by dashes (-). In the following example, VLAN numbers 1 through 10 and VLAN 1000 are specified:

1-10,1000	

MAC Addresses, IP Addresses, and IP Aliases

Some commands require a MAC address, IP address, or IP alias, which you must designate 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 four octets separated by periods (dotted decimal format). IP addresses 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 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 commands that define the IP address or IP alias. For more information about the set interface and set ip alias commands, refer to the "Switch set Commands" chapter.

ROM Monitor Mode

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 manually load a system image from Flash memory, from a network server file, or from bootflash.

You can also enter ROM monitor mode by restarting the switch and then pressing the Break key during the first 60 seconds of startup.


Note Break is always enabled for 60 seconds after rebooting the system, regardless of whether Break is configured to be off by configuration register settings.

For connection through a terminal server, you can escape to the Telnet prompt and enter the send break command to break back to the ROM monitor mode.

For ROM monitor command descriptions, refer to the "ROM Monitor Commands" chapter.

The manual boot command has the following syntax:


Note Supervisor Engine III does not support TFTP boot. Enter the copy file-id {tftp | flash | file-id} command to obtain an image from the network. See the "copy" command section of the "Switch Flash Commands" chapter for details.

Once you are in ROM monitor mode, the prompt changes to rommon #>.

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1998 © Cisco Systems Inc.