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

Table of Contents

General Switch Commands

General Switch Commands

This chapter describes the general commands used in the Catalyst 5000 series switch 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 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 Software Configuration Guide for information about constructing a configuration file to download 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 #.

This example shows how to download the system5.cfg configuration file 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 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

This example shows how to return the console to normal mode:

Console> (enable) disable
Console> 
Related Command

enable

disconnect

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

disconnect {ip_addr | console}
Syntax Description
ip_addr IP address or IP alias.
console Keyword that denotes an 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

This 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 command to copy a software image from a specified host to the Flash memory of a designated module.

download host file [mod_num]
download serial [mod_num]
Syntax Description
host Name or IP address of host.
file Name of file to be downloaded.
mod_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 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 TFTP gateway, forwarding TFTP packets to the ATM module through an in-band IPC method.

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

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

If the module number is specified, the download goes to the specified module, but the download will fail if the module is of a different type than is indicated by the download header. If the module number is not specified, the download goes to all modules of that type.


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.
Examples

This 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

This example shows how to download the fddi_1113.cpi file 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)

This example shows how to download the acpflash_1111.bbi file 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)

This sample session shows 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

reset
show flash
upload

download vmps

Use the download vmps command to download 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 storage 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

This 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 commands can be entered.

Example

This example shows how to enter privileged mode:

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

disable

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 this 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 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 returns output only when a 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

This example shows how to ping a host with IP alias elvis a single time, then ping it once per second (ping -s elvis) 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 CLI 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

This example shows how to quit a CLI session:

Console> quit
Connection closed by foreign host.
host%

reconfirm vmps

Use the reconfirm vmps 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, you can use this command to apply the change to the dynamic port entity on a device.

Example

This example shows 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

reset

Use the reset command to restart the system or an individual module.

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

This 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%

This 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 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

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

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

slip

Use the slip command to attach or detach 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

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

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

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

Console> (enable) slip detach
SLIP detached on Console port.

Console> (enable) 
Related Command

set interface

switch

Use the switch command to switch the clock from the supervisor clock to the internal clock, or to switch from the active supervisor to the standby supervisor.

switch {clock | supervisor}
Syntax Description
clock Keyword used to switch the clock from the supervisor clock to the internal clock.
supervisor Keyword used to switch from the active supervisor to the standby supervisor.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Examples

This example shows how to switch the clock:

Console> (enable) switch clock
This command will reset system and force a clock switch-over.
Do you want to continue (y/n) [n]?

This example shows how to switch the supervisor:

Console> (enable) switch supervisor
This command will force a switch-over to the standby Supervisor module.
Do you want to continue (y/n) [n]?
Console> (enable)

telnet

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

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

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

This 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 snmp trap

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

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

This command has no default setting.

Command Type

Switch command.

Command Mode

Privileged.

Example

This example shows how to run trap 0:

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

set snmp trap

upload

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

upload host file [mod_num]
Syntax Description
host IP address or IP alias of the host.
file Name of the image file.
mod_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

This 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 CLI to pause for a specified number of seconds before executing the next command. This command might be included in a configuration file.

wait seconds
Syntax Description
seconds Number of seconds for the CLI to wait.
Default

This command has no default setting.

Command Type

Switch command.

Command Mode

Normal.

Example

This example shows how to pause the CLI for five seconds:

Console> wait 5
Console> 

write

Use the write 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 an FDDI module. Details of the ATM configuration must be accessed through the special module mode.

This 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) 

This 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) 

This 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

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1997 © Cisco Systems Inc.