Set Internet Connection priority – Multiple Network Adapters

What is “Automatic metric” and how Windows utilizes it to set the Internet connection priority route in Multiple Network Adapter environment

When you have several network adapters in Windows 10, the Operating System uses “Automatic metric” to set the priority of the adapters. Automatic metric is described by Microsoft as “a value that is assigned to an IP route for a particular network interface that identifies the cost that is associated with using that route and can be valued in terms of link speed, hop count, or time delay”. Only one adapter is used for internet connection and it is the adapter with the highest priority (usually it is Ethernet adapter). You can disable the “Automatic metric” and set the priority manually (like using WiFi network card instead of Ethernet). We’ll cover 2 methods.

Affiliate: Experience limitless no-code automation, streamline your workflows, and effortlessly transfer data between apps with Make.com.

First method – Set Internet Connection Priority from Control Panel

 . Goto Control Panel\All Control Panel Items => Network and Sharing Center => "Change adapter settings" on the left pane.
. RightClick the adapter => [Properties] => Select "Internet Protocol Version 4 (TCP/IPv4)" => [Properties] => [Advanced]
. On the bottom of the "Advanced TCP/IP Settings" window you will see:
[V] Automatic metric
. Remove the selection from checkbox and write a numeric value in "Interface metric:" texbox.

The lowest number (1) is the highest priority. The highest number is the lowest priority (if you have 10 network adapters, number “10” will be the lowest priority).

 . [OK] => [OK] => [OK]

If you’re using “Internet Protocol Version 6 (TCP/IPv6)”, then you will need to do the same.
If you want to revert the changes, then select the checkbox of [V] Automatic metric again.

Second method – Set the Priority with Powershell

. Open “Windows PowerShell” as Administrator (without it you won’t be able to set the priority).
. Execute:

Get-NetIPInterface

The result:

 ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp    ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
11 Ethernet IPv6 1500 25 Enabled Connected ActiveStore
1 Wi-FI IPv6 4294967295 75 Enabled Connected ActiveStore
11 Ethernet IPv4 1500 25 Enabled Connected ActiveStore
1 Wi-FI IPv4 4294967295 75 Enabled Connected ActiveStore

As you can see each interface has 2 instances: IPv4 and IPv6. Both of them are of the same “ifindex” property. So changing a value of “InterfaceMetric” property for specific index will change it for both instances of IPv4 and IPv6 at the same time.
In most cases “Ethernet” will be of higher priority. Therefore if you want to use Wi-Fi as primary Internet source – you need to change its “InterfaceMetric” property to higher value.

. To change the priority for Wi-Fi (ifindex of 1) execute in Powershell:

Set-NetIPInterface -InterfaceIndex 1 -InterfaceMetric 1

. Also to change the priority for Ethernet to lower (ifindex of 11) execute in Powershell:

Set-NetIPInterface -InterfaceIndex 11 -InterfaceMetric 2

. So running the check cmdlet again of:

Get-NetIPInterface

Will give you result of:

 ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp    ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
11 Ethernet IPv6 1500 2 Enabled Connected ActiveStore
1 Wi-FI IPv6 4294967295 1 Enabled Connected ActiveStore
11 Ethernet IPv4 1500 2 Enabled Connected ActiveStore
1 Wi-FI IPv4 4294967295 1 Enabled Connected ActiveStore

If you want to return the “InterfaceMetric” for any of the interfaces to Automatic, execute:

Set-NetIPInterface -InterfaceIndex 11 -AutomaticMetric enabled

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.