DHCP lease

Thomas N
Thomas N used Ask the Experts™
If I lower the lease time to 1 day and delete the lease out of DHCP. Will the machine grab a new lease IP and register DNS right away?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014

if "Dynamically update DNS A and PTR records for DHCP clients..." is enabled in DHCP server.
then yes, machines will take the IP and it will register in DNS.
Distinguished Expert 2018

Yes, this will work if following conditions are true

DNS updates can be sent for any one of the following reasons or events:
•An IP address is added, removed, or modified in the TCP/IP properties configuration for any one of the installed network connections.
•An IP address lease changes or renews any one of the installed network connections with the DHCP server. For example, this update occurs when the computer is started or when you use the ipconfig /renew command.
•You use the ipconfig /registerdns command to manually force an update of the client name registration in DNS.
•The computer is turned on.
•A member server is promoted to a domain controller.

In order to work with DHCP lease and DNS dynamic update following must be configured properly

You have to set secure dynamic updates to secure only in dns zone properties

In the properties of DHCP server (Ipv4 in case of 2008 DHCP server), on the DNS tab if have set Always dynamically update DNS A and PTR records, then DHCP server will always update host (A) and PTR records on behalf of clients
In the properties of DHCP server (Ipv4 in case of 2008 DHCP server), on the DNS tab if have set Dynamically update DNS A and PTR records only if requested by the DHCP clients
In this case if IP lease has changed then client computers will dynamically update DNS records and DHCP server will update PTR records
If DHCP server is installed on domain controller, then you must set domain service account in DHCP server properties (IPV4 in case of 2008) \ advanced \ credentials tab in order to dynamic update work correctly, otherwise it will fail.

Also you must set "Discard A and PTR records when dhcp lease expires" in order to delete expired DHCP leases from DHCP console automatically, otherwise you must delete expired DHCP leases from DHCP console manually.
Note that this will not delete DNS records automatically unless you setup DNS scavenging properly

Check below article for DHCP lease process in depth

Check below articles for more information
http://technet.microsoft.com/en-us/library/dd145315(v=ws.10).aspx - Configure secure Dynamic Update

let me know if you have any specific question please

Just to add to sgupta1181, I believe deleting the entry has no effect on the computer. It will at 50% if i remember begin polling for a new address and more than likely receive the same address again.
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

BillBondo is right.
DHCP clients usually try to renew their lease when it half expired.
Deleting a lease on the DHCP server side does not instruct the client to renew its DHCP lease.
To do so, you must explicitly run some commands to renew DHCP or, better, to release the lease and then "renew it" (since a renewal is by definition done with the same IP address).
Under Windows, the commands are:
ipconfig /release
ipconfig /renew
(you can be more specific by specifying the adapter to use. ipconfig /? for more details).
Regarding automatic DNS registration, this depends on your hosts, dhcp server/DNS integration etc.
What OS run on your clients and server(s)?
Thomas NSystems Analyst - Windows System Administrator


Deleting the lease wont but wont lowering the lease time get them to report in and get a different IP address?

Im using 2008 server and XP\Win7 machines.
Distinguished Expert 2018

DNS records will be updated when DHCP lease changed if DNS -DHCP integration is configured correctly as per my 1st comment

However, different DHCP IP for existing clients is bit difficult for 1day lease period
Because DHCP client will request for renewal after 12 HRs from obtaining lease and if that not happened since client may be shutdown \ disconnected from network earlier, the still lease will remain on DHCP server for 24 HRS and will be deleted after expiry, but its not immediate task and it will happens every Hour with DHCP cleanup cycle. If client reports to DHCP prior to deletion of expired record from DHCP, DHCP server will simply grant that IP to clients again.

For Ex: morning 8.00AM client A get IP lease, he left for the day at 6.00PM
Now Lease will be left in DHCP until 8.00AM tomorrow

If client came tomorrow again at 8.00AM hopefully it will get same IP lease because now its lease is expired but not deleted from DHCP immediately because of waiting for clean up cycle to run and client is trying to request same lease as yesterday and if available DHCP will grant it
According to my knowledge, every 60 minutes DHCP will cleanup expired leases.

It not necessarily possible that lease will get deleted from DHCP right at 8.00 AM It depends upon last cleanup cycle

Check below article for more information

Also its not recommended to set lower lease than this because this will create to many stale records in DNS and you need to lower scavenging setting also to cleanup this mess which is not recommended as it may produce undesired results

The workaround I can see around this provided that you are not running 24\7 shifts.
Instead of lowering lease duration, Delete all dynamic lease from DHCP by means of some script \ sc tasks \ command every night so that there is no trace left on DHCP server regarding previous lease and hopefully it will provide new leases to clients on 1st come 1st basis.
Again you need to set your DNS scavenging accordingly because it will trigger to many stale records in DNS which is undesirable
Check below articles for settings up scavenging in relation with DHCP lease period

Let me know what is the exactly your issue please

Thomas NSystems Analyst - Windows System Administrator


I was having issues with the DHCP server register DNS names but I found out and not that I wanted my machines to get new IP address, more that I wanted them to automatically register to DNS. I have over 3k machines and did not want to register them each manually. What could I do to get this done? Script? Thanks for all your help.
I believe that is a default setting in the dhcp scope properties.
Distinguished Expert 2018
Thanks for confirmation.

In that case please check my 1st comment and verify you DHCP and DNS settings are set accordingly
may be you are running DHCP on Domain controller, in that case you must set credentials in DHCP properties, please check my comment for details

Also find one more excellent article related to this

Let me know if you have any queries related to dns - dhcp integration

What OSes run your DNS and DHCP services?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial