Reputation: 1155
While using the UNIX traceroute
command, in order to calculate average latency for each loop (from one hop to the next one, e.g.: hop 8 to 9) what procedure should we take?
8 146.97.33.6 2.150 ms 2.159 ms 2.133 ms
9 146.97.33.61 1.580 ms 1.543 ms 1.552 ms
10 146.97.35.170 1.544 ms 1.535 ms 1.526 ms
I am aware, for instance, the average latency for hop 9, is 1.5583:
1.580 ms+1.543 ms+1.552 ms / 3
However, is this the average time it takes from the local host to that particular hop, or is it the time it takes for data packets to travel from previous hop to the particular hop?
Upvotes: 0
Views: 4020
Reputation: 85
According to Wikipedia it looks like it is the former
the route is recorded as the round-trip times of the packets received from each successive host (remote node) in the route (path); the sum of the mean times in each hop is a measure of the total time spent to establish the connection.
Upvotes: 1
Reputation: 6472
The latency is the round-trip latency from the originating host to the hop where it times out and back to the originating host, but it includes the time it takes for the timeout hop to get around to generating an ICMP message back to the originating host.
The primary purpose of a router is to route packets as fast as it can. Generating ICMP messages is a much lower priority for the router. If the router is busy routing packets, it will get around to generating the ICMP message when it has some spare time.
That is why you can see the times for some intermediate hops to be much longer than it is for the full path.
Upvotes: 1