|
|
Use the stack command to dump a stack trace of frames.
stack [-d | -m] [num]
-d | (Optional) Keyword to dump the ROM monitor stack. |
-m | (Optional) Keyword to specify addresses to dump. |
num | (Optional) Number of frames. |
The default for num is five frames.
ROM monitor command.
Normal.
The minus sign (-) is required with the -d and -m options.
This example shows how to use the stack command to dump a stack trace of eight frames:
rommon 5 > stack 8 Kernel Level Stack Trace: Initial SP = 0x60276a98, Initial PC = 0x60033054, RA = 0x6006d380 Frame 0 : FP= 0x60276a98, PC= 0x60033054, 0 bytes Frame 1 : FP= 0x60276a98, PC= 0x6006d380, 24 bytes Frame 2 : FP= 0x60276ab0, PC= 0x600e5218, 40 bytes Frame 3 : FP= 0x60276ad8, PC= 0x600dcd48, 32 bytes Frame 4 : FP= 0x60276af8, PC= 0x60033fdc, 0 bytes Process Level Stack Trace: Initial SP = 0x80007ce8, Initial PC = 0x600dfd38, RA = 0x600dfd20 Frame 0 : FP= 0x80007ce8, PC= 0x600dfd38, 24 bytes Frame 1 : FP= 0x80007d00, PC= 0x6005b260, 32 bytes Frame 2 : FP= 0x80007d20, PC= 0x6005c05c, 192 bytes Frame 3 : FP= 0x80007de0, PC= 0x6005b54c, 24 bytes Frame 4 : FP= 0x80007df8, PC= 0x600e82e0, 56 bytes Frame 5 : FP= 0x80007e30, PC= 0x600e9484, 40 bytes Frame 6 : FP= 0x80007e58, PC= 0x600e8b28, 24 bytes Frame 7 : FP= 0x80007e70, PC= 0x600de224, 72 bytes
Use the switch command to switch the clock from the supervisor clock to the internal clock or from the active supervisor to the standby supervisor.
switch {clock | supervisor}
clock | Keyword to switch the clock from the supervisor clock to the internal clock. |
supervisor | Keyword to switch from the active supervisor engine to the standby supervisor engine. |
This command has no default setting.
Switch command.
Privileged.
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]? Console> (enable)
This example shows how to switch to the standby supervisor engine:
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)
Use the switch console command to physically switch the console connection to the MFSC on the active supervisor engine.
switch consoleThis command has no arguments or keywords.
The default is supervisor engine console.
Switch command.
Privileged.
The switch console command allows you to change to the MSFC that shares the slot with the active supervisor. You cannot use the switch console command to switch to the console of the MSFC placed in the standby supervisor slot.
To exit from the router CLI back to the switch CLI, enter the exit command at the Router> prompt.
If the MFSC is placed on a supervisor engine installed in slot 1, then the MFSC is recognized as module 15. Otherwise, if the supervisor engine is installed in slot 2, the MFSC is recognized as module 16.
This example shows how to switch console connection to MFSC on the active supervisor:
Console> (enable) switch consoleTrying Router-15...Connected to Router-15.Type 'exit' to switch back...ÿRouter>
Use the sync command to write the working in-core copy of environment variables and the aliases out to NVRAM so they are read on the next reset.
syncThis command has no arguments or keywords.
This command has no default setting.
ROM monitor command.
Normal.
This example shows how to use the sync command:
rommon 10 > sync rommon 11 >
Use the sysret command to display the return information from the last booted system image.
sysretThis command has no arguments or keywords.
This command has no default setting.
ROM monitor command.
Normal.
The stack dump information displayed has a maximum of eight frames.
This example shows how to use the sysret command to display the return information from the last booted system image:
rommon 8 > sysret System Return Info: count: 19, reason: user break pc:0x60043754, error address: 0x0 Stack Trace: FP: 0x80007e78, PC: 0x60043754 FP: 0x80007ed8, PC: 0x6001540c FP: 0x80007ef8, PC: 0x600087f0 FP: 0x80007f18, PC: 0x80008734
Use the telnet command to start a Telnet connection to a remote host.
telnet host [port_num]
host | Name or IP address of the remote host to which you want to connect. |
port_num | (Optional) Specific port connection on the remote host. |
This command has no default setting.
Switch command.
Privileged.
This example shows how to open and close 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 Oct 15 09:25:01 from forster.cisc.rum Sun Microsystems Inc. SunOS 5.4 Generic July 1994 You have new mail. % logout Console> (enable)
Use the test snmp trap command to send an SNMP trap message to the trap receivers.
test snmp trap trap_num [specific_num]
trap_num | Number of the trap. |
specific_num | (Optional) Number of a predefined trap. |
This command has no default setting.
Switch command.
Privileged.
This example shows how to run trap 0:
Console> (enable) test snmp trap 0 SNMP trap message sent. (4) Console> (enable)
Use the traceroute command to display a hop-by-hop path through an IP network from the Catalyst 6000 family switch to a specific destination host.
traceroute [-n] [-w wait_time] [-i initial_ttl] [-m max_ttl] [-p dest_port] [-q nqueries] [-t tos] host [data_size]
-n | (Optional) Option that prevents traceroute from performing a DNS lookup for each hop on the path. Only numerical IP addresses are printed. |
-w wait_time | (Optional) Option used to specify the amount of time (in seconds) that traceroute will wait for an ICMP response message. The allowed range for wait_time is from |
-i initial_ttl | (Optional) Option that causes traceroute to send ICMP datagrams with a TTL value equal to initial_ttl instead of the default TTL of 1. This causes traceroute to skip processing for hosts that are less than initial_ttl hops away. |
-m max_ttl | (Optional) Option used to specify the maximum TTL value for outgoing ICMP datagrams. The allowed range for max_ttl is from 1 to 255; the default value is 30. |
-p dest_port | (Optional) Option used to specify the base UDP destination port number used in traceroute datagrams. This value is incremented each time a datagram is sent. The allowed range for dest_port is from 1 to 65535; the default base port is 33434. Use this option in the unlikely event that the destination host is listening to a port in the default traceroute port range. |
-q nqueries | (Optional) Option used to specify the number of datagrams to send for each TTL value. The allowed range for nqueries is from 1 to 1000; the default is 3. |
-t tos | (Optional) Option used to specify the TOS to be set in the IP header of the outgoing datagrams. The allowed range for tos is from 0 to 255; the default is 0. Use this option to see if different types of service cause routes to change. |
host | IP alias or IP address in dot notation (a.b.c.d) of the destination host. |
data_size | (Optional) Number of bytes, in addition to the default of 40 bytes, of the outgoing datagrams. The allowed range is from 0 to 1420; the default is 0. |
Entering the traceroute host command without options sends three 40-byte ICMP datagrams with an initial TTL of 1, a maximum TTL of 30, a timeout period of 5 seconds, and a TOS specification of 0 to destination UDP port number 33434. For each host in the processed path, the initial TTL for each host and the destination UDP port number for each packet sent are incremented by one.
Switch command.
Privileged.
To interrupt traceroute after the command has been issued, press Ctrl-C.
The traceroute command uses the TTL field in the IP header to cause routers and servers to generate specific return messages. Traceroute starts by sending a UDP datagram to the destination host with the TTL field set to 1. If a router finds a TTL value of 1 or 0, it drops the datagram and sends back an ICMP "time-exceeded" message to the sender. The traceroute facility determines the address of the first hop by examining the source address field of the ICMP time-exceeded message.
To identify the next hop, traceroute again sends a UDP packet but this time with a TTL value of 2. The first router decrements the TTL field by 1 and sends the datagram to the next router. The second router sees a TTL value of 1, discards the datagram, and returns the time-exceeded message to the source. This process continues until the TTL is incremented to a value large enough for the datagram to reach the destination host (or until the maximum TTL is reached).
To determine when a datagram has reached its destination, traceroute sets the UDP destination port in the datagram to a very large value that the destination host is unlikely to be using. When a host receives a datagram with an unrecognized port number, it sends an ICMP "port unreachable" error to the source. This message indicates to the traceroute facility that it has reached the destination.
Catalyst 6000 family switches can participate as the source or destination of the traceroute command. However, because they are Layer 2 devices, Catalyst 6000 family switches do not examine the TTL field in the IP header and do not decrement the TTL field or send ICMP time-exceeded messages. Thus, a Catalyst 6000 family switch does not appear as a hop in the traceroute command output.
This example shows how to use the traceroute command to determine the path from the source to the destination host server10:
Console> (enable) traceroute server10 traceroute to server10.company.com (172.16.22.7), 30 hops max, 40 byte packets 1 engineering-1.company.com (172.31.192.206) 2 ms 1 ms 1 ms 2 engineering-2.company.com (172.31.196.204) 2 ms 3 ms 2 ms 3 gateway_a.company.com (172.16.1.201) 6 ms 3 ms 3 ms 4 server10.company.com (172.16.22.7) 3 ms * 2 ms Console> (enable)
Table 2-59 describes the fields in the traceroute command output.
| Field | Description |
|---|---|
30 hops max, 40 byte packets | Maximum TTL value and the size of the ICMP datagrams being sent. |
2 ms 1 ms 1 ms | Total time (in milliseconds) for each ICMP datagram to reach the router or host plus the time it took for the ICMP time-exceeded message to return to the host. An exclamation point following any of these values (for example, 20 ms !) indicates that the port-unreachable message returned by the destination had a TTL of 0 or 1. Typically, this occurs when the destination uses the TTL value from the arriving datagram as the TTL in its ICMP reply. The reply does not arrive at the source until the destination receives a traceroute datagram with a TTL equal to the number of hops between the source and destination. |
3 ms * 2 ms | "*" indicates that the timeout period (default of 5 seconds) expired before an ICMP time-exceeded message was received for the datagram. |
If traceroute receives an ICMP error message other than a time-exceeded or port-unreachable message, it prints one of the error codes shown in Table 2-60 instead of the round-trip time or an asterisk (*).
| ICMP Error Code | Meaning |
|---|---|
!N | No route to host. The network is unreachable. |
!H | No route to host. The host is unreachable. |
!P | Connection refused. The protocol is unreachable. |
!F | Fragmentation needed but do not fragment (DF) bit was set. |
!S | Source route failed. |
!A | Communication administratively prohibited. |
? | Unknown error occurred. |
Use the unalias command to remove the alias name and associated value from the alias list.
unalias name
name | Name of the alias. |
ROM monitor command.
Normal.
You must issue a sync command to save your change. Otherwise, the change is not saved and a reset removes your change.
This example shows how to use the unalias command to remove the s alias and then check to ensure it was removed:
rommon 5 > alias r=repeat h=history ?=help b=boot ls=dir i=reset k=stack s=set rommon 6 > unalias s rommon 7 > alias r=repeat h=history ?=help b=boot ls=dir i=reset k=stack rmmon 8 > s monitor: command "s" not found ===========================================================================
Use the undelete command to recover a deleted file on a Flash memory device. The deleted file can be recovered using its index (because there could be multiple deleted files with the same name).
undelete index [[m/]device:]
index | Index number of the deleted file. |
m/ | (Optional) Module number of the supervisor engine containing the Flash device. |
device: | (Optional) Device where the Flash resides. |
This command has no default setting.
Switch command.
Privileged.
A colon (:) is required after the specified device.
Use the dir command to learn the index number of the file to be undeleted.
A file cannot be undeleted if a valid file with the same name exists. You must delete the existing file before you can undelete the target file.
A file can be deleted and undeleted up to 15 times.
To delete all deleted files permanently on a device, use the squeeze command.
This example shows how to recover the deleted file with index 1 and use the show flash command to confirm:
Console> (enable) undelete 1 bootflash: Console> (enable) Console> (enable) show flash -#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name 1 .. ffffffff 5415406e 3300b8 25 3080247 May 25 1998 13:22:46 cat6000-sup.5.3.1.CSX.bin
2 .. ffffffff 762950d6 6234d0 25 3093399 May 25 1998 12:33:14 cat6000-sup.5.3.1.CSX.bin 1428272 bytes available (6173904 bytes used) Console> (enable)
Use the unset= command to remove a variable name from the variable list.
unset=varname
varname | Name of the variable. |
This command has no defaults.
ROM monitor command.
Normal.
You must enter the sync command to save your change to NVRAM. Otherwise, the change is not saved and a reset removes your change.
This example shows how to use the set command to display the variable list, remove a variable name from the variable list, and then display the variable list to verify:
rommon 2 > set PS1=rommon ! > BOOT= ?=0 rommon 3 > unset=0 rommon 4 > set PS1=rommon ! > BOOT=
Use the upload command to upload a software image to a network host.
upload host file [mod_num]
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. |
This command has no default setting.
Switch command.
Privileged.
This command is not supported by the Gigabit Ethernet switching module.
This example shows how to upload the supervisor image to the cat6000-sup.5.3.1.CSX.bin file on the mercury host:
Console> (enable) upload mercury cat6000-sup.5.3.1.CSX.bin 3 Upload Module 1 image to cat6000-sup.5.3.1.bin on mercury (y/n) [n]? y / Done. Finished Network Upload. (153908 bytes) Console> (enable)
Use the varname= command to set the variable VARNAME to varvalue. Note that the syntax varname= sets the variable to a NULL string.
varname=value
varname= | Name of the variable. |
value | Any ROM monitor command. |
This command has no defaults.
ROM monitor command.
Normal.
Do not put a space before or after the equal (=) sign. If there are spaces, you must place the value in quotes. Spell out variable names in uppercase letters to make them conspicuous.
This example shows how to assign a variable name to a value:
rommon 1 > s=set rommon 2 > s PS1=rommon ! > BOOT= ?=0
Use the verify command to confirm the checksum of a file on a Flash device.
verify [[m/]device:] filename
m/ | (Optional) Module number of the supervisor engine containing the Flash device. |
device: | (Optional) Device where the Flash resides. |
filename | Name of the configuration file. |
This command has no default setting.
Switch command.
Privileged.
A colon (:) is required after the specified device.
This example shows how to use the verify command:
Console> verify cat6k_r47_1.cbi .......................................................... File cat6k_r47_1.cbi verified OK.
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
seconds | Number of seconds for the CLI to wait. |
This command has no default setting.
Switch command.
Normal.
This example shows how to pause the CLI for 5 seconds:
Console> wait 5 Console>
Use the whichboot command to determine which file booted.
whichbootThis command has no arguments or keywords.
This command has no default setting.
Switch command.
Privileged.
This example shows how to use the whichboot command:
Console> whichboot Boot image name is `bootflash:cat6000-sup.5.3-1.CSX.bin'. Console>
Use the write command to upload the current configuration to a host or display it on the terminal.
write {host file | network | terminal}
host | IP address or IP alias of the host. |
file | Name of the configuration file. |
Keyword to specify interactive prompting for the IP address or IP alias of the host and the filename to upload. | |
terminal | Keyword to display the configuration file on the terminal. |
This command has no default setting.
Switch command.
Privileged.
The write terminal command is exactly the same as the show config command. The write host file command is a shorthand version of the write network command.
You cannot use the write network command to upload software to the ATM module.
With the write network command, the file must already exist on the host (use the UNIX touch filename command to create it).
This example shows how to upload the system5.cfg file to 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 (partial display):
Console> (enable) write terminal!........................................begin!#version 4.2(0.24)VAI58 set password $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set enablepass $1$FMFQ$HfZR5DUszVHIRhrz4h6V70set prompt Console>set length 24 defaultset logout 20set banner motd ^C^C!#systemset system baud 9600set system modem disableset system nameset system locationset system contact!#powerset power redundancy enable!#snmpset snmp community read-only publicset snmp community read-write privateset snmp community read-write-all secretset snmp rmon disableset snmp trap disable module...
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Dec 31 11:03:31 PST 1999
Copyright 1989-1999©Cisco Systems Inc.