×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

Automatically Resetting DHCP Leases

Answered Question
Apr 29th, 2014
User Badges:

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

Correct Answer by Marvin Rhoads about 3 years 3 months ago

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:


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

Let me know if it works for you.

Correct Answer by Marvin Rhoads about 3 years 3 months ago

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

Reference

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Marvin Rhoads Tue, 04/29/2014 - 15:56
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,
  • Cisco Designated VIP,

    2017 Firewalling, Network Management, VPN

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

Reference

stephen.pugh2 Tue, 04/29/2014 - 16:44
User Badges:

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.

Correct Answer
Marvin Rhoads Tue, 04/29/2014 - 19:00
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,
  • Cisco Designated VIP,

    2017 Firewalling, Network Management, VPN

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:


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

Let me know if it works for you.

Actions

This Discussion