Author Topic: fix 0.0.0.0 default gateway  (Read 22972 times)

0 Members and 1 Guest are viewing this topic.

Offline captainmorgan85

  • Newbie
  • *
  • Join Date: May 2014
  • Posts: 4
  • Karma: 1
    • View Profile
fix 0.0.0.0 default gateway
« on: May 07, 2014, 01:22:43 PM »
I've seen on a few computers (all have been Windows 7 so far) where out of no where there will be 2 default gateways: 0.0.0.0, and the real one that applies to their particular net connection.  Having that 0.0.0.0 gateway on there prevents access to any resource not in the current LAN.  It's pretty easy to fix:

route delete 0.0.0.0
ipconfig /release *
ipconfig /renew *

I don't how the last step would change if they have a static address, or this problem can even happen if they are on static.

I just thought it might make a nice addition to Windows Repair AIO.

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: fix 0.0.0.0 default gateway
« Reply #1 on: May 07, 2014, 01:28:59 PM »
Looks like having 0.0.0.0 is normal, its something odd that Windows does. Here I people who lost their internet when they did that

http://superuser.com/questions/471702/i-used-route-delete-0-0-0-0-in-windows-7-and-now-i-cant-connect-to-my-adsl-inte

And when you do the IPconfig it would make the connection work again because it gets created.

Windows must use 0.0.0.0 like it does 127.0.0.1 on somethings, I need to check if the gateway 0.0.0.0 is part of the 127.0.0.1 setup. Not sure lol :wink:

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline captainmorgan85

  • Newbie
  • *
  • Join Date: May 2014
  • Posts: 4
  • Karma: 1
    • View Profile
Re: fix 0.0.0.0 default gateway
« Reply #2 on: May 08, 2014, 07:21:04 AM »
0.0.0.0 listed as a gateway is definitely not right or normal.

When you do ipconfig, you should see something like this:

Connection-specific DNS Suffix  . : alltech.local
IP Address. . . . . . . . . . . . : 192.168.1.181
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

When this problem is happening, you'll see instead:

IP Address. . . . . . . . . . . . : 192.168.1.181
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 0.0.0.0,
                                                   192.168.1.1

So that 0.0.0.0 gets set as your default gateway and your real gateway address gets set as a secondary gateway.  Your internet connection can NEVER work this way, as all WAN IP's will try to route through that 0.0.0.0 gateway, which is invalid.  My fix removes the 0.0.0.0 as a gateway, and then renew's the IP address so that your real gateway gets set as the default one.

When this bug happens, simply renewing the IP or even rebooting won't fix it.  The 0.0.0.0 gateway gets saved and reloaded on reboot.  By manually deleting it using the route command, it won't come back.

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: fix 0.0.0.0 default gateway
« Reply #3 on: May 08, 2014, 04:56:02 PM »
You are correct, I never see 0.0.0.0 when I do a ipconfig.

And I think it would be good to remove it, but reading how others have had it cause problems by removing it makes me want to research it more. Any repair I add has to be able to run on any machine, that is the hardest part, so many variables! :wink:

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com

Offline captainmorgan85

  • Newbie
  • *
  • Join Date: May 2014
  • Posts: 4
  • Karma: 1
    • View Profile
Re: fix 0.0.0.0 default gateway
« Reply #4 on: May 09, 2014, 05:42:05 AM »
I certainly understand that!  I know you don't want to add to the damage.

Thanks!

Offline Shane

  • Top Geek, err uh Dog.
  • Administrator
  • Hero Member
  • *****
  • Join Date: Sep 2011
  • Posts: 9280
  • Location: USA
  • Karma: 138
  • "Knowledge should be shared not hidden."
    • View Profile
    • Tweaking.com
Re: fix 0.0.0.0 default gateway
« Reply #5 on: May 09, 2014, 03:24:02 PM »
Always feel welcome to post recommendations to me.

I am just one person, and while I run my own computer repair business, which is why I know so many fixes.

I dont know them all, so info from other users is always a plus!

Shane
PLEASE EDIT YOUR TOPIC AND PUT (SOLVED) IF YOU ARE ALL FIXED.

(My weekends belong to my wife and kids, I will try my best to answer all posts daily during the work week)

(About Shane)
Site Owner, Top Admin, Lead Programmer, Wife & 5 kids, Needs a lot more coffee.

When people ask "Why fix what isn't broken?" I reply "To make it better."
"Only a life lived for others is a life worthwhile"
Honor & Respect is all that matters.

Owner & Programmer of: www.pcwintech.com & www.tweaking.com