<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-v6ops-prefer8781-07" number="9872" category="info" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3" updates="" obsoletes="" xml:lang="en">

  <front>
    <title abbrev="NAT64 Prefix Discovery">Recommendations for Discovering IPv6 Prefix Used for IPv6 Address Synthesis</title>
    <seriesInfo name="RFC" value="9872"/>
    <author fullname="Nick Buraglio">
      <organization>Energy Sciences Network</organization>
      <address>
        <email>buraglio@forwardingplane.net</email>
      </address>
    </author>
    <author fullname="Tommy Jensen">
      <organization/>
      <address>
        <email>tojens.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Jen Linkova">
      <organization>Google</organization>
      <address>
        <email>furry13@gmail.com</email>
      </address>
    </author>
    <date year="2025" month="September"/>
    <area>OPS</area>
    <workgroup>v6ops</workgroup>

    <keyword>IPv6</keyword>
    <keyword>DNS64</keyword>
    <keyword>PREF64</keyword>
    <keyword>NAT64</keyword>
    <keyword>CLAT</keyword>

    <abstract>
<t>On networks providing IPv4-IPv6 translation (RFC 7915), hosts and other endpoints need to know the IPv6 prefix(es) used for translation (the NAT64 prefix (RFC 6052)). This document provides guidelines for NAT64 prefix discovery, specifically recommending obtaining the NAT64 prefix from the Router Advertisement option (RFC 8781) when available.</t>
    </abstract>
  </front>
  <middle>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Devices translating between IPv4 and IPv6 packet headers <xref target="RFC7915"/> use a NAT64 prefix to map IPv4 addresses into the IPv6 address space, and vice versa.
When a network provides NAT64, it is advantageous for endpoints to acquire the network's NAT64 prefixes (PREF64).
Discovering the PREF64 enables endpoints to:</t>
      <ul spacing="normal">
        <li>
          <t>Implement the customer-side translator (CLAT) function of the 464XLAT architecture <xref target="RFC6877"/>.</t>
        </li>
        <li>
          <t>Translate IPv4 literals to IPv6 literals (<xref target="RFC8305" section="7.1"/>).</t>
        </li>
        <li>
          <t>Perform local DNS64 <xref target="RFC6147"/> functions.</t>
        </li>
        <li>
          <t>Support applications relying on IPv4 address referral (<xref target="RFC7225" section="3.2.2"/>).</t>
        </li>
      </ul>
      <t>Dynamic PREF64 discovery is useful to keep the NAT64 prefix configuration up-to-date, particularly for unmanaged endpoints or endpoints that move between networks.
<xref target="RFC7050"/> introduces the first DNS64-based mechanism for PREF64 discovery per the analysis described in <xref target="RFC7051"/>.
However, subsequent methods have been developed to address the limitations of the mechanism described in <xref target="RFC7050"/>.</t>
      <t>For instance, <xref target="RFC8781"/> defines a Neighbor Discovery <xref target="RFC4861"/> option for Router Advertisements (RAs) to convey PREF64 information to hosts.
      This approach offers several advantages (<xref target="RFC8781" section="3"/>), including fate sharing with other host network configuration parameters.</t>
      <t>Due to fundamental shortcomings of the mechanism defined in <xref target="RFC7050"/> (see <xref target="issues"/> for more details), <xref target="RFC8781"/> describes the preferred solution for new deployments.
Implementations should strive for consistent PREF64 acquisition methods.
The DNS64-based mechanism of <xref target="RFC7050"/> should be employed only when RA-based PREF64 delivery is unavailable or as a fallback for legacy systems incapable of processing the PREF64 RA Option.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</name>

<dl spacing="normal" newline="false">
  <dt>DNS64:</dt><dd>A mechanism for synthesizing AAAA records from A records,
  defined in <xref target="RFC6147"/>.</dd>
  <dt>NAT64:</dt><dd>A mechanism for translating IPv6 packets to IPv4 packets,
  and vice versa.  The translation is done by translating the packet headers
  according to the IP/ICMP Translation Algorithm defined in <xref
  target="RFC7915"/>. NAT64 translators can operate in stateful mode <xref
  target="RFC6144"/> or stateless mode <xref target="RFC6877"/> (e.g., customer-side translator (CLAT)).
  This document uses "NAT64" as a generalized term
  for a translator, which uses the stateless IP/ICMP Translation Algorithm
  defined in <xref target="RFC7915"/> and operates within a framework for
  IPv4/IPv6 translation described in <xref target="RFC6144"/>.</dd>
  <dt>PREF64:</dt><dd>Pref64::/n or NAT64 prefix. An IPv6 prefix used for
  IPv6 address synthesis <xref target="RFC6146"/>.</dd>
  <dt>RA:</dt><dd>Router Advertisement. A packet used by Neighbor Discovery
  <xref target="RFC4861"/> and SLAAC to advertise the presence of the routers,
  together with other IPv6 configuration information.</dd>  
  <dt>SLAAC:</dt><dd>Stateless Address Autoconfiguration <xref target="RFC4862"/>.</dd>
</dl>
<t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/>
    <xref target="RFC8174"/> when, and only when, they appear in all capitals,
    as shown here. 
</t>
    </section>
    <section anchor="recommendations-for-pref64-discovery">
      <name>Recommendations for PREF64 Discovery</name>
      <section anchor="deployment-recommendations-for-endpoints">
        <name>Deployment Recommendations for Endpoints</name>
        <t>Endpoints <bcp14>SHOULD</bcp14> attempt to obtain PREF64 information from RAs per <xref target="RFC8781"/>, instead of using the method described in <xref target="RFC7050"/>.
In the absence of the PREF64 information in RAs, an endpoint <bcp14>MAY</bcp14> choose to fall back to the mechanism defined in <xref target="RFC7050"/>.
This recommendation to prefer the mechanism defined in <xref target="RFC8781"/> over the one defined in <xref target="RFC7050"/> is consistent with <xref target="RFC8781" section="5.1"/>.</t>
      </section>
      <section anchor="deployment-recommendations-for-operators">
        <name>Deployment Recommendations for Operators</name>
        <t>Network operators deploying NAT64 <bcp14>SHOULD</bcp14> provide PREF64 information in Router Advertisements per <xref target="RFC8781"/>.</t>
        <section anchor="mobile-network-considerations">
          <name>Mobile Network Considerations</name>
          <t>While support for the option specified in <xref target="RFC8781"/> is widely integrated into modern operating systems on mobile endpoints, equipment deployed in mobile network environments often lacks abilities to include the PREF64 Option into RAs.
Therefore, the immediate deployment and enablement of PREF64 by mobile operators may not currently be feasible and the recommendations outlined in this document are not presently applicable to mobile network operators.
These environments are encouraged to incorporate the option specified in <xref target="RFC8781"/> when made practical by infrastructure upgrades or software stack feature additions.</t>
        </section>
        <section anchor="migration-considerations">
          <name>Migration Considerations</name>
          <t>Transitioning from the heuristic procedure in <xref target="RFC7050"/> to using the approach in <xref target="RFC8781"/> might require a period of time where both mechanisms coexist.
How long this may take depends on the endpoint footprint, particularly the presence and number of endpoints running outdated operating systems that do not support the option in <xref target="RFC8781"/>.
Operators are advised to take those factors into account prior to removing support for the heuristic procedure in <xref target="RFC7050"/>, noting that it is still safe to add support for the approach in <xref target="RFC8781"/> since endpoints that support it will always prefer it over <xref target="RFC7050"/> if they follow RFC requirements.</t>
          <t>Migrating away from DNS64-based discovery also reduces dependency on DNS64 in general, thereby eliminating DNSSEC and DNS64 incompatibility concerns (<xref target="RFC6147" section="6.2"/>).</t>
        </section>
      </section>
    </section>
    <section anchor="issues">
      <name>Existing Issues with RFC 7050</name>
      <t>DNS-based discovery of the NAT64 prefix introduces some challenges, which make this approach less preferable than the latest developed alternatives (such as the PREF64 RA Option <xref target="RFC8781"/>).
This section outlines the key issues associated with <xref target="RFC7050"/> with a focus on those not discussed in <xref target="RFC7050"/> or in the analysis of solutions for hosts to discover the NAT64 prefix <xref target="RFC7051"/>.</t>
      <t>Signalling PREF64 in the RA Option addresses all issues outlined in this section (see <xref target="RFC8781" section="3"/> for details).</t>
      <section anchor="dependency-on-network-provided-recursive-resolvers">
        <name>Dependency on Network-Provided Recursive Resolvers</name>
        <t>The presence or absence of NAT64 functionality, as well as its
associated prefix (if present), are network-dependent attributes.
Therefore, <xref target="RFC7050"/> requires the endpoint discovering the prefix to use the DNS64 resolvers provided by the network.
If the device or an application is configured to use other recursive resolvers or runs a local recursive resolver, the corresponding name resolution APIs and libraries are required to recognize 'ipv4only.arpa.' as a special name and give it special treatment.
This issue and remediation approach are discussed in <xref target="RFC8880"/>.
However, it has been observed that very few implementations of the method described in <xref target="RFC7050"/> support the requirements specified in <xref target="RFC8880"/> for special treatment of 'ipv4only.arpa.'.
	As a result, configuring such systems and applications to use resolvers other than the one provided by the network breaks the PREF64 discovery, leading to degraded user experience.</t>
        <t>VPN applications may override the endpoint's DNS configuration, for example, by configuring enterprise DNS servers as the node's recursive resolvers and forcing all name resolution through the VPN.
These enterprise DNS servers typically lack DNS64 functionality and therefore cannot provide information about the PREF64 used within the local network.
	If the VPN is configured in so-called "split tunneling" mode (when only a subset of network traffic is routed into the VPN tunnel), endpoints may not discover the necessary PREF64, which negatively impacts their connectivity on IPv6-only networks.</t>
        <t>If both the network-provided DNS64 and the endpoint's resolver happen to utilize the Well-Known Prefix (64:ff9b::/96) <xref target="RFC6052"/>, the endpoint would end up using a PREF64 that's valid for the current network.
However, if the endpoint changes its network attachment, it can't detect if the new network lacks NAT64 entirely or uses a network-specific prefix (NSP) <xref target="RFC6144"/> for NAT64.</t>
        <t>Signalling PREF64 in an RA Option decouples the PREF64 discovery from the host's DNS resolver configuration.</t>
      </section>
      <section anchor="network-stack-initialization-delay">
        <name>Network Stack Initialization Delay</name>
        <t>When using SLAAC, an IPv6 host typically requires a single RA to acquire its network configuration.
For IPv6-only endpoints, timely PREF64 discovery is critical, particularly for those performing local DNS64 or NAT64 functions, such as CLAT <xref target="RFC6877"/>.
Until a PREF64 is obtained, the endpoint's IPv4-only applications and communication to IPv4-only destinations are impaired.
The mechanism defined in <xref target="RFC7050"/> does not bundle PREF64 information with other network configuration parameters and requires at least one round-trip time (to send a DNS request and receive a response) after the network stack configuration is completed.</t>
        <t>On the other hand, advertising PREF64 in an RA eliminates the period when the host obtains IPv6 addresses and default routers but no PREF64.</t>
      </section>
      <section anchor="latency-in-updates-propagation">
        <name>Latency in Updates Propagation</name>	
<t><xref target="RFC7050" section="3"/> states:</t>
<blockquote>The node <bcp14>SHALL</bcp14> cache the replies it receives during the Pref64::/n discovery procedure, and it <bcp14>SHOULD</bcp14> repeat the discovery process ten seconds before the TTL of the Well-Known Name's synthetic AAAA resource record expires.</blockquote>
<t>As a result, once a PREF64 is discovered, it will be used until the TTL expires or until the node disconnects from the network.
There is no mechanism for an operator to force the PREF64 rediscovery on the node without disconnecting the node from the network.
If the operator needs to change the PREF64 value used in the network, they need to proactively reduce the TTL value returned by the DNS64 server.
This method has two significant drawbacks:</t>
        <ul spacing="normal">
          <li>
            <t>Many networks utilize external DNS64 servers and therefore have no control over the TTL value if the PREF64 needs to be changed or withdrawn.</t>
          </li>
          <li>
            <t>The PREF64 changes need to be planned and executed at least TTL seconds in advance. If the operator needs to notify nodes that a particular prefix must not be used (e.g., during a network outage or if the nodes learned a rogue PREF64 as a result of an attack), it might not be possible without interrupting the network connectivity for the affected nodes.</t>
          </li>
        </ul>
        <t>The mechanism defined in <xref target="RFC8781"/> allows notifying hosts about PREF64 changes immediately by sending an RA with updated information.</t>
      </section>
      <section anchor="multihoming-implications">
        <name>Multihoming Implications</name>
        <t><xref target="RFC7050" section="3"/> requires a node to examine all received AAAA resource records to discover one or more PREF64s and to utilize all learned prefixes.
However, this approach presents challenges in some multihomed topologies where different DNS64 servers belonging to different ISPs might return different PREF64s.
In such cases, it is crucial that traffic destined for synthesized addresses is sent to the correct NAT64 and the source address selected for those flows belongs to the prefix from that ISP's address space.
In other words, the node needs to associate each discovered PREF64 with upstream information, including the IPv6 prefix and default gateway.
Currently, there is no reliable way for a node to map a DNS64 response (and the prefix learned from it) to a specific upstream in a multihoming scenario.
Consequently, the node might inadvertently select an incorrect source address for a given PREF64 and/or send traffic to the incorrect uplink.</t>
        <t>Advertising PREF64 in RAs allows hosts to track which PREF64 was advertised by which router and use that information to select the correct next hop.
<xref section="8" target="I-D.ietf-v6ops-claton"/> discusses this scenario in more details.</t>
      </section>
      <section anchor="security-implications">
        <name>Security Implications</name>
        <t>As discussed in <xref target="RFC7050" section="7"/>, the DNS-based PREF64 discovery is prone to DNS spoofing attacks.
In addition to creating a wider attack surface for IPv6 deployments, <xref target="RFC7050"/> has other security challenges, which are discussed below.</t>
        <section anchor="secure-channel-def">
          <name>Definition of Secure Channel</name>
          <t><xref target="RFC7050"/> requires a node's communication channel with a DNS64 server to be a "secure channel", which it defines to mean "a communication channel a node has between itself and a DNS64 server protecting DNS protocol-related messages from interception and tampering".
	  This need is redundant when another communication mechanism of IPv6-related configuration, specifically RAs, can already be defended against tampering, for example, by enabling RA-Guard <xref target="RFC6105"/>.
When the mechanism defined in <xref target="RFC8781"/> is used in place of the one defined in <xref target="RFC7050"/>,
nodes only need to implement one defense mechanism; requiring nodes to implement two defense mechanisms creates an unnecessary risk.</t>
        </section>
        <section anchor="secure-channel-example-of-ipsec">
          <name>Secure Channel Example of IPsec</name>
          <t>One of the two examples that <xref target="RFC7050"/> defines to qualify a communication channel with a DNS64 server is the use of an "IPsec-based virtual private network (VPN) tunnel". As of the time of this writing, this is not supported as a practice by any common operating system DNS client. While they could, there have also since been multiple mechanisms defined for performing DNS-specific encryption, such as those defined in <xref target="RFC9499"/>, that would be more appropriately scoped to the applicable DNS traffic. These are also compatible with encrypted DNS advertisement by the network using Discovery of Network-designated Resolvers <xref target="RFC9463"/>, which would ensure the clients know in advance that the DNS64 server supported the encryption mechanism.</t>
        </section>
        <section anchor="secure-channel-example-of-link-layer-encryption">
          <name>Secure Channel Example of Link Layer Encryption</name>
          <t>The other example given by <xref target="RFC7050"/> that would allow a communication channel with a DNS64 server to qualify as a "secure channel" is the use of a "link layer utilizing data encryption technologies". As of the time of this writing, most common link layer implementations use data encryption already with no extra effort needed on the part of network nodes. While this appears to be a trivial way to satisfy this requirement, it also renders the requirement meaningless since any node along the path can still read the higher-layer DNS traffic containing the translation prefix. This seems to be at odds with the definition of "secure channel", as explained in <xref section="2.2" sectionFormat="of" target="RFC7050"/>.</t>
        </section>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>Obtaining PREF64 information using RAs improves the overall security of an IPv6-only endpoint as it mitigates all attack vectors related to a spoofed or rogue DNS response, as discussed in <xref target="RFC7050" section="7"/>.
Security considerations related to obtaining PREF64 information from RAs are discussed in <xref target="RFC8781" section="7"/>.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <displayreference target="I-D.ietf-v6ops-claton" to="CLAT"/>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7050.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8781.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4861.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4862.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6105.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6052.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6144.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7225.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7915.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6146.xml"/>	
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6147.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6877.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7051.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8880.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9463.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9499.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8305.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-v6ops-claton.xml"/>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments">
      <name>Acknowledgments</name>
      <t>The authors would like to thank the following people for their
      valuable contributions: <contact fullname="Mike Bishop"/>, <contact
      fullname="Mohamed Boucadair"/>, <contact fullname="Lorenzo Colitti"/>,
      <contact fullname="Tom Costello"/>, <contact fullname="Charles Eckel"/>,
      <contact fullname="Susan Hares"/>, <contact fullname="Nick Heatley"/>,
      <contact fullname="Ted Lemon"/>, <contact fullname="Gábor Lencse"/>, 
      <contact fullname="David Lou"/>, <contact fullname="Peter Schmitt"/>,
      <contact fullname="Éric Vyncke"/>, and <contact fullname="Chongfeng
      Xie"/>.</t>
    </section>
  </back>
  </rfc>
