Traceroute Process
Traceroute is a network diagnostic tool that discovers the sequence of routers (hops) between a source and destination by exploiting the IP TTL (Time to Live) field, sending probes with incrementing TTL values and collecting ICMP Time Exceeded responses from each hop.
Traceroute is a network diagnostic tool that discovers the sequence of routers (hops) between a source and destination by exploiting the IP TTL (Time to Live) field, sending probes with incrementing TTL values and collecting ICMP Time Exceeded responses from each hop.
Every IP packet carries a TTL field, decremented by 1 at each router hop. When TTL reaches 0, the router discards the packet and sends an ICMP "Time Exceeded" message back to the source — crucially, this message includes the router's IP address.
Mechanics: Traceroute sends the first probe with TTL=1. The first router decrements TTL to 0, discards the packet, and sends back an ICMP Time Exceeded message from its own IP address. Traceroute records that IP as hop 1 and the round-trip time. It then sends probes with TTL=2, reaching the second router. This continues until either the destination is reached or the maximum hop count is hit (usually 30).
Probe Protocols: Unix traceroute uses UDP probes to high-numbered ports (33434+) by default. Windows tracert uses ICMP Echo Requests. traceroute -T uses TCP SYN packets (bypasses firewalls that block ICMP/UDP).
Three Probes Per Hop: Traceroute sends three probes per TTL value to measure RTT variation. The three RTT values show jitter and packet loss at each hop. An asterisk (*) means no response — either the router drops probes without sending ICMP, or the ICMP response is blocked by a firewall.
Asymmetric Routing: Traceroute only shows the forward path. Return packets may take completely different routes, so the displayed path is not necessarily symmetric. The RTT at each hop includes the full round-trip to that router, not just the one-way latency.
ECMP: On networks using ECMP (Equal-Cost Multi-Path), each probe for the same TTL may take a different path, producing seemingly random hops. Per-flow hashing means successive probes with the same 5-tuple typically follow the same path.