08 August 2012

IPv4 DNS records removed from DHCP clients with IPv6 Enabled

When client machines are configured to use a DHCP server that contains a IPv4 scope they are issues an IPv4 address and a DNS host record or A record is registeed.

If IPv6 is also enabled it will automatically assign an IPv6 address and a corresponding AAAA record is registered in DNS.

In an environment where both IPv4 and IPv6 is enabled on a client machine (dual stacked) you should see two DNS entries for that machine

  • The first would a a normal IPv4 host Record or A record
  • The second would be an IPv6 host record or AAAA record

The look as follows in DNS

When doing a name lookup on the host you will get the following response

When doing a ping to another machine you will notice that it now defaults to using IPv6 addressing and that you will have to execute ping -4  to force using IPv4 addressing

I ran into a problem where DHCP client machines would initially register both the A and AAAA records, but after a while the IPv4 A records disappeared or was removed or went missing from DNS.  The IPv4 address was of course still valid but could not be resolved with DNS since the record was no longer there.  This caused an issue for machines with no IPv6 enabled.

The cause of this was a configuration on the DHCP server

If "Always dynamically uupdate DNS A and PTR records" is the selected option it will only update one DNS record. If IPv6 is enable it will be that one only.

The image below where "Dynamically update DNS A and PTR record only if requested by the DHCP clients" is the selected option is the correct configuration.  This will not only initially register both record but it will update both.

1 comment:

Anonymous said...

Lifesaver - thanks man. Helped me.

Post a Comment