Traceroute Incomplete Route Issue

traceroute

Monitoring my network I realized some time ago that traceroute used to print routes more complete than it is doing right now… and, right now, sometimes traceroute omits some devices.

For example, this is a more complete traceroute, including my gateway:

$ sudo traceroute -F xxx.xx.136.5

traceroute to xxx.xx.136.5 (xxx.xx.136.5), 30 hops max, 60 byte packets

 1  * * *

 2  192.168.1.1 (192.168.1.1)  1.607 ms  1.604 ms  1.627 ms

 3  xxx.xx.136.5 (xxx.xx.136.5)  3.286 ms  5.729 ms  7.416 ms

Now, the exactly the same command omits my gateway:

$ sudo traceroute -F xxx.xx.136.5

traceroute to xxx.xx.136.5 (xxx.xx.136.5), 30 hops max, 60 byte packets

1  xxx.xx.136.5 (xxx.xx.136.5)  24.004 ms  28.267 ms  42.343 ms

These commands were given on the same machine.

How can I set to always have the entire route?

Best Answer

Any form of traceroute works by incrementing the TTL of an IP packet by one. The first packet has a TTL of one and the 1 router decrements the timer and send out an error massage via ICMP (Time to live exceeded). Standard *NIX traceroute uses UDP, Windows tracert ICMP, there are also versions that use TCP.

There are different cases why you don't see a hop:

  • People think that ICMP is evil an block it. This will lead to many problems (e.g. PMTU discovery).
  • People only think of windows and block UDP. Try running traceroute -I should to the trick.
  • you may also want to try using tcptraceroute
  • If a router is busy routing packets it's my not have the resources to send out ICMP packets.
Related Topic