Windows 7 is skipping the primary DNS server and moving straight to the alternate DNS server

domain-name-systemwindows 7

I'm running into an odd issue with a number of Windows 7 machines on my network.

These machines are currently configured to use a local DNS server, 192.168.1.42, as their primary DNS server. Google's public DNS, 8.8.8.8, is configured as an alternate DNS server.

Occasionally, and sporadically, the resolution of local FQDNs completely fails. So, supposing I ping test.loc, I will get a "could not find host" error. FQDNs with records in Google's DNS resolve fine.

Loading up Wireshark and checking the actual traffic during this ping attempt shows a query going out to 8.8.8.8 for test.loc, and, obviously, this is not found.

Yet, if, while this problem persists, I run, say, nslookup test.loc, I can see DNS queries being sent to the primary DNS server, 192.168.1.42. This is the only case, while the problem persists, in which the primary DNS server is used. In any other case — ping requests, attempts to access a Web resource on test.loc, etc. — Windows immediately skips to the alternate DNS server.

I can temporarily fix this issue by restarting my DNS Client service (net stop dnscache, net start dnscache), or by resetting my network adapter (I've only tried this via the GUI), but the issue seems to recur often (though without any apparent pattern).

Any ideas about why Windows is refusing to use my primary DNS server for non-nslookup name resolution would be appreciated!

(We're not in an AD domain, so any troubleshooting should keep that in mind.)

Best Answer

Unfortunately, there does not appear to be a fix for this issue. It occurs when Windows fails to contact its primary DNS server, and alters the DNS priority internally to prefer the secondary DNS server. The only way to reset DNS server priority in Windows 7 is to restart the DNS client service.

Related Topic