Hi Eric,

For example older windows were trying to send DNS updates on their configured DNS servers. I am not sure if they are still trying that, I assume they don't. That would work on ipv6-only network. Only that machine knows its name.

As you have described, the name of the host is revealed anyway in DHCPv4 request. I think the OS could try to send updates to the local network DNS server, if it resides on local network. That would be equivalent to using mdns, which I think is used by Apple devices often. But unicast is more reliable. The question is after which time such name should be removed. Because not paired with DHCP lease time, it should not remain there forever.

On 6/9/23 17:38, Eric Fahlgren wrote:

Hi Petr,

I have been looking into this off and on for the last year or two and haven't found a good solution (where "good" is defined as "apt install give-me-ipv6-dns-auto-names").

My two use cases are both on-LAN, so privacy is a non-issue:
  1) making tcpdump show host names when I do traces;
  2) allow wife and other home users to just say "https://videos.lan/"; instead of me explaining and dealing with IP addresses.
For devices offering any services to network, I think DHCPv6 client would make sense. That would register the name automagically. Static records would be good for devices always there, like raspberry pi service.

My solution is a cron script on my (Linux/OpenWrt) gateway device that looks at the DHCPv4 table to collect MAC:host-name pairs, then looks at 'ip -6 neigh show' to get MAC:IPv6 pairs, matches up the names and SLAAC IPv6s to the names and writes them to a dnsmasq config file.  (The config file still needs manual cleaning, as I don't have anything logging expiration times.)
Sounds like working, but not too elegant hack. I think dhcp-range with ra-names should help you in this case, if the dnsmasq is doing this job. Should do something like your script in a bit more elegant way. But needs IPv4 DHCP to obtain the name. If we ever stop using it, that will stop providing names.

It would be lovely if there were a nice demon that just sat and watched for NDP NA/NS messages and used that information (including TTLs) to do a DNS UPDATE instead of my hack.  I'm not sure where to get host names on an IPv6-only network, as I haven't looked into that part deeply...

Eric

At least using MDNS responder on network gateway might push names obtained via mdns into unicast dns too. I would expect some RA option to say: try to register on the DNS server (if you wish). But IANA has nothing such registered [1]. Because I would like to have some names for all connected devices in my network, without a need to register them manually.

1. https://www.iana.org/assignments/icmpv6-parameters/icmpv6-parameters.xhtml#icmpv6-parameters-5

--
Petr Menšík
Software Engineer, RHEL
Red Hat,https://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to