<?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" submissionType="IETF" category="info" consensus="true" docName="draft-ietf-v6ops-transition-comparison-04" number="9313" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" tocDepth="4"
symRefs="true" sortRefs="true" version="3">
  
<!-- xml2rfc v2v3 conversion 3.14.0 -->
  <front>

    <title abbrev="Pros and Cons of IPv4aaS Technologies">Pros and Cons of
    IPv6 Transition Technologies for IPv4-as-a-Service (IPv4aaS)</title>
    <seriesInfo name="RFC" value="9313"/>
    <author fullname="Gábor Lencse" initials="G." surname="Lencse">
      <organization abbrev="BUTE">Budapest University of Technology and Economics</organization>
      <address>
        <postal>
          <street>Magyar tudósok körútja 2</street>
          <city>Budapest</city>
          <region/>
          <code>H-1117</code>
          <country>Hungary</country>
        </postal>
        <email>lencse@hit.bme.hu</email>
        <uri>http://www.hit.bme.hu/~lencse/index_en.htm</uri>
      </address>
    </author>
    <author fullname="Jordi Palet Martinez" initials="J." surname="Palet Martinez">
      <organization>The IPv6 Company</organization>
      <address>
        <postal>
          <street>Molino de la Navata, 75</street>
          <city>La Navata - Galapagar</city>
          <region>Madrid</region>
          <code>28420</code>
          <country>Spain</country>
        </postal>
        <email>jordi.palet@theipv6company.com</email>
        <uri>http://www.theipv6company.com/</uri>
      </address>
    </author>
    <author fullname="Lee Howard" initials="L." surname="Howard">
      <organization>Retevia</organization>
      <address>
        <postal>
	  <street>9940 Main St., Suite 200</street>
          <city>Fairfax</city>
          <region>Virginia</region>
          <code>22031</code>
          <country>United States of America</country>
        </postal>
        <email>lee@asgard.org</email>
      </address>
    </author>
    <author fullname="Richard Patterson" initials="R." surname="Patterson">
      <organization>Sky UK</organization>
      <address>
        <postal>
          <street>1 Brick Lane</street>
          <city>London</city>
          <code>EQ 6PU</code>
          <country>United Kingdom</country>
        </postal>
        <email>richard.patterson@sky.uk</email>
      </address>
    </author>
    <author fullname="Ian Farrer" initials="I." surname="Farrer">
      <organization>Deutsche Telekom AG</organization>
      <address>
        <postal>
          <street>Landgrabenweg 151</street>
          <city>Bonn</city>
          <code>53227</code>
          <country>Germany</country>
        </postal>
        <email>ian.farrer@telekom.de</email>
      </address>
    </author>
    <date year="2022" month="October" />

    <area>ops</area>
    <workgroup>v6ops</workgroup>

    <keyword>IPv6</keyword>
    <keyword>Transition Technologies</keyword>
    <keyword>Comparison</keyword>
    <keyword>IPv4aaS</keyword>
    <keyword>IPv6-only</keyword>
    <keyword>464XLAT</keyword>
    <keyword>DNS64</keyword>
    <keyword>Dual-Stack Lite</keyword>
    <keyword>Lightweight 4over6</keyword>
    <keyword>MAP-E</keyword>
    <keyword>MAP-T</keyword>
    
    <abstract>
      <t>Several IPv6 transition technologies have been developed to
      provide customers with IPv4-as-a-Service (IPv4aaS) for ISPs with an
      IPv6-only access and/or core network. These technologies have their
      advantages and disadvantages. Depending on existing topology, skills,
      strategy, and other preferences, one of these technologies may be the
      most appropriate solution for a network operator.</t>
      <t>This document examines the five most prominent
      IPv4aaS technologies and considers a number of different aspects
      to provide network operators with an easy-to-use reference to assist in
      selecting the technology that best suits their needs.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>As the deployment of IPv6 continues to be prevalent, it becomes clearer
      that network operators will move to building single-stack IPv6 core
      and access networks to simplify network planning and operations.
      However, providing customers with IPv4 services continues to be a
      requirement for the foreseeable future. To meet this need, the IETF
      has standardized a number of different IPv4aaS technologies
      for this (see <xref target="LEN2019" format="default"/>) based on differing requirements and
      deployment scenarios.</t>
      <t>The number of technologies that have been developed makes it 
	  time-consuming for a network operator to identify the most appropriate
      mechanism for their specific deployment. This document provides a
      comparative analysis of the most commonly used mechanisms to assist
      operators with this problem.</t>
      <t>Five different IPv4aaS solutions are considered:
      </t>
      <ol spacing="normal" type="1"><li>464XLAT <xref target="RFC6877" format="default"/></li>
        <li>Dual-Stack Lite <xref target="RFC6333" format="default"/></li>
        <li>Lightweight 4over6 (lw4o6) <xref target="RFC7596" format="default"/></li>


        <li>Mapping of Address and Port with Encapsulation (MAP-E) <xref target="RFC7597" format="default"/></li>
        <li>Mapping of Address and Port using Translation (MAP-T) <xref target="RFC7599" format="default"/></li>
      </ol>
      <t>We note that <xref target="RFC6180" format="default"/> gives
      guidelines for using IPv6 transition mechanisms during IPv6 deployment;
      that document addresses a much broader topic, whereas this document
      focuses on a small part of it.</t>
    </section>
    <section anchor="overview" numbered="true" toc="default">
      <name>Overview of the Technologies</name>
      <t>The following sections introduce the different technologies analyzed
      in this document and describe some of their most important characteristics.
      </t>
      <section anchor="xlat_ov" numbered="true" toc="default">
        <name>464XLAT</name>
        <t>464XLAT may use double translation (stateless NAT46 + stateful
        NAT64) or single translation (stateful NAT64) depending on different
        factors, such as the use of DNS by the applications and the
        availability of a DNS64 function (in the host or service
        provider network).</t>
        <t>The customer-side translator (CLAT) is located in the customer's
        device, and it performs stateless NAT46 translation <xref
        target="RFC7915" format="default"/> (more precisely, a stateless
        IP/ICMP translation from IPv4 to IPv6).  IPv4-embedded IPv6 addresses
        <xref target="RFC6052" format="default"/> are used for both source and
        destination addresses. Commonly, a /96 prefix (either the 64:ff9b::/96
        Well-Known Prefix (WKP) or a Network-Specific Prefix) is used as the
        IPv6 destination for the IPv4-embedded client traffic.</t>
        <t>In deployments where NAT64 load balancing (see <xref target="RFC7269"
        sectionFormat="of" section="4.2"/>) is enabled, multiple WKPs <xref target="RFC8215" format="default"/> may be used.</t>
        <t>In the operator's network, the provider-side translator (PLAT)
        performs stateful NAT64 <xref target="RFC6146" format="default"/> to translate the
        traffic. The destination IPv4 address is extracted from the
        IPv4-embedded IPv6 packet destination address, and the source address is
        from a pool of public IPv4 addresses.</t>

        <t>Alternatively, when a dedicated /64 is not available for translation,
        the CLAT device uses a stateful NAT44 translation before the stateless
        NAT46 translation.</t>

<t>In general, keeping state in devices close to the end-user network (i.e., at the CE (Customer Edge) router) is not perceived to be as problematic as keeping state in the operator's network.
</t>

<t>In typical deployments, 464XLAT is used together with DNS64 
		<xref target="RFC6147" format="default"/>; see <xref       
target="RFC8683" sectionFormat="of" section="3.1.2"/>.
        When an IPv6-only client or application communicates with an IPv4-only
        server, the DNS64 server returns the IPv4-embedded IPv6 address of the
        IPv4-only server. In this case, the IPv6-only client sends out IPv6
        packets, the CLAT functions as an IPv6 router, and the PLAT performs a
        stateful NAT64 for these packets. There is a single
        translation.</t>
        <t>Similarly, when an IPv4-only client or application communicates
        with an IPv4-only server, the CLAT will statelessly translate to IPv6
        so it can traverse the ISP network up to the PLAT (NAT64), which in
        turn will translate to IPv4.</t>
        <t>Alternatively, one can say that DNS64 + stateful NAT64 is
        used to carry the traffic of the IPv6-only client and the IPv4-only
        server, and the CLAT is used only for the IPv4 traffic from applications
        or devices that use literal IPv4 addresses or non-IPv6-compliant APIs.
        </t>

 <figure anchor="xlatarch">
          <name>Overview of the 464XLAT Architecture</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
          Private +----------+ Translated  +----------+     _______
  +------+  IPv4  |   CLAT   |    4-6-4    |   PLAT   |    ( IPv4  )
  | IPv4 |------->| Stateless|------------>| Stateful +--( Internet )
  |Device|<-------|   NAT46  |<------------|   NAT64  |   (________)
  +------+        +----------+      ^      +----------+ 
                                    |                    
                              Operator IPv6
                                Network]]></artwork>
        </figure>

        <t>Note: In mobile networks, the CLAT is commonly implemented in the
        user equipment (UE) or smartphone; please refer to Figure 2 in <xref
        target="RFC6877" format="default"/>.</t>
        <t>Some NAT64 vendors support direct communication (that is, without translation) 
		between two CLATs by means of hairpinning through the NAT64.</t>
      </section>
      <section anchor="dslite_ov" numbered="true" toc="default">
        <name>Dual-Stack Lite</name>
        <t>Dual-Stack Lite (DS-Lite) <xref target="RFC6333" format="default"/> was the first
        of the considered transition mechanisms to be developed. DS-Lite uses a
        Basic Bridging BroadBand (B4) function in the customer's CE router
        that encapsulates IPv4 in IPv6 traffic and sends it over the IPv6 native
        service provider network to an Address Family Transition
        Router (AFTR). The AFTR performs encapsulation/decapsulation of the
        4in6 <xref target="RFC2473" format="default"/> traffic and translates the IPv4 source 
		address in the inner IPv4 packet to a public IPv4 source address using 
		a stateful NAPT44 <xref target="RFC2663" format="default"/> function.</t>
        <figure anchor="dslitearch">
          <name>Overview of the DS-Lite Architecture</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
                                         +-------------+
        Private +----------+ IPv4-in-IPv6|Stateful AFTR|
+------+  IPv4  |    B4    |    Tunnel   |------+------+     _______
| IPv4 |------->| Encap./  |------------>|Encap.|      |    ( IPv4  )
|Device|<-------|  Decap.  |<------------|  /   | NAPT +--( Internet )
+------+        +----------+      ^      |Decap.|  44  |   (________)
                                  |      +------+------+
                            Operator IPv6
                              Network]]></artwork>
        </figure>
        <t>Some AFTR vendors support direct communication 
		between two B4s by means of hairpinning through the AFTR.</t>
      </section>
      <section anchor="lw4o6_ov" numbered="true" toc="default">
        <name>Lightweight 4over6</name>
        <t>Lightweight 4over6 (lw4o6) is a variant of DS-Lite. The main
        difference is that the stateful NAPT44 function is relocated from the
        centralized AFTR to the customer's B4 element (called an "lwB4"). The
        AFTR (called an "lwAFTR") function therefore only performs A+P
        (Address plus Port) routing <xref target="RFC6346" format="default"/> and 4in6
        encapsulation/decapsulation.</t>
        <t>Routing to the correct client and IPv4 address sharing are achieved
        using the A+P model <xref target="RFC6346" format="default"/> of
        provisioning each lwB4 with a unique tuple of IPv4 address and a unique range
        of transport-layer ports. The client uses these for NAPT44.</t>
        <t>The lwAFTR implements a binding table, which has a per-client
        entry linking the customer's source IPv4 address and an allocated range of
        transport-layer ports to their IPv6 tunnel endpoint address. The binding table
        allows egress traffic from customers to be validated (to prevent 
        spoofing) and ingress traffic to be correctly encapsulated and
        forwarded. As there needs to be a per-client entry, an lwAFTR
        implementation needs to be optimized for performing a per-packet
        lookup on the binding table.</t>
        <t>Direct communication (that is, without translation) between two lwB4s is performed by hairpinning
        traffic through the lwAFTR.</t>
        <figure anchor="lw4o6arch">
          <name>Overview of the lw4o6 Architecture</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
                +-------------+             +----------+
        Private |    lwB4     | IPv4-in-IPv6| Stateless|
+------+  IPv4  |------+------|    Tunnel   |  lwAFTR  |     _______
| IPv4 |------->|      |Encap.|------------>|(encap/A+P|    ( IPv4  )
|Device|<-------| NAPT |  /   |<------------|bind. tab +--( Internet )
+------+        |  44  |Decap.|      ^      | routing) |   (________)
                +------+------+      |      +----------+
                              Operator IPv6
                                  Network]]></artwork>
        </figure>
      </section>
      <section anchor="map_e_ov" numbered="true" toc="default">
        <name>MAP-E</name>
        <t>Like 464XLAT (<xref target="xlat_ov" format="default"/>), MAP-E and MAP-T use 
		IPv4-embedded IPv6 addresses <xref target="RFC6052" format="default"/> to represent IPv4 
		hosts outside the MAP domain. </t>
        <t>MAP-E and MAP-T use a stateless algorithm to embed portions of the customer's
        allocated IPv4 address (or part of an address with A+P routing) into the
        IPv6 prefix delegated to the client. This allows for large numbers of
        clients to be provisioned using a single MAP rule (called a "MAP domain").
        The algorithm also allows direct IPv4 peer-to-peer communication
        between hosts provisioned with common MAP rules.</t>
        <t>The CE router typically performs stateful NAPT44 
        <xref target="RFC2663" format="default"/> to translate the private IPv4 source addresses
        and source ports into an address and port range defined by applying
        the MAP rule to the delegated IPv6 prefix. The client
        address/port allocation size is a configuration parameter. The CE router then
        encapsulates the IPv4 packet in an IPv6 packet <xref target="RFC2473" format="default"/>
        and sends it directly to another host in the MAP domain
        (for peer-to-peer) or to a Border Router (BR) if the IPv4 destination is
        not covered in one of the CE's MAP rules.</t>

<t>The MAP BR is provisioned with the set of MAP rules for the MAP
        domains it serves. These rules determine how the MAP BR is to decapsulate
        traffic that it receives from the client, validate the source IPv4
        address and transport-layer ports assigned, and calculate the
        destination IPv6 address for ingress IPv4 traffic.</t>
        <figure anchor="map-e-arch">
          <name>Overview of the MAP-E Architecture</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
                +-------------+             +----------+
        Private |   MAP CE    | IPv4-in-IPv6| Stateless|
+------+  IPv4  |------+------|    tunnel   |  MAP BR  |     _______
| IPv4 |------->|      |Encap.|------------>|(encap/A+P|    ( IPv4  )
|Device|<-------| NAPT |  /   |<------------|algorithm +--( Internet )
+------+        |  44  |Decap.|      ^      | routing) |   (________)
                +------+------+      |      +----------+
                              Operator IPv6
                                  Network]]></artwork>
        </figure>
        <t>Some BR vendors support direct communication 
		between two MAP CEs by means of hairpinning through the BR.</t>
      </section>
      <section anchor="map_t_ov" numbered="true" toc="default">
        <name>MAP-T</name>
        <t>MAP-T uses the same mapping algorithm as MAP-E. The major difference
        is that double stateless translation (NAT46 in the CE and NAT64 in the
        BR) is used to traverse the ISP's IPv6 single-stack network. MAP-T can
        also be compared to 464XLAT when there is a double translation.</t>

<t>A MAP CE router typically performs stateful NAPT44 to translate traffic to a public
        IPv4 address and port range calculated by applying the provisioned 
        Basic MAP Rule (BMR), which is a set of inputs to the algorithm, to the delegated
        IPv6 prefix. The CE then performs stateless translation from IPv4 to
        IPv6 <xref target="RFC7915" format="default"/>.
   The MAP BR is
   provisioned with the same BMR as the client, enabling the received
   IPv6 traffic to be translated (using stateless NAT64) back to the public
   IPv4 source address used by the client.
</t>
        <t>Using translation instead of encapsulation also allows IPv4-only
        nodes to correspond directly with IPv6 nodes in the MAP-T domain
        that have IPv4-embedded IPv6 addresses.</t>

        <figure anchor="map-t-arch">
          <name>Overview of the MAP-T Architecture</name>
          <artwork align="left" name="" type="" alt=""><![CDATA[
                +-------------+             +----------+
        Private |   MAP CE    |  Translated | Stateless|
+------+  IPv4  |------+------|    4-6-4    |  MAP BR  |     _______
| IPv4 |------->|      |State-|------------>|(NAT64/A+P|    ( IPv4  )
|Device|<-------| NAPT | less |<------------|algorithm +--( Internet )
+------+        |  44  |NAT46 |      ^      | routing) |   (________)
                +------+------+      |      +----------+
                              Operator IPv6
                                  Network]]></artwork>
        </figure>
        <t>Some BR vendors support direct communication 
		between two MAP CEs by means of hairpinning through the BR.</t>
      </section>
    </section>
    <section anchor="hl_arch" numbered="true" toc="default">
      <name>High-Level Architectures and Their Consequences</name>
      <section anchor="sp_net_trav" numbered="true" toc="default">
        <name>Service Provider Network Traversal</name>
        <t>For the data plane, there are two approaches for traversing
        the IPv6 provider network:
        </t>

        <ul spacing="normal">
          <li>4-6-4 translation</li>
          <li>4in6 encapsulation</li>
        </ul>

        <table anchor="net_trav_table" align="center">
          <name>Available Traversal Mechanisms</name>
          <thead>
            <tr>
              <th align="center"/>
              <th align="center">464XLAT</th>
              <th align="center">DS-Lite</th>
              <th align="center">lw4o6</th>
              <th align="center">MAP-E</th>
              <th align="center">MAP-T</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">4-6-4 translation</td>
              <td align="center">X</td>
              <td align="center"/>
              <td align="center"/>
              <td align="center"/>
              <td align="center">X</td>
            </tr>
            <tr>
              <td align="left">4in6 encapsulation</td>
              <td align="center"/>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center"/>
            </tr>
          </tbody>
        </table>

        <t>In the scope of this document, all of the encapsulation-based
        mechanisms use IP-in-IP tunneling <xref target="RFC2473" format="default"/>.
        This is a stateless tunneling mechanism that does not require any
        additional overhead.</t>
        <t>It should be noted that both of these approaches result in an
        increase in the size of the packet that needs to be transported across
        the operator's network when compared to native IPv4. 4-6-4
        translation adds a 20-byte overhead (the 20-byte IPv4 header is
        replaced with a 40-byte IPv6 header). Encapsulation has a 40-byte
        overhead (an IPv6 header is prepended to the IPv4 header).</t>
        <t>The increase in packet size can become a significant problem if there
        is a link with a smaller MTU in the traffic path. This may result in the need for
        traffic to be fragmented at the ingress point to the IPv6 only
        domain (i.e., the NAT46 or 4in6 encapsulation endpoint). It may also
        result in the need to implement buffering and fragment reassembly
        in the PLAT/AFTR/lwAFTR/BR node.</t>
        <t>The advice given in <xref target="RFC7597" sectionFormat="of"
        section="8.3.1"/> is applicable to all of these mechanisms: 

	It is
        strongly recommended that the MTU in the IPv6-only domain be well
        managed (it should have sufficiently large MTU to support tunneling
        and/or translation) and that the IPv6 MTU on the CE WAN-side interface
        be set so that no fragmentation occurs within the boundary of the
        IPv6-only domain.</t>
      </section>
      <section anchor="nat" numbered="true" toc="default">
        <name>Network Address Translation among the Different IPv4aaS Technologies</name>

<t>
  For the high-level solution of IPv6 service provider network traversal,
  MAP-T uses double stateless translation. The first translation is from IPv4
  to IPv6 (NAT46) at the CE, and the second translation is from IPv6 to IPv4
  (NAT64) at the service provider network.
	</t>
        <t>464XLAT may use double translation (stateless NAT46 + stateful
        NAT64) or single translation (stateful NAT64) depending on different
        factors, such as the use of DNS by the applications and the availability
        of a DNS64 function (in the host or in the service provider network).
        For deployment guidelines, please refer to <xref target="RFC8683" format="default"/>.</t>
        <t>The first step for the double translation mechanisms is a stateless
        NAT from IPv4 to IPv6 implemented as SIIT (Stateless IP/ICMP
        Translation Algorithm) <xref target="RFC7915" format="default"/>,
        which does not translate IPv4 header options and/or multicast IP/ICMP
        packets. With encapsulation-based technologies, the header is
        transported intact, and multicast can also be carried.</t>
        <t>Single and double translation results in native IPv6 traffic with a
        transport-layer next header. The fields in these headers can be used
        for functions such as hashing across equal-cost multipaths or Access
        Control List (ACL) filtering. Encapsulation technologies, in contrast,
        may hinder hashing algorithms or other functions relying on header
        inspection.</t>
        <t>Solutions using double translation can only carry port-aware IP
        protocols (e.g., TCP and UDP) and ICMP when they are used with IPv4
        address sharing (please refer to <xref target="pub_serv"
        format="default"/> for more details).  Encapsulation-based solutions
        can also carry any other protocols over IP.</t>
        <t>An in-depth analysis of stateful NAT64 can be found in <xref target="RFC6889" format="default"/>.</t>
        <t>As stateful NAT interferes with the port numbers, <xref
        target="I-D.ietf-tsvwg-natsupp" format="default"/> explains how NATs
        can handle SCTP (Stream Control Transmission Protocol).</t>
      </section>
      <section anchor="ipv4_sharing" numbered="true" toc="default">
        <name>IPv4 Address Sharing</name>
        <t>As public IPv4 address exhaustion is a common motivation for
        deploying IPv6, transition technologies need to provide a solution that
        allows public IPv4 address sharing.</t>
        <t>In order to fulfill this requirement, a stateful NAPT function is
        a necessary function in all of the mechanisms. The major differentiator
        is where in the architecture this function is located.</t>
        <t>The solutions compared by this document fall into two categories:
        </t>
        <ul spacing="normal">
          <li>Approaches based on Carrier-Grade NAT (CGN) (DS-Lite, 464XLAT)</li>
          <li>Approaches based on A+P (lw4o6, MAP-E, MAP-T)</li>
        </ul>
        <t>In the CGN-based model, a device such as a CGN/AFTR or NAT64 performs
        the NAPT44 function and maintains per-session state for all of the
        active client's traffic. The customer's device does not require 
        per-session state for NAPT.</t>

        <t>In the A+P-based model, a device (usually a CE) performs stateful
        NAPT44 and maintains per-session state only for co-located devices,
        e.g., in the customer's home network. Here, the centralized network
        function (lwAFTR or BR) only needs to perform stateless
        encapsulation/decapsulation or NAT64.</t>
        <t>Issues related to IPv4 address-sharing mechanisms are described 
        in <xref target="RFC6269" format="default"/> and should also be considered.</t>
        <t>The address-sharing efficiency of the five technologies is
        significantly different and is discussed in 
        <xref target="port_num_eff" format="default"/>.</t>
        <t>Lw4o6, MAP-E, and MAP-T can also be configured without IPv4 address sharing;
        see the details in <xref target="pub_serv"
        format="default"/>. However, in that case, there is no advantage in
        terms of public IPv4 address saving.
	In the case of 464XLAT, one-to-one mapping can also
        be achieved through EAMT (Explicit Address Mapping Table)
        <xref target="RFC7757" format="default"/>.</t>
        <t>Conversely, both MAP-E and MAP-T may be configured to provide more
        than one public IPv4 address (i.e., an address with an IPv4 prefix shorter than a /32)
        to customers.</t>
        <t>Dynamic DNS issues in address-sharing contexts and their possible
		solutions using PCP (Port Control Protocol) are discussed in detail 
		in <xref target="RFC7393" format="default"/>.</t>
      </section>
      <section anchor="ipv4_pool" numbered="true" toc="default">
        <name>IPv4 Pool Size Considerations</name>

	<t>In this section, we do some simple calculations regarding port
        numbers. However, technical limitations are not the only point to
        consider for port sharing; there are also local regulations and
        best current practices.</t>

        <t>Note: By "port numbers", we mean TCP/UDP port numbers or ICMP
        identifiers.</t>

        <t>In most networks, it is possible to use existing data about flows to
   Content Delivery Networks (CDNs), caches, or other well-known
   IPv6-enabled destinations to calculate the percentage of traffic that
   would turn into IPv6 if IPv6 is enabled on that network or on part of it.
	</t>
        <t>Knowing that, it is possible to calculate the IPv4 pool size
        required for a given number of subscribers, depending on the IPv4aaS
        technology being used.</t>
        <t>According to <xref target="MIY2010" format="default"/>, each
        user device (computer, tablet, smartphone) behind a NAT could
        simultaneously use up to 300 ports.  (Table 1 of <xref
        target="MIY2010" format="default"/> lists the port number usage of
        various applications. According to <xref target="REP2014"
        format="default"/>, the downloading of some web pages may consume up to
        200 port numbers.) If the extended NAPT algorithm is used, which
        includes the full 5-tuple into the connection tracking table, then
        the port numbers are reused when the destinations are
        different. Therefore, we need to consider the number of "port-hungry"
        applications that are accessing the same destination simultaneously.
        We estimate that in the case of a residential subscriber, there will
        be typically no more than four port-hungry applications communicating
        with the same destination simultaneously, which is a total of 1,200
        ports. </t>
        <t>For example, if 80% of the traffic is expected towards IPv6
        destinations, only 20% will actually be using IPv4 ports. Thus, in our
        example, 240 ports are required for each subscriber.</t>



<t>From the 65,535 ports available per IPv4 address, we could even
   consider reserving 1,024 ports for customers that need
   EAMT entries for incoming connections to System ports (0-1023, also
   called "well-known ports") <xref target="RFC7605" format="default"/>.
        This means that 64,511 ports are actually available for each IPv4 address.</t>
        <t>According to this, a /22 (1.024 public IPv4 addresses) will be sufficient 
		for over 275,000 subscribers (1,024x64,511/240=275,246.93).</t>
        <t>Similarly, a /18 (16,384 public IPv4 addresses) will be sufficient
        for over 4,403,940 subscribers, and so on.</t>
        <t>This is a conservative approach, which is valid in the case of
        464XLAT because ports are assigned dynamically by the NAT64. Therefore, it is
        not necessary to consider if one user is actually using more or fewer
        ports; average values work well.</t>

        <t>As the deployment of IPv6 progresses, the use of NAT64, and
        therefore of public IPv4 addresses, decreases (more IPv6 ports, fewer
        IPv4 ports). Thus, either more subscribers can be accommodated with the
        same number of IPv4 addresses or some of those addressed can be
        retired from the NAT64.</t>
        <t>For comparison, if dual-stack is being used, any given number of
        users will require the same number of public IPv4 addresses. For
        instance, a /14 will provide 262,144 IPv4 public addresses for 262,144
        subscribers, versus 275,000 subscribers being served with only a
        /22.</t>
        <t>In the other IPv4aaS technologies, this calculation will only match
        if the assignment of ports per subscriber can be done dynamically,
        which is not always the case (depending on the vendor
        implementation).</t>

        <t>  When dynamic assignment of addresses is not possible, an
  alternative approximation for the other IPv4aaS technologies must ensure a
  sufficient number of ports per subscriber.
	That means 1,200 ports, and
        typically, it comes to 2,000 ports in many deployments.
   In that case, assuming 80% is IPv6 traffic (as above), only 30 subscribers
   will be allowed per each IPv4 address; thus, the closer approximation to
   275,000 subscribers per our example with 464XLAT (with a /22) will be using
   a /19, which serves 245,760 subscribers (a /19 has 8,192 addresses and 30
   subscribers with 2,000 ports each per address).
	</t>
        <t>If the CGN (in case of DS-Lite) or the CE (in case of lw4o6, MAP-E,
        and MAP-T) make use of a 5-tuple for tracking the NAT connections, the
        number of ports required per subscriber can be limited as low as four
        ports per subscriber.  However, the practical limit depends on the
        desired limit for parallel connections that any single host behind the
        NAT can have to the same address and port in Internet. Note that it is
        becoming more common that applications use AJAX (Asynchronous
        JavaScript and XML) and similar mechanisms, so taking that extreme
        limit is probably not a safe choice.</t>

        <t>This feature of extremely reduced number of ports could also be used in 
		case the CLAT-enabled CE with 464XLAT makes use of tracking the 5-tuple NAT 
		connections and could also be further extended 
		if the NAT64 also uses the 5-tuple.</t>
        <t>Please also refer to <xref target="RFC6888" format="default"/> for in-depth information about 
		the requirements for sizing CGN gateways.</t>
      </section>
      <section anchor="ce_prov" numbered="true" toc="default">
        <name>CE Provisioning Considerations</name>
        <t>All of the technologies require some provisioning of customer
        devices. The table below shows which methods currently have
        extensions for provisioning the different mechanisms.</t>
        <table anchor="prov_mech_table" align="center">
          <name>Available Provisioning Mechanisms</name>
          <thead>
            <tr>
              <th align="left">Provisioning Method</th>
              <th align="center">464XLAT</th>
              <th align="center">DS-Lite</th>
              <th align="center">lw4o6</th>
              <th align="center">MAP-E</th>
              <th align="center">MAP-T</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">DHCPv6 <xref target="RFC8415" format="default"/></td>
              <td align="center"/>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center">X</td>
            </tr>
            <tr>
              <td align="left">RADIUS <xref target="RFC8658" format="default"/></td>
              <td align="center"/>
              <td align="center">
                <xref target="RFC6519" format="default"/></td>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center">X</td>
            </tr>
            <tr>
              <td align="left">TR-069 <xref target="TR-069" format="default"/></td>
              <td align="center">*</td>
              <td align="center">X</td>
              <td align="center">*</td>
              <td align="center">X</td>
              <td align="center">X</td>
            </tr>
            <tr>
              <td align="left">DNS64 <xref target="RFC7050" format="default"/></td>
              <td align="center">X</td>
              <td align="center"/>
              <td align="center"/>
              <td align="center"/>
              <td align="center"/>
            </tr>
            <tr>
              <td align="left">YANG <xref target="RFC7950" format="default"/></td>
              <td align="center">
                <xref target="RFC8512" format="default"/></td>
              <td align="center">
                <xref target="RFC8513" format="default"/></td>
              <td align="center">
                <xref target="RFC8676" format="default"/></td>
              <td align="center">
                <xref target="RFC8676" format="default"/></td>
              <td align="center">
                <xref target="RFC8676" format="default"/></td>
            </tr>
            <tr>
              <td align="left">DHCP 4o6 <xref target="RFC7341" format="default"/></td>
              <td align="center"/>
              <td align="center"/>
              <td align="center">X</td>
              <td align="center">X</td>
              <td align="center"/>
            </tr>
          </tbody>
        </table>
<dl newline="false" spacing="normal">
        <dt>*:</dt>
	<dd>Work started at Broadband Forum (2021)</dd>
        <dt>X:</dt> 
	<dd>Supported by the provisioning method</dd>
      </dl>
    </section>
      <section anchor="multicast" numbered="true" toc="default">
        <name>Support for Multicast</name>
        <t>The solutions covered in this document are all intended for
        unicast traffic. <xref target="RFC8114" format="default"/> describes a method for
        carrying encapsulated IPv4 multicast traffic over an IPv6 multicast
        network. This could be deployed in parallel to any of the operator's
        chosen IPv4aaS mechanism.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>Detailed Analysis</name>
      <section numbered="true" toc="default">
        <name>Architectural Differences</name>
        <section numbered="true" toc="default">
          <name>Basic Comparison</name>

          <t>The five IPv4aaS technologies can be classified
          based on two aspects:
          </t>
          <ul spacing="normal">
            <li>Technology used for service provider network traversal. 
            It can be single/double translation or encapsulation.</li>
            <li>Presence or absence of per-flow state in the
            operator network.
            </li>
          </ul>

          <table anchor="data_plane_table" align="center">
            <name>Basic Comparison among the Analyzed Technologies</name>
            <thead>
              <tr>
                <th align="center"/>
                <th align="center">464XLAT</th>
                <th align="center">DS-Lite</th>
                <th align="center">lw4o6</th>
                <th align="center">MAP-E</th>
                <th align="center">MAP-T</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="left">Translation (T) or Encapsulation (E) </td>
                <td align="center">T</td>
                <td align="center">E</td>
                <td align="center">E</td>
                <td align="center">E</td>
                <td align="center">T</td>
              </tr>
              <tr>
                <td align="left"> Presence (+) of Per-Flow State in Operator Network</td>
                <td align="center">+</td>
                <td align="center">+</td>
                <td align="center"/>
                <td align="center"/>
                <td align="center"/>
              </tr>
            </tbody>
          </table>
        </section>
      </section>
      <section anchor="port_num_eff" numbered="true" toc="default">
        <name>Trade-Off between Port Number Efficiency and Stateless Operation</name>
        <t>464XLAT and DS-Lite use stateful NAPT at the PLAT and AFTR devices,
      respectively. This may cause scalability issues for the number of clients
      or volume of traffic, but it does not impose a limitation 
      on the number of ports per user, as they can be allocated dynamically 
      on-demand and the allocation policy can be centrally managed and adjusted.</t>
        <t>A+P-based mechanisms (lw4o6, MAP-E, and MAP-T) avoid using NAPT in the
      service provider network. However, this means that the number of ports
      provided to each user (and hence the effective IPv4 address-sharing ratio)
      must be pre-provisioned to the client.</t>
        <t>Changing the allocated port ranges with A+P-based
      technologies requires more planning and is likely to involve
      reprovisioning both hosts and operator-side equipment. It should be
      noted that due to the per-customer binding table entry used
      by lw4o6, a single customer can be reprovisioned (e.g., if they
      request a full IPv4 address) without needing to change parameters for a
      number of customers as in a MAP domain.</t>
        <t>It is also worth noting that there is a direct relationship between
      the efficiency of public port allocations for customers and the corresponding
      logging overhead that may be necessary to meet data-retention
      requirements. This is considered in <xref target="logging" format="default"/>.</t>

        <t>Determining the optimal number of ports for a fixed port set is not
        an easy task and may also be impacted by local regulatory law (and in
        the Belgian case, it is not a law but more a memorandum of
        understanding or best current practice), which may define a maximum
        number of users per IP address and consequently a minimum number of
        ports per user.</t>

        <t>On the one hand, the "lack of ports" situation may cause serious
      problems in the operation of certain applications. For example, Miyakawa
      has demonstrated the consequences of the session number limitation due
      to port number shortage in the example of Google Maps 
      <xref target="MIY2010" format="default"/>. When the limit was 15, several blocks of the
      map were missing, and the map was unusable. This study also provided
      several examples for the session numbers of different applications
      (the highest one was Apple's iTunes at 230-270 ports).</t>

<t>The port number consumption of different applications is highly
        varying. In the case of web browsing, it depends on several
        factors, including the choice of the web page, the web browser, and
        sometimes the operating system <xref target="REP2014"
        format="default"/>. For example, under certain conditions, 120-160
        ports were used (URL: sohu.com, browser: Firefox under Ubuntu Linux),
        and in some other cases, only 3-12 ports were used (URL: twitter.com,
        browser: Iceweasel under Debian Linux).</t>
        <t>There may be several users behind a CE router, especially in the
      broadband case (e.g., Internet is used by different members of a family
      simultaneously), so sufficient ports must be allocated to avoid
      impacting user experience.</t>
        <t>In general, assigning too few source port numbers to an end user may 
	  result in unexpected and hard-to-debug consequences; therefore, if the 
	  number of ports per end user is fixed, then we recommend assigning a 
	  conservatively large number of ports. For example, the developers of Jool used 
	  2048 ports per user in their example for MAP-T <xref target="JOOL-MAPT" format="default"/>.</t>
        <t>However, assigning too many ports per CE router
      will result in waste of public IPv4 addresses, which are scarce and
      expensive resources. Clearly, this is a big advantage in the case of 464XLAT 
      where they are dynamically managed so that the number of IPv4 addresses 
      for the sharing pool is smaller while the availability of ports per user 
      doesn't need to be pre-defined and is not a limitation.</t>
        <t>There is a direct trade-off between the optimization of client
      port allocations and the associated logging overhead. 
      <xref target="logging" format="default"/> discusses this in more depth.</t>

      <t> We note that common NAT44 implementations utilizing Netfilter at the
      CE router multiplex active sessions using a 3-tuple (source address,
      destination address, and destination port).  This means that external
      source ports can be reused for unique internal source and destination
      addresses and port sessions. It is also noted that Netfilter cannot
      currently make use of multiple source port ranges (i.e., several blocks
      of ports distributed across the total port space as is common in MAP
      deployments).  This may influence the design when using stateless
      technologies.</t>
        <t>Stateful technologies, 464XLAT, DS-Lite, and NAT444 can
      therefore be much more efficient in terms of port allocation and thus
      public IP address saving. The price is the stateful operation in the
      service provider network, which allegedly does not scale up well.
      It should be noted that, in many cases, all those factors may depend on
      how it is actually implemented.</t>
        <t>Measurements have been started to examine the scalability of a few 
	  stateful solutions in two areas:
        </t>
        <ul spacing="normal">
          <li>How their performance scales up with the number of CPU cores</li>
          <li>To what extent their performance degrades with the number of 
			concurrent connections</li>
        </ul>
        <t>
      The details of the measurements and their results are available from 
	  	  <xref target="I-D.lencse-v6ops-transition-scalability" format="default"/>.
        </t>

      <t>We note that some CGN-type solutions can allocate ports dynamically
      "on the fly". Depending on configuration, this can result in the same
      customer being allocated ports from different source addresses. This can
      cause operational issues for protocols and applications that expect
      multiple flows to be sourced from the same address (e.g., ECMP hashing,
      STUN, gaming, and content delivery networks). However, it should be noted
      that this is the same problem when a network has a NAT44 with multiple
      public IPv4 addresses, or even when applications in a dual-stack case,
      behave wrongly if Happy Eyeballs is flapping the flow address between
      IPv4 and IPv6.</t>
        <t>The consequences of IPv4 address sharing <xref target="RFC6269" format="default"/> may
      impact all five technologies. However, when ports are allocated
      statically, more customers may get ports from the same public IPv4
      address, which may result in negative consequences with higher
      probability. For example, many applications and service providers (Sony
      PlayStation Network, OpenDNS, etc.) can permanently block IPv4 ranges
      if they detect that they are used for address sharing.</t>
        <t>Both cases are, again, implementation-dependent.</t>
        <t>We note that although it is not of typical use, one can do
      deterministic, stateful NAT and reserve a fixed set of ports for each
      customer as well.</t>
      </section>
      <section anchor="pub_serv" numbered="true" toc="default">
        <name>Support for Public Server Operation</name>
        <t>Mechanisms that rely on operator-side per-flow state do not, by
      themselves, offer a way for customers to present services on publicly
      accessible transport-layer ports.</t>
        <t>The Port Control Protocol (PCP) <xref target="RFC6887" format="default"/> provides a
      mechanism for a client to request an external public port from a CGN
      device. For server operation, it is required with 464XLAT/NAT64, and 
	  it is supported in some DS-Lite AFTR implementations.</t>
        <t>A+P-based mechanisms distribute a public IPv4 address and
        restricted range of transport-layer ports to the client. In this case,
        it is possible for the user to configure their device to offer a
        publicly accessible server on one of their allocated ports. It should
        be noted that operators commonly do not assign the well-known ports to
        users (unless they are allocating a full IPv4 address), so the user
        will need to run the service on an allocated port or configure port
        translation.</t>
        <t>Lw4o6, MAP-E, and MAP-T may be configured to allocated clients with 
      a full IPv4 address, allowing exclusive use of all ports and
      non-port-based transport-layer protocols. Thus, they may also be used to support 
      server/services operation on their default ports. However, when public
      IPv4 addresses are assigned to the CE router without address sharing,
      there is obviously no advantage in terms of IPv4 public addresses saving.
        </t>
        <t>It is also possible to configure specific ports mapping in
      464XLAT/NAT64 using EAMT <xref target="RFC7757" format="default"/>, which means that only
      those ports are "lost" from the pool of addresses, so there is a higher
      maximization of the total usage of IPv4 port resources.</t>
	  
    </section>
      <section anchor="supp_imp" numbered="true" toc="default">
        <name>Support and Implementations</name>
        <section numbered="true" toc="default">
          <name>Vendor Support</name>

	  <t>In general, router vendors support AFTR, MAP-E BR, MAP-T
		BR, and NAT64.  Vendors of load balancers and firewalls usually
		support NAT64 as well while not all of them have support for
		the other protocols.</t>
          <t>A 464XLAT client (CLAT) is implemented in Windows 10, Linux
          (including Android), Windows Mobile, Chrome OS, and iOS, but it is
          not available in macOS 12.3.1.</t>
          <t>The remaining four solutions are commonly deployed as functions
          in the CE device only; however, the vendors' support is poor in
          general (except for DS-Lite).</t>

 <t> OpenWRT is a Linux-based open-source OS designed for CE devices. It
 offers a number of different 'opkg' packages as part of the distribution:
          </t>
          <ul spacing="normal">
            <li>'464xlat' enables support for 464XLAT CLAT functionality.</li>
            <li>'ds-lite' enables support for DSLite B4 functionality.</li>
            <li>'map' enables support for MAP-E and lw4o6 CE
            functionality.</li>
            <li>'map-t' enables support for MAP-T CE functionality.</li>
          </ul>
          <t>At the time of publication, some free open-source implementations 
		exist for the operator-side functionality:
          </t>
          <ul spacing="normal">
            <li>Jool <xref target="JOOL" format="default"/> (CLAT, NAT64, EAMT, MAP-T CE, MAP-T BR)</li>
            <li>VPP/fd.io <xref target="VPP" format="default"/> (MAP-BR, lwAFTR, CGN, CLAT, NAT64)</li>
            <li>Snabb <xref target="SNABB" format="default"/> (lwAFTR)</li>
            <li>AFTR <xref target="AFTR" format="default"/> (DSLite AFTR)</li>
          </ul>
        </section>
        <section anchor="cell_broad_supp" numbered="true" toc="default">
          <name>Support in Cellular and Broadband Networks</name>
          <t>Several cellular networks use 464XLAT, whereas there are no
        deployments of the four other technologies in cellular networks, as
        they are neither standardized nor implemented in UE devices.</t>

	<t>In broadband networks, there are some deployments of 464XLAT, MAP-E,
        and MAP-T.
   Lw4o6 and DS-Lite have more deployments, with DS-Lite
   being the most common, but deployments of lw4o6 have been rapidly
   increasing in the last few years.
	</t>
          <t>Please refer to Tables 2 and 3 of <xref target="LEN2019" format="default"/>
		for a limited set of deployment information.</t>
      </section>
        <section anchor="code_size" numbered="true" toc="default">
          <name>Implementation Code Sizes</name>

          <t>As a hint to the relative complexity of the mechanisms, the
        code sizes reported from the OpenWRT
        implementations of each technology are 17 kB, 35 kB, 15 kB, 35 kB, and
        48 kB for 464XLAT, lw4o6,
        DS-Lite, MAP-E, and MAP-T, respectively
        (see <eref target="https://openwrt.org/packages/start" brackets="angle"/>).</t>

<t>We note that the support for all five technologies requires a much
        smaller code size than the total sum of the above quantities, because
        they contain a lot of common functions (e.g., data plane is shared among
        several of them).</t>
        </section>
      </section>
      <section numbered="true" toc="default">
        <name>Typical Deployment and Traffic Volume Considerations</name>
        <section numbered="true" toc="default">
          <name>Deployment Possibilities</name>
          <t>Theoretically, all five IPv4aaS technologies could be
        used together with DNS64 + stateful NAT64, as is done in 464XLAT.
        In this case, the CE router would treat the traffic between an
        IPv6-only client and IPv4-only server as normal IPv6 traffic, and
        the stateful NAT64 gateway would do a single translation, thus
        offloading this kind of traffic from the IPv4aaS technology. The
        cost of this solution would be the need to also deploy DNS64 +
        stateful NAT64.</t>
          <t>However, this has not been implemented in clients or actual
        deployments, so only 464XLAT always uses this optimization, and the
        other four solutions do not use it at all.</t>
        </section>
        <section numbered="true" toc="default">
          <name>Cellular Networks with 464XLAT</name>



          <t>Figures from existing deployments (through the end of 2018) show
          the typical traffic volumes in an IPv6-only cellular network when
          464XLAT technology is used together with DNS64:
          </t>
          <ul spacing="normal">
            <li>75% of traffic is IPv6 end-to-end (no translation).</li>
            <li>24% of traffic uses DNS64 + NAT64 (one translation).</li>
            <li>Less than 1% of traffic uses the CLAT in addition to NAT64
          (two translations), due to an IPv4 socket and/or IPv4 literal.</li>
          </ul>
          <t>Without using DNS64, 25% of the traffic would undergo double
        translation.</t>

      </section>
        <section numbered="true" toc="default">
          <name>Wireline Networks with 464XLAT</name>
          <t> Figures from several existing deployments (through the end of
          2020), mainly with residential customers, show the ranges of typical
          traffic volumes in an IPv6-only network, when 464XLAT is used with
          DNS64:
          </t>
          <ul spacing="normal">
            <li>65%-85% of traffic is IPv6 end-to-end (no translation).</li>
            <li>14%-34% of traffic uses DNS64 + NAT64 (one translation).</li>
            <li>Less than 1-2% of traffic uses the CLAT in addition to NAT64
          (two translations), due to an IPv4 socket and/or IPv4 literal.</li>
          </ul>
          <t>Without using DNS64, 16%-35% of the traffic would undergo double
        translation.</t>

<t>
This data is consistent with non-public information of actual deployments,
which can be easily explained.  When a wireline ISP has mainly residential
customers, content providers and CDNs that are already IPv6 enabled
(Google/YouTube, Netflix, Facebook, Akamai, etc.) typically account for 65-85%
of the traffic in the network.  Thus, when the subscribers are IPv6 enabled,
about the same percentage of traffic will become IPv6.
</t>
      </section>
      </section>
      <section numbered="true" toc="default">
        <name>Load Sharing</name>
        <t>If multiple network-side devices are needed as PLAT/AFTR/BR for
      capacity, then there is a need for a load-sharing mechanism. ECMP
      (Equal-Cost Multipath) load sharing can be used for all
      technologies; however, stateful technologies will be impacted by
      changes in network topology or device failure.</t>

      <t>Technologies utilizing DNS64 can also distribute load across
      PLAT/AFTR devices, evenly or unevenly, by using different prefixes.
      Different network-specific prefixes can be distributed for
      subscribers in appropriately sized segments (like split-horizon DNS,
      also called "DNS views").</t>
        <t>Stateless technologies, due to the lack of per-flow state, can
      make use of anycast routing for load sharing and resiliency across
      network devices, both ingress and egress; flows can take asymmetric
      paths through the network, i.e., in through one lwAFTR/BR and out
      via another.</t>
        <t>Mechanisms with centralized NAPT44 state have a number of challenges
      specifically related to scaling and resilience. As the total amount of
      client traffic exceeds the capacity of a single CGN instance, additional
      nodes are required to handle the load. Each CGN maintains a
      stateful table of active client sessions, and this table may need to be
      synchronized between CGN instances. This is necessary for two reasons:
        </t>
        <ul spacing="normal">
          <li>To prevent all active customer sessions from being dropped in the event
      of a CGN node failure.</li>
          <li>To ensure a matching state table entry for an active session in
      the event of asymmetric routing through different egress and ingress
      CGN nodes.</li>
        </ul>
      </section>
      <section anchor="logging" numbered="true" toc="default">
        <name>Logging</name>

        <t>In the case of 464XLAT and DS-Lite, the user of any given public
      IPv4 address and port combination will vary over time; therefore,
      logging is necessary to meet data-retention laws. Each entry in the
      PLAT/AFTR generates a logging entry. As discussed in 
      <xref target="port_num_eff" format="default"/>, a client may open hundreds of sessions
      during common tasks such as web browsing, each of which needs to be
      logged so the overall logging burden on the network operator is
      significant. In some countries, this level of logging is required to comply
      with data-retention legislation.</t>
        <t>One common optimization available to reduce the logging overhead
      is the allocation of a block of ports to a client for the duration
      of their session. This means that a logging entry only needs to be
      made when the client's port block is released, which dramatically
      reduces the logging overhead. This comes as the cost of less
      efficient public address sharing as clients need to be allocated a
      port block of a fixed size regardless of the actual number of ports
      that they are using.</t>

        <t>Stateless technologies that pre-allocate the IPv4 addresses and
        ports only require that copies of the active MAP rules (for MAP-E and
        MAP-T) or binding table (for lw4o6) are retained along with timestamp
        information of when they have been active. Support tools (e.g., those
        used to serve data-retention requests) may need to be updated to be
        aware of the mechanism in use (e.g., implementing the MAP algorithm so
        that IPv4 information can be linked to the IPv6 prefix delegated to a
        client).  Stateless technologies do not have a centralized stateful
        element that customer traffic needs to pass through, so if
        data-retention laws mandate per-session logging, there is no simple
        way of meeting this requirement with a stateless technology alone.
        Thus, a centralized NAPT44 model may be the only way to meet this
        requirement.</t>
        <t>Deterministic CGN <xref target="RFC7422" format="default"/> was proposed as a solution to 
	  reduce the resource consumption of logging.</t>
        <t>Please also refer to <xref target="RFC6888" sectionFormat="of" section="4"/> for more information about 
	  requirements for logging CGN gateways.</t>
      </section>
      <section anchor="optimization" numbered="true" toc="default">
        <name>Optimization for IPv4-Only Devices and Applications</name>
        <t>When IPv4-only devices or applications are behind a CE connected with 
      IPv6-only and IPv4aaS, the IPv4-only traffic flows will necessarily be 
      encapsulated/decapsulated (in the case of DS-Lite, lw4o6, and MAP-E) 
      and will reach the IPv4 address of the destination, even if that 
      service supports dual-stack. This means that the traffic flow will 
      cross through the AFTR, lwAFTR, or BR, depending on the specific 
      transition mechanism being used.</t>
        <t>Even if those services are directly connected to the operator network 
	  (e.g., CDNs and caches) or located internally (such as VoIP, etc.), 
	  it is not possible to avoid that overhead.</t>
        <t>However, in the case of those mechanisms that use a NAT46 function, in the CE (464XLAT and MAP-T), it is possible to take
        advantage of optimization functionalities, such as the ones described
        in <xref target="I-D.ietf-v6ops-464xlat-optimization"
        format="default"/>.
        	</t>

<t>
   Because the NAT46 has already translated
   the IPv4-only flow to IPv6 and the services are dual-stack, using these
   optimizations allows the services to
   be reached without the need to translate the flow back to IPv4.
</t>
      </section>
    </section>
    <section anchor="performance" numbered="true" toc="default">
      <name>Performance Comparison</name>
      <t>We plan to compare the performances of the most prominent free software 
	 implementations of the five IPv6 transition technologies using the 
	 methodology described in "Benchmarking Methodology for IPv6 Transition 
	 Technologies" <xref target="RFC8219" format="default"/>.</t>
      <t>The dual Device Under Test (DUT) setup of <xref target="RFC8219" format="default"/> makes it possible to use the existing measurement devices compliant with
	 "Benchmarking Methodology for Network Interconnect Devices" 
	 <xref target="RFC2544" format="default"/>; however, 
	 this solution has two kinds of limitations:
      </t>
      <ul spacing="normal">
        <li>Dual DUT setup has the drawback that the performances of the CE 
		and the ISP-side device (e.g., the CLAT and PLAT of 464XLAT) 
		are measured together. In order to measure the performance of 
		only one of them, we need to ensure that the desired one is the 
		bottleneck.</li>


		<li>Measurement procedures for Packet Delay Variation (PDV)
		and Inter-Packet Delay Variation (IPDV) measurements are
		missing from the legacy devices, and the old measurement
		procedure for latency has been redefined in <xref
		target="RFC8219" format="default"/>.</li>
      </ul>

      <t>The single DUT setup of <xref target="RFC8219" format="default"/>
      makes it possible to benchmark the selected device separately, but
      either special Tester is required or some trick is needed if we want to
      use legacy Testers.  An example for the latter is our stateless NAT64
      measurements testing Throughput and Frame Loss Rate using a legacy
      commercial Tester <xref target="LEN2020a" format="default"/> that is
      compliant with <xref target="RFC5180" format="default"/>.</t>

	 <t>Siitperf, a DPDK-based 
	 software Tester that is compliant with <xref target="RFC8219" format="default"/> and used for benchmarking stateless NAT64 gateways, has been 
	 developed recently. Siitperf is available from GitHub 
	 <xref target="SIITPERF" format="default"/> as free software and is documented in 
	 <xref target="LEN2021" format="default"/>. Originally, it literally followed the test 
	 frame format of <xref target="RFC2544" format="default"/>, including "hard-wired" source and 
	 destination port numbers, and then it was complemented with the 
	 pseudorandom port feature required by <xref target="RFC4814" format="default"/>. The new 
	 version is documented in <xref target="LEN2020b" format="default"/>.</t>
      <t>Further DPDK-based software Testers that are compliant with <xref target="RFC8219" format="default"/>
	 are being developed at the Budapest University of Technology and 
	 Economics as student projects. They are planned to be released as free 
	 software, too.</t>
      <t>Information about the benchmarking tools, measurements, and results will
	 be made available in <xref target="I-D.lencse-v6ops-transition-benchmarking" format="default"/>.
      </t>
    </section>
   <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>As discussed in <xref target="logging"></xref>, the different technologies have varying 
	 logging capabilities and limitations. Care should be taken when storing, 
	 transmitting, and providing access to log entries that may be considered 
	 personally identifiable information. However, it should be noted that 
	 those issues are not specific to the IPv4aaS IPv6 transition technologies
	 but apply to logging functionalities in general.</t>

	 <t>For all five technologies, the CE device typically contains a DNS proxy.
     However, the user may change DNS settings. If this happens and lw4o6, MAP-E,
     and MAP-T are used with a significantly restricted port set (which is
     required for efficient public IPv4 address sharing), the entropy of the
     source ports is significantly lowered (e.g., from 16 bits to 10 bits when
     1024 port numbers are assigned to each subscriber), and these
     technologies are thus theoretically less resilient against cache poisoning (see
     <xref target="RFC5452" format="default"/>). However, an efficient cache poisoning attack
     requires that the subscriber operates its own caching DNS server and the
     attack is performed in the service provider network. Thus, we consider the
     chance of the successful exploitation of this vulnerability to be low.</t>
      <t>IPv4aaS technologies based on encapsulation have no DNSSEC
      implications.  However, those based on translation may have implications
      as discussed in <xref target="RFC8683" sectionFormat="of"
      section="4.1"/>.</t>
      <t>An in-depth security analysis of all five IPv6 transition technologies
     and their most prominent free software implementations according to the
     methodology defined in <xref target="LEN2018" format="default"/> is planned.</t>
      <t>As the first step, an initial security analysis of 464XLAT was 
	 done in <xref target="AZZ2021" format="default"/>.</t>
      <t>The implementers of any of the five IPv4aaS solutions should consult the 
	 Security Considerations of the respective RFCs documenting them.</t>
    </section>
  </middle>

 <back>

<displayreference target="I-D.ietf-v6ops-464xlat-optimization" to="OP-464XLAT/MAP-T"/>
<displayreference target="I-D.ietf-tsvwg-natsupp" to="NAT-SUPP"/>
<displayreference target="I-D.lencse-v6ops-transition-scalability" to="IPv4aaS-SCALE-TECH"/>
<displayreference target="I-D.lencse-v6ops-transition-benchmarking" to="IPv4aaS-BENCHMARK-TECH"/>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2473.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2544.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2663.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4814.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5180.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5452.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.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.6180.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6269.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6333.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6346.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6519.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.6887.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6888.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6889.xml"/>
        <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.7269.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7393.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7422.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7757.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.7596.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7597.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7599.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7605.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8114.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8215.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8219.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8415.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8512.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8513.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8658.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8676.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8683.xml"/>
      </references>
      <references>
        <name>Informative References</name>
 
<!-- [I-D.ietf-v6ops-464xlat-optimization] IESG state Expired -->

<reference anchor="I-D.ietf-v6ops-464xlat-optimization">
   <front>
      <title>464XLAT/MAT-T Optimization</title>
      <author initials="J." surname="Palet Martinez">
	 <organization>The IPv6 Company</organization>
      </author>
      <author initials="A" surname="D'Egidio" fullname="Alejandro D'Egidio">
	 <organization>Telecentro</organization>
      </author>
      <date month="July" day="28" year="2020" />
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-v6ops-464xlat-optimization-03" />
   <format type="TXT" target="https://www.ietf.org/archive/id/draft-ietf-v6ops-464xlat-optimization-03.txt" />
</reference>

<!-- [I-D.ietf-tsvwg-natsupp] IESG state Expired  -->
        <xi:include                                                                                       
href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-tsvwg-natsupp.xml"/>

<!-- [I-D.lencse-v6ops-transition-scalability] IESG state I-D Exists -->

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.lencse-v6ops-transition-scalability.xml"/>

<!-- [I-D.lencse-v6ops-transition-benchmarking] IESG state I-D Exists -->

        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.lencse-v6ops-transition-benchmarking.xml"/>

        <reference anchor="AZZ2021" target="https://www.infocommunications.hu/2021_4_2">
          <front>
            <title>Identification of the Possible Security Issues of the 
		464XLAT IPv6 Transition Technology
            </title>
            <author initials="A." surname="Al-Azzawi">
              <organization/>
            </author>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <date month="December" year="2021"/>
          </front>
          <seriesInfo name="DOI" value="10.36244/ICJ.2021.4.2"/>
          <refcontent>Infocommunications Journal, Vol. 13, No. 4, pp. 10-18</refcontent>
        </reference>

<reference anchor="LEN2018" target="http://www.hit.bme.hu/~lencse/publications/ECS-2018-Methodology-revised.pdf">
          <front>
            <title>Methodology for the identification of potential security issues
        of different IPv6 transition technologies: Threat analysis of DNS64 and
        stateful NAT64
            </title>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <author initials="Y." surname="Kadobayashi">
              <organization/>
            </author>
            <date month="August" year="2018"/>
          </front>
	  <seriesInfo name="DOI" value="10.1016/j.cose.2018.04.012"/>
          <refcontent>Computers &amp; Security, Vol. 77, No. 1, pp. 397-411</refcontent>
        </reference>

        <reference anchor="LEN2019" target="http://www.hit.bme.hu/~lencse/publications/e102-b_10_2021.pdf">
          <front>
            <title>Comprehensive Survey of IPv6 Transition Technologies: 
		A Subjective Classification for Security Analysis
            </title>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <author initials="Y." surname="Kadobayashi">
              <organization/>
            </author>
            <date month="October" year="2019"/>
          </front>
          <seriesInfo name="DOI" value="10.1587/transcom.2018EBR0002"/>
          <refcontent>IEICE Transactions on Communications, Vol. E102-B, No. 10, pp. 2021-2035</refcontent>
        </reference>

        <reference anchor="LEN2020a" target="https://link.springer.com/article/10.1007/s11235-020-00681-x">
          <front>
            <title>Benchmarking stateless NAT64 implementations with a standard tester
            </title>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <date month="June" year="2020"/>
          </front>
          <seriesInfo name="DOI" value="10.1007/s11235-020-00681-x"/>
	  <refcontent>Telecommunication Systems, Vol. 75, pp. 245-257</refcontent>
        </reference>

        <reference anchor="LEN2020b" target="https://ijates.org/index.php/ijates/article/view/291">
          <front>
            <title>Adding RFC 4814 Random Port Feature to Siitperf: Design, Implementation and 
		Performance Estimation
            </title>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <date month="" year="2020"/>
          </front>
          <seriesInfo name="DOI" value="10.11601/ijates.v9i3.291"/>
	  <refcontent>International Journal of Advances in Telecommunications, Electrotechnics, Signals and Systems, Vol. 9, No. 3, pp. 18-26</refcontent>
        </reference>

        <reference anchor="LEN2021">
          <front>
            <title>Design and Implementation of a Software Tester for Benchmarking Stateless NAT64 Gateways
            </title>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <date  year="2021"/>
          </front>
          <seriesInfo name="DOI" value="10.1587/transcom.2019EBN0010"/>
	  <refcontent>IEICE Transactions on Communications, Vol. E104.B, Issue 2, pp. 128-140</refcontent>
        </reference>

        <reference anchor="JOOL-MAPT" target="https://www.jool.mx/en/run-mapt.html">
          <front>
            <title>MAP-T Run</title>
            <author>
            </author>
          </front>
        </reference>

        <reference anchor="MIY2010" target="https://www.jstage.jst.go.jp/article/transcom/E93.B/5/E93.B_5_1078/_article">
          <front>
            <title>IPv4 to IPv6 Transformation Schemes
            </title>
            <author initials="S." surname="Miyakawa">
              <organization/>
            </author>
            <date  year="2010"/>
          </front>
          <seriesInfo name="DOI" value="10.1587/transcom.E93.B.1078"/>
	  <refcontent>IEICE Transactions on Communications, Vol. E93-B, Issue 5, pp. 1078-1084</refcontent>
        </reference>

        <reference anchor="REP2014" target="http://www.hit.bme.hu/~lencse/publications/TSP-2014-PC.pdf">
          <front>
            <title>Port Number Consumption of the NAT64 IPv6 Transition Technology
            </title>
            <author initials="S." surname="Répás">
              <organization/>
            </author>
            <author initials="T." surname="Hajas">
              <organization/>
            </author>
            <author initials="G." surname="Lencse">
              <organization/>
            </author>
            <date year="2014"/>
          </front>
          <seriesInfo name="DOI" value="10.1109/TSP.2015.7296411"/>
	  <refcontent>37th International Conference on Telecommunications and Signal Processing</refcontent>
        </reference>

        <reference anchor="SIITPERF" target="https://github.com/lencsegabor/siitperf">
          <front>
            <title>Siitperf: an RFC 8219 compliant SIIT (stateless NAT64) 
		tester</title>
	      <author/>
		<date month="February" year="2021"/>
          </front>
	  <refcontent>commit bdce0f</refcontent>
        </reference>

        <reference anchor="TR-069" target="https://www.broadband-forum.org/technical/download/TR-069.pdf">
          <front>
            <title>CPE WAN Management Protocol</title>
            <author>
              <organization>Broadband Forum</organization>
            </author>
            <date month="June" year="2020"/>
          </front>
	  <seriesInfo name="Technical Report" value="TR-069"/>
        </reference>

        <reference anchor="JOOL" target="http://www.jool.mx">
          <front>
            <title>Jool: SIIT &amp; NAT64</title>
            <author>
            </author>
          </front>
        </reference>

        <reference anchor="VPP" target="https://wiki.fd.io/index.php?title=VPP&amp;oldid=11809">
          <front>
            <title>VPP</title>
            <author>
            </author>
	    <date month="July" year="2022"/>
          </front>
        </reference>


        <reference anchor="SNABB" target="https://github.com/Igalia/snabb">
          <front>
            <title>Snabb implementation of lwAFTR</title>
	    <author>
            </author>
            <date month="January" year="2022"/>
          </front>
	  <refcontent>commit 1ef72ce</refcontent>
        </reference>

        <reference anchor="AFTR" target="https://downloads.isc.org/isc/aftr/">
          <front>
            <title>ISC Implementation of AFTR</title>
            <author>
              <organization>ISC</organization>
            </author>
          </front>
        </reference>
      </references>
    </references>
<section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>The authors would like to thank <contact fullname="Ole Troan"/>,
      <contact fullname="Warren Kumari"/>, <contact fullname="Dan
      Romascanu"/>, <contact fullname="Brian Trammell"/>, <contact
      fullname="Joseph Salowey"/>, <contact fullname="Roman Danyliw"/>,
      <contact fullname="Erik Kline"/>, <contact fullname="Lars Eggert"/>,
      <contact fullname="Zaheduzzaman Sarker"/>, <contact fullname="Robert
      Wilton"/>, <contact fullname="Éric Vyncke"/> and <contact
      fullname="Martin Duke"/> for their review of this document and acknowledge
      the inputs of <contact fullname=" Mark Andrews"/>, <contact
      fullname="Edwin Cordeiro"/>, <contact fullname="Fred Baker"/>, <contact
      fullname="Alexandre Petrescu"/>, <contact fullname="Cameron Byrne"/>,
      <contact fullname="Tore Anderson"/>, <contact fullname="Mikael
      Abrahamsson"/>, <contact fullname="Gert Doering"/>, <contact
      fullname="Satoru Matsushima"/>, <contact fullname="Yutianpeng (Tim)"/>,
      <contact fullname="Mohamed Boucadair"/>, <contact fullname="Nick
      Hilliard"/>, <contact fullname="Joel Jaeggli"/>, <contact
      fullname="Kristian McColm"/>, 
      <contact fullname="Tom Petch"/>, <contact fullname="Yannis
      Nikolopoulos"/>, <contact fullname="Havard Eidnes"/>, <contact
      fullname="Yann-Ju Chu"/>, <contact fullname="Barbara Stark"/>, <contact
      fullname="Vasilenko Eduard"/>, <contact fullname="Chongfeng Xie"/>,
      <contact fullname="Henri Alves de Godoy"/>, <contact fullname="Magnus
      Westerlund"/>, <contact fullname="Michael Tüxen"/>, <contact
      fullname="Philipp S. Tiesel"/>, <contact fullname="Brian E. Carpenter"/>,
      and <contact fullname="Joe Touch"/>.</t>
    </section>

  </back>
</rfc>
