Table of Contents

General Switch Commands

General Switch Commands

This chapter describes the general commands used in the Catalyst 5000 series switch command-line interface (CLI). For a summary of the available switch CLI commands, refer to the "Switch Command Quick Reference" chapter. For more information about using the switch CLI, refer to the "Switch Command-Line Interface" chapter.

Other commands are described elsewhere in this publication:

Switch CLI:

ATM module CLI:

configure

Use the configure privileged command to download a configuration file from the network and execute each command in that file.

configure {host file | network}
Syntax Description
host IP address or IP alias of the host.
file Name of the file.
network Keyword that specifies interactive prompting for the host and the file.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

Refer to the "Creating a Configuration File" appendix in the Catalyst 5000 Series Advanced Software Configuration Guide for information about constructing a configuration file to be downloaded using the configure command.

Examples

Following is a sample file called system5.cfg in the tftpboot directory:

begin
show time
set ip alias conc7 198.133.219.207
set ip alias montreux 198.133.119.42
set ip alias cres 192.122.174.42
set prompt system5>
set password
# empty string old password
pingpong
pingpong
end
#

Each line contains a command, except lines that begin with ! or #.

The following example shows how to download the configuration file called system5.cfg from the 192.122.174.42 host:

Console> (enable) configure 192.122.174.42 system5.cfg
Configure using system5.cfg from cres (y/n) [n]? y
/
Done.  Finished Network Download.  (446 bytes)
>> show time
Wed Feb 22 1995, 17:42:50
>> set ip alias conc7 198.133.219.207
IP alias added.
>> set ip alias montreux 198.133.219.40
IP alias added.
>> set ip alias cres 192.122.174.42
IP alias added.
>> set prompt system5>
>> set password
Enter old password: 
Enter new password: pingpong
Retype new password: pingpong
Password changed.
system5> (enable)
Related Command

show config

disable

Use the disable privileged command to return the console interface to normal mode.

disable
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to return the console to normal mode:

Console> (enable) disable
Console> 
Related Command

enable

disconnect

Use the disconnect privileged command to close an active console port or Telnet session.

disconnect {ip_addr | console}
Syntax Description
ip_addr IP address or IP alias.
console Active console port.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

If multiple sessions from the same IP address exist, the disconnect command checks if the current process is also from the same IP address. If it is not, all Telnet sessions from the specified IP address are disconnected. If it is, all sessions, other than the current session, are disconnected. The system prompts whether to disconnect the current Telnet session. You can answer n and remain connected or answer y and be disconnected.

Example

The following example shows how to close a Telnet session with a host and how to close the current console session:

Console> (enable) disconnect 198.134.214.4
Telnet session from 198.134.214.4 disconnected. (1)
Console> (enable) disconnect console
Console session disconnected.
Related Command

telnet

download

Use the download privileged command to copy a software image from a specified host to the Flash memory of a designated module.

download host file [module_num]
Syntax Description
host Name or IP address of host.
file Name of file to be downloaded.
module_num (Optional) Number of the module to receive downloaded image.
Default

If a module number is not specified, the image is downloaded to all modules for which the image is valid.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

The Catalyst 5000 series switches support two ways to download new code to the processors: TFTP network download through any network port, and Kermit serial download through the EIA/TIA-232 console port. Only the first applies to the Asynchronous Transfer Mode (ATM) module. The ATM module has processors that will require field upgrades.

The download command downloads code to the module Flash memory. Catalyst 5000 series software rejects an image if it is not a valid image for the module.

When downloading to the ATM module, the supervisor module acts as a Trivial File Transfer Protocol (TFTP) gateway, forwarding TFTP packets to the ATM module through an in-band interprocessor communication (IPC) method.

To download a software image for the RSM, use the session command.

Examples

The following example shows how to download the c5000_spv11.bin file from the mercury host:

Console> (enable) download mercury c5000_spv11.bin
Download image c5000_spv11.bin from mercury to module 1FLASH (y/n) [n]? y
\
Done.  Finished Network Download.  (100604 bytes)
host%
intelquery: id=0x89898989 code=0xa2a2a2a2
FLASH on Synergy:
Type            Address             Location
Intel 28F008    20000000            NMP (P3) 4MB SIM
erase(b=14, c=1): block(s): 14 Erase done
Programming Flash:  Flash Programming Complete
erase(b=2, c=4): block(s): 2 3 4 5 Erase done
Programming Flash:  Flash Programming Complete
System must be reset to run new image

The following example shows how to download the fddi_1113.cpi code from the mercury host:

Console> (enable) download mercury fddi_1113.cpi 4
This command will reset Module 4.
Download image fddi_1113.cbi from mercury to Module 4 FLASH (y/n) [n]? y
|
Finished network download.  (1064876 bytes)
...............................................................................n
Console> (enable)

The following example shows how to download the acpflash_1111.bbi code from the mercury host:

Console> (enable) download mercury acpflash_1111.bbi 3
This command will reset Module 3.
Download image acpflash_1111.bbi from mercury to Module 3 FLASH (y/n) [n]? y
/
Done.  Finished network download.  (1964012 bytes)
Console> (enable)
Related Commands

download serial
reset
show flash
show version
upload

download serial

Use the download serial privileged command to copy software images to the supervisor card or Flash memory through a serial port.

download serial
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

This command uses the Kermit protocol through the serial EIA/TIA-232 console port. The download serial command is not allowed from a Telnet session.

Caution After starting the serial download using Kermit, do not attempt to abort the serial download by using Ctrl-C. This command will interrupt the download process and could leave the switch in a problematic state. If this does occur, reboot the switch.
Example

In the following example, a tty port is connected to the command-line interface port on the
Catalyst 5000 series switch. Following is a sample session showing a connection to a remote terminal from a Sun workstation and the use of the download serial command to copy a software image to the supervisor card:

[At local Sun workstation]
host% kermit
C-Kermit 5A(172) ALPHA, 30 Jun 95, SUNOS 4.0 (BSD)
Type ? or 'help' for help
C-Kermit> set line /dev/ttyb
C-Kermit> c     
Connecting to /dev/ttyb, speed 9600.
The escape character is ^ (ASCII 28).
Type the escape character followed by C to get back,
or followed by ? to see other options.
 
Console> enable
Enter Password: 
Console> (enable) set system baud 19200
^\C
[Back at local Sun workstation]
C-Kermit> set speed 19200
/dev/ttyb, 19200 bps
C-Kermit> c
Connecting to /dev/ttyb, speed 19200.
The escape character is ^ (ASCII 28).
Type the escape character followed by C to get back,
or followed by ? to see other options.
 
Console> (enable) download serial
Download Supervisor image via console port (y/n) [n]? y
Concentrator Boot ROM (Ver 1.00)
 
Waiting for DOWNLOAD!!
Return to your local Machine by typing its escape sequence
Issue Kermit send command from there[ Send 'Filename']
 
^\C
[Back at Local System]
C-Kermit> send c5000_xx.bin
                          SF
c5000_xx.bin => C5000_XX.BIN, Size: 1233266
 
X to cancel file,  CR to resend current packet
Z to cancel group, A for status report
E to send Error packet, Ctrl-C to quit immediately: ..........................
...............................................................................
...... [OK]
ZB
C-Kermit> quit
host%
Related Commands

download
reset
show flash
show version
upload

download vmps

Use the download vmps privileged command to download VLAN Membership Policy Server (VMPS) database information from a TFTP server.

download vmps
Syntax Description

This command has no arguments or keywords.

Default

There is no default setting for this command.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

Before you can successfully execute the download vmps command, you must use the set vmps tftpserver command to configure the IP address of the TFTP server and the name of the VMPS configuration file on that server. If the IP address of the TFTP server is not configured, the download vmps command reports an error. If the configuration filename is not configured, the download vmps command uses the default filename vmps-config-database.1.

After a successful download, the new VMPS information replaces any existing information. If there are not enough resources to build the new configuration database, the VMPS is made inactive.

Example

The following example shows the download vmps command and typical system responses:

Console> (enable) download vmps
Re-initialization of Vlan Membership Policy Server with the downloaded
configuration file is in progress.
Console> (enable) 6/4/1997,17:37:29:VMPS-2:PARSER: 82 lines parsed, Errors 0
Related Commands

set vmps tftpserver
show vmps

enable

Use the enable command to activate privileged mode. In privileged mode, additional commands are available, and certain commands display additional information.

enable
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Usage Guideline

The designation "(enable)" in the prompt indicates that the system is in privileged mode and that privileged commands can be entered.

Example

The following example shows how to enter privileged mode:

Console> enable
Enter password:
Console> (enable) 
Related Command

disable

help

Use the help command to list the top-level commands available in the current command mode.

help
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal and privileged.

Usage Guideline

In normal mode, the help command provides a list of the top-level commands available in normal mode. In privileged mode, this command provides a list of the top-level commands available in privileged mode.

Example

The following example shows how to list the top-level commands available in privileged mode:

Console> (enable) help
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)

history

Use the history command to show the contents of the command history buffer.

history
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Usage Guideline

The history buffer size is fixed at 20 commands. Refer to the "Switch Command-Line Interface" chapter for detailed information about the command history feature.

Example

In the following example, the history command lists the contents of the command history buffer:

Console> history
       1 help
       2 history
Console> !2
history
       1 help
       2 history
       3 history
Console>

ping

Use the ping command to send Internet Control Message Protocol (ICMP) echo request packets to another node on the network.

ping [-s] host [packet_size] [packet_count]
Syntax Description
-s Command option that causes ping to send one datagram per second, printing one line of output for every response received. The ping command does not return any output when no response is received.
host IP address or IP alias of the host.
packet_size (Optional) Number of bytes in a packet, from 56 to 1472 bytes. The default is 56 bytes. The actual packet size will be eight bytes larger than the size specified because the switch adds header information.
packet_count (Optional) Number of packets to send.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Usage Guideline

Press Ctrl-C to stop pinging.

Following are sample results of the ping command:

Example

The following example shows how to ping a host with IP alias elvis a single time, then ping it once per second until you press Ctrl-C to stop pinging:

Console> ping elvis
elvis is alive
Console> ping -s elvis
ping elvis: 56 data bytes
64 bytes from elvis: icmp_seq=0. time=11 ms
64 bytes from elvis: icmp_seq=1. time=8 ms
64 bytes from elvis: icmp_seq=2. time=8 ms
64 bytes from elvis: icmp_seq=3. time=7 ms
64 bytes from elvis: icmp_seq=4. time=11 ms
64 bytes from elvis: icmp_seq=5. time=7 ms
64 bytes from elvis: icmp_seq=6. time=7 ms
^C
----elvis PING Statistics----
7 packets transmitted, 7 packets received, 0% packet loss
round-trip (ms)  min/avg/max = 7/8/11
Console> 
Related Commands

set interface
set ip route
show interface
show ip route

quit

Use the quit command to exit a command-line interface session.

quit
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Usage Guideline

The exit and logout commands perform the same function as the quit command.

Example

The following example shows how to close a connection with the command-line interface:

Console> quit
Connection closed by foreign host.
host%

reconfirm vmps

Use the reconfirm vmps privileged command to reconfirm the current dynamic port VLAN membership with VMPS.

reconfirm vmps
Syntax Description

This command has no arguments or keywords.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

VMPS database changes are not automatically conveyed to dynamic port entities; therefore, after making a VMPS database change, the user can apply the change to the dynamic port entity on a device.

Example

The following example illustrates how to reconfirm the current dynamic port VLAN membership with VMPS:

Console (enable)> reconfirm vmps
reconfirm process started
Use 'show dvlan statistics' to see reconfirm status
Console (enable)>
Related Commands

clear vmps server
set vmps server
show dvlan statistics
show vmps server

reset

Use the reset privileged command to restart the system or an individual line card.

reset {mod_num | system}
Syntax Description
mod_num Number of the module to be restarted.
system Keyword used to reset the system to its default values.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines

If no module number or module 1 is specified, the command resets the entire system.

You can use the reset mod_num command to switch to the standby supervisor engine, where mod_num is the slot number of the active supervisor.

Where mod_num is an RSM, both the RSM hardware and software are completely reset.

Examples

The following example shows how to reset the supervisor engine module on a Catalyst 5500 switch with redundant supervisors:

Console> (enable) reset 1
This command will force a switch-over to the standby supervisor module
and disconnect your telnet session.
Do you want to continue (y/n) [n]? y
Connection closed by foreign host.
host%

The following example shows how to reset module 4:

Console> (enable) reset 4
This command will reset module 4 and may disconnect your telnet session.
Do you want to continue (y/n) [n]? y
Resetting module 4...
Console> (enable)

session

Use the session command to open a session with the ATM module or the Route Switch Module (RSM), allowing you to use the ATM or RSM CLI.

session mod_num
Syntax Description
mod_num Number of the ATM or RSM module.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal and privileged.

Usage Guidelines

After you enter this command, the system responds with the Enter Password: prompt, if one is configured on the module.

To end the session with the ATM module or RSM, enter the quit command.

Use the session command to toggle between router and switch sessions.

Example

The following example shows how to open a session with an ATM module (module 4):

Console> session
Usage: session <mod_num>
Console> session 4
End ATM session with exit, quit or logout.
ATM> enable
Enter Password:
ATM-# exit
Console> (enable)

slip

Use the slip privileged command to attach or detach Serial Line Interface Protocol (SLIP) for the console port.

slip {attach | detach}
Syntax Description
attach Keyword used to activate SLIP for the console port.
detach Keyword used to deactivate SLIP for the console port.
Default

By default, SLIP is not active (detached).

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

You can use the slip command from a console port session or a Telnet session.

Examples

The following example shows how to enable SLIP for a console port during a console port session:

Console> (enable) slip attach
Console port now running SLIP.
<console port running SLIP>

The following example shows how to disable SLIP for a console port during a Telnet session:

Console> (enable) slip detach
SLIP detached on Console port.
<console port back to RS-232 Console>
Console> (enable) 
Related Command

set interface

telnet

Use the telnet privileged command to start a Telnet connection to a remote host.

telnet host [port]
Syntax Description
host Remote host to which you want to connect.
port (Optional) Specific port connection on the remote host.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to open a Telnet session with the host elvis:

Console> (enable) telnet elvis
Trying 192.122.174.11...
Connected to elvis.
Escape character is '^]'.
UNIX(r) System V Release 4.0 (elvis)
login: fred
Password:
Last login: Thu Feb 15 09:25:01 from forster.cisc.rum
Sun Microsystems Inc.   SunOS 5.4       Generic July 1994
You have new mail.
% logout
Console> (enable) 
Related Command

disconnect

test help

Use the test help privileged command to display a listing of the available test commands.

test help
Syntax Description

This command has no keywords or arguments.

Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to list the test commands:

Console> (enable) test help
Test commands:
-------------------------------------------------------------------------
test help           Show this message
test snmp           Send trap message to SNMP trap receivers
Console> (enable)

test snmp trap

Use the test snmp trap privileged command to send an SNMP trap message to the trap receivers.

test snmp trap trap_number [specific_number]
Syntax Description
trap_number Number of the trap.
specific_number (Optional) Number of a predefined trap.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

The following example shows how to run trap 0:

Console> (enable) test snmp trap 0
SNMP trap message sent. (4)
Console> (enable) 
Related Commands

clear snmp trap
set snmp trap
show snmp
test help

upload

Use the upload privileged command to upload a software image to a network host.

upload host file [module_num]
Syntax Description
host IP address or IP alias of the host.
file Name of the image file.
module_num (Optional) Number of the module from which to upload the image file. If no number is specified, the default is module 1.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guideline

To upload a software image for the RSM, use the session command.

Example

The following example shows how to upload the supervisor image to the c5009_11.bin file on the mercury host:

Console> (enable) upload mercury c5009_11.bin 3
Upload Module 1 image to c5009_11.bin on mercury (y/n) [n]? y
/
Done.  Finished Network Upload.  (153908 bytes)
Console> (enable) 
Related Command

download

wait

Use the wait command to cause the command-line interface to pause for a specified number of seconds. This command might be included in a configuration file.

wait seconds
Syntax Description
seconds Number of seconds for the command-line interface to wait.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Example

The following example shows how to pause the command-line interface for 5 seconds:

Console> wait 5
Console> 

write

Use the write privileged command to upload the current configuration to a host or display it on the terminal.

write {host file | network | terminal}
Syntax Description
host IP address or IP alias of the host.
file Name of the configuration file.
network Keyword that specifies interactive prompting for the IP address or IP alias of the host and the filename to upload.
terminal Keyword used to display the configuration file on the terminal.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Usage Guidelines
Examples

This sample session assumes that module 1 is a 2-port supervisor module, module 2 is a 12-port 10/100BaseT switched Ethernet module, modules 3 and 5 are empty, and module 4 is a FDDI module. Details of the ATM configuration must be accessed through the special module mode.

The following example shows how to upload the system5.cfg file from the mercury host using the write network command:

Console> (enable) write network
IP address or name of host? mercury
Name of configuration file to write? system5.cfg
Upload configuration to system5.cfg on mercury (y/n) [y]? y
/
Done.  Finished Network Upload.  (9003 bytes)
Console> (enable) 

The following example shows how to upload the system5.cfg file to the mercury host using the write host file command as a shorthand method:

Console> (enable) write mercury system5.cfg
Upload configuration to system5.cfg on mercury (y/n) [y]? y
/
Done.  Finished Network Upload.  (9003 bytes)
Console> (enable) 

The following example shows how to use the write terminal command to display the configuration file on the terminal:

Console> (enable) write terminal
begin
set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70
set prompt Console>
!
#system
set system baud 9600
set system modem  disable
set system name
set system location
set system contact
!
#snmp
set snmp community read-only public
set snmp community read-write private
set snmp community read-write-all secret
set snmp trap  disable
!
#vlan/trunk
set vlan 1    1/1-2,4/1
set vlan 2    2/1-5
!
#trunks
!
#cam
set cam agingtime 1    300
set cam agingtime 2    300
!
#ip
set interface sc0 0.0.0.0 0.0.0.0 0.0.0.0
set interface sl0 0.0.0.0 0.0.0.0
set ip redirect      enable
set ip unreachable   disable
set ip fragmentation enable
set ip alias default         0.0.0.0
set arp agingtime 1200
!
#bridge
set bridge ipx snaptoether   8023raw
set bridge ipx 8022toether   8023
set bridge ipx 8023rawtofddi snap
!
#Command alias
!
#cdp
set cdp enable   1/1-2,2/1-5,4/1
set cdp interval 1/1  60
set cdp interval 1/2  60
set cdp interval 2/1  60
set cdp interval 2/2  60
set cdp interval 2/3  60
set cdp interval 2/4  60
set cdp interval 2/5  60
set cdp interval 4/1  60
!
#spantree
#vlan 1
set spantree enable         1
set spantree fwddelay 15    1
set spantree hello    2     1
set spantree maxage   20    1
set spantree priority 32768 1
set spantree portpri  1/1  32
set spantree portcost 1/1  10
set spantree portpri  1/2  32
set spantree portcost 1/2  10
set spantree portpri  4/1  32
set spantree portcost 4/1  10
#vlan 2
set spantree enable         2
set spantree fwddelay 15    2
set spantree hello    2     2
set spantree maxage   20    2
set spantree priority 32768 2
set spantree portpri  2/1  32
set spantree portcost 2/1  100
set spantree portpri  2/2  32
set spantree portcost 2/2  100
set spantree portpri  2/3  32
set spantree portcost 2/3  100
set spantree portpri  2/4  32
set spantree portcost 2/4  100
set spantree portpri  2/5  32
set spantree portcost 2/5  100
!
#trunk
!
#module 1
set module name    1
set port enable    1/1
set port name      1/1
set port duplex    1/1  half
set port level     1/1  normal
set port enable    1/2
set port name      1/2
set port duplex    1/2  half
set port level     1/2  normal
!
#module 2
set module name    2
set module enable  2
!
set port enable    2/1
set port name      2/1
set port duplex    2/1  half
set port level     2/1  normal
set port enable    2/2
set port name      2/2
set port duplex    2/2  half
set port level     2/2  normal
set port enable    2/3
set port name      2/3
set port duplex    2/3  half
set port level     2/3  normal
set port enable    2/4
set port name      2/4
set port duplex    2/4  half
set port level     2/4  normal
set port enable    2/5
set port name      2/5
set port duplex    2/5  half
set port level     2/5  normal
!
#module 3 empty
!
#module 4
set module name    4
set module enable  4
!
set fddi userdata  4 WorkGroup Stack
set fddi tnotify   4 30
set fddi treq      4 5000
set port enable    4/1
set port name      4/1
set port level     4/1  normal
set fddi tlmin     4/1  40
set port enable    4/2
set port name      4/2
set port level     4/2  normal
set fddi tlmin     4/2  40
!
#module 5 empty
end
Console> (enable)
Related Command

show config


Copyright 1989-1997 © Cisco Systems Inc.