cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2223
Views
6
Helpful
4
Replies

Automated Scripts to periodically clear IP DHCP binding *

frankie.yap1
Level 1
Level 1

Hi,

 

Is there a way to write a script to clear IP DHCP binding *  and clear IP DHCP conflict * without telnet to cisco router mannually?

 

BR,

Frankie

4 Replies 4

Aaron Harrison
VIP Alumni
VIP Alumni

Sure - you can use EEM  'Embedded Event Manager' to trigger command scripts on the router.

You just need to decide what should trigger it.

There are lots of examples of EEM out there you can google.

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

Hello

Using a Kron Schedular would be applicable here also mush easier I would say than EEM

Please note when you clear the dhcp binding it ONLY clears tthe dhcp server bindings The ducp lease on the clients will still be assigned to them.

 

kron policy-list DHCP
 cli clear ip dhcp bindings *
 cli clear ip dhcp conflict *

kron occurrence ClearDhcp in 24:00 recurring
 policy-list DHCP

 

sh kron schedule
Kron Occurrence Schedule
ClearDhcp inactive, will run again in 0 days 23;59:27
 

res
paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I know this is an old post, but I ran into this problem. My subnet has only 8 usable dhcp leases and they're on and of or switch interfaces (remote clients on the move)

It seems that it should be : clear ip dhcp binding * (not with the S it won't work that way)

P Lalleman

Thank you, this script is work

Review Cisco Networking for a $25 gift card