title: Setting network adapter metric priority in Windows 7
body: <p>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.</p>
  
  <p>Another weird thing is when I look at <em>Control Panel\Network and Internet\Network Connections</em>, 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".</p>
  
  <blockquote>
    <p>Note: Sorry I can't show screen captures because I'm one reputation point away from being able to show images.</p>
  </blockquote>
  
  <p>I followed the steps in the articles <a href="http://www.howtogeek.com/howto/27994/how-to-change-the-priority-of-wiredwireless-network-cards-in-windows/" rel="noreferrer">How to Change the Priority of Wired/Wireless Network Cards in Windows</a> and <a href="https://support.microsoft.com/kb/299540" rel="noreferrer">An explanation of the Automatic Metric feature for Internet Protocol routes</a></p>
  
  <p>Here are my current metrics (network adapter priority):</p>
  
  <pre><code>C:\Users\Michael&gt; 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
  ===========================================================================
  </code></pre>
  
  <p>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):</p>
  
  <ul>
  <li>10: TAP-Win32 Adapter OAS</li>
  <li>12: Realtek PCIe GBE Family Controller</li>
  <li>14: Broadcom 43224AG 802.11a/b/g/draft-n Wi-Fi Adapter</li>
  <li>16: Bluetooth Device (Personal Area Network)</li>
  </ul>
  
  <p>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.</p>
  
  <p>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.  </p>
  
  <p>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.  </p>