I asked this question in the Microsoft Community forum and they suggested I repost it here.
We manufacture a product that has an Ethernet interface with built in DHCP and DNS servers. When connected to a Windows 10 PC, it starts blasting the device with DNS requests. If the PC is connected to the Internet via WiFi, all internet communications fail because the device does not have internet access. I understand this is due to the default interface metrics settings. Wired Ethernet gets a metric setting of 25 and WiFi of 50. When I manually set the interface metrics of the Ethernet interface to 9999, all works well.
To prevent our customers from have to manually set the interface metrics, I configured the device DHCP server to send the Microsoft vendor-specific option to set the metric to 9999:
Vendor Class "MSFT 5.0"
Vendor code 3, length 4, value 9999
I can see the vendor fields being received in the DHCPACK packet using Wireshark. But the setting is not being honored. I check this by running this Powershell command I found on the web:
Get-NetIPInterface | Select-Object -Property InterfaceAlias, InterfaceMetric | Sort-Object -Property InterfaceMetric
The device is running Linux and uses either dhcpd or dnsmasq. Here are excerpts from their configuration files:
dnsmasq:
interface=usb0
domain=qpm,172.23.166.0/24
address=/qpm/172.23.166.1
dhcp-range=usb0,172.23.166.100,172.23.166.254,255.255.255.0,12h
dhcp-option=option:router,172.23.166.1
dhcp-option=vendor:MSFT 5.0,3,9999i
dhcpd:
option space MS;
option MS.metric code 3 = unsigned integer 32;
class "MSFT 5.0" {
match if option vendor-class-identifier = "MSFT 5.0";
vendor-option-space MS;
option MS.metric 9999;
}
How do I get Windows 10 to honor the DHCP metric setting?