OPNsense Forum

English Forums => 25.7 Series => Topic started by: Snuffy2 on July 24, 2025, 01:54:44 AM

Title: Dnsmasq DHCP Lease hostnames going in and out
Post by: Snuffy2 on July 24, 2025, 01:54:44 AM
I converted over from Kea to Dnsmasq for DHCP leases with 25.1.10. Since then, I've been having issues with hostnames intermittently stop working. I've tried 25.1.11, 25.1.12 and now 25.7.0 with the same issue. It seems that every few minutes the internal hostnames stop working. I won't be able to load a web page at that hostname or SSH into the device. Then about a minute later it comes back up. For example, I run Home Assistant and connecting to http://homeassistant.home:8123 works most of the time but on occasion with fail for about a minute then come back up.

Looking at the Unbound and Dnsmasq logs I don't see any warnings or errors, only Informational logs. Happy to post any if that might help.

The router and the devices have been restarted multiple times.

Not sure what other information to post or what other steps to try. Happy to try anything so please let me know.
Title: Re: Dnsmasq DHCP Lease hostnames going in and out
Post by: Snuffy2 on July 24, 2025, 01:56:24 AM
DHCP Ranges
Title: Re: Dnsmasq DHCP Lease hostnames going in and out
Post by: Snuffy2 on July 24, 2025, 04:49:32 AM
Recent Uptime Kuma logs
Title: Re: Dnsmasq DHCP Lease hostnames going in and out
Post by: meyergru on July 24, 2025, 10:24:00 AM
Local DNS entry TTL = 1 second ???

I guess if a DHCP lease is renewed, there will be a short pause in DNS resolution. Just set that timeout higher and try if it fixes the problem.
Title: Re: Dnsmasq DHCP Lease hostnames going in and out
Post by: franco on July 24, 2025, 11:03:31 AM
One of the obvious technical downsides of a true lease-to-DNS resolution is that DNS entries are not found when no lease is active.


Cheers,
Franco
Title: Re: Dnsmasq DHCP Lease hostnames going in and out
Post by: Snuffy2 on July 31, 2025, 01:40:43 AM
I tried initially going to 5 seconds and didn't see any difference. I then bumped it to 60 seconds. It may be a little more stable but hostnames are still failing pretty routinely. On Kea previously, I didn't see this issue at all. I can go back to Kea but it is more that I really need for my setup and I like the idea of Dnsmasq better if possible.