Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Automatically Resetting DHCP Leases

I am setting up a DHCP scope on a Cisco 4500X.  The DHCP will service new clients and provide a PXE boot set of options.  Once built the client will access a Windows based DHCP service.  

I understand that the minimum DHCP lease duration is 1 day (24 hrs?). My question is, how can I clear the DHCP leases on a more regular basis say every 4 hours allowing me to use a smaller network IP range for the build network?  

Thanks in advance!
Steve

Everyone's tags (3)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Hall of Fame Super Silver

Try "clear ip dchp binding".

Try "clear ip dhcp binding". You can specify only a specific address or all ("*")

Reference

Hall of Fame Super Silver

Glad to hear that worked.It

Glad to hear that worked.

It looks like the 4500X IOS-XE does include support for the kron command scheduler utility.

I've not used it personally but from the configuration guide, it looks like you should be able to do something like:


!
kron policy-list ClearBindings
cli clear ip dhcp binding
!
kron occurrence ClearDHCP in 04:00 recurring
policy-list ClearBindings
!

Let me know if it works for you.

4 REPLIES
Hall of Fame Super Silver

Try "clear ip dchp binding".

Try "clear ip dhcp binding". You can specify only a specific address or all ("*")

Reference

Community Member

Hi MarvinThat worked, thank

Hi Marvin

That worked, thank you.  Would you know how I could possibly automate this command to run every 4 hours?  Kron job perhaps?

Cheers,

Stephen.

Hall of Fame Super Silver

Glad to hear that worked.It

Glad to hear that worked.

It looks like the 4500X IOS-XE does include support for the kron command scheduler utility.

I've not used it personally but from the configuration guide, it looks like you should be able to do something like:


!
kron policy-list ClearBindings
cli clear ip dhcp binding
!
kron occurrence ClearDHCP in 04:00 recurring
policy-list ClearBindings
!

Let me know if it works for you.

Community Member

Thanks again Marvin.  This

Thanks again Marvin.  This will do the job nicely. 

753
Views
0
Helpful
4
Replies
CreatePlease to create content