I'm currently in the process of implementing and using IPv6 inside my LAN, and I've run into some annoying quirks with DHCP leases:
- Dual/Multi booting: A single host with multiple operating systems will generate different DUID values.
With a IPv4 lease I had a static MAC address that was shared between all operating systems on a host. That lease would be reused/renewed if I booted into a different OS. This way, the IPv4 address would remain the same and I could have a single set of firewall rules for the services running on all the applicable operating systems.
For IPv6, I've tried working around this by adding different entries into the dhcp file:
config host option dns '1' option ip '192.168.1.3' option name 'example' option mac 'XX:XX:XX:79:4D:B6' option duid '000100012380be330c9d92794db6' option hostid '3' config host option dns '1' option name 'example' option duid '0004ecdb2fbd1533b6d58c115305086294f5' option hostid '3'
And I've noticed that if two entires share the same hostid value, only the last entry in order will work. So I've been forced to set the hostid to a3/b3/c3/etc, depending on the OS and specific DUID. This sucks, because now I have to duplicate all my IPv6 firewall rules for that one host.
Is there a way to specify multiple duid values for a single IPv6 hostid, in a way that would mimic the IPv4 lease behavior? I'd like all the operating systems to have the same IPv6 address assigned.
- The hostname specified in the static IPv6 lease is ignored in favour of the DHCPv6 clients actual hostname.
The name option has no effect if the DHCPv6 client reports a hostname back. It will simply use the hostname the client provides. This sucks for one major reason: A dual-stack client with a IPv4 and IPv6 static lease will now have two hostnames in the domain. One with a IPv4 A record, and one with a AAAA record for IPv6.
IPv4 lease: example.domain.lan. 0 IN A 192.168.1.3 IPv6 lease: Aurelian.domain.lan. 0 IN AAAA fd42::b3 What I expected: example.domain.lan. 0 IN A 192.168.1.3 example.domain.lan. 0 IN AAAA fd42::b3
This last quirk can be worked around by adding entries into the hosts file manually, which kinda ruins the point of the whole exercise. Is this a bug or a feature of DHCPv6?