Windows – Tell the system which network connection to use for internet access

networkingwindows 7wireless-networking

I have two (three) network connections. LAN, Wireless WiFi, and Built in WiFi. Built in is off in this case.

I want to be able to tell my computer to always use the Wireless Wifi for internet (no firewall) and use the LAN for secondary Networking (work LAN).

I set the Metric on the LAN to 9999 and the Metric on the Wifi to 1 and this works most of the time, but I still get contention issues.

Is there anything else I can do to insure internet traffic goes through the Wifi first?

Windows 7 BTW

EDIT: What I'm doing is connecting to the LAN and Remoting into my machine. Then with that intact, I do a ROUTE DELETE 0.0.0.0 to remove the default route. Then I attach my Sprint card which connects and adds its own default route. Working like a charm!

Best Answer

The way to do that would be to change your routing table so that only the WiFi connection has a route to the Internet. What that practically means is that you should remove the default route from your LAN connection. This will make the TCP/IP stack not see anyway to get to an outside network using your LAN connection.

I'll assume why what your doing is failing sometimes is that at some point the WiFi connection disconnects momentarily and Windows switches to the default route on the LAN connection.

If you can't disable the default route, you can try to find a proxy server that you can run locally that will let you determine which interface it uses.

Here is some information on having multiple default routes (gateways) on Windows. It hasn't been updated in a while so it may or may not be out of date.

Related Question