IPv6 + DHCPv6 static mapping + DNS forwarder: incorrect name resolution.
-
Hi all,
I've come across an issue I haven't seen discussed here so far, I think. Otherwise, would appreciate a pointer to related discussion.
My setup:
- 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/hosts
and that are used bydnsmasq
can be wrong, particularly if the WAN connection has just come up.The problem seems to be that regeneration of the
/etc/hosts
file 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.Example:
- Domain is
domain.com
. - 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
foo
with address::4
.
I expect that
/etc/hosts
contains the entryxxxx:yyyy:zzzz:aa01::4 foo.domain.com foo
, but it actually sometimes contains::4 foo.domain.com foo
which is incorrect.Now, the entries are generated in
/etc/hosts
correctly 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?
Cheers,
Jens