Monday, July 14, 2008

Default Gateway of in Vista

Strange one just occurred - woke up my machine from sleep, and plugged in the various cables in no particular order.  Everything looked good, except no network access.  Could ping the local network (including the gateway), but nothing outside of that.  Everyone else on the same subnet was seeing external IPs just fine. 

A quick investigation with IPConfig showed that I had two default gateways, once with the correct address but another with an address of  And it was the one that was first in the list.

No idea where it came from - Vista does use that address if you are using dial-up networking, but I wasn't (although my mobile was plugged in through USB to charge it, so perhaps it is related in someway).  Anyhow - that was clearly the problem, so it was just a case of getting rid of the rogue gateway address.

Tried "ipconfig /renew".  Tried "ipconfig /release" then "ipconfig /renew".  Tried unplugging network cables, mobile phones etc.  No luck.  Reboot was looking likely.  Last attempt was to use netsh.  Success :)

For those of you who may get stuck in a similar situation, here's the netsh rune that you need to cast:

netsh interface ipv4 delete address "Local Area Connection"
addr=a.b.c.d gateway=

where a.b.c.d is your local IP address.  netsh can do just about anything to your local network config - well worth some exploration if you're *really* bored.