Understanding Traceroute

Traceroute is a network diagnostic tool used to track in real-time the pathway taken by a packet of information from one system to another.

Interactive Traceroute Simulator
How Traceroute Works
  1. Initialization: Traceroute starts by sending packets with a Time to Live (TTL) value of 1.
  2. First Hop: The first router receives the packet, decrements the TTL to 0, and sends back an ICMP "Time Exceeded" message.
  3. Increasing TTL: Traceroute then increases the TTL value and sends new packets, allowing them to reach the next hop.
  4. Subsequent Hops: This process repeats, with each router along the path sending back ICMP messages, revealing the route.
  5. Destination Reached: When the packets reach the destination, it responds with an ICMP "Port Unreachable" message, completing the trace.
  6. Latency Calculation: Traceroute measures the round-trip time for each hop, providing latency information.
Traceroute Output Explained

Here's an example of traceroute output and what each part means:

traceroute to google.com (172.217.16.142), 30 hops max, 60 byte packets
1  _gateway (192.168.1.1)  3.171 ms  3.457 ms  3.673 ms
2  10.0.0.1 (10.0.0.1)  15.301 ms  15.444 ms  15.582 ms
3  72.14.215.85 (72.14.215.85)  23.941 ms  24.172 ms  24.309 ms
4  108.170.252.209 (108.170.252.209)  24.462 ms  24.614 ms  24.792 ms
5  172.217.16.142 (172.217.16.142)  24.992 ms  25.138 ms  25.284 ms
ColumnMeaning
1Hop number
2Hostname (IP address)
3-5Round-trip times for three packets
Using Traceroute

On Linux/macOS:

traceroute example.com

On Windows:

tracert example.com

Replace "example.com" with the domain or IP address you want to trace.

Interpreting Traceroute Results
  • Asterisks (*): Indicate that the probe timed out - the router didn't respond within the expected time.
  • High latency: A sudden increase in response time could indicate network congestion or a long-distance link.
  • Private IP addresses: Often seen in the first few hops, representing your local network devices.
  • Many hops: A large number of hops doesn't necessarily indicate a problem, but could explain higher latency.