Windows – constantly have to restart DNS Client

domain-name-systemiiswindowswindows-server-2008

NOTE: This is more for learning purposes than anything practical

Ok, so here's the basic setup: I have a Windows 2008 box that has IIS and DNS Manager installed on it. I added one zone (called it home.local) and added an a record called "mvctest.home.local" that points to the IPAddress of this machine. I set up a web site in IIS called "mvctest" and it all works fine on this machine. I then went to another machine (Windows 7 box) on my home network (have a wireless router) and in the IPV4 properties I set the DNS server to point to my Server 2008 machine. I opened a browser and pointed to "mvctest.home.local" and the web page came up. All works fine.

The problem is, after a few hours of inactivity, when I come back and try to pull up this site on my other machine (Windows 7 machine) it can't find it. Nothing I do seems to fix it. The only thing that finaly does work is if I restart the DNS Client Service, then it works again. Does anyone have any idea why this is happening? Is there a setting in the DNS Manager I'm missing?

Best Answer

One of the quirks with Windows Vista and up (Also on Server side) machines is the "Network Location Awareness" service. When the NLA service, when you change to the new DNS, it tries to detect whether the network is on a "Domain"/"work", "Private"/"Home", or "Public" network and then adjust firewall settings accordingly.

Because you may have set that your home network on your wireless router as "Private"/"Home" for NLA detection, when you change the DNS, it re-detects the network and when it finds the new domain and does not understand it, it switches to "Public". In "Public" the Windows Firewall comes up, blocks access, and then you may have lost DNS connectivity. So the first thing I would check is to make sure Windows Firewall is not affecting your Windows boxes between the "Work"/"Home"/"Public" settings.

You may also need to setup a reverse DNS zone to keep things a bit sane for the network settings. Try those and see if it works.