- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Clear all DHCP Lease at once...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-03-2016 03:32 PM
In a Point of Sale network, we have 20 000 scopes with only 1 IP available per scope. For operationnal reason (equipement replacement, testing eqpt on the network), we need to make sure that even if the lease is for 2 weeks, any one of those IP are to be available 15 minutes after the lease.
On the actual Cisco Network Registrar system, a script run every 15 min and clear all leases, one by one.
Is it possible with Infoblox IPAM to clear all leases with one command?
If not, is it possible to allow any DHCP request to one scope to be answer even if the lease is not expired (would not make sence in a normal network but there could be no collision here)?
Last option, is there any REST script example available to read a 20 000 lines text file and issue a delete lease command?
Thank you
Solved! Go to Solution.
Re: Clear all DHCP Lease at once...
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-04-2016 01:42 PM - edited 03-04-2016 03:33 PM
Hi DBO,
You cannot do it in one command but you could write a script to get all your leases and iteratively remove each lease.
Ex:
# Get a All DHCP leases. my @retrieved_objs = $session->get( object => "Infoblox::DHCP::Lease" ); # Iteratively Remove a DHCP Lease object foreach (@retrieved_objs) { my $desired_lease = $_; unless($desired_lease){ die("get lease failed: ", $session->status_code() . ":" . $session->status_detail()); } # Submit the object for removal $session->remove($desired_lease) or die("Remove dhcp lease failed: ", $session->status_code() . ":" . $session->status_detail()); }
Re: Clear all DHCP Lease at once...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-12-2016 07:23 AM
Can you also download the leases.csv from the DHCP leases tab, then sort for only the "Active" leases and do a CSV import to delete those leases? Also, does deleting DHCP leases cause the DHCP server to send anything to the DHCP client that would force it to attempt to renew for a new lease?
Re: Clear all DHCP Lease at once...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-12-2016 01:35 PM
I was thinking along those lines. The remove lease command using the API is currently taking 1.3 sec/lease so it's way too slow. A global CSV export of the active leases the first day the IB get in production would allow me to create a valid template (the 8500 POS change very little) that I could reuse.
The question is can I clear a lease doing a CSV import and how can I automate this???
Re: Clear all DHCP Lease at once...
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-12-2016 01:55 PM
Niet, CSV import for lease is not supported...
Back to square one