Automated Scripts to periodically clear IP DHCP binding *
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2015 08:13 PM - edited 03-05-2019 02:19 AM
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
- Labels:
-
Routing Protocols
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2015 01:23 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2015 03:45 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 01:05 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 03:22 AM
Thank you, this script is work
