unable to get DNSmasq to provide A and AAAA records from leases

Started by thelittleblackbird, June 28, 2026, 05:25:17 PM

Previous topic - Next topic
so thats the question, I rather prefer to avoid static pinning or assignments because that defeats the purpose of the DHCP server.

some extra details:

I have a network with dual stack and 2 separate segments (LAN and DMZ), my dnsmasq is acting as DHCP server for both protocols and dns server, the upstream in the unbound.

up to now, i am not able to get to get both records for a name resolution, does anyone know to achieve it?

NOTE: as a side effect of the investigation i realized that in the leases file the domain name is not included even if the required full fqdn is set. is this the expected behavior? --> every independent segment of the network has a different domain name and it may happen that there is a collision of the names of the devices in different segments.

If you want Unbound (as your resolver) to be able to lookup internal domains managed by dnsmasq, you'll need to configure query forwarding as described at https://docs.opnsense.org/manual/dnsmasq.html#dhcpv4-with-dns-registration

Quote from: dseven on June 28, 2026, 07:19:11 PMIf you want Unbound (as your resolver) to be able to lookup internal domains managed by dnsmasq, you'll need to configure query forwarding as described at https://docs.opnsense.org/manual/dnsmasq.html#dhcpv4-with-dns-registration

If i udnerstood the howto correctly, this is not going to solve the issue, because in this case unbound is going to forward the dns request to dnsmasq and then we will hit again the problem i am describing.

My problem is that there is not an internal association inside dnsmasq between dhcpv4 and v6 and therefore i dont get a consolidated A and AAAA record for a specific domain name

June 28, 2026, 09:36:09 PM #3 Last Edit: June 28, 2026, 09:39:00 PM by Monviech (Cedrik)
In the ipv4 and ipv6 subnets, enable advanced mode and set Domain Type to Interface.

If you run into validation issues, delete the v6 subnet, then change domain type on the v4 subnet, then recreate the v6 subnet.

Reason is that partial ipv6 networks (::...) do not match the configured dhcp domain otherwise.

Its explained in the second attention box here:
https://docs.opnsense.org/manual/dnsmasq.html#dhcpv6-and-router-advertisements

Hardware:
DEC740