Windows Prefers Wired Connections

Published 19 April 09 11:11 AM | clinth@microsoft.com 

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.

image

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.

clip_image002

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

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Topics about Microsoft » Windows Prefers Wired Connections said on April 19, 2009 3:17 PM:

PingBack from http://microsoft.linkedz.info/2009/04/19/windows-prefers-wired-connections/

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required

About clinth@microsoft.com

I am originally from Dayton, OH. Worked for the Air Force for 6 years. Joined Microsoft in 1999 and moved to Charlotte, NC. There I was a Support Professional and later worked as a Testing Consultant. After 6 years, my wife, daughter and I moved to Seattle, WA where I took a job as a Microsoft Premier Field Engineering (PFE) supporting BizTalk. Throughout my Microsoft career I've always been very passionate about performance analysis, so I have worked hard to make performance analysis easier for our customers. Oh, and I like PC games like Diablo 2 and Fable, cigars, and a nice Chianti.

Search

This Blog

Syndication

Page view tracker