Having your DHCP server update your DNS dynamically (Windows Server 2012 edition)

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!

Posted in Computers and Internet, General, Infrastructure, Organization will set you free, Raspberry Pi, Uncategorized
One comment on “Having your DHCP server update your DNS dynamically (Windows Server 2012 edition)
  1. […] is significant because now you are using the Windows-based DNS now too. You might recall I did a blog post about this, but when DHCP gives your laptop an address, it gets it’s name and puts it into the DNS […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

%d bloggers like this: