tracert results not matching routing table (route print)
Why would tracert 10.0.0.1
produce the following results:
Tracing route to 10.0.0.1 over a maximum of 30 hops
1 3 ms 3 ms 3 ms 192.168.0.1
2 * * * Request timed out.
3 * * * Request timed out.
4 * * * Request timed out.
Indicating that it's using 192.168.0.1
as a next hop when the routing table is as follows:
route print
:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.2 25
10.0.0.0 255.0.0.0 On-link 10.0.0.2 286
10.0.0.2 255.255.255.255 On-link 10.0.0.2 286
10.255.255.255 255.255.255.255 On-link 10.0.0.2 286
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
192.168.0.0 255.255.255.0 On-link 192.168.0.2 281
192.168.0.2 255.255.255.255 On-link 192.168.0.2 281
192.168.0.255 255.255.255.255 On-link 192.168.0.2 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 192.168.0.2 281
224.0.0.0 240.0.0.0 On-link 10.0.0.2 286
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 192.168.0.2 281
255.255.255.255 255.255.255.255 On-link 10.0.0.2 286
===========================================================================
Shouldn't it be using the 10.0.0.2
interface due to this line being the most specific?
10.0.0.0 255.0.0.0 On-link 10.0.0.2 286
Edit:
Sometimes I also get Reply from 10.0.0.2: Destination host unreachable.
followed by Request timed out.
on ping
. Perhaps it thinks it's a bad route and blacklists it (falling back on the default route?)
This depends on your topology, but it would seem that whatever is there at 192.168.0.1 knows how to get to 10.0.0.1 and it's also connected to your 10.0.0.2 interface. The key to understand this is that tracert lines list the source address that the intermediate node uses to reach the original source, and not the original intermediate destination. (It is the source of an ICMP message)
Thus, if 192.168.0.1 has a route to 10.0.0.2 via 192.168.0.2, that (192.168.0.1) will be the source of the ICMP and what you will see.