Howto : Remove Windows Server 2008 / Windows 7 multiple default gateways with the first being 0.0.0.0

Windows has 2 default gateways set and the first is 0.0.0.0 which is causing network failures

You may have installed a new Windows 2008 server or Windows 7 workstation with a static IP address but networing outside your localnet fails. After you investigate you find by running “ipconfig” that there is 2 default routes listed. You see first 0.0.0.0 and then you see your real default router IP address below the 0.0.0.0 address.

This is preventing you from accessing the Internet as it believes the first route to the internet is your local IP address and it goes nowhere. You need to get the first route out but if you use “route delete” on the next reboot it will right back and you will be left without Internet access so what do you do?

You need to edit the registery and remove the entry listed in the default route key. To do this go to:

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\your interface #\DefaultGateway

You will most likely find if you edit this key 2 IP addresses listed and the one you want being listed as the second IP in the list. Just remove all IP addresses but the real gateway address.

Close and reboot then try to ping out and it should now work.

Enjoy.

Cubert

Repair and Reset TCP/IP Winsock Catalog Corruption in Windows Vista or Windows 7

Winsock 2 accommodates layered protocols. A layered protocol is one that implements only higher level communications functions, while relying on an underlying transport stack for the actual exchange of data with a remote endpoint. LSP  aka Layered Service Provider can be a security layer that adds protocol to the connection establishment process. An example of an LSP is the Microsoft Firewall Client Service Provider installed as part of the Internet Secutity and Authentication Server (ISA) on clients. The Microsoft Firewall Client Service Provider installs over the Winsock base providers for TCP and UDP.

To check which LSPs installed on your Windows Vista or Windows 7, use netsh winsock show catalog command.

Sometimes the winsock settings in Windows may get corrupted, causing errors and problems with Internet connectivity. When Winsock corrupts, the networking errors that you may face include unable to access network services, web pages, Windows update services or other odd network behaviors.

Now to reset Winsock we can use a similar cmd “netsh winsock reset”. 
What netsh winsock reset command does is it resets Winsock Catalog to a clean state or default configuration. It will remove anyWinsock LSP (Layered Service Providers) previously installed, including any potentially malfunctioning LSP that may cause the loss of network packets or transmission failures. So any previously installed LSPmust be reinstalled. This command does not affect Winsock Name Space Providers.

To repair and reset the Windows Vista or Windows 7

  1. Click on Start button.
  2. Type Cmd in the Start Search text box.
  3. Press Ctrl-Shift-Enter keyboard shortcut to run Command Prompt as Administrator. Allow elevation request.
  4. Type netsh winsock reset in the Command Prompt shell, and then press the Enter key.
  5. Restart the computer.

Good luck,

Cubert