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?
Best Answer
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.
Internet Protocol Version 4 (TCP/IPv4)
.Advanced
.Automatic Metric
and set theInterface Metric
value to a high number, say 2000.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.