How is latency / travel time determined when you execute a traceroute?

This is simply a question placed out of curiosity. When you execute a traceroute, and get some time durations back for the latency/travel time, how are those calculated? It would seem more than likely that the 'current time' on each stop in the route would be variable, and you can't exactly ask a server for what current time it has to figure out the offset, because you don't know how long it takes to make/receive that request.


Solution 1:

It has nothing to do with the wall-clock time on the systems involved.

Whatever system you're doing the traceroute from knows when it sent the ICMP request, and knows when it received the reply. It can then calculate how long the reply took to arrive.

Solution 2:

  1. Time is relative to the host performing the trace.

  2. It doesn't matter what the actual time is at any of the hops or what their time offset is.

  3. It doesn't matter what time it is on the host or what it's time offset is. A trace determines the amount of time it takes for the ICMP packets to be sent out and for the replies to be received. As such, the system time and time offset are irrelevant.