System information
Using Router Diagnostic Commands
Book Title
2-10
In many situations, using third-party diagnostic tools can be more useful and less intrusive than using
debug commands. For more information, see the section “Third-Party Troubleshooting Tools” later
in this chapter.
Using the
ping
Command
To check host reachability and network connectivity, use the ping exec (user) or privileged exec
command. After you log in to the router or access server, you are automatically in user exec
command mode. The exec commands available at the user level are a subset of those available at the
privileged level. In general, the user exec commands allow you to connect to remote devices, change
terminal settings on a temporary basis, perform basic tests, and list system information. The ping
command can be used to confirm basic network connectivity on AppleTalk, ISO Conectionless
Network Service (CLNS), IP, Novell, Apollo, VINES, DECnet, or XNS networks.
For IP, the ping command sends Internet Control Message Protocol (ICMP) Echo messages. ICMP
is the Internet protocol that reports errors and provides information relevant to IP packet addressing.
If a station receives an ICMP Echo message, it sends an ICMP Echo Reply message back to the
source.
The extended command mode of the ping command permits you to specify the supported IP header
options. This allows the router to perform a more extensive range of test options. To enter ping
extended command mode, enter yes at the extended commands prompt of the ping command.
It is a good idea to use the ping command when the network is functioning properly to see how the
command works under normal conditions and so you have something to compare against when
troubleshooting.
For detailed information on using the ping and extended ping commands, refer to the Cisco IOS
Configuration Fundamentals Command Reference.
Using the trace Command
The trace user exec command discovers the routes that a router’s packets follow when traveling to
their destinations. The trace privileged exec command permits the supported IP header options to
be specified, allowing the router to perform a more extensive range of test options.
The trace command works by using the error message generated by routers when a datagram
exceeds its time-to-live (TTL) value. First, probe datagrams are sent with a TTL value of 1. This
causes the first router to discard the probe datagrams and send back “time exceeded” error messages.
The trace command then sends several probes and displays the round-trip time for each. After every
third probe, the TTL is increased by one.
Each outgoing packet can result in one of two error messages. A “time exceeded” error message
indicates that an intermediate router has seen and discarded the probe. A “port unreachable” error
message indicates that the destination node has received the probe and discarded it because it could
not deliver the packet to an application. If the timer goes off before a response comes in, trace prints
an asterisk (*).
The trace command terminates when the destination responds, when the maximum TTL is
exceeded, or when the user interrupts the trace with the escape sequence.
As with ping, it is a good idea to use the trace command when the network is functioning properly
to see how the command works under normal conditions and so you have something to compare
against when troubleshooting.
For detailed information on using the trace and extended trace commands, refer to the Cisco IOS
Configuration Fundamentals Command Reference.