[SOLVED] static dhcp lease domain issues in dnsmasq

Started by gadgetguy, August 08, 2025, 09:28:43 PM

Previous topic - Next topic
August 08, 2025, 09:28:43 PM Last Edit: August 11, 2025, 04:33:03 PM by gadgetguy Reason: SOLVED
Part of this was mentioned in the 25.1 Series but wasn't answered. @IsaacFL https://forum.opnsense.org/index.php?topic=47963.0


In Dnsmasq, the static mappings are set in hosts tab and are present in the /var/etc/dnsmasq-hosts, but they dont show the FQDN in /var/db/dnsmasq.leases and won't do an internal lookup successfully.

In Unbound, the "Register DHCP Static Mappings" option is checked

I am finding the forum comments and documentation a bit confusing on this. 

  • I have some items in the hosts list without the host name or domain and others with the host name and domain (as a test). The entries without a name or domain pick up the device name, but not the domain for the leases. The others show the host name but nothing in the domain
  • I have DHCP ranges with the domain defined (xyz.internal, abc.internal, etc.). And some the devices are in the range and some not.  [Mixed comments on what is needed in forum topics.]
  • I have added the domain-name(15) in the DHCP options

Most everything else is functional -- traffic flow is good, dhcp assignments work, dhcp options work properly (except domain name).

August 11, 2025, 04:32:10 PM #1 Last Edit: August 11, 2025, 04:36:05 PM by gadgetguy
Incomplete setup.  Needed Unbound DNS query forwarding for Internal addresses.

https://docs.opnsense.org/manual/dnsmasq.html#dhcpv4-with-dns-registration

The FQDN do not show in the /var/db/dnsmasq.leases, but they can be found with a nslookup.