With Windows 8.1 and previous operating systems when you want to change the priority of a network card, you could change the Network Bindings using Advanced Settings in Network center.
This interface always exists in Windows 10 but this function was deprecated. Changes in “Connections” are no more applied. You can tell me that on a workstation, we don’t use this feature, and it is true. But I faced an issue with Windows 10, VMware Workstation and OpenVPN client.
When my LAB is up and running (Host-Only network), host connected to internet using OpenVPN Client, sometime the host loses access to internet. After troubleshooting, my host queries the DNS in my LAB and not the DNS of OpenVPN interface, and so the query failed because the DNS server does not have access to internet.
Let’s see how to solve this minor issue.
When OpenVPN Client is connected, a specific network interface is created: TAP Adapter OAS NDIS 6.0:
In fact, Network Bindings is no longer used by any Windows components but DNS Ordering still use it before Windows 10. Yes, that is my problem: When VMware and OpenVPN are used in the same time, Windows 10 uses Route Metric + Interface Metric to determine that VMware interface is a better route, and take its DNS.
Network bindings substitute
To solve this issue, we can increase the Interface Metric of VMware Network interfaces. With a bigger metric, Windows will always set these networks and its DNS, last.
We can get the current metrics for all network interfaces with: Get-NetIPInterface
On my host, OpenVPN interface and VMware interfaces have the same Interface Metric: 20. I set the Metric for VMware to 100 with: Set-NetIPInterface -InterfaceIndex XXX -InterfaceMetric 100
Now, OpenVPN takes precedence over VMware interfaces.
You can get more information about Powershell cmdlet here.