"ddns-hostname" generated from IPv6-address?

Joachim Tingvold joachim at tingvold.com
Fri Sep 23 00:27:02 UTC 2011


I'm not even sure if all DHCPv6-clients provides a hostname, but is there any equivalent to the following syntax, that works with IPv6 DDNS?

  if exists host-name {
     ddns-hostname = lcase(option host-name);
  } else {
     ddns-hostname = binary-to-ascii(10, 8, "-", leased-address);

If the client doesn't provide a hostname, it should use the IPv6-address to make the hostname.

"2001:20a0:4000:300::123" would become "2001-20a0-4000-300_123" (or the like). I guess "2001-20a0-4000-0300-0000-0000-0000-0123" could work too, but "2001-20a0-4000-300_123" would be preferred.


More information about the dhcp-users mailing list