<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-link-v6ops-claton-02"
  ipr="trust200902"
  obsoletes=""
  updates="8585"
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
<title abbrev="claton">464 Customer-side Translator (CLAT): Node Recommendations</title>
    <seriesInfo name="Internet-Draft" value="draft-link-v6ops-claton"/>
    <author fullname="Jen Linkova" initials="J" surname="Linkova">
      <organization>Google</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>1 Darling Island Rd</street>
          <city>Pyrmont</city>
          <region>NSW</region>
          <code>2009</code>
          <country>AU</country>
        </postal>        
        <email>furry13@gmail.com</email>  
        <email>furry@google.com</email>  
      </address>
    </author>
<author initials="T." surname="Jensen" fullname="Tommy Jensen">
      <organization showOnFrontPage="true">Microsoft</organization>
      <address>
        <email>tojens@microsoft.com</email>
      </address>
    </author>
    <date year="2024"/>
<area>Ops</area>
    <workgroup>IPv6 operations</workgroup>
    <keyword>ipv6</keyword>
    <keyword>slaac</keyword>
    <keyword>464xlat</keyword>
    <keyword>clat</keyword>
    <keyword>nat64</keyword>
    <keyword>pref64</keyword>
    <keyword>ipv6-only</keyword>
    <keyword>ipv6-mostly</keyword>


    <abstract>
 <t>
464XLAT (<xref target="RFC6877"/>) defines an architecture for providing IPv4 connectivity across an IPv6-only network.
The solution  contains two key elements: provider-side translator (PLAT) and customer-side translator (CLAT).
This document provides recommendations on when a node shall enable or disable CLAT.
</t>

    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
<t>
464XLAT is widely deployed in 3GPP networks (as described in Section 4.2 of <xref target="RFC6877"/>) where a mobile phone performs the CLAT function, providing a private IPv4 address and IPv4 default route for the applications and tethered devices.
Enabling 464XLAT allowed mobile operators to migrate User Equipment (UE) devices (also known as mobile phones) to IPv6-only mode, where those devices are only assigned IPv6 addresses.
</t>
<t>
Until recently, IPv6-only hosts were rather uncommon outside of mobile networks and datacenters.
Even if the network provides PLAT in the form of NAT64, hosts like desktops and laptops still need the network to provide IPv4 addresses, as otherwise IPv4-only applications fail.
However, as more and more operating systems outside of the 3GPP world support CLAT, it becomes possible to migrate those devices to IPv6-only mode.
Networks such as public Wi-Fi, enterprise networks, or even home networks can deploy 464XLAT as described in Section 4.2 of <xref target="RFC6877"/>:
</t>
<ul>
<li>
<t>PLAT functions are performed by NAT64 network devices.</t>
</li>
<li>
<t>
CLAT is performed by the host itself.
</t>
</li>
</ul>

<t>
Another 464XLAT deployment model is a Wireline one (section 4.1 of <xref target="RFC6877"/>), when a CPE router is connected to an IPv6-only network and provides CLAT functions for IPv4-enabled downstream devices. <xref target="RFC8585"/> specifies 464XLAT support requirements for such devices.
</t>

<t>
For both scenarios to work, the node performing CLAT (such as a host or a CPE router) need to enable the CLAT when connecting to an IPv6-only network.
This document complements <xref target="RFC6877"/> by  providing recommendations for the node developers on enabling and disabling CLAT functions.
</t>

    </section>
      
      <section>
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
          interpreted as described in BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>

<section anchor="term">
<name>
Terminology
</name>
<ul>
<li>
<t>
IPv6-only network: A network that does not assign IPv4 addresses to hosts and facilitates connectivity to IPv4-only destinations using NAT64 ((<xref target="RFC6146"/>). In this document, the term "IPv6-only network" specifically refers to networks that provide NAT64 as it's required by the 464XLAT architecture (<xref target="RFC6877"/>).
</t>
</li>
<li>
<t>
CLAT Node: a node (a host or a router) which performs CLAT functions by running one or multiple CLAT instances (e.g. one CLAT instance per interface).
</t>
</li>
</ul>
</section>
<section anchor="multihomed">
<name>Multiple Interfaces Considerations</name>
<t>
A node may have multiple IPv6-only interfaces (for example, a mobile phone can be connected to an IPv6-only Wi-Fi network and to an IPv6-only mobile network).
In that case the node SHOULD run an independent, dedicated CLAT instance on each interface connected to a network equipped with PLAT.
Consequently, each CLAT instance SHOULD install a separate default IPv4 route on each CLAT-enabled interface.
The metrics of IPv4 routes SHOULD be consistent with the metrics of IPv6 default routes.
</t>
</section>

    <section anchor="enable">
<name>Enabling CLAT</name>
<t>
To enable CLAT, the node needs to discover the PLAT-side translation IPv6 prefix, also known as the NAT64 prefix (see Section 6.3 of <xref target="RFC6877"/>).
The PREF64 Router Advertisement option (<xref target="RFC8781"/>) provides that information and can be used as a strong indication that the network supports NAT64 (PLAT) functionality.
Therefore the node SHOULD enable CLAT if it receives an Router Advertisement containing PREF64 option.
</t>
<t>
If RAs received by the node do not contain a PREF64 option, the node MAY use other mechanisms to detect the PLAT presence and obtain the NAT64 prefix (such as <xref target="RFC7050"/>).
In that case, the node SHOULD enable CLAT after discovering the NAT64 prefix, unless by that time the node has already obtained an IPv4 address.
</t>
<t>
The node MUST follow recommendations from Section 4 of <xref target="RFC7335"/> to avoid IPv4 address space conflicts.
</t>
<section anchor="ipv4detect">
<name>Detecting IPv4 Presence</name>
<t>
From a performance perspective, native IPv4 connectivity is preferrable over 464XLAT, so CLAT SHOULD NOT be enabled if the node has IPv4 connectivity over the given interface.
However, SLAAC might complete faster than DHCPv4. 
The node SHOULD NOT wait for an explicit (DHCPv4 Option 108, <xref target="RFC8925"/>) or an implicit (DHCPv4 timeouts) indication that native IPv4 connectivity is not available.
Such delay would be impactful for IPv4-only applications, as such applications cannot benefit from 464XLAT until CLAT is operational.
Therefore, the node SHOULD enable CLAT as soon as network support for PLAT is detected while IPv4 connectivity is not yet detected. Clients SHOULD then disable CLAT if native IPv4 connectivity is established whether or not PLAT support from the network remains available.
</t>
</section>
</section>

<section anchor="addr">
<name>
CLAT Addresses Considerations
</name>


<section anchor="v4addr">
<name>
CLAT IPv4 Addresses
</name>
<t>
There are two different models in 464xlat deployments:
</t>
<ul>
<li>
<t>
A dedicated prefix model, which Section 4.1 of <xref target="RFC6877"/> calls "wireline network architecture".
In that case, the node performing CLAT functions also extends the network downstream and provides network connectivity services to other connected systems.
Those systems can be physical (e.g. various clients connected to a CPE router), or logical (e.g. virtual systems running on a node, while the host system acts as a router and performs CLAT). 
In all those cases, systems behind the CLAT node usually use <xref target="RFC1918"/> addresses.
</t>
</li>
<li>
<t>
A single-address model, which section 4.2 of <xref target="RFC6877"/> calls "wireless network architecture".
In that case, the CLAT instance provides an IPv4 address and the default route to the local node's network stack only.
It should be noted that <xref target="RFC6877"/> implies that the second deployment scenario is limited to 3GPP cases, while currently it is also deployed in other types of networks, such as enterprise and public Wi-Fi networks, where hosts (as mobile phones, laptops and desktops) use CLAT to provide connectivity to IPv4-only local applications.
Despite the word "wireless" in the name, this architecure is applicable for wired networks as well (e.g. desktops or servers using wired connections).
</t>
</li>
</ul>
<t>
In the latter case, the CLAT instance needs a single IPv6 and a single IPv4 address only.
The node providing CLAT functions to local applications SHOULD use IPv4 addresses from the dedicated 192.0.0.0/29 range (<xref target="RFC7335"/>), reserved for IPv4 continuity solutions including but not limited to 464XLAT.
If the node runs multiple CLAT instances (see <xref target="multihomed"/>), the node SHOULD use different local IPv4 addresses for each CLAT instance.
This means that it is not possible to run more than 8 CLAT instances per node.
The node MUST NOT send packets on wire from the local CLAT address.
</t>
<t>
The host SHOULD use 255.255.255.255 as a netmask for the CLAT address.
That allows all 8 addresses from 192.0.0.0/29 to be used, if needed.
</t>
<t>
It should be noted that 192.0.0.0/29 is shared between multiple IPv4 continuity solutions such as 464XLAT and DS-Lite (see <xref target="RFC7335"/>.
For example, Section 10 of <xref target="RFC6333"/> reserves 192.0.0.1 for the Dual-Stack Lite default router.
However, as per Section 4 of <xref target="RFC7335"/>, the host MUST NOT enable two active IPv4 continuity solutions simultaneously in a way that would cause a node to have overlapping 192.0.0.0/29 address space.
Therefore, as long as the host is not using DS-Lite, it MAY use 192.0.0.1 as a CLAT address.
</t>

</section>

<section anchor="v6addr">
<name>
CLAT IPv6 Addresses
</name>
<t>
Section 6.3 of <xref target="RFC6877"/> recommends that the CLAT instance acquires a dedicated /64 for translating between IPv4 and IPv6, and only uses a single interface IPv6 address if a dedicated prefix is not available via DHCPv6-PD.
However, deployments where each node can obtain a dedicated /64 just for CLAT are rather uncommon, to say the least.
In most cases, the CLAT instance uses a single IPv6 address as a source for all IPv4 traffic translated bt CLAT. 
</t>
<t>
The CLAT instance SHOULD obtain a dedicated IPv6 address used exclusively for CLAT functions. 
This is required as when the node receives a packet from a NAT64 source, the node needs to differentiate between native IPv6 traffic and traffic which needs to be passed to the CLAT instance.
For example, an ICMPv6 Echo Reply packet from 64:ff9b::203.0.113.1 can be a response to either an IPv6 ping to 64:ff9b::203.0.113.1, or an IPv4 ping to 203.0.113.1, translated by CLAT.
Using a dedicated IPv6 source address for CLAT traffic allows the node to make that distinction without keeping state and operate in the stateless mode (see Section 1.3 of <xref target="RFC6145"/>.
</t>
<t>
In accordance with Section 5.4 of <xref target="RFC4862"/>, the node MUST perform Duplicate Address Detection for each dedicated CLAT address.
</t>
<t>
If the dedicated CLAT address is obtained via SLAAC, the CLAT instance SHOULD ensure that the address is checksum-neutral for the given local IPv4 CLAT address and the NAT64 prefix (this means that the local IPv4 address needs to be assigned/known before the IPv6 one is configured).
Using a checksum-neutral CLAT address provides the following benefits:
</t>
<ul>
<li>
<t>Better performance as CLAT doesn't need to recalculate the checksum.</t>
</li>
<li>
<t>
If a protocol uses the standard IP checksum, CLAT doesn't need to recalculate the checksum.
That improves the chances of the protocol working via CLAT even if CLAT is not aware of the protocol's semantics.
</t>
</li>
</ul>

<t>
The node SHOULD generate a different interface id for the CLAT address when connecting to different networks, even if the NAT64 prefix and the local IPv4 CLAT address do not change. 
To achieve that, the node SHOULD generate a random checksum-neutral CLAT address every time.
</t>
</section>
</section>
<section anchor="disable">
<name>Disabling CLAT</name>
<t>
The node MAY choose to turn CLAT off if an IPv4 address becomes available after CLAT has started.
However, turning it off would affect all applications and traffic flows already utilizing CLAT.
</t>
</section>
<section anchor="update">
<name>
Updates to RFC8585
</name>
<t>
This document makes the following changes to Section 3.2.1 of [RFC8585]:
</t>
<t>
OLD TEXT:
</t>
<t>
===
</t>
<t>
464XLAT requirements:
</t>
<t>
===
</t>
<t>
NEW TEXT:
</t>
<t>
===
</t>
<t>
464XLAT requirements:
</t>
<t>
464XLAT-0:  The IPv6 Transition CE Router SHOULD follow recommendations provided in draft-link-v6ops-claton.
</t>
<t>
===
</t>
<t>
OLD TEXT:
</t>
<t>
===
</t>
<t>464XLAT-4: The IPv6 Transition CE Router MUST implement <xref target="RFC7050"/>
               ("Discovery of the IPv6 Prefix Used for IPv6 Address
               Synthesis") in order to discover the provider-side
               translator (PLAT) translation IPv4 and IPv6
               prefix(es)/suffix(es). </t>

<t>464XLAT-5: If PCP is implemented, the IPv6 Transition CE Router MUST
               follow <xref target="RFC7225"/> ("Discovering NAT64 IPv6 Prefixes Using
               the Port Control Protocol (PCP)") in order to learn the
               PLAT-side translation IPv4 and IPv6 prefix(es)/suffix(es)
               used by an upstream PCP-controlled NAT64 device. </t>

<t>464XLAT-6:  If the network provides several choices for the
               discovery/learning of the NAT64 prefix, the priority to
               use one or the other MUST follow this order: 1) <xref target="RFC7225"/>
               and 2) <xref target="RFC7050"/>.</t>
<t>
   The NAT64 prefix could be discovered by means of the method defined
   in <xref target="RFC7050"/> only if the service provider uses DNS64 [RFC6147].  It
   may be the case that the service provider does not use or does not
   trust DNS64 [RFC6147] because the DNS configuration at the CE (or
   hosts behind the CE) can be modified by the customer.  In that case,
   the service provider may opt to configure the NAT64 prefix by means
   of the option defined in <xref target="RFC7225"/>.  This can also be used if the
   service provider uses DNS64 [RFC6147].
</t>
<t>
===
</t>
<t>
NEW TEXT
</t>
<t>
===
</t>
<t>464XLAT-4: The IPv6 Transition CE Router MUST implement <xref target="RFC8781"/> ("Discovering PREF64 in Router Advertisements") and <xref target="RFC7050"/>
               ("Discovery of the IPv6 Prefix Used for IPv6 Address
               Synthesis") in order to discover the provider-side
               translator (PLAT) translation IPv4 and IPv6
               prefix(es)/suffix(es). </t>

<t>464XLAT-5: If PCP is implemented, the IPv6 Transition CE Router MUST
               follow <xref target="RFC7225"/> ("Discovering NAT64 IPv6 Prefixes Using
               the Port Control Protocol (PCP)") in order to learn the
               PLAT-side translation IPv4 and IPv6 prefix(es)/suffix(es)
               used by an upstream PCP-controlled NAT64 device. </t>

<t>464XLAT-6:  If the network provides several choices for the
               discovery/learning of the NAT64 prefix, the priority to
               use one or the other MUST follow this order: 1)<xref target="RFC7225"/> 2)<xref target="RFC8781"/>
               and 3) <xref target="RFC7050"/>.</t>
<t>
   <xref target="RFC8781"/> allows the service provider to signal NAT64 prefix independently from DNS64 presence.
   At the same time the NAT64 prefix could be discovered by means of the method defined
   in <xref target="RFC7050"/> only if the service provider uses DNS64 [RFC6147].  It
   may be the case that the service provider does not use or does not
   trust DNS64 [RFC6147] because the DNS configuration at the CE (or
   hosts behind the CE) can be modified by the customer.  In that case,
   the service provider may opt to configure the NAT64 prefix by means
   of the option defined in <xref target="RFC7225"/>.  This can also be used if the
   service provider uses DNS64 [RFC6147].
</t>
<t>
===
</t>

</section>
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
<t>
If a malicious actor spoofs PLAT presence signals (such as an RA with PREF64 option) or DNS responses for DNS-based NAT64 prefix detection (<xref target="RFC7050"/>), traffic of IPv4-only applications using CLAT can be affected:
</t>
<ul>
<li>
<t>if there is no PLAT (NAT64) devices, traffic to NAT64 destinations would be dropped.</t>
</li>
<li>
<t>
If the attacker intercepts traffic for the NAT64 prefix (e.g. by providing the victim with a bogus NAT64 prefix and steering traffic for those destinations towards themselves), the attacker might be able to perform man-in-the-middle attacks.
</t>
</li>
</ul>
<t>
Using the PREF64 RA option to detect PLAT presence and the NAT64 prefix is less prone to such attacks, as the attacker needs to be on-link and be able to bypass layer-2 security features such as RA Guard.
</t>
    </section>

    <section anchor="privacy">
      <name>Privacy Considerations</name>
      <t>
This document does not introduce any privacy considerations.
      </t>
    </section>
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>This memo does not introduce any requests to IANA.</t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
	<xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6146.xml"/>
	<xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6333.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6877.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7050.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7335.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8781.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8585.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8925.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
 
      <references>
	      <name>Informative References</name>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.1918.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4861.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.4862.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6145.xml"/>
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7225.xml"/>

      </references>
    </references>
    
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
<t>
Thanks to Ondrej Caletka, Lorenzo Colitti, Ted Lemon, Jordi Palet, Dieter Siegmund for the discussions, the input and all contribution.
</t>
    </section>
    
 </back>
</rfc>
