How to update DNS AAAA record when SLAAC clients appear
Radvd sends out multicast messages with network information, it doesn't get replies back from clients about what they do with that information. So (1) doesn't work.
Link-local addresses (the fe80:
addresses) are not related to the global unicast addresses that a client uses. Step (2) is therefore also not possible.
The common solutions to what you want to do are:
- Use SLAAC and DHCPv6 in parallel. The DHCPv6 based addresses are put in DNS by the DHCPv6 server for connections towards the client, and the SLAAC addresses don't get put in DNS to maintain the privacy of outbound connections from the client.
- Use DHCPv6 without SLAAC (turn off the
A
flag in the RA) and let the DHCPv6 server put the addresses in DNS. Android based devices will not work in such an environment though, so not a good idea. - Use SLAAC and let the client put its own addresses in DNS. In managed environments (I remember this from long ago in the Win2k and Win2k3 era) this can be configured automatically.
Besides this you can also script things on devices where you can see both the MAC address and the IPv6 addresses used on the network, for example on switches and the default gateway router. You could write a script that monitors which IPv6 addresses are being used, look at the MAC address to determine which physical device it is, look up the hostname for that device in a database and then update the DNS based on that. I don't think there is standard software that will do that for you though.