Windows 10 Wifi Sets Wrong DNS Server When Connecting to Wifi Networks

networkingwifi-configurationwindowswindows 10wireless-networking

Somehow my Windows 10 laptop stopped getting the correct DNS servers sent from Wifi networks. It somehow locked 192.168.1.1 and won't accept whatever DNS IP comes from DHCP. I have no idea how/why, and I tried everything to fix. Any thoughts?

Tried the Wifi while sitting at a Starbucks, the office, or the Apple Store, it always put 192.168.1.1 as the DNS server instead of the correct DNS IP supplied by the DHCP router.

I tried this under Command Prompt (run as Administrator), still did not help:

netsh winsock reset
ipconfig /flushdns
ipconfig /renew

Also rebooted several times, turned Wifi on/off, deleted known Wifi networks… nothing works. I also tried manually setting the DNS IP when at a known Wifi place, which works, then I set back to obtain automatically, and it goes back to stuck on 192.168.1.1.

For example, check out ipconfig /all output from a Starbucks, it incorrectly says 192.168.1.1 as the DNS:

Wireless LAN adapter Wi-Fi 2:
   Connection-specific DNS Suffix  . : home
   Description . . . . . . . . . . . : Intel(R) Centrino(R) Advanced-N 6205 #2
   Physical Address. . . . . . . . . : 60-67-20-12-34-56
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::2d12:3c21:1234:5678%23(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.31.99.119(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.254.0
   Lease Obtained. . . . . . . . . . : Friday, May 18, 2018 9:30:43 AM
   Lease Expires . . . . . . . . . . : Friday, May 18, 2018 10:43:47 AM
   Default Gateway . . . . . . . . . : 172.31.98.1
   DHCP Server . . . . . . . . . . . : 172.31.98.1
   DHCPv6 IAID . . . . . . . . . . . : 308307744
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1D-D4-7C-E7-3C-97-0E-12-34-56
   DNS Servers . . . . . . . . . . . : 192.168.1.1
   NetBIOS over Tcpip. . . . . . . . : Enabled

I have the Wifi interface set to pull DNS from DHCP, see screenshots below.

Wifi Network Adapter Properties

Wifi Network Adapter Properties

Best Answer

This is an older question but I just wanted to add my answer here because this question came up when I was searching for an answer and it pointed me in the right direction.

If your nameservers point to something that you once manually entered in the TCP/IP properties, this setting is cached in the registry under

Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{*interface-UUID*}\ProfileNameServer

where {*interface-UUID*} is a unique ID that is assigned to the different interfaces on the local machine. ProfileNameServer is a REG_SZ string that contains a space-separated list of IP addresses of the nameservers to use. This appears to override the DhcpNameServer string, which is of the same format.

I cleared the ProfileNameServer string and the interface in question used what was in DhcpNameServer instead, which solved my issue.

Related Question