1

If a packet can take any route, how can you iteratively figure out the path from you to a host?

From what I can tell, packet tracing works on the basis that packet_i takes a the route: route(packet_(i-1)) + router_i

  • 2
    "Any" route doesn't mean random. Routing is deterministic. – Ron Trunk May 29 '19 at 12:32
  • @RonTrunk what if a router were to go down during tracing? – Tobiq May 29 '19 at 12:47
  • 3
    Review the link in the answer below. then you will probably be able to answer your own question. When I say deterministic, I mean given a certain state of the network, you know the path. If the state changes (a router goes down), there may be a new path, but that's also deterministic. – Ron Trunk May 29 '19 at 12:52
  • Makes sense, thanks – Tobiq May 29 '19 at 14:01
1

If a packet can take any route, how can you iteratively figure out the path from you to a host?

You can't.

However in practice packets don't take any old route, they take the route that the routers deem as best. While that can certainly change over longer durations over short durations it tends to be reasonably stable.

There is the question of what happens if two routes appear to the router to be equally good. In principle a router could be configured to round-robin between the two equally good routes in this scenario. In practice it's rarely done that way because out of order packet delivery can cause performance issues. Instead either one route is picked for all packets or the packets are split between the routes by a hash of packet meta-data that is likely to remain consistent for a given connection (e.g. source/destination ips, L4 protocol, port numbers or similar).

So most of the time the iterative process will produce sensible results, it's not 100% guaranteed to though.

| improve this answer | |
2

There are many explanations of how traceroute work on the web, so there's no point repeating it here. You can try this one.

| improve this answer | |
  • I've read up on packet tracing. Directing me to another source doesn't help me figure out this one detail I'm confused with, yet alone warrant an answer. Your comment on the question was more helpful – Tobiq May 29 '19 at 12:50
  • 1
    I'm not sure where your confusion lies. What are you not sure about? – Ron Trunk May 29 '19 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.