Force Windows DHCP to Update DNS for All Current Leases

90,255

Solution 1

I'm afraid that you're going to have to approach this from the client end. Changing the timeouts is only going to help clients the next time they check in, which is usually after half the existing lease time, or sometimes during boot. You can approach this by manually forcing the clients to check in. You might be able to do this by tweaking some group policy settings, or by running a script to bulk "ipconfig /registerdns" on a bunch of clients.

If you insist on doing this from the server end of things, it should be possible to write a custom program to read the entries from a DHCP lease export, and register the addresses, but be sure to run it as the same account that DHCP uses for registrations, or else it may have trouble updating the entries in the future.

Solution 2

One of the way you can do this is by enabling DNS Aging/scavenging.

Please Backup your DNS and DHCP!

You will have to make changes in 2 places:

  1. DNS SERVER [Enable aging/scavenging for all zones]

    -Open you DNS server and open your zones

    -Right Click > Properties > General Tab >Aging

    -Check the "Scavenge stage resource records" -Change the No-refresh interval and Refresh interval from days to hours

Note: Don't forget to change it back to a appropiate interval when the dns is updated and you must take another step in DHCP server for this to work.

DNS Image 2. DHCP SERVER [Check DNS update settings for all scopes]

  • Open your DHCP server and click down to the scopes

  • Right click on your scope > Click Properties > DNS Tab

  • Take a note of your current settings and apply the highlighted settings from the image below

DHCP Image

Note: Please backup your dns and dhcp before changing anything. This should bring your DHCP/DNS up to date

Share:
90,255
fukawi2
Author by

fukawi2

Server Shepherd; Command Line Svengali; Tsar of Firewalls.

Updated on September 18, 2022

Comments

  • fukawi2
    fukawi2 almost 2 years

    Is there are way to force Windows 2008R2 DHCP Server to update all DNS entries for all current leases?

    (Guess the server-side equivalent of ipconfig /registerdns)

    We had a configuration issue with our dynamic DNS and DNS is badly out of sync with the current leases. It's taking days to catch up now that we've fixed (I think) the original issue.

  • fukawi2
    fukawi2 over 9 years
    This won't force an immediate "sync" between the DHCP and DNS systems, I still have to wait X days for scavenging etc to take place.
  • zman
    zman over 9 years
    Another Place to check will be DHCP > "Right Click" IPv4 > Properties > Advanced > Credentials > Input credentials with admin access to DNS service. This will ensure that dhcp can update dns records. Then try ipconfig /registerdns
  • fukawi2
    fukawi2 over 4 years
    I don't see Windows currently supporting DHCPFORCERENEW, and it's probably not high on Microsoft's list. The switch port manipulation is a clever solution though that should be possible with an appropriate level of scripting :)