How do you release existing DHCP lease?
-
Twice now I've run into this. I define a new static Mac-ip address pair and save and deploy and I get 2 listings for the same MAC address in the dhcp table. I thought this was impossible. Apparently not...
there must be a way to manually release a specific dhcp lease? This is driving me insane.
I lost all my configs when I tried upgrading to 24.03 and bricked my Netgate 1100. So I'm starting over. All my IP cameras need static mappings so my NVR will work.
-
@jazzmonger Are you using KEA DHCP? If so, don't. It's not ready and I've seen the double assignment when using it also.
-
-
@jazzmonger Your experience is odd to me. When I add a new camera or other thing that needs a DHCP reservation, I let it get a random address, then create the reservation for the address I want it to have and restart the system. When it returns it gets the new address.
Admittedly I am only looking at the result, "does it get the new address", I am not looking at what DHCP has because the result is correct. It may keep the other address for a bit. -
@AndyRH yeah I have never bothered to look into that, when I add a new device to the network.. I let it get an IP from dhcp, then setup the reservation and reboot or renew and let the device gets its new reserved IP.
I don't recall bothering to look if the old lease is still listed as long as my device gets the IP I want it to get. I would assume once the old dynamic lease has actually expired you should be able to just delete it with the trashcan icon..
example - just took a look, clicked the show all configured leases and can see quite a few old leases for stuff I moved to reserved lease
Here is one for example
My UC (unifi controller vm) had gotten 2.212 when I brought it up back in jan.. I then set a reservation for it for 2.13 and it now gets that address.. I could just click the trashcan icon to remove the old lease..
here is another example of same thing, device got a dynamic IP - then created a reservation.. I could delete the old lease if I cared to by just clicking the trashcan.. But I don't think pfsense lets you delete a lease that is still valid, even if the client is currently offline
-
@jazzmonger said in How do you release existing DHCP lease?:
there must be a way to manually release a specific dhcp lease? This is driving me insane.
If you really want to force things on the DHCP server side :
Create an entry here "DHCP Static Mappings".
Now stop the DHCP server (dashboard GUI).
Delete /var/dhcpd/var/db/dhcpd.leases and dhcpd.leases~ These two filers are the 'memory' of the DHCP server. Btw : I never had to do this.Disconnect the LAN client.
Reconnect the LAN client. The LAN client will ask for a lease, and it might even ask for a specific (now old) IP (Lease).
The server has the authority to override, and will give whatever you specified in your "DHCP Static Mappings".
Done. -
@Gertjan
Don't have trash cans next to all of my leases, only some of them. Any idea why? -
@jazzmonger said in How do you release existing DHCP lease?:
only some of them. Any idea why?
because they are prob active.. Like I said I don't think pfsense will let you delete an active lease, even if the client is offline.
-
You can't 'delete' a Lease on the server side.
Given == given.
There is no such thing as a web/mail/dhcp/whatever server contacting the client back to say "no wits over".
Communication is initiated - always - by a client, and it connects to, a 'server'. Communication is done. And then it's over. -
Other than DHCP showing the in-scope lease and the out-of-scope reservation, are you having an issue?
Is the client receiving the expected address?