5-8
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter5 Checking Port Status an d Connectivity
Using IP Traceroute
This example shows how to ping a remote host from normal executive mode:
Switch# ping labsparc
labsparc is alive
Switch> ping 72.16.10.3
12.16.10.3 is alive
Switch#
This example shows how to enter a ping command in privileged EXEC mode specifying the number of
packets, the packet size, and the timeout period:
Switch# ping
Target IP Address []: 12.20.5.19
Number of Packets [5]: 10
Datagram Size [56]: 100
Timeout in seconds [2]: 10
Source IP Address [12.20.2.18]: 12.20.2.18
!!!!!!!!!!
----12.20.2.19 PING Statistics----
10 packets transmitted, 10 packets received, 0% packet loss
round-trip (ms) min/avg/max = 1/1/1
Switch
Using IP Traceroute
These sections describe how to use IP traceroute feature:
Understanding How IP Traceroute Works, page 5-8
Running IP Traceroute, page 5-9

Understanding How IP Traceroute Works

You can use IP traceroute to identify the path that packets take through the network on a hop-by-hop
basis. The command output displays all network layer (Layer 3) devices, such as ro uters, that the traffic
passes through on the way to the destination.
Layer 2 switches can participate as the source or destinatio n of the trace command but will not appear
as a hop in the trace command output.
The trace command uses the Time To Live (TTL) field in the IP header to cause routers and servers to
generate specific return messages. Traceroute starts by sending a User Datagr am Protocol (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 Internet Control Message Protocol (ICMP) Time-Exceeded
message to the sender. Traceroute 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 sends a UDP packet 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 me ssage 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 reaches 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 message to th e
source. The Port Unreachable error message indicates to traceroute that the destination has been reached.