Friday, July 30, 2010

Routing tables

I've been dealing with this problem for a while, and I've only had a few instances where I *thought* it might be the problem with a specific person's internet, but I've never actually SEEN it on any system other than my own.

I work next to people that see this all the time, their solution is to Uninstall the NIC from device manager and get it to re-detect it. This is obviously not the best solution.

I'm not sure where the error comes from but it seems to primarily effect wired interfaces where you will shutdown and restart connected to the same, or a different network. I havn't been able to determine exactly WHY or WHEN it happens, so all of that is theory, but here's what happens.

The routing tables receive an incorrect entry stating that the local area adapter has a default gateway of 0.0.0.0

This entry, while not being assigned by any dhcp, is immune to release/renew attempts made by normal adapter "repair" operations.

Essentially, this entry tells the computer that every possible address on the internet should be sent out onto the local area network. That every possible IP address is local. So your computer, when connecting to Google, (for the purposes of this example, we'll use a common Linksys, NAT, private Class C network with local DNS and DHCP), you would need to go ask your DNS for Google's IP... in this case, your DNS will be an address local to you, such as 192.168.1.1 (most common router IPs), which will respond with something not-local, such as 173.194.32.104 . Your computer then checks it's routing tables and falsely determines that it should be able to connect to Google directly, which it obviously can't do... so it requests a connection and fails (on OSI layer 2) every time.

The easiest solution to the problem is to reboot, uninstall the adapter or similarly clear the routing tables using an indirect method.

The most efficient way is to do a "route delete 0.0.0.0" with added options to tell the route command to delete just the incorrect entry.

MY solution is just to perform a "route delete 0.0.0.0" which will clear ALL default routes, then do an IPCONFIG release and renew.

I don't know where this problem came from but it seems to only affect Windows Vista and Windows 7.

Hopefully that helps some of you folks out there. Happy routing.

No comments:

Post a Comment