Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
16.1 Legacy Series
»
Easiest way to delete expired DHCP leases? Or feature request for that ability?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Easiest way to delete expired DHCP leases? Or feature request for that ability? (Read 22996 times)
unquietwiki
Newbie
Posts: 10
Karma: 2
Easiest way to delete expired DHCP leases? Or feature request for that ability?
«
on:
February 06, 2016, 04:19:40 am »
It seems despite DHCP being set to have leases on a 6-12h period, I have a backlog of leases going back to August. Just updated to 16.1 from 15.7, so curious to see if there's a safe way to purge the old expired leases, or if a feature could be added to wipe out all expired or offline leases. Thanks!
Logged
jstrebel
Full Member
Posts: 188
Karma: 23
Re: Easiest way to delete expired DHCP leases? Or feature request for that ability?
«
Reply #1 on:
February 10, 2016, 09:22:38 am »
I have seen this as well in the 8.4 BSD version using in monowall. After some investigation I came to the conclusion this is how the DHCP Server works. It seems he has no aging built in.
Any comments to this from the experts?
Jakob
Logged
weust
Hero Member
Posts: 650
Karma: 57
Re: Easiest way to delete expired DHCP leases? Or feature request for that ability?
«
Reply #2 on:
February 10, 2016, 11:58:23 am »
Might it not be that an expired lease may stay in the log until all addresses in the pool have been issued, and then it will overwrite expired ones?
Would need to look deeper into it, but that sounds plausible to me.
A way to avoid duplicate IP addresses, just in case, etc.
Logged
Hobbyist at home, sysadmin at work. Sometimes the first is mixed with the second.
smajor
Jr. Member
Posts: 77
Karma: 10
Re: Easiest way to delete expired DHCP leases? Or feature request for that ability?
«
Reply #3 on:
February 14, 2016, 03:57:19 pm »
Many DHCP services work like this by design, they won't start re-issuing used DHCP addresses if there are previously unused ones in the IP range given to it EVEN IF those leases have expired.
The simple answer is if that same device comes back onto the network at some point in the future it'll get (re)assigned the address it had before, even if its lease had expired. This can have some benefits both for logging and for devices that are really aggressive about getting the same address as they did once-upon-a-time.
Typically, once the never-used leases have been issued, it'll probably start from the bottom of the range and re-issue the oldest ones in a round-robin sort of fashion.
I've not hit the top of the range I assigned with my OpnSense install yet, but this seems to be the pattern it is following.
Logged
franco
Administrator
Hero Member
Posts: 17657
Karma: 1611
Re: Easiest way to delete expired DHCP leases? Or feature request for that ability?
«
Reply #4 on:
February 15, 2016, 07:40:48 am »
Looks like you've been on the right track...
https://lists.isc.org/pipermail/dhcp-users/2012-March/015052.html
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
16.1 Legacy Series
»
Easiest way to delete expired DHCP leases? Or feature request for that ability?