Share via


Purge (Delete) DHCP Entries

Question

Monday, May 7, 2012 4:11 PM

Hi !

There is windows 2003 r2 dhcp server

the max age has been define 10 days and it is out of ip address now because of addition of many systems recently

i want to delete all dhcp entries which have not refreshed themselves (their owners have not contacted server) in for example last 4 days.

How can i find these entries and delete them

All replies (4)

Friday, May 11, 2012 1:51 PM ✅Answered

Start by reducing lease duration and delete the leased addresses by using the following suggestion:

Consider this scenario. Suppose you have selected 10 days for lease duration. If a client sends a request to the DHCP and the lease operation be successful, you can see in the Expiration Date column of the Address Leases section of the DHCP console a date of 10 days from this time on (If the lease operation take place today, so the expiration date is 21/5/2012). With this info in hand, you can sort the data in Expiration Date column, by clicking its title and so select any leases that has the date of at least expires 6 days later. Now select them and then delete them entirely.

Please VOTE as HELPFUL if the post helps you and remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Tuesday, May 8, 2012 10:18 AM

Hi M.Ganji,

Thanks for posting here.

Not a perfect solution with DHCP but consider to ping the address range we defined in scope by script, such like the sample below:

Powerful Multi Ping Tool Built in Powershell

http://gallery.technet.microsoft.com/scriptcenter/Powerful-Multi-Ping-Tool-c2490d3b

Thanks.

Tiger Li

Tiger Li

TechNet Community Support


Tuesday, May 8, 2012 3:11 PM

Hi Ganji, <o:p></o:p>

Please check last Para in the below link i.e. Reducing the default lease Duration.

http://technet.microsoft.com/en-us/library/cc783573(WS.10).aspx

Hope this helps, and be sure to check out the risks that come with adjusting the leased duration, you dont want to flood your network with dhcp traffic because you put too low a lease duration or having to clear leases all the time because the duration is too high.<o:p></o:p>


Regards, Ravikumar P


Friday, May 11, 2012 2:32 PM

thanks

bye the way

how can i quickly and simply see how many addresses are remaining (all available : All Addresses Except leased - reserved - excluded)