Incorrect placement of asterisks for probe timeouts
Brought to you by:
buc
I think there's a bug in the output of traceroute v2.1.0.
$ traceroute -m 3 45.56.99.171 -n -q 6
traceroute to 45.56.99.171 (45.56.99.171), 3 hops max, 60 byte packets
1 192.168.10.2 7.558 ms 7.516 ms 8.326 ms * * *
2 198.19.123.1 13.768 ms 13.754 ms 16.205 ms 16.190 ms * *
3 198.19.110.1 52.282 ms 50.843 ms 52.252 ms * * 44.707 ms
Is correct and normal... with 6 queries, we have 6 ms responses or asterisks per line.
Sometimes though, under conditions I can't yet nail down, when that last has failures, the asterisks end up in front of the host IP address:
$ sudo traceroute -m 3 45.56.99.171 -n -q 6
traceroute to 45.56.99.171 (45.56.99.171), 3 hops max, 60 byte packets
1 192.168.10.2 8.342 ms * * * * *
2 198.19.123.1 16.835 ms * * * * *
3 * * * 198.19.110.1 50.561 ms * *
Still 6 asterisks/MS's, but wrong placement.
Even with the 3 hop default this is possible:
$ traceroute -m 3 45.56.99.171 -n
traceroute to 45.56.99.171 (45.56.99.171), 3 hops max, 60 byte packets
1 * * *
2 198.19.123.1 19.705 ms * 19.674 ms
3 * 198.19.110.1 26.045 ms 27.674 ms
I only noticed this because I was trying to parse traceroute output so I was looking more closely...
This isn't expected behavior right?
Tyler wrote:
The IP address is printed at the first answered probe in a line. When
the first answered probe is not the first probe, it means there is
already an asterisk in that line (because of an unanswered probe), so
the IP address appears after it.
Moreover, it is possible that replies sometimes come from different
addresses. In such a case, new IP address is printed each time it
differs from the one of the previous successful probe.
For example:
Note that by default traceroute sends 16 packets simultaneously. This
speeds up the work, but at the same time leads to some instability (some
routes filter "too often" probe packs, or re-route it etc.etc.etc.). If
this is a problem just use `-N 1' to send probe one per time (as was old
time before).
Regards,
Dmitry Butskoy
Ok, I think I understand.
If the first n probes for a given hop don't get a response, you will have n asterisks ahead of the IP if/when it actually does respond.
This is because tracert doesn't know the IPs or response times of the hops until it gets a response back for that hop. Sometimes it's possible to get the false impression that it is discovering IPs and then pinging them.
Thanks for the clarification!