Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Unbound seemingly never removes stale DHCP records
« previous
next »
Print
Pages: [
1
]
Author
Topic: Unbound seemingly never removes stale DHCP records (Read 2136 times)
bubbagump
Newbie
Posts: 39
Karma: 5
Unbound seemingly never removes stale DHCP records
«
on:
March 15, 2022, 02:14:34 pm »
Running 22.1.2_1. Seemingly Unbound never deletes/cleans up A records created by DHCP. As an example and how I can reproduce it - I spin up a new VM and it uses DHCP in its initial boot. Once it boots the first time, I create a static reservation and refresh the lease on the VM to use the new IP reservation. Now Unbound reports the original IP and the new reservation IP. Fast forward a few days and the original DHCP lease which has long expired literally days ago is still being served by Unbound along with the reservation IP. No amount of service restarts or reboots cleans it up. Is this a bug? By design and I am missing a config option? Something else?
EDIT: Ignore me... somehow the default lease time was set to a WEEK. Well, that explains that. It was a DHCP issue and not Unbound as when I deleted the entries from /var/unbound/dhcpleases.conf, they would reappear when I restarted Unbound. That was my clue. I r dum.
«
Last Edit: March 15, 2022, 03:03:09 pm by bubbagump
»
Logged
devhunter55
Newbie
Posts: 45
Karma: 0
Re: Unbound seemingly never removes stale DHCP records
«
Reply #1 on:
March 15, 2022, 03:01:48 pm »
what is your TTL for Host cache entries ?
(Time to live for entries in the host cache. The host cache contains roundtrip timing and EDNS support information. The default is 15 minutes. )
Logged
bubbagump
Newbie
Posts: 39
Karma: 5
Re: Unbound seemingly never removes stale DHCP records
«
Reply #2 on:
March 15, 2022, 03:04:13 pm »
Thank you, but see my edit above... somehow the DHCP lease time was set to a week. (I think I know how this happened - someone trying to match Windows DHCP defaults... grumble.)
Logged
franco
Administrator
Hero Member
Posts: 17661
Karma: 1611
Re: Unbound seemingly never removes stale DHCP records
«
Reply #3 on:
March 15, 2022, 03:38:03 pm »
Did you know: the reference file for Unbound's DHCP watcher is /var/dhcpd/var/db/dhcpd.leases and this is operated by DHCPd alone. Of course you can edit the file yourself if you really need to purge a lease although it might not convince the client to give it up either.
Cheers,
Franco
Logged
bubbagump
Newbie
Posts: 39
Karma: 5
Re: Unbound seemingly never removes stale DHCP records
«
Reply #4 on:
March 15, 2022, 03:43:25 pm »
Thanks, yup, I tracked that down and see how the plumbing connects now.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.1 Legacy Series
»
Unbound seemingly never removes stale DHCP records