Skip to main content

DNS Dynamic Updates & DNS Scavenging

I was encountering an issue at a customer's site where the DNS records of their client PCs often would be behind or out of sync with the records in DHCP.  Usually the IP address would be older in DNS and this was causing issues with scripts executing and network tools correctly resolving client PC hostnames to their correct IP addresses.

I realised I needed to make some changes to their dynamic DNS updating configuration.  After a lot of reading through Microsoft's documentation and various online forums, this is what I ended up configuring.  Hopefully this may help someone, some day:

- Make the DHCP server a member of the "DnsUpdateProxy" group














Create a new user account, in the "Users" OU, called "dnsdynamicupdates"

  - This new user only needs to be a member of the "Domain Users" group - no special privileges

  - Make the password strong and set it to never expire


- Set this new user as the credentials used by the DCHP server in IPv4 Properties | Advanced | Credentials









- Secure the DnsUpdateProxy group by running the following command with Admin privileges:

  - dnscmd /config /OpenAclOnProxyUpdates 0


- Set the DHCP server's DNS settings to "Always dynamically update DNS records" in IPv4 Properties | DNS














- Configure DNS Aging values on the DNS server (combined these should be less than the DHCP lease time):

  - NoRefresh: 3 days

  - Refresh:   3 days










- Set the scavenging period on the DNS server to 4 days (often recommended to be less than the DHCP lease time)















- Set the DHCP lease time to 7 days (as appropriate for your network)














Some good Resources:

- DNS Dynamic Updates: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/configure-dns-dynamic-updates-windows-server-2003

- DNS Scavenging: https://lazyadmin.nl/it/dns-scavenging/

https://chrisbrown.au/techblog/how-dns-aging-and-scavenging-actually-work/

https://techit-services.com/best-practices-for-windows-dns-scavenging/#:~:text=In%20general%2C%20the%20total%20duration,is%20a%20well%2Drecognized%20practice.


Comments

Popular posts from this blog

Resolve WSUS Server issue that gives "Cannot save configuration because the server is still processing"

This is a pretty infuriating error and can sometimes crop up as a result of running a "wsusutil reset" command. First of all, give the server some time, and then a bit more...  but you've probably already done this. These steps may help to resolve the situation: - Install Microsoft SQL Management Studio (free download) - Run SQL Management Studio and start to connect to the WSUS database - Enter this in the "Server Name" box:  \\.\pipe\MICROSOFT##WID\tsql\query - Expand the "Databases" tree - Right-click on "SUSDB" and choose "New Query" - Paste this query in:     UPDATE tbSingletonData     SET ResetStateMachineNeeded = 0 - You should see a message like "1 row affected", which is good - Quit SQL Management Studio - Open "Services" and restart the "WSUS Service" - Now, open WSUS

Re-arm ESXI Evaluation License

Needed to get a little more time out of my ESXI trial so that I could migrate it to Hyper-V. This pair of commands came in very handy and gave another 60 days: rm -f /etc/vmware/vmware.lic /etc/vmware/license.cfg reboot To use them, you need to: Put your ESXI server into Maintenance Mode Enable Secure Shell access (SSH) Enable Console Access Then ssh to the server (in Windows 11 you can just type ssh username@serveripaddress and then enter password) Otherwise, you could use something like PuTTY ( https://www.putty.org/ ) Hope this helps.  

Turn off "BitLocker waiting for activation"

This can be a pain when attempting to "sysprep" a PC's storage drive (usually the C: drive) or take an image of it using something like Acronis SnapDeploy.  In such cases, the software will complain about this BitLocker status. I keep forgetting about this every time I go to take an image! It isn't immediately obvious how to get around the issue... do you go for "Turn on BitLocker" and then turn if off when it has finished encrypting the drive?  Well you probably could if you had the time, but there's an easier way. Using the "manage-bde" tool via an administrative command line gives lots more options, and allows this to be turned off. Tip: handy way to open an admin command line is to hit  W  + R, then type "cmd" and then hit CRTL + Shift + Enter. Typing "manage-bde -status" will show you some more detail, but the command you need is: manage-bde -off c: This may take some time, depending on how much of the drive has already...