cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2757
Views
5
Helpful
1
Replies

Track DHCP Exhaustion and run a command

Is there any way with EEM to track the exhaustion of dhcp pool and run the command clear ip dhcp binding?

Best Regards

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

I haven't done that exactly, but attached is an EEM Tcl policy I did that watches the DHCP bindings database and sends syslogs when there are changes to the lease database.  It could be modified to count the number of active leases instead, then run the clear command.  Just count the number of lines in the show ip dhcp bind output, and if the number exceeds your threshold, do:

run_cli [list "clear ip dhcp binding"]