Traceroute: Can it correctly track the path from A to B?

Traceroute is an application to track the path from A to B. (A is your location, and B is the server you want to track). On Windows, you can enter tracert . The main algorithm:

 send UDP with TTL = 1 Server A1 received, and return ICMP packet to A because TTL is expired. --> know first machine between. For example A1. send UDP with TTL = 2 Server A1 received, and send this UDP to server A2. Server A2 received, and return ICMP packet to A because TTL is expired --> know second machine between. In this example is A2. Do it until to B. we can track down: A -> A1 -> A2 -> ... ->B 

Does this algorithm work correctly? Because at different times, the intermediate server can send a message to another server. For example, the first time a UDP message is sent to A1, but later it can send to another server, such as B1. Therefore, route tracing will not work properly.

I didn’t understand something?

+6
source share
2 answers

On the man page:

traceroute monitors the receipt of route packets from the IP network, their path to this host

So, if you are trying to find one of the possible paths that your package might require, you will find a friend in traceroute .

Now, since the routing tables do not change every minute, packets you send are more likely to follow the same path as traceroute.

Another important point to not miss is the record route in the IP v4 header. After you indicate that you want to use this option, each router in the path will add its ip address to the parameters in the header. You can read about it here . The trap is that the recipient learns about intermediate jumps, not the source.

I see that you missed the role of icmp echo request and response messages in the traceroute description. If this was not intentional, review.

Refresh . You can see the recording route option in action by doing ping -R

ping -R Enables route recording for echo request packets and displays the route buffer on the returned packets (ignored by many routers) .

+2
source

The algorithm is working correctly. In fact, routing may change due to considerations of different servers along the way, such as server load or availability. Say you want to send a message from A to B. If the route is not mutable, what will happen if some server on the route is down? If routing cannot be configured dynamically, this will result in the inability to deliver the message to the recipient in this example. Here is another example: let's say you have a server that is used for some heavy computing during the day, but it is idle during the night. You can let it pass traffic only at night, so any routing that uses it should be changed daily.

To complete all this, we can definitely say that without dynamic routing, the Internet could not exist in its β€œreal form”.

Addition:

Tracert sends a message from A to B. It shows the transitions along the path. These jumps constitute a valid route from A to B at run time. There is no guarantee that the connection between two adjacent points along the path is valid after the jump is completed. The only thing guaranteed is that for each hop there was a connection between the two endpoints when there was sent a message sent by Tracert .

+2
source

All Articles