Introducing DNR support for Windows Insiders

>A huge thank you to Alex Jercaianu, Justin Sapp, Kosi Nwabueze, and Milan Justel for implementing this feature!
Discovery of -designated Resolvers (DNR) is an upcoming IETF standard to discover DNS servers. Before DNR, devices getting server from their local would not be able to use without manually finding out the IP address of their desired DNS server and configuring it on client-side. DNR enables devices to use encrypted DNS protocols like DNS over HTTPS (DoH) and DNS over TLS (DoT) on the client-side without requiring manual endpoint configuration.
We are excited to announce client-side DNR support in Windows Insiders build 25982 and higher!

How does client-side DNR work?

Let us look at what happens when a machine with client-side DNR enabled attempts to join a new . First, the machine queries the local DHCP server to acquire an IP address. During that query it also requests special DNR-specific options (OPTION_V4_DNR for DHCPv4 or OPTION_V6_DNR for DHCPv6). The local DHCP server which is running server-side DNR responds to the machine with all the required information for configuring encrypted DNS such as the IP address of the encrypted DNS server, list of supported encrypted DNS protocols, their port numbers, and server information. On receiving this information, the client machine sets up an encrypted DNS tunnel automatically with the server discovered through DNR.
From the user's perspective, they joined a new network as they normally would and without any effort on their part, they are reaping the benefits of encrypted DNS!

>How to use DNR on Windows Insider builds?

First step is to install the latest Windows Insider build (25982 or higher). DNR support is not available on non-Insider Windows builds yet.
Once a compatible Windows Insider build is installed, a new registry key needs to be created to enable DNR on the device.
Please note: You should proceed with the deployment steps below only if you have prior experience with modifying registry. This is NOT recommended for people who are unfamiliar with registry keys.


The registry key can be created using UI by the following steps:

    1. Open Registry Editor on your Windows device
    2. Navigate to “ComputerHKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDnscache”
    3. Click on “Edit” -> “New” -> “DWORD (32-bit) Value” (on the top left side of the window)
    4. Rename this new registry key from “New Value #1” to “EnableDnr”
    5. Double-click on “EnableDnr” registry key
    6. In the new pop-up window, verify value name is “EnableDnr” and set value data to “1”
    7. Click “OK”

Screenshot 2023-10-19 165240.png

>Command prompt

Alternatively, the following command can be run in an administrator command prompt:
reg add HKLMSYSTEMCurrentControlSetServicesDnscacheParameters /v EnableDnr /t REG_DWORD /d 1
After all the registry changes are done, reboot the device for the new settings to take effect.
To see DNR working in action, try joining a network whose DHCPv4 or DHCPv6 server supports server-side DNR.
During our internal testing, we partnered with BT Group who prototyped server-side DNR on their DHCPv4 servers. A Windows Insiders device with DNR enabled was joined to a network provisioned by BT. The Windows Insiders device was able to use OPTION_V4_DNR to discover, validate and use BT's trial DNS over HTTPS service.
Please note that our current client-side DNR implementation only supports configuration through following modes as stated in the DNR IETF draft:

We do not support the IPv6 RA Encrypted DNS option yet.
To stop using client-side DNR, the following command can be run in an administrator command prompt:
reg add HKLMSYSTEMCurrentControlSetServicesDnscacheParameters /v EnableDnr /t REG_DWORD /d 0
After running the command, reboot the device to return the machine to its original state.


This article was originally published by Microsoft's Networking Blog. You can find the original article here.