cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4645
Views
0
Helpful
5
Replies

How to clear the dhcp leases in Cisco Network Registrar

stefanjansson87
Level 1
Level 1

Hello,

I have a setup with Cisco Network Registrar. We have a few scoops with the lease time set to forever. Now I want to reconfigure the scoops to have a 24h hour leasetime. But before this I would like to clear all the current leases. I have problems doing this. I have tried to delete the scoop and then create a new but the old leases is still there. Does anyone have any ides?

5 Replies 5

Nael Mohammad
Level 5
Level 5

You would issue "dhcp-subnet force-available" to make available the whole subnet you specified in the command. Or if you want to do it for a specific lease, you would issue "lease address force-available". And then issue a "lease list -subnet ipaddress mask" to list the current leases.

How do I do this from the gui?

I have tried your solution but the cli does not like it. With subnet number I have tried all different ways to specify the subnet I want to use force-available on but It wont work. the "subnet-number" is the subnet I want to clear right? What format does I need to use?

Same issue here:

nrcmd> dhcp-subnet 10.135.128.0/17 force-available

302 Not Found - dhcp-subnet 10.135.128.0/17 not found

That subnet is configured and viewable on the GUI.

I did not get it to work. I had to delete each lease in the subnet manually. I suggest you use the batch command to do it.

Just go to the local/bin folder where the cnr is installed and issue the following:

nrcmd -N username -P password -b <"PATH TO FILE"

Just make a textfile with the commands you want to run as a batch like:

lease 10.28.4.1 force-available

You need to do one row for each ip.