Using Ip Traceroute; Understanding How Ip Traceroute Works; Running Ip Traceroute - Cisco 4500M Software Manual

Software guide
Table of Contents

Advertisement

Chapter 5
Checking Port Status and Connectivity

Using IP Traceroute

These sections describe how to use IP traceroute feature:

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 routers, that the traffic
passes through on the way to the destination.
Layer 2 switches can participate as the source or destination 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 Datagram 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 message 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 the
source. The Port Unreachable error message indicates to traceroute that the destination has been reached.

Running IP Traceroute

To trace the path that packets take through the network, perform this task in EXEC or privileged EXEC
mode:
Command
Switch# trace [ protocol ] [ destination ]
OL-6696-01
Understanding How IP Traceroute Works, page 5-7
Running IP Traceroute, page 5-7
Purpose
Runs IP traceroute to trace the path that packets
take through the network.
Software Configuration Guide—Release 12.2(25)EW
Using IP Traceroute
5-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

4500 series

Table of Contents