I haven’t had this working in a long time. In fact, I think since I started doing things with Active Directory on Windows Server 2012, this stopped working because they made it more “secure”. What I wanted is this:
Your DHCP server gives out an IP address. However, so that other computers can find this new device, the DHCP server should also go update the forward and reverse lookup zones in DNS dynamically. The end result being that if you connect a device to the network called “mainpc01”, within a few seconds of you getting an IP address, on another machine, I should be able to “ping mainpc01”
But how do you do that?
This morning I decided to fix this once and for all.
Settings on the DHCP server:
On the DHCP server, at the scope level – right-click and choose Properties and click on the DNS tab:
I have it set up this way because I especially wanted this for non-Windows machines. If I hook up a Raspberry Pi or brought up a Linux machine, I didn’t want to have to go chase down the new IP address. So, this should make it so the DHCP server sends updates to the locally-configured DNS server.
In my particular case, I have 2 domain controllers which are ALSO the DNS and DHCP servers, by the way.
Settings on the DNS server:
We will have “dynamic updates” coming from DHCP, but we need to be able to receive them on the DNS server. So, right-click on a forward-zone:
and choose Properties:
Here you just want to make sure Dynamic updates is set to secure, ideally. OK – I think I’m done; let’s test it out! …release my IP, renew.. OK, I see the new lease in DHCP, but still no DNS update! What gives!?
One last step:
Up until now, that is where I was. Everything seemed like it should work, but it didn’t. The DNS was not getting updated. So, I looked in the event viewer (System log) and saw this error:
Well, what do you know?! That explains the problem and the fix! Sure enough, I run the following command on both servers:
netsh dhcp server set dnscredentials administrator springhill MyP4zzwordR0cks!
and voila! When I release and renew – I get an IP address and settings from DHCP, and an A and PTR record are created in the DNS. When I release the lease, those records are deleted!