Search code examples
networkingrouterttltraceroute

Why traceroute's three packets with same TTL always go to same router?


I was studying about traceroute in the book "Computer Networking A Top-Down Approach" recently, and I was struck by a few questions. The book said and I quote

Trace-route actually repeats the experiment just described three times, so the source actually sends 3 • N packets to the destination.

My question is: if the source sends 3 packets with same TTL value, why should all packets with same TTL reach the same router all the time (by all the time I mean for all 3 packets with same TTL value during one single traceroute execution) . I mean why does it not happen that a packet with TTL=n goes to a router n hops from source, another packet with same TTL goes to another router n hops from source and so on? Due to different congestion at different times, it is very likely that two packets to the same destination may take different routes. Why does it not happen in case of traceroute's 3 packets with same TTL? If it does happen, how come only one single router is shown for each TTL value?

Yet another question

RFC1393 says:

The purpose behind this is to record the source of each ICMP TTL exceeded message to provide a trace of the path the packet took to reach the destination.

Lets say for TTL=3 the packet took a path of routers A-B-C, and due to different congestion faced by packet with TTL=4, it took a path A-X-Y-D. Now, what can we conclude about the trace here?

Or am I missing something more obvious here?


Solution

  • Your premise is wrong. For instance, if there is load balancing in the path, you don't always get the same router at the same number of hops. There was a recent question in Network Engineering about this.

    If you have a stable, well-designed network, and no load balancing, you should get the same router at the same number of hops. This is because the routing tables should be stable and deterministic. Each router will have a best route toward the destination in its routing table, and, absent network instability (or something else like load balancing), the routing tables will not change. The packets are independently routed by each router, and should follow the same path.

    In fact, random or varying hops on the path may be a real concern since it can point to serious network problems. If there is churn in one or more of the routing tables, the source of the problem needs to be identified and corrected.

    You keep assuming that a router will route around congestion. That is almost never true. Routers typically manage congestion with shaping, queuing, and/or policing, not routing around congestion. The whole reason for QoS is to deal with network congestion and to try to manage fairness and order into which traffic get dropped and which must wait.