- Configure the Order of Network Interfaces
- How to change the network connection priority in Windows 7
- Summary
- Steps to change the network connection priority in Windows 7
- Steps to change wireless network connection priority in Windows 7
- Network interfaces
- Overview
- Network interface identifiers and properties
- Visibility to developers
- Related topics
- How to change the priority order of network adapters on Windows 10
- How to change network adapter priorities using Control Panel
- How to change network adapter priorities using PowerShell
- More Windows 10 resources
- The Dell XPS 15 is our choice for best 15-inch laptop
- Halo: MCC’s live service elements make it better, not worse
- Microsoft’s Surface Duo is not ‘failing up’
- These are the best PC sticks when you’re on the move
Configure the Order of Network Interfaces
Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016
In Windows Server 2016 and Windows 10, you can use the interface metric to configure the order of network interfaces.
This is different than in previous versions of Windows and Windows Server, which allowed you to configure the binding order of network adapters by using either the user interface or the commands INetCfgComponentBindings::MoveBefore and INetCfgComponentBindings::MoveAfter. These two methods for ordering network interfaces are not available in Windows Server 2016 and Windows 10.
Instead, you can use the new method for setting the enumerated order of network adapters by configuring the interface metric of each adapter. You can configure the interface metric by using the Set-NetIPInterface Windows PowerShell command.
When network traffic routes are chosen and you have configured the InterfaceMetric parameter of the Set-NetIPInterface command, the overall metric that is used to determine the interface preference is the sum of the route metric and the interface metric. Typically, the interface metric gives preference to a particular interface, such as using wired if both wired and wireless are available.
The following Windows PowerShell command example shows use of this parameter.
The order in which adapters appear in a list is determined by the IPv4 or IPv6 interface metric. For more information, see GetAdaptersAddresses function.
For links to all topics in this guide, see Network Subsystem Performance Tuning.
How to change the network connection priority in Windows 7
This is a step-by-step article.
Summary
This article briefly explains how to change the priority of network connections in Windows 7 so that they follow a specific connection order.
Steps to change the network connection priority in Windows 7
Click Start , and in the search field, type View network connections.
Press the ALT key, click Advanced Options and then click Advanced Settings.
Select Local Area Connection and click the green arrows to give priority to the desired connection.
After organizing the network connections available according to your preferences, click OK.
The computer will now follow an order of priority when detecting available connections.
Steps to change wireless network connection priority in Windows 7
The computer can detect more than one wireless network at a time. This article explains how to prioritize the wireless network you want to connect to first.
Click Start, and in the search field, type Network and Sharing Center.
In Network and Sharing Center, click Manage wireless networks.
Click the connection to be given priority (e.g. Connection 2 has less priority than Connection 1), and then click Move up.
The next time it is detecting the networks, the computer will give more priority to Connection 2 than to Connection 1.
Your opinion is important to us: Send your opinion on these articles using the comments field at the bottom. You’ll be helping us to improve the content. Thank you very much!
Network interfaces
This topic describes high-level network interface concepts on Windows, including the ways they can be identified in code and their properties.
This topic is intended for a developer audience, both for Windows desktop networking apps and kernel mode networking drivers. Nevertheless, some of the information presented here can also be useful for system administrators managing network interfaces through PowerShell cmdlets.
Overview
A network interface is the point where two pieces of network equipment or protocol layers connect. Typically, this is represented by a physical Network Interface Card (NIC) for connection between a computer and a private or public network. However, it can also take the form of a software-only component such as the loopback interface ( 127.0.0.1 for IPv4 or ::1 for IPv6).
Network interfaces are defined by the Internet Engineering Task Force (IETF) in RFC 2863 and are not meant to be defined by Windows. For detailed questions about the meaning of network interface identifiers such as ifIndex, see the IETF’s definitions of them. The rest of this topic discusses Windows-specific implementation details.
Network interface identifiers and properties
On Windows, a network interface can be identified in different ways. Some of these identifiers are used to distinguish network interfaces from each other, but not all identifiers are equally suited to that task because of their differing properties. Generally, network interfaces are identified by a network address to external components. For example, this may be a node ID and a port number, or simply a unique node ID.
In code, a network interface can be identified in many ways. The following table details the ways a network interface can be identified along with associated properties. We recommend using the interface GUID (ifGuid) for programming unless a specific API requires a different network interface identifier.
In the following table, bolded cells represent a property that is desirable for networking programmers.
Identifier | Size | Is unique on the system | Is unique in the world | Is predictable | Will be recycled if the NIC is removed | Persists across reboots | End users can modify at any time | Drivers can modify at any time | General familiarity with end users | Is always present |
---|---|---|---|---|---|---|---|---|---|---|
ifIndex | 4 bytes | Yes | No | No | Yes | No 1 | No | No | Some 2 | Yes |
NetLuid | 8 bytes | Yes | No | No | Yes | Yes | No | No | No | Yes |
ifGuid | 16 bytes | Yes | Usually 3 | No | No | Yes | No | No | No | Yes |
ifAlias | 514 bytes | Yes for NICs 4 | No | Sometimes 5 | Yes | Yes | Yes | No | Yes | Usually 4 |
ifDescr | 514 bytes | Usually 6 | No | No | Yes | Yes | No | Yes | Yes | Usually |
ifPhysAddress (MAC ADDRESS) | 0 to 32 bytes | Usually, for NICs | Usually, for NICs | Yes | Tied to hardware | Yes | No | No | Yes | Usually 7 |
PnP instance ID | Up to 400 bytes | Yes | No | No | Yes | Yes | No | No | No | Usually, for NICs 8 |
PnP location (PCI slot number) | Up to 400 bytes | Yes | No | Yes | Yes | Yes | No | No | Sometimes | Sometimes 8,9 |
Notes for the preceding table:
- IfIndexes are not guaranteed to be stable across reboots, even though they often receive the same value as the previous boot. Therefore, it is not recommended that drivers use ifIndex except where required by an API.
- Some netsh commands take ifIndex , or index , as an input. Therefore, some administrative users are familiar with the ifIndex property if they use the netsh command frequently.
- If a machine is cloned or imaged, then some of the GUIDs might be the same. Also, certain special network interfaces such as the built-in Teredo interface might have the same GUID on all machines.
- NetCfg enforces that an ifAlias is a non-empty string and is unique among all NICs. However, the NDIS interface provider does not. Thererfore, it is possible to find special network interfaces with duplicate or empty names. This is most commonly seen with LBFO teams.
- Only if the firmware supports Consistent Device Naming. Typcically, servers have this feature.
- NetCfg assigns unique ifDescrs to all network interfaces. However, drivers can call an API to change the ifDescr to anything, including something that is not unique. Some 3rd party software packages do this.
- Not all media types have a «MAC address.» For example, some tunnels do not have this concept and simply advertise a zero-length byte array as their network address.
- Only present on network interfaces that are backed by a PnP device. For example, loopback interfaces, light weight filter interfaces, interfaces provided by an NDIS interface provider, and certain special built-in NICs don’t have PnP devices backing them.
- Only some PnP buses support a PnP location ID. The built-in PCI and USB buses do, while root-enumerated devices do not.
Visibility to developers
In the preceding table, all properties except for the Plug and Play (PnP) properties are visible to user mode desktop apps and kernel mode drivers via a shared header (Netioapi.h). The PnP properties are visible via the Devpkey.h header and are used by both user mode desktop apps and kernel mode drivers. For example, see the DEVPKEY documentation.
The IP Helper API is also available for both user mode desktop apps and kernel mode drivers.
The UWP API surface only exposes the ifGuid property directly. However, it is possible for a UWP app developers to import the GetIfTable2 function using P/Invoke if they are required to access other network interface properties.
Related topics
For management information base (MIB) definitions for network interfaces, see RFC 2863.
For NDIS network interfaces in network drivers, see NDIS Network Interfaces.
For Netioapi.h API reference, see netioapi.h header.
How to change the priority order of network adapters on Windows 10
On Windows 10, if you have a device with more than one network adapter (such as Ethernet and Wi-Fi), each interface receives a priority value automatically based on its network metric, which defines the primary connection that your device will use to send and receive networking traffic.
Although, for the most part, Windows 10 does a pretty good job selecting an optimal connection to access the network, sometimes you may need to configure the order of the network adapters manually. For example, if you want to use a Wi-Fi over an Ethernet interface when both adapters are connected to the network.
You could disable those adapters you don’t use, but it may not be the best solution as you may need them as backups. Instead, a more straightforward solution is to adjust the interface metric to specify in which order your device should use each network adapter, which you can do using Control Panel and PowerShell.
In this Windows 10 guide, we’ll walk you through the steps to change the network adapter priorities to stay connected using your prefered adapter when using multiple interfaces.
How to change network adapter priorities using Control Panel
If you want to change the order in which Windows 10 uses network adapters, do the following:
- Open Settings.
- Click on Network & Internet.
- Click on Status.
Click the Change Adapter options item.
Right-click the network adapter you want to prioritize, and select Properties.
Click the Properties button.
In the «General» tab, click the Advanced button.
In the «Interface metric» field assign a priority value for the adapter.
Quick Tip: The lower the metric number means higher priority, and a higher number indicates lower priority.
Once you’ve completed the steps, Windows 10 will prioritize the network traffic depending on your configuration.
The only caveat using the Control Panel experience is that depending on your network setup, you may need to adjust the metric for the Internet Protocol Version 6 (TCP/IPv6) as well, if that’s the protocol you’re using. (Usually, you will be using the TCP/IPv4 protocol.)
At any time, you can revert the changes using the same instructions, but on step No. 9, make sure to check the Automatic metric option.
How to change network adapter priorities using PowerShell
Alternatively, you can change network adapters priorities on a device with multiple interfaces using PowerShell with these steps:
- Open Start.
- Search for Windows PowerShell, right-click the top result a select Run as administrator.
Type the following command to identify the current interface metric and interface index number and press Enter:
Type the following command to change the priority order of the network adapter and press Enter:
Set-NetIPInterface -InterfaceIndex 21 -InterfaceMetric 10
In the command, make sure to change the -InterfaceIndex value to reflect the network adapter you want to prioritize and change the -InterfaceMetric value to assign a priority. Also, remember that a lower metric number means higher priority, and a higher metric number means lower priority.
Type the following command to see the new metric applied to the network adapter and press Enter:
After completing the steps, Windows 10 will prioritize the network traffic depending on your configuration when multiple network adapters are connected to the network.
At any time, you can go back to the previous behavior allowing Windows 10 to decide the network adapter priority using these steps:
- Open Start.
- Search for Windows PowerShell, right-click the top result a select Run as administrator.
Type the following command to identify the current interface metric and interface index number and press Enter:
Set-NetIPInterface -InterfaceIndex 21 -AutomaticMetric enabled
In the command, make sure to change the -InterfaceIndex value with the correct number of the network adapter you want to apply an automatic metric.
More Windows 10 resources
For more helpful articles, coverage, and answers to common questions about Windows 10, visit the following resources:
The Dell XPS 15 is our choice for best 15-inch laptop
For a lot of people, a 15-inch laptop is a perfect size that offers enough screen for multitasking, and in a lot of cases, some extra performance from powerful hardware. We’ve rounded up the best of the best at this size.
Halo: MCC’s live service elements make it better, not worse
Halo: The Master Chief Collection is more popular than ever, but some fans don’t agree with the live service approach 343 Industries has taken with it. Here’s why those elements are, at the end of the day, great for the game and for Halo overall.
Microsoft’s Surface Duo is not ‘failing up’
Microsoft announced this week that it was expanding Surface Duo availability to nine new commercial markets. While Surface Duo is undoubtedly a work in progress, this is not a sign of a disaster. It’s also doesn’t mean that Surface Duo is selling a ton either. Instead, the reason for the expansion is a lot more straightforward.
These are the best PC sticks when you’re on the move
Instant computer — just add a screen. That’s the general idea behind the ultra-portable PC, but it can be hard to know which one you want. Relax, we have you covered!