Routes: Destination host unreachable when using On-link as Gateway.
I have a rather peculiar issue with routes in Windows 7 and 2008R2 When I set a route using On-link or 0.0.0.0 as the gateway I get destination host unreachable when i try to ping, but if i change the gateway to the default gateway it works without a problem. This is not an issue in Vista and I guess that I just want to get some information why this is happening in Windows 7. I'm developing an application that fetches the Gateway of an interface using GetAdaptersInfo and looking up the wanted gateway in the IP_ADAPTER_INFO struct. Using this method I will get the On-link (0.0.0.0) address, which do not work in Windows 7 +. IPv4 Route Table ========================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.91 20 153.88.112.31 255.255.255.255 On-link 192.168.1.91 21 153.88.112.32 255.255.255.255 192.168.1.1 192.168.1.91 21 ========================================================== On Vista: Pinging 153.88.112.32 with 32 bytes of data: Reply from 153.88.112.32: bytes=32 time=37ms TTL=123 Pinging 153.88.112.31 with 32 bytes of data: Reply from 153.88.112.31: bytes=32 time=2ms TTL=123 On Windows 7: Pinging 153.88.112.32 with 32 bytes of data: Reply from 153.88.112.32: bytes=32 time=37ms TTL=123 Pinging 153.88.112.31 with 32 bytes of data: Reply from 192.168.1.91: Destination host unreachable. Any help would be appreciated.
July 4th, 2012 5:35am

Use network monitor to pinpoint the cause... Place the same question into developer forum. It seems to be well beyound the scope of network forum. Thanks for understanding Milos
Free Windows Admin Tool Kit Click here and download it now
July 4th, 2012 2:15pm

Hi , The Destination Host Unreachable error message indicates that a route to the destination node cannot be found. To resolve this problem, you might need to examine the routing information on the local host to confirm that the local host is correctly configured. Common issues that generate this type of error message is the local host not configured with a default gateway. If the local computer's TCP/IP configuration is correct, you can still receive this message from your gateway. This would indicate that your gateway does not have information in the routing table to successful route the packet to the destination host. In order to get the most qualified pool of respondents, you may redirect to some developer forum for discussion. Thank you for your understanding. Tracy Cai TechNet Community Support
July 5th, 2012 3:03am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics