Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I currently have 2 network cards in my PC -- one connected to an internal network on a router with a disconnected WAN port (10.x.x.x), and one connected to the internet through a consumer router (192.168.0.x).

Windows seems to recognize them correctly (my "Network and Sharing Center" lists them as "No Internet" and "Internet" respectively), however when I try browsing the internet it always tries the internal network's default gateway, rather than the one with internet access. Trying to ping a website results in "Reply from 10.0.0.1: Destination net unreachable.".

A simple "route delete 0.0.0.0 mask 0.0.0.0 10.0.0.1" fixes the problems, but they return upon reboot, or upon renewing my IP.

Is there any way to tell Windows to ignore one NIC's default gateway, or to at least give them priorities?

share|improve this question
add comment

4 Answers

up vote 19 down vote accepted

You can try to force the metric for the 10.0.0.0 adapter to be higher than the 192.168.0.0 adapter. This should push Windows 7 to prefer the 192.168.0.0 adapter when routing to a network that is not directly connected.

  1. Open the Properties of your 10.0.0.0 network adapter.
  2. Open the properties of Internet Protocol Version 4 (TCP/IPv4).
  3. Click on Advanced.
  4. Uncheck Automatic Metric and set the Interface Metric value to a high number, say 2000.
  5. Hit OK until you close the screens.

You can view what metrics are used using the route print and looking at the metric column for the routes listed. Windows 7 uses a more dynamic metric than the previous versions, so you'll want to make sure you set the 10.0.0.0 adapter to a high enough number to prevent it from being lower than your 192.168.0.0 adapter.

share|improve this answer
    
Sounds like I should have poked around a little more. This worked great. Thanks! –  zildjohn01 Dec 2 '09 at 16:50
add comment

Apple's Bonjour service is known to cause the 0.0.0.0 gateway issue. It is installed by iTunes or Adobe Suites.

Here's how to turn it off: http://kb2.adobe.com/cps/400/kb400982.html

This bug has been dogging me since Vista, thanks Apple for your crappy software!

share|improve this answer
add comment

If you can't turn force the internal network's router to stop handing out a default gateway address altogether, then perhaps you could simply have the internal network's router hand out the same gateway address as the other router.

share|improve this answer
add comment

You could use NetProfiles to run a batch script every time your 192.168.0.x connection is activated. Of course, the script being your route delete command:

route delete 0.0.0.0 mask 0.0.0.0 10.0.0.1

other features of NetProfiles:

  • Save your network settings as profiles.
  • Automatically activate wireless profiles when specified wireless connections are detected. (XP only)
  • Change IP Address, Subnet Mask, Default Gateway, Primary and Secondary DNS Servers, WINS
    • Server, and DHCP settings with the click of a button.
  • Specifiy different mapped drives for each profile.
  • Change your default printer based on which profile you're currently using.
  • Automatically change your profile via program shortcuts created with Net Profiles.
  • Change the default homepage for Internet Explorer, Firefox, and Opera.

  • Proxy settings for Internet Explorer, Firefox, and Opera.

  • Run a user-defined list of programs when a profile is activated.
  • Maintain seperate desktop wallper for each profile.
  • Change screen resolutions and color quality when profiles are activated.
  • Can be easily translated into other languages using the enclosed XML language file.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.