Make Windows 7 ignore WiFi when ethernet is available

118

33

When I dock my Windows 7 laptop, I want it to prefer the wired ethernet connection over WiFi.

This is a pretty straightforward thing to do on my Mac - I just reorder my network preferences, and it "does the right thing." I just can't figure out how to achieve the same thing on my Win7 laptop.

So, when I'm docked, it connects to WiFi, and then fails to connect to servers on the local wired network. How do I fix this?

jkooker

Posted 2011-02-18T19:42:43.050

Reputation: 1 347

You could try this, I use it on my computers. Disables Wifi adapters when any ethernet nic is connected and reenables them when network becomes unavailable, works when multiple wired and wireless nics are present. Good luck.

– sean_m – 2016-04-01T23:02:41.940

With windows I've always used IBM Access connections, which would now be Lenovo Access Connections. But this could only be installed on Lenovo Hardware. Thus try the answer to this question: http://superuser.com/questions/214427/thinkvantage-access-connection-alternative Maybe you could even use the Access Connections Software? http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS107-708&appname=lenovous&language=en

– Darokthar – 2011-02-18T19:53:30.427

This is answered here: enter link description here

– CodeMonkey – 2012-08-22T22:55:28.540

Answers

115

It's on Windows 7, but it's pretty well hidden.

Go to Control Panel -> Network and Sharing Center -> Change adapter settings -> The hit Alt to get the menu and choose Advanced -> Advanced Settings.

Then you can re-order your connections in that list.

Although Windows should already automatically prefer your wired over your wireless connection. It chooses what adapter to use based on the lowest interface metric, and a wirelesss connection should have a higher metric than your wired. Run route print from the command prompt to see that.

shf301

Posted 2011-02-18T19:42:43.050

Reputation: 7 582

Didn't work for me - I had wired at the top and it was still preferring the wifi. Leeroy Jenkins' answer below (check "Connect to a more preferred network if available" in wireless properties) fixed it. – aucuparia – 2015-04-23T09:06:20.497

23This solution didn't work for me. I've ordered my connections: (1) Local Area Connection, (2) Wireless Network Connection. When I connect to the public WiFi network, I can't access internal sites. When I disconnect, I can. It still seems to be preferring WiFi. – jkooker – 2011-02-18T23:59:18.993

Does your wired and wireless connections both have a default gateway set (check via ipconfig)? Multiple, different, default gateways will cause routing issues. If that's the case then you could probably fix you issue by adding a static router via the route command. We'd have to know your IP address setup and the addresses of the server's that you are trying to connect to to help you with that. – shf301 – 2011-02-19T04:30:32.890

it's perfectly legal to have multiple default gateways; it's the norm. only one will be used, but the others are still there in case one of the interfaces disappears (unplugged cable, wireless turned off) – Michael Lowman – 2011-02-19T05:22:26.110

True, the problem is when the different default gateways don't have the access to the same networks, which is jkooker's case. See his comment to your answer. In his case changing default gateways changes which network is accessible. That was the context I was thinking in. – shf301 – 2011-02-19T14:41:51.430

Metrics are definitely the problem. route print shows that the problem occurs when both interfaces have the same metric (20). I've already ordered my connections (per above) - how else can I change these metrics? – jkooker – 2011-02-24T17:19:05.713

3

Use the instructions at the end of this KB article: http://support.microsoft.com/kb/299540/en-us

– shf301 – 2011-02-24T18:54:26.207

Thanks so much for this. What I can't understand is, why is this option so well hidden? (And how did you even find it?) – Kyle Strand – 2013-07-26T14:37:33.190

28

  1. Click Start and, in the search field, type View network connections.
  2. Press the ALT key, click Advanced Options and then click Advanced Settings.
  3. Select the Wireless Connection and move up for top priority.

pulsarjune

Posted 2011-02-18T19:42:43.050

Reputation: 1 242

The "Adapters and Bindings" tab doesn't appear for me, only "Provider Order" – Attila Szeremi – 2016-12-30T18:14:14.280

@AttilaSzeremi I'm not sure why. But are you a local admin on the machine or a member of the Network Configuration operators group – pulsarjune – 2017-01-02T09:32:46.153

yes, it's my own PC at home – Attila Szeremi – 2017-01-02T15:19:07.010

18

Go to Control Panel -> Network and Sharing Center -> Change adapter settings -> Then 'Right Click' on the Wireless network and select Status Then click Wireless Properties and make sure that if you have it set to connect when in range that it is also set to connect to Connect to a more preferred network if available.

leeroy jenkins

Posted 2011-02-18T19:42:43.050

Reputation: 181

1not available on Windows 8 – beluchin – 2014-10-23T11:31:35.797

3At last - in all the posts I've read about this problem (ongoing for years!) this is the first time I've come across this solution - and it works !!!! – wotney – 2014-11-19T15:16:58.450

LAN was already ordered at the top of the connection list, and had the lowest metric, but still wasn't used when wifi was available. Changing this setting finally fixed things for me on Windows 7. – Rintze Zelle – 2017-01-27T15:39:59.463

Actually I solved the problem by simply selecting static ip but not specifying the default gateway on the interface that I don't want to use the internet traffic on. – David Okwii – 2017-11-04T14:52:04.157

13

Two things: first, you can add a metric to each interface to specify that one is better than another. Using the GUI, go to your network connection's properties, TCP/IP, Advanced, uncheck Automatic metric, and fill in the appropriate number. Since the metric represents a cost, Windows will automatically use the interface with a lower metric if it can't decide. This KnowledgeBase article describes the feature you're disabling.

Second, you shouldn't ever have a problem that requires one interface to be used over another. If both interfaces are the same network, then you'll always want the fast one. If they're different networks, then routing tables will automatically send packets out the proper interface to reach the network they belong to.

Perhaps you have two physically separate networks with the same IP block? This is a misconfiguration, and you should fix it.

Michael Lowman

Posted 2011-02-18T19:42:43.050

Reputation: 768

1The problem with metrics I had, was related to the creation of an Hyper-V Virtual Switch attached to a wireless network adapter. In this case, the metrics are incorrectly low for the 'Wireless Virtual Switch' which made Windows always choose it, instead of the 'Ethernet Virtual Switch'. – Pablo Montilla – 2015-03-10T12:54:19.130

This is at work, so the wired network has access to internal sites, and the wireless network doesn't. – jkooker – 2011-02-18T23:15:47.167

1ok, i'll still argue this is a configuration issue, but not one you can solve at the source. so just give your wireless interface a higher metric, and the wired network's default gateway will be used. again, route print helps. I have two interfaces, one with a metric of 20, the other 10. The default gateway (dest 0.0.0.0, mask 0.0.0.0) used will be the one with the lowest metric. – Michael Lowman – 2011-02-19T05:19:39.000

This solution worked for me, it seems. – Peter Jaric – 2012-12-17T09:07:03.090

1This worked for me, but I had to mess around with it a bit. I changed my Wired connection metric to 10 and Wireless connection metric to 20. When I used route print, it showed the Wired as 250-300 and the Wireless to 20-30 each time. To get around this, I just set each to the extreme. Wired = 1, Wireless = 999. I now get the proper order. Thanks! – Lyrical – 2014-02-19T09:39:31.857

2

  1. Go to Control Panel > Network & Internet > Network Connections
  2. Right click on your Wifi Network Adaptor usually titled "Wireless Network Connection"
  3. Select Properties
  4. Click on the "Configure" button
  5. Select Advanced tab
  6. Under "Property" Scroll down to "Disable Upon Wired Connect" and highlight it
  7. On the Right-hand side under "Value", select "Enabled" in the drop down menu
  8. Hit OK
  9. Disable then Enable back Wireless Network Connection.

Kevin

Posted 2011-02-18T19:42:43.050

Reputation: 21

4This isn't available for all adapters. – Logos – 2016-10-17T19:34:54.067

1

If you have a wireless switch on your laptop, you may want to turn that off. Another thing you can look at is whether your ethernet port is operational in the device manager. You can also set this up through your internet options as well.

w7pro

Posted 2011-02-18T19:42:43.050

Reputation: 692

1turning off wifi works, but is a hacky solution. – jkooker – 2011-02-18T23:58:42.567

1

I got it working by setting the metric setting to 10 for wired and 1000 for wifi, all the other suggestions I found didn't work.

Morbia

Posted 2011-02-18T19:42:43.050

Reputation: 111

Confirmed. It works – Junior Usca – 2019-07-15T16:24:06.000

1

Simple way to disable the wireless is windows button+X, turn off wireless. Repeat process to turn it back on.

Kiyotaka

Posted 2011-02-18T19:42:43.050

Reputation: 19

0

My problem was that DHCP was not enabled for my LAN Connection - ran the troubleshooter, it turned it on and all is well now.

AVH

Posted 2011-02-18T19:42:43.050

Reputation: 101

0

i had a similar problem at home when i ran an ethernet wire to my computer after using wireless for a long time. my wifi was set to connect automatically, even though i had an ethernet connection.

my solution:

  • control panel
  • network sharing
  • change adapter settings
  • right click on wireless network, while connected
  • click status
  • wireless properties
  • uncheck "connect automatically when this network is in range"

not exactly the same but someone might find this usefull.

hopethishelps

Posted 2011-02-18T19:42:43.050

Reputation: 1