04-29-2014 03:40 PM
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
Solved! Go to Solution.
04-29-2014 03:56 PM
Try "clear ip dhcp binding". You can specify only a specific address or all ("*")
04-29-2014 07:00 PM
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.
04-29-2014 03:56 PM
Try "clear ip dhcp binding". You can specify only a specific address or all ("*")
04-29-2014 04:44 PM
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.
04-29-2014 07:00 PM
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.
04-30-2014 04:16 PM
Thanks again Marvin. This will do the job nicely.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide