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.

Like most laptops, it has both both ethernet and wireless networking options. Likewise, I have a wireless router with 10/100/1000 Mbs. 90% of the time, wireless speeds suffice. But once in a while, I have several gigs of data that needs transfering. In those times, I would physically walk over the router and plug in directly. The problem is that until I disable the wirelless network adapter, Windows still uses the wireless connection as opposed the ethernet connection. Is there a way to configure Windows to give preference to one network adapter once it becomes availabe instead of disabling the other altogether?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

You have to change the priority of the network adapters.

To do this, open the Network and Sharing Center and click on Change adapter settings in the left pane. you should see a list of network adapters. Press the Alt button (if the menu bar is not already visible) and click on the Advanced menu, and then choose Advanced settings.

A new control panel will pop up, and you should see it open to the Adapters and Bindings tab. In the top list should be a list of your network adapters, with an up and down arrow button to the right. This is the priority order of what adapter it will use when connecting to the Internet. Choose your Ethernet adapter and click the up arrow button until it shows at the top. Then click OK.

That should cause it to prioritize your wired connection over WiFi whenever it is connected.

share|improve this answer
    
Two words: freakin' awesome! –  hydroparadise Jul 31 '12 at 19:42

(I know there is already accepted answer, but)...

First, from XP onwards, Windows has a feature called automatic metric. This feature should automatically prioritize traffic on adapter with highest throughput. When you enable 'better' NIC (eg. by plugging in cable) Windows should automatically route traffic via that interface. Obviously yours incorrectly thinks WiFi is faster (which seems to be reported for some of WiFi cards)

What is a metric anyway and how it's used by network software? Well,a metric is used in routing when there are multiple paths to a destination and a decision needs to be made which one is the best. The lower, the better. Imagine you're at exit gates in a stadium. There are several gates and each will eventually allow you to get out - you need to select which one is the best, eg. by looking at how many people queue at each. Windows does the same, but bases it's decision on link speed.

Your gate to 'outside' is called default route. Let's look at output from route print command, which shows you ip routing table:

> (output ommited) 
Network Destination        Netmask          Gateway     Interface        Metric
>           0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.12       25
>           0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.22       10  
(output ommited)

Those entries with 0.0.0.0 are default routes (sometimes also called quad 0 routes). Obviously I have two (with both cable and WiFi active), which one will be selected? The one with lower metric. In my case - 0.22 which happens to be my cable connection.

Now important thing - changing adapter priority via adapter setting does not change metric. This means it will not change routing decisions!

To actually change metric you need to to to open each adapter properties, then TCP/IP properties, Advanced, uncheck automatic metric and enter your own value. Adapter with lowest metric wins.

You can quickly check which interface is actually used - open Task Manager - Network, start download/upload and look at interface usage. If you need more detail - use Perfmon.

share|improve this answer

Easier and faster, you can just delete the entire 0.0.0.0 route.

route delete 0.0.0.0

And adding back only the preferable route to the internet.

route add 0.0.0.0 mask 0.0.0.0 192.168.43.1 METRIC 1

Also ensure that legitimate traffic meant for the second route is added to the routing table so that all traffic meant for that route is not routed through the default route.

route add 10.1.0.0 mask 255.255.0.0 10.1.18.41 METRIC 1
share|improve this answer

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.