Awhile ago someone asked me about how to make their laptop prefer their wired internet connection versus their wireless when both are connected to the internet. The short answer is that Windows (Vista, 7, 2008, and I’m pretty sure XP and 2003 does as well) does this by default. The key here is the network interface metric. When you have more than one default gateway defined (indicated by a network destination of 0.0.0.0), then the internet bound packets go out the interface with the lowest metric. In the case of a tie (same metric), then the internet bound packets will go out the interface listed first.
Below is the routing table of my laptop when it is docked at my home network where I am connected to the internet through my wired docking station and by my wireless access point. My wired IP address is 192.168.1.12 and my wireless IP address is 192.168.1.13. Windows is aware of this condition and automatically prefers my wired connection by giving it a lower metric of 20 versus my wireless connection metric of 25. In this case, this is my Windows 7 (Beta 1) laptop.
You can, of course, permanently alter your metrics by editing your TCP/IP settings on your network adapter’s advanced settings. By default, it is set to Automatic metric allowing Windows to decide which metrics are best. Here is a screenshot.
In conclusion, Windows will automatically prefer your wired connections versus your wireless connections when both are connected to the internet. This is great for us road warriors.
Scott Landry adds:
You should know that Vista made a change to how we handle existing sockets – after plugging in, connections will not be switched over, you must re-establish the connection in order to make use of a wired connection. For example, if you’re downloading something from a website and realize that it would go faster by plugging in, you’d have to cancel and start over after plugging in. This is a change from XP and 2003. Here is a good reference:
The Cable Guy Strong and Weak Host Models http://technet.microsoft.com/en-us/magazine/2007.09.cableguy.aspx