22

I'm having an issue on Windows 7 - if I have my Ethernet cable plugged in, Windows will default to using my WiFi network adapter. I would prefer that Windows default to my Ethernet connection. In order to resolve this, I have to manually disconnect the WiFi adapter in Control Panel's "Networking and Sharing Center", and then it will recognize my Ethernet connection.

Another weird thing is when I look at Control Panel\Network and Internet\Network Connections, my "TAP-Win32 Adapter OAS" is always disconnected. My Ethernet adapter is only noticed when I have it plugged in; and only then it shows up as a new adapter called "Realtek PCIe GBE Family Controller".

Note: Sorry I can't show screen captures because I'm one reputation point away from being able to show images.

I followed the steps in the articles How to Change the Priority of Wired/Wireless Network Cards in Windows and An explanation of the Automatic Metric feature for Internet Protocol routes

Here are my current metrics (network adapter priority):

C:\Users\Michael> netstat -rn    
===========================================================================
Interface List
10...1c c1 de 98 1b 88 ......Realtek PCIe GBE Family Controller
16...00 ff fa d7 9e 94 ......TAP-Win32 Adapter OAS
13...00 26 82 c8 41 a7 ......Broadcom 43224AG 802.11a/b/g/draft-n Wi-Fi Adapter
12...70 f3 95 79 4f ec ......Bluetooth Device (Personal Area Network)
24...00 50 56 c0 00 08 ......VMware Virtual Ethernet Adapter for VMnet8
 1...........................Software Loopback Interface 1
18...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
21...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2
22...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3
14...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
17...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4
20...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination  Netmask           Gateway     Interface     Metric
0.0.0.0              0.0.0.0           192.168.1.1 192.168.1.103     28
0.0.0.0              0.0.0.0           192.168.1.1 192.168.1.101     24
127.0.0.0            255.0.0.0         On-link         127.0.0.1    306
127.0.0.1            255.255.255.255   On-link         127.0.0.1    306
127.255.255.255      255.255.255.255   On-link         127.0.0.1    306
192.168.1.0          255.255.255.0     On-link     192.168.1.103    270
192.168.1.0          255.255.255.0     On-link     192.168.1.101    268
192.168.1.101        255.255.255.255   On-link     192.168.1.101    268
192.168.1.103        255.255.255.255   On-link     192.168.1.103    270
192.168.1.255        255.255.255.255   On-link     192.168.1.103    270
192.168.1.255        255.255.255.255   On-link     192.168.1.101    268
192.168.116.0        255.255.255.0     On-link     192.168.116.1    276
192.168.116.1        255.255.255.255   On-link     192.168.116.1    276
192.168.116.255      255.255.255.255   On-link     192.168.116.1    276
224.0.0.0            240.0.0.0         On-link         127.0.0.1    306
224.0.0.0            240.0.0.0         On-link     192.168.1.101    268
224.0.0.0            240.0.0.0         On-link     192.168.116.1    276
224.0.0.0            240.0.0.0         On-link     192.168.1.103    270
255.255.255.255      255.255.255.255   On-link         127.0.0.1    306
255.255.255.255      255.255.255.255   On-link     192.168.1.101    268
255.255.255.255      255.255.255.255   On-link     192.168.116.1    276
255.255.255.255      255.255.255.255   On-link     192.168.1.103    270
===========================================================================

Although the "Realtek PCIe GBE Family Controller" has the higher priority metric, Windows still uses the WiFi connection by default. So to be explicit, I followed the instructions from the article; I unchecked the "automatic metric" assignment, and set it manually; only for the following adapters (on TCP/IPv4):

  • 10: TAP-Win32 Adapter OAS
  • 12: Realtek PCIe GBE Family Controller
  • 14: Broadcom 43224AG 802.11a/b/g/draft-n Wi-Fi Adapter
  • 16: Bluetooth Device (Personal Area Network)

I then rebooted, and unfortunately, these settings were not picked up. Running the "netstat -rn" displays the same interface list priority as shown above, and again Windows used the WiFi adapter by default.

If anyone has run into the same issues and resolved them, please let me know. The fact that Windows 7 does not prioritize an Ethernet connection over a WiFi connection baffles me, and its annoying to have to finagle around with it every time I boot up.

If you also understand the behavior for the two adapters "Realtek PCIe GBE Family Controller" and "TAP-Win32 Adapter OAS", that would be helpful as well.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Michael
  • 415
  • 2
  • 5
  • 7
  • For the 46k visitors to this page, A stopgap solution is to **simply enable airplane mode**. That will instantly cut off all Wifi leaving you only with the Ethernet cable connection. – Pacerier Oct 09 '15 at 06:51

2 Answers2

30

Windows has two different settings in which priority is established. There is the metric value which you have already set in the adapter settings, and then there is the connection priority in the network connections settings.

To change the priority of the connections:

  • Open your Adapter Settings (Control Panel\Network and Internet\Network Connections)
  • Click Alt to pull up the menu bar
  • Select Advanced -> Advanced Settings
  • Change the order of the connections so that the connection you want to have priority is top on the list
JeremyK
  • 1,075
  • 1
  • 22
  • 45
  • 1
    @BrianKnoblauch It depends on what is trying to access the network. It is has been like 5 years since I worked on what I needed that exact change so I can't recall why. It may have been a windows service or something but we certainly had to change both for consistent access across the correct two networs – JeremyK Nov 14 '15 at 03:00
  • 1
    In win10, there is no tab 'connections' for me. Any advice? :) – lucidbrot May 26 '17 at 11:33
  • 1
    @lucidbrot I did a quick search and it seems microsoft removed the ability to sort multiple adapters of same type. They only let you sort by providers now. I think they expect the metric's to work properly now. Not sure though, sorry I don't have more help for you – JeremyK May 29 '17 at 19:16
  • I have now set up (but not thorougly tested) an alias command `route delete 0.0.0.0 if 23` because an interface can only have one route, followed by `route add 0.0.0.0 mask 0.0.0.0 10.8.0.5 metric 1 if 23` to route all traffic to the internet via the ip 10.8.0.5 which is in my case my VPN but could also just be a switch/router connected via ethernet I guess. Whenever my traffic should go through my VPN, I just run this command. (Not sure why openVPN didn't do that by itself but this worked the last time I checked) still thanks for your answer – lucidbrot May 29 '17 at 20:22
3

I had the same problem on Windows 7 64-bit Pro. I adjusted network adapters binding using Control panel but nothing changed. Also metrics where showing that Win should use Ethernet adapter as primary, but it didn't.

Then a tried to uninstall Ethernet adapter driver and then install it again (without restart) and then I checked metrics for sure.

After this, Windows started prioritize Ethernet adapter.

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
Matus
  • 31
  • 1