Score:0

Does traceroute use the same path?

cn flag

I was a little bit confused about the use of traceroute.

According to this

The traceroute command is used to see how packets are getting routed. It works by sending packets with increasing TTL values, starting with 1. So the first router gets the packet, and it decrements the TTL value by one, thus dropping the packet. The router sends back an ICMP Time Exceeded message back to us. And then the next packet gets a TTL of 2, so it makes it past the first router, but when it gets to the second router the TTL is 0 and it returns another ICMP Time Exceeded message. Traceroute works this way because as it sends and drops packets it is build a list of routers that the packets traverse, until it finally gets to its destination and gets an ICMP Echo Reply message. (source: https://linuxjourney.com/lesson/traceroute)

According to this, how can we be sure that traceroute use the same path at each ICMP packet sending? Can't a packet be routed somewhere else during the second, third, fourth call, and so on?

Thanks.

Score:0
in flag

We can't be sure, it can change.

Each packet can have a different path, there is no guarantee here, it is a tool to help debugging, and not always a perfect truth.

A packet can also take one path there, but a completely different path back.

So what traceroute does tell you is at which router the packet "failed" with each step of increased TTL. To try and verify you run the trace multiple times (some implementations might already do this for you)

There could also be specific rules in place, which makes different types of packets take different paths. For example a trace might work perfectly fine, while TCP and/or UDP ports are blocked somewhere.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.