The following example shows an extended ping command sourced from the Router A
Ethernet 0 interface and destined for the Router B Ethernet interface. If this ping
succeeds, it is an indication that there is no routing problem. Router A knows how
to get to the Ethernet of Router B, and Router B knows how to get to the Ethernet of
Router A. Also, both hosts have their default gateways set correctly.
If the extended ping command from Router A fails, it means that there is a
routing problem. There could be a routing problem on any of the three routers:
Router A could be missing a route to the subnet of Router B’s Ethernet, or to the
subnet between Router C and Router B; Router B could be missing a route to the
subnet of Router A's subnet, or to the subnet between Router C and Router A; and
Router C could be missing a route to the subnet of Router A's or Router B's Ethernet
segments. You should correct any routing problems, and then Host 1 should try to
ping Host 2. If Host 1 still cannot ping Host 2, then both hosts' default gateways
should be checked. The connectivity between the Ethernet of Router A and the
Ethernet of Router B is checked with the extended ping command.
With a normal ping from Router A to Router B's Ethernet interface, the source address
of the ping packet would be the address of the outgoing interface; that is, the
address of the serial 0 interface (172.31.20.1). When Router B replies to the ping
packet, it replies to the source address (that is, 172.31.20.1). This way, only the
connectivity between the serial 0 interface of Router A (172.31.20.1) and the
Ethernet interface of Router B (192.168.40.1) is tested.
To test the connectivity between Router A's Ethernet 0 (172.16.23.2) and Router B's
Ethernet 0 (192.168.40.1), we use the extended
ping
command. With extended ping, we get the option to specify the source address
of the ping packet.
In this example, the extended ping command verifies the IP connectivity
between the two IP addresses 10.0.0.2 and 10.0.0.1.
ping
Protocol [ip]:
Target IP address: 10.0.0.1
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands? [no]: yes
Source address or interface: 10.0.0.2
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]: yes
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes? [no]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.25.58.21, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/11/49 ms
The
traceroute
command is used to discover the paths
packets take to a remote destination and where routing breaks down. The
traceroute
command provides the path between the
two IP addresses and does not indicate any problems along the path.
traceroute
Protocol [ip]:
Target IP address: ena-view3
Source address: 10.0.58.29
Numeric display? [no]:
Timeout in seconds [3]:
Probe count [3]:
Minimum Time to Live [1]:
Maximum Time to Live [30]:
Port Number [33434]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Type escape sequence to abort.
Tracing the route to 171.71.164.199
1 sjc-jpollock-vpn.cisco.com (10.25.0.1) 30 msec 4 msec 4 msec
2 15lab-vlan525-gw1.cisco.com (172.19.72.2) 7 msec 5 msec 5 msec
3 sjc15-00lab-gw1.cisco.com (172.24.114.33) 5 msec 6 msec 6 msec
4 sjc5-lab4-gw1.cisco.com (172.24.114.89) 5 msec 5 msec 5 msec
5 sjc5-sbb4-gw1.cisco.com (171.71.241.162) 5 msec 6 msec 6 msec
6 sjc5-dc5-gw1.cisco.com (171.71.241.10) 6 msec 6 msec 5 msec
7 sjc5-dc1-gw1.cisco.com (171.71.243.2) 7 msec 8 msec 8 msec
8 ena-view3.cisco.com (171.71.164.199) 6 msec * 8 msec