0

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?

Sнаđошƒаӽ
  • 16,753
  • 12
  • 73
  • 90
  • 1
    I'm voting to close this question as off-topic because this has nothing to do with programming. Try http://networkengineering.stackexchange.com/ instead. – vhu Sep 26 '15 at 19:38
  • I'm voting to close this question as off-topic because it does not appear to be about programming within the scope defined in the [help center](http://stackoverflow.com/help/on-topic). – Matt Nov 29 '16 at 18:54

2 Answers2

1

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.

Community
  • 1
  • 1
Ron Maupin
  • 6,180
  • 4
  • 29
  • 36
  • You wrote: "Routers typically manage congestion with shaping, queuing, and/or policing, not routing around congestion" - is it **always** the case? What if there is load balancing? Does my question make sense considering load balancing is used in routing? If it does, then what would be the answer. Thanks for your answer. – Sнаđошƒаӽ Sep 27 '15 at 04:11
  • The Cisco proprietary EIGRP routing protocol can take Load into account when determining the best path. The industry-standard routing protocols have no such feature. OSPF simply uses a "cost" that is normally based on the bandwidth (not available bandwidth) of the link. BGP basically uses a hop-count, but can have other factors involved, too, but none of the other factors have anything to do with congestion. In any event, it would be a poor practice, and detrimental to performance in the long run, to have constantly changing routing tables. Load balancing is different, not changing the tables. – Ron Maupin Sep 27 '15 at 04:20
  • Even with load balancing, the routing is deterministic and predictable. Once you reach the limit of the routes involved in the balancing, it starts over from the first route.. – Ron Maupin Sep 27 '15 at 04:22
  • Sorry about the wrong usage of the term 'load balancing'. I wanted to mean 'congestion sensitive routing'. I found something about 'congestion sensitive routing' in the book I named in the OP, and that is why I had this question in the first place. – Sнаđошƒаӽ Sep 28 '15 at 03:08
  • What you normally find in the real world is that congestion is managed by QoS. You really don't want routing tables to constantly change since that increases jitter, and that is bad for things like VoIP. As I wrote before, EIGRP can take various things into account in routing (bandwdith, delay, load, reliability, and MTU), but it is a proprietary protocol. BGP runs the Internet, and it doesn't currently have anything to take congestion into account. – Ron Maupin Sep 28 '15 at 03:18
  • Since BGP runs the Internet (as you said), and it doesn't currently take congestion into consideration when routing, then it makes sense why all traceroute packets follow a single route during a single run of traceroute. Thank you very much, it is all clear now! Can you please add this BGP thing in your answer for future readers (if any)? – Sнаđошƒаӽ Sep 28 '15 at 03:30
0

TTL refers the maximum number of hops that a packet can travel before discarding it. Therefore, a packet with TTL equal to 5 does not mean that the packet needs to travel 5 hops every time is sent.

vilanova
  • 77
  • 1
  • 10