I've stumbled upon a strange behaviour with Windows machines, which seems to be fairly consistent between all Windows versions from Vista/2008 to 8.1/2012 R2; it doesn't happen instead when using Windows XP or Windows Server 2003.
The problem is this: when the network adapter is configured for DHCP and the DHCP server doesn't register DNS records on behalf of its clients (because it can't, or because it's not configured to do so), then the forward A record gets registered, but the reverse PTR record doesn't.
Some more details:
- Both the forward and the reverse DNS zones are AD-integrated and accept dynamic updates.
- All computers are joined to the domain.
- All computers use the correct internal DNS servers, both when configured statically and when getting their configuration from DHCP.
- "Register this connection's addresses in DNS" is enabled in the network adapters.
- Everything is fine when a computer has a static IP address; both the forward and the reverse records get automatically registered.
- When the same computer is configured for DHCP, the forward record is registered, but the reverse record isn't.
- This happens for all computers with an OS version >= 6.0, and it's definitely not related to a single machine.
- No amount of
ipconfig /registerdns
will change anything. - No errors are logged anywhere.
Why does this happen, and how can it be fixed?
And no, configuring the DHCP server to perform DNS registration is not an option here.
The solution is checking
Use this connection's DNS suffix in DNS registration
in the TCP/IP settings of the network interface:As much as it may appear strange, this is the only solution to ensure Windows will register both the A and the PTR records for a DHCP network connection; otherwise, it will only register the A record.
I ran into the same issue years ago the following group policy settings are how I resolved it. This could easily be overkill, but since the above answers didn't cover things from a group policy angle here goes.
Computer Configuration\Administrative Templates\Network\DNS Client
According to MS:
The article also mentions
Changing registry entries changes the behavior of the dynamic update DNS client.
So there might be a registry workaround... LookingEdit:
According to the article linked by TheCleaner below, the GPO I mentioned in my comment will not do what you want (yeah MS and closed-source software). But checking the boxes for "Register this connection's address in DNS" and "Use this connection's DNS suffix in DNS registration" makes it work. I don't have a convenient test environment to try it...
I ran into this issue during creating and migrating VM's into Azure IAAS. Most of the VMs we install have a reserved DHCP address in the subnet and the NIC IP-settings are set to DHCP. The default 'register this adapter in DNS' setting is always enabled. A-records get created in our domain's DNS but not the PTR which indeed makes sense as the Azure DHCP service won't be able to update our DNS reverse lookup zones. Ticking the 'Use this connection's DNS suffix in DNS registration' seems to work if the IP-address is static and not DHCP for all the VM's with OS 2012R2, 2016 or 2019. Those OS's I tested, not lower or higher OS version. When the VM is running 2019 (and above?) that checkbox also does the trick if it's DHCP, however when the VM-OS is 2016 or 2012R2 then you also need the GPO Setting 'Register PTR records' to make it work. That was at least in my lab..
I implemented this via the GPO's for our servers with these two settings in: "Computer Configuration/Policies/Administrative Templates/Network/DNS Client" 'Register PTR records':Enabled 'Register DNS records with connection specific DNS suffix':Enable
run GPUpdate and restart the server to let it take effect. It could also work by gpupdate followed by a DHCP-client service restart as that part does the registration.
hope this helps anyone.
In Windows 2008 and above, there is an option in the DHCP scope to set up the DHCP server to automatically update the authoritative DNS servers with the host (A) and PTR) records of the DHCP clients. You must enable DNS dynamic updates and choose the option for "Always dynamically update DNS A and PTR records, and to Discard A and PTR records when the lease is deleted.
Image of the DNS tab
Another issue that we found out is if the DNS zone (both) is set to Secure only. If the Machine is not generating a unique SID, then an Active Directory integrated DNS will have the option to be set as allowing secure updates only. Have them set to be secure and non-secure on both the forward and reverse lookup zones.