• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

IPv6 + DHCPv6 static mapping + DNS forwarder: incorrect name resolution.

Scheduled Pinned Locked Moved IPv6
1 Posts 1 Posters 319 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    Jens Keiner
    last edited by Dec 15, 2020, 11:27 AM

    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 by dnsmasq 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 entry xxxx: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

    1 Reply Last reply Reply Quote 0
    1 out of 1
    • First post
      1/1
      Last post
    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
      This community forum collects and processes your personal information.
      consent.not_received