Table Of Contents
format
frame
history—ROM monitor
history—switch
l2trace
meminfo
ping
format
Use the format command to format bootflash or a Flash PC card (a Flash device must be formatted before it can be used).
format [spare spare-num] [m/]device1: [[device2:][monlib-filename]]
Syntax Description
spare spare_num
|
(Optional) Number of spare sectors to reserve when other sectors fail.
|
m/
|
(Optional) Module number of the supervisor engine containing the Flash device.
|
device1:
|
Flash device to be formatted.
|
device2:
|
(Optional) Flash device that contains the monlib file to be used to format device1:.
|
monlib-filename
|
(Optional) Name of the monlib file.
|
Defaults
The default number of spare sectors is 0.
Command Types
Switch command.
Command Modes
Privileged.
Usage Guidelines
A colon (:) is required after the specified device.
You can reserve up to 16 spare sectors for use when other sectors fail. If you do not reserve a spare sector and later some sectors fail, you will have to reformat the entire Flash memory, which will erase all existing data.
The monlib file is the ROM monitor library used by the ROM monitor to access files in the Flash file system. It is also compiled into the system image. In the command syntax, device1: is the device to format and device2: contains the monlib file to use.
When you omit the [[device2:][monlib-filename]] argument, the system formats device1: using the monlib that is bundled with the system software.
When you omit device2: from the [[device2:][monlib-filename]] argument, the system formats device1: using the named monlib file from the device specified by the cd command.
When you omit monlib-filename from the [[device2:][monlib-filename]] argument, the system formats device1: using the monlib file from device2:. When you specify the whole [[device2:][monlib-filename]] argument, the system formats device1: using the specified monlib file from the specified device.
You can also specify device1:monlib-filename as the device and filename to be used, as follows:
format device1: [device1: [monlib-filename]]
If monlib-filename is omitted, the system formats device1: using the built-in monlib file on the device.
Note
When the system cannot find a monlib file, the system terminates the formatting process.
Note
If the Flash device has a volume ID, you must provide the volume ID to format the device. The volume ID is displayed using the show flash m/device: filesys command.
Examples
This example shows how to format a Flash PC card:
Console> (enable) format slot0:
All sectors will be erased, proceed (y/n) [n]?y
Enter volume id (up to 31 characters):
Format device slot0 completed.
frame
Use the frame command to display an individual stack frame.
frame [-d | -p] [num]
Syntax Description
-d
|
(Optional) Keyword to specify a monitor context.
|
-p
|
(Optional) Keyword to specify a booted image process level context.
|
num
|
(Optional) Number of the frame to display, where 0 = youngest frame.
|
Defaults
The default is a booted image kernel context—the youngest frame.
Command Types
ROM monitor command.
Command Types
Normal.
Usage Guidelines
The minus sign (-) is required with the -d and -p options.
Examples
This example shows how to use the frame command to specify a booted image process level context, frame 1:
Stack Frame 1, SP = 0x80007ed8, Size = 32 bytes
[0x80007ed8 : sp + 0x000] = 0x6031de50
[0x80007edc : sp + 0x004] = 0x6031c000
[0x80007ee0 : sp + 0x008] = 0x00000000
[0x80007ee4 : sp + 0x00c] = 0x80007ec4
[0x80007ee8 : sp + 0x010] = 0x00000002
[0x80007eec : sp + 0x014] = 0x00000000
[0x80007ef0 : sp + 0x018] = 0x60008770
[0x80007ef4 : sp + 0x01c] = 0x600087f0
history—ROM monitor
Use the history command to display the command history (the last 16 commands executed in the ROM monitor environment). This command is aliased to "h" by the ROM monitor for convenience.
history
Syntax Description
This command has no arguments or keywords.
Defaults
This command has no default settings.
Command Types
ROM monitor command.
Command Modes
Normal.
Examples
This example shows how to use the history command:
=============================================================================
history—switch
Use the history command to show the contents of the command history buffer.
history
Syntax Description
This command has no arguments or keywords.
Defaults
This command has no default settings.
Command Types
Switch command.
Command Modes
Normal.
Usage Guidelines
The history buffer size is fixed at 20 commands. See the "Command-Line Interfaces" chapter for detailed information about the command history feature.
Examples
In this example, the history command lists the contents of the command history buffer:
l2trace
Use the l2trace command set to display the Layer 2 path taken by the packets that start at a specified source address and end at a specified destination address.
l2trace src_mac_addr dest_mac_addr [vlan] [detail]
l2trace src_ip_addr dest_ip_addr [detail]
Syntax Description
src_mac_addr
|
Source MAC address.
|
dest_mac_addr
|
Destination MAC address.
|
vlan
|
(Optional) Number of the VLAN.
|
src_ip_addr
|
Source IP address or alias.
|
dest_ip_addr
|
Destination IP address or alias.
|
detail
|
(Optional) Keyword to specify detailed information.
|
Defaults
This command has no default settings.
Command Types
Switch command.
Command Types
Privileged.
Usage Guidelines
All the intermediate devices should be Catalyst 5000 or Catalyst 6000 family switches running supervisor engine software release 6.1 or later. Catalyst 4000 family switches must be running supervisor engine software release 6.2 or later.
The l2trace command displays the Layer 2 path when the specified source and destination addresses belong to the same VLAN. If you specify source and destination addresses that belong to different VLANs, l2trace aborts with an error message.
You must enable CDP on all the Catalyst 4000, Catalyst 5000, or Catalyst 6000 family switches in the network.
When the switch detects a device (in the Layer 2 path) that does not belong to the Catalyst 4000, Catalyst 5000, or Catalyst 6000 family switch, the switch continues to send Layer 2 trace queries and lets them time out.
This command is rejected if you enter a multicast source or destination MAC address.
If a source or the destination address belongs to multiple VLANs, you must specify the VLAN to be used for determining the Layer 2 path.
The Layer 2 trace feature is not supported when multiple devices are attached to one port via hubs (for example, multiple CDP neighbors detected on a port). When more than one CDP neighbor is detected on the port, l2trace is aborted.
If you specify the IP address of the source and destination systems instead of the MAC addresses, the switch looks at the ARP table to determine the IP address to MAC address mapping of the source and destination systems. If an ARP entry exists for the specified IP address, the corresponding MAC address is used. If no matching ARP entry exists, the system does an ARP query and tries to resolve the IP address. If this is the case, a restriction is imposed that requires the source and destination systems to be in the same subnet as the switch in order for the ARP query to be resolved.
Examples
This example shows how to display the Layer 2 packet path for a specified source and destination MAC address:
Console> (enable) l2trace 00-01-22-33-44-55 10-22-33-44-55-66 detail
l2trace vlan number is 10.
00-01-22-33-44-55 found in C5500 named wiring-1 on port 4/1 10Mb half duplex
C5500: wiring-1: 192.168.242.10: 4/1 10Mb half duplex -> 5/2 100MB full duplex
C5000: backup-wiring-1: 192.168.242.20: 1/1 100Mb full duplex -> 3/1-4 FEC attached
C5000: backup-core-1: 192.168.242.30: 4/1-4 FEC attached -> 1/1-2 GEC attached
C6000: core-1: 192.168.242.40: 1/1-2 GEC attached -> 2/1 10MB half duplex.
10-22-33-44-55-66 found in C6000 named core-1 on port 2/1 10MB half duplex.
This example shows how to display the Layer 2 packet path for a specified source and destination IP alias:
Console> (enable) l2trace user-1-pc user-2-pc detail
Mapping IP address to MAC Address
user-1-pc -> 00-01-22-33-44-55
user-2-pc -> 10-22-33-44-55-66
l2trace vlan number is 10
00-01-22-33-44-55 found in C5500 named wiring-1 on port 4/1 10Mb half duplex
C5500: wiring-1: 192.168.242.10: 4/1 10Mb half duplex -> 5/2 100MB full duplex
C5000: backup-wiring-1: 192.168.242.20: 1/1 100Mb full duplex -> 3/1-4 FEC attached
C5000: backup-core-1: 192.168.242.30: 4/1-4 FEC attached -> 1/1-2 GEC attached
C6000: core-1: 192.168.242.40: 1/1-2 GEC attached -> 2/1 10MB half duplex.
10-22-33-44-55-66 found in C6000 named core-1 on port 2/1 10MB half duplex.
This example shows how to display a summary of Layer 2 packet path information for a specified source and destination IP address:
Console> (enable) l2trace 9.7.0.7 9.7.0.6
This example shows how to display a summary of Layer 2 packet path information for a specified source and destination MAC address:
Console> (enable) l2trace 00-01-22-33-44-55 10-22-33-44-55-66
meminfo
Use the meminfo command to display information about the main memory, packet memory, and NVRAM. With the -l option, the supported DRAM configurations are displayed.
meminfo [-l]
Syntax Description
-l
|
(Optional) Keyword to specify the long listing, which displays the DRAM configurations.
|
Defaults
This command has no default settings.
Command Types
ROM monitor command.
Command Modes
Normal.
Usage Guidelines
The minus sign (-) is required with the -l option.
Examples
This example shows how to use the meminfo command:
Main memory size: 16 MB in 32 bit mode.
Available main memory starts at 0xa000e000, size 16328KB
IO (packet) memory size: 25 percent of main memory.
ping
Use the ping command set to send ICMP echo-request packets to another node on the network. You can also use the ping command without arguments to configure ping.
ping -s host
ping -s host [packet_size] [packet_count]
ping
Syntax Description
-s
|
Keyword to cause ping to send one datagram per second, printing one line of output for every response received.
|
host
|
IP address or IP alias of the host.
|
packet_size
|
(Optional) Number of bytes in a packet, from 56 to 1472 bytes.
|
packet_count
|
(Optional) Number of packets to send; valid values are from 0 to 2,147,483,647.
|
Defaults
The defaults for ping -s are as follows:
•
packet_size is 56 bytes
•
packet_count is 2,147,483,647
The defaults for ping with no arguments are as follows:
•
packet_size is 56 bytes
•
packet_count is 5
•
Wait time is 2 seconds
•
Target IP address is none (this is a mandatory field)
•
Source address is the host IP address
Command Types
Switch command.
Command Modes
Normal or privileged.
Usage Guidelines
General ping command guidelines are as follows:
•
Press Ctrl-C to stop pinging.
•
Continuous ping means that, unless you press Ctrl-C to stop pinging, packets are generated continually and dispatched to the host.
•
The actual packet size is 8 bytes larger than the size you specify because the switch adds header information.
•
Normal response—The normal response occurs in 1 to 10 seconds, depending on network traffic.
The guidelines for the ping -s command are as follows:
•
The maximum waiting time before timing out is 2 seconds.
•
A new ping packet is generated after 1 second of sending the previous packet, regardless of whether an echo-reply is received or not.
•
If you do not enter a packet count, continuous ping results.
•
Network or host unreachable—The switch found no corresponding entry in the route table.
•
Destination does not respond—If the host does not respond, a "no answer from host" appears in 2 seconds.
•
Destination unreachable—The gateway for this destination indicates that the destination is unreachable.
The guidelines for the ping command without arguments are as follows:
•
The ping host command is accepted in normal mode only. The parameters take the default values automatically.
•
The target IP address is a mandatory field to be entered.
•
The maximum waiting time is configurable.
•
A new ping packet is generated only when an echo-reply is received.
•
If you enter a packet count of 0, this results in continuous ping.
•
Returns output only when a response is received or you press Return.
•
Available in privileged mode only.
•
When configuring ping, you must either press Return or enter a response. Valid responses and appropriate values are as follows:
–
Target IP address: IP address or host name of the destination node you plan to ping.
–
Number of Packets: Number of ping packets to be sent to the destination address; valid values are from 0 to 2,147,483,647 (0 specifies continuous ping).
–
Datagram size: Size of the ping packet; valid values are from 56 to 1472 bytes.
–
Timeout in seconds: Timeout interval; valid values are from 0 to 3600 seconds.
–
Source IP Address [(default)]: IP address or IP alias of the source.
Examples
This example shows how to ping a host with IP alias elvis a single time:
-----172.20.52.19 PING Statistics------
5 packets transmitted, 5 packets received, 0% packet loss
round-trip (ms) min/avg/max = 1/1/1
This example shows how to ping a host with IP alias elvis once per second until you press Ctrl-C to stop pinging:
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
----elvis PING Statistics----
7 packets transmitted, 7 packets received, 0% packet loss
round-trip (ms) min/avg/max = 7/8/11
This example shows how to configure ping:
Target IP Address []: 172.20.52.19
Timeout in seconds [2]: 1
Source IP Address [172.20.52.18]:
----172.20.52.19 PING Statistics----
6 packets transmitted, 6 packets received, 0% packet loss
round-trip (ms) min/avg/max = 1/1/1
Related Commands
set interface
set ip route
show interface
show ip route