Linux – Can ping but cannot traceroute from Linux. Can do both from Windows. What gives

linuxnetworkingping

So here's the issue. I have two different computers behind the same network. Both have the same gateway, IP address prefixes, etc.

Computer 1:
Windows XP
IP 192.168.0.15

This computer can ping and tracert out of the network to another computer I'm trying to reach

Computer 2:
Linux (debian)
IP 192.168.0.54

This computer can ping that out-of-network computer, but cannot traceroute to it.

This makes me believe that it is nothing to do with firewalls, but with the OS configuration.

The output of the route command:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

Any ideas as to what the issue might be?

Best Answer

That's because Windows and Linux implement traceroute differently.

On Windows, it uses ICMP Echo packets with varying time-to-live settings to figure out intermediary hops.

On Linux, it uses UDP packets with varying time-to-live settings to figure out intermediary hops.

Some networks allow one or both, or none. Networks that allow ICMP but not UDP will behave differently. Ping on linux uses the same ICMP Echo packets that Windows uses, which explains why that works but not Traceroute.

Also, different traceroute programs behave differently. Not all linuxes use UDP for that. So this is not universal.