IPv6 + DHCPv6 static mapping + DNS forwarder: incorrect name resolution.
I've come across an issue I haven't seen discussed here so far, I think. Otherwise, would appreciate a pointer to related discussion.
- Running on a recent 2.50 development build of pfSense.
- I use IPv6 with a delegated prefix from my ISP.
- I have a handful of subnets that track the WAN interface with respect to IPv6.
- I use the DHCPv6 + RA service on the internal interfaces to hand out IP addresses.
- I also use the DNS Forwarder service (aka dnsmasq) for DNS name resolution within the LAN. Checked the option to include static DHCPv6 mappings.
The problem I've observed is that the static mappings that get written to
/etc/hostsand that are used by
dnsmasqcan be wrong, particularly if the WAN connection has just come up.
The problem seems to be that regeneration of the
/etc/hostsfile is triggered when the WAN connection comes up (as per system logs), but at the time, the WAN interface may not yet have acquired a prefix so that the static DHCPv6 mappings are not correctly enriched with the respective subnet prefix.
- Domain is
- Delegated prefix from ISP is
xxxx:yyyy:zzzz:aa, i.e. a /56 net.
- LAN interface uses prefix
xxxx:yyyy:zzzz:aa01, a /64 net.
- Static host mapping for host
I expect that
/etc/hostscontains the entry
xxxx:yyyy:zzzz:aa01::4 foo.domain.com foo, but it actually sometimes contains
::4 foo.domain.com foowhich is incorrect.
Now, the entries are generated in
/etc/hostscorrectly if I add or change a mapping while the WAN interface is up and running and a prefix has been assigned. But, e.g. on reboot, the entries may be incorrect since they are generated when the WAN interface hasn't yet received a prefix, and they are not generated again once the WAN interface actually receives a prefix.
Has anybody observed the same behavior? Any ideas what's the best way to fix this?