DNSMasq should automatically resolve names when it gets a DNS request for a device it registered over DHCP. Make sure to set the base name in your DHCP scopes. I believe it updates /etc/hosts too.
This can be combined with IPv6 DHCPv6, but not all devices use DHCPv6, such as Android. Android only does IPv6 SLAAC (never registers name). You can work around this with ra-names options, see below. For devices disabling IPv4 and only use IPv6 SLAAC will never get a hostname registered. Devices that do this are rare but it is possible to configure. ra-names: ra-names enables a mode which gives DNS names to dual-stack hosts which do SLAAC for IPv6. Dnsmasq uses the host's IPv4 lease to derive the name, network segment and MAC address and assumes that the host will also have an IPv6 address calculated using the SLAAC algorithm, on the same network segment. The address is pinged, and if a reply is received, an AAAA record is added to the DNS for this IPv6 address. Note that this is only happens for directly-connected networks, (not one doing DHCP via a relay) and it will not work if a host is using privacy extensions. ra-names can be combined with ra-stateless and slaac. See ra-names in manual https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html On Friday, April 5th, 2024 at 3:22 AM, Hsin-Yao Huang - zeusshuang at gmail.com <zeusshu...@gmail.com> wrote: > A router with WAN site IPv6 only with IPv6 DNS server settings, and LAN site > supports both IPv4/IPv6.While the LAN site client only query DNS by IPv4 (A > record), how to configure dnsmasq to convert between A and AAAA automatically? > > Thanks, > Eric _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss