background image
282 Chapter 5: Network Protocols
Two subtleties of the ping command are used in these two example console dialogs of
Examples 5-6 and 5-7:
·
Cisco ping commands use the output interface's IP address as the source address of the
packet, unless otherwise specified in an extended ping. The first ping in Example 5-6 uses
a source of 10.1.128.251; the extended ping uses the source address shown (10.1.1.251).
·
ICMP Echo Reply messages (ping responses) reverse the IP addresses used in the ICMP
Echo Request to which it is responding.
The extended version of the ping command can be used to more fully refine the underlying
cause of the problem. In fact, when a ping from a router works but a ping from a host does not,
the extended ping could help in re-creating the problem without needing to work with the end
user on the phone. For instance, the extended ping command on Albuquerque sent an Echo
Request from 10.1.1.251 (Albuquerque's Ethernet) to 10.1.2.252 (Yosemite's Ethernet); no
response was received by Albuquerque. Normally, the echoes are sourced from the IP address
of the outgoing interface; with the use of the extended ping source address option, the source
IP address of the echo packet can be changed. It appears that the ICMP Echo Requests were
received by Yosemite because the debug messages on Yosemite imply that it sent ICMP Echo
Replies back to 10.1.1.251. Somewhere between Yosemite creating the ICMP echo replies and
Albuquerque receiving them, a problem occurred.
An examination of the steps after the echo replies were created by Yosemite is needed to
understand the problem in this example. ICMP asks the IP software in Yosemite to deliver the
packets. The IP code performs IP routing table lookup to find the correct route for these packets,
whose destination is 10.1.1.251. However, the show ip route command output in Example 5-7
shows that Yosemite has no route to subnet 10.1.1.0. It seems that Yosemite created the Echo
Reply messages but failed to send them because it has no route to 10.1.1.0/24. This is just one
example in which the route in one direction is working fine, but the route in the reverse direction
is not.
Other options for extended ping are also quite useful. The Don't Fragment (DF) bit can be set,
along with the amount of data to send in the echo, so that the MTU for the entire route can be
discovered through experimentation. Echo packets that are too large to pass over a link due to
MTU restrictions will be discarded because the DF bit is set. The timeout value can be set so
that the ping command will wait longer than the default 2 seconds before thinking that an echo
will receive a reply. Furthermore, not only can a single size for the ICMP Echo be set, but a
range of sizes can be used to give a more realistic set of packets.
One key to troubleshooting with the ping command is understanding the various codes the
command uses to signify the various responses it can receive. Table 5-29 lists the various codes
that the Cisco IOS ping command can supply.
ch05.fm Page 282 Monday, March 20, 2000 5:06 PM