﻿<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
    which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
    There has to be one entity for each item to be referenced. 
    An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2473 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2473.xml">
<!ENTITY RFC2544 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2544.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC2663 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2663.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC4814 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4814.xml">
<!ENTITY RFC5180 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5180.xml">
<!ENTITY RFC5226 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5226.xml">
<!ENTITY RFC5452 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5452.xml">
<!ENTITY RFC6050 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6050.xml">
<!ENTITY RFC6052 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6052.xml">
<!ENTITY RFC6146 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6146.xml">
<!ENTITY RFC6147 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6147.xml">
<!ENTITY RFC6180 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6180.xml">
<!ENTITY RFC6269 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6269.xml">
<!ENTITY RFC6333 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6333.xml">
<!ENTITY RFC6346 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6346.xml">
<!ENTITY RFC6519 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6519.xml">
<!ENTITY RFC6877 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6877.xml">
<!ENTITY RFC6889 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6889.xml">
<!ENTITY RFC7050 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7050.xml">
<!ENTITY RFC7341 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7341.xml">
<!ENTITY RFC7393 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7393.xml">
<!ENTITY RFC7422 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7422.xml">
<!ENTITY RFC7596 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7596.xml">
<!ENTITY RFC7597 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7597.xml">
<!ENTITY RFC7599 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7599.xml">
<!ENTITY RFC7605 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7605.xml">
<!ENTITY RFC7757 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7757.xml">
<!--<!ENTITY RFC7857 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7757.xml">-->
<!ENTITY RFC7915 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7915.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC8114 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8114.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC8219 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8219.xml">
<!ENTITY RFC8415 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8415.xml">
<!ENTITY RFC8512 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8512.xml">
<!ENTITY RFC8658 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8658.xml">
<!ENTITY RFC8683 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8683.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
    please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
    (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
    (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-ietf-v6ops-transition-comparison-02" ipr="trust200902">

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
          full title is longer than 39 characters -->

    <title abbrev="Pros and Cons of IPv4aaS Technologies">Pros and Cons of IPv6 Transition
    Technologies for IPv4aaS</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Gabor Lencse" initials="G." surname="Lencse">
      <organization abbrev="BUTE">Budapest University of Technology and Economics</organization>
      <address>
        <postal>
          <street>Magyar tudosok korutja 2.</street>
          <!-- Reorder these if your country does things differently -->
          <city>Budapest</city>
          <region></region>
          <code>H-1117</code>
          <country>Hungary</country>
        </postal>
        <phone></phone>
        <email>lencse@hit.bme.hu</email>
      </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>
          <!-- Reorder these if your country does things differently -->
          <city>Fairfax</city>
          <region>Virginia</region>
          <code>22031</code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <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>
          <!-- Reorder these if your country does things differently -->
          <city>London</city>
          <region></region>
          <code>EQ 6PU</code>
          <country>United Kingdom</country>
        </postal>
        <phone></phone>
        <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>
          <!-- Reorder these if your country does things differently -->
          <city>Bonn</city>
          <region></region>
          <code>53227</code>
          <country>Germany</country>
        </postal>
        <phone></phone>
        <email>ian.farrer@telekom.de</email>
      </address>
    </author>

    <date year="2022" />

    <!-- Meta-data Declarations -->

    <area>ops</area>

    <workgroup>v6ops</workgroup>

    <!-- WG name at the upperleft corner of the doc,
          IETF is fine for individual submissions.  
    If this element is not present, the default is "Network Working Group",
          which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>IPv6, Transition Technologies, Comparison, IPv4aaS, IPv6-only, 464XLAT, DNS64, Dual Stack Lite, Lightweight 4over6, MAP-E, MAP-T</keyword>

    <!-- Keywords will be incorporated into HTML output
          files in a meta tag but they have no effect on text or nroff
          output. If you submit your draft to the RFC Editor, the
          keywords will be used for the search engine. -->

    <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. All these technologies have their
      advantages and disadvantages, and 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 considering 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" title="Introduction">
      <t>As the deployment of IPv6 becomes more prevalent, it follows
      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 <xref target="LEN2019"/> 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. The
      following IPv6 transition technologies are covered:
      <list style="numbers">
      	<t>464XLAT <xref target="RFC6877"/></t>
      	<t>Dual Stack Lite <xref target="RFC6333"/></t>
      	<t>lw4o6 (Lightweight 4over6) <xref target="RFC7596"/></t>
      	<t>MAP-E <xref target="RFC7597"/></t>
      	<t>MAP-T <xref target="RFC7599"/></t>
      </list></t>
	  
	  <t>We note that <xref target="RFC6180"/> gives guidelines for using 
	  IPv6 transition mechanisms during IPv6 deployment addressing a much 
	  broader topic, whereas this document focuses on a small part of it.</t>

      <section title="Requirements Language">
        <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 BCP14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
           when, and only when, they appear in all capitals, as shown here.
         </t>
      </section>
    </section>

    <section anchor="overview" title="Overview of the Technologies">
      <t>The following sections introduce the different technologies analyzed
      in this document, describing some of their most important characteristics.
      </t>

      <section anchor="xlat_ov" title="464XLAT">
        <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).</t>
		
		<t>The customer-side translator (CLAT) is located in the customer's device, 
		and it performs stateless NAT64 translation <xref target="RFC7915"/> (more precisely,
        stateless NAT46, a stateless IP/ICMP translation from IPv4 to IPv6).
        IPv4-embedded IPv6 addresses <xref target="RFC6052"/> are used for both
        source and destination addresses. Commonly, a /96 prefix (either the 
		64:ff9b::/96 Well-Known Prefix, or a Network-Specific Prefix) is used as
        the IPv6 destination for the IPv4-embedded client traffic.</t>

        <t>In the operator's network, the provider-side translator (PLAT)
        performs stateful NAT64 <xref target="RFC6146"/> 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>

        <!-- I'm not sure I understand the above statement. It seems to 
        conflate the /64 destination address needed to route the 46 translated
        traffic to the PLAT with moving the stateful NAT44 function from the 
        PLAT to the CLAT -->
		
		<!-- GL:  Please refer to: https://tools.ietf.org/html/rfc6877#section-6.3 -->


		<t>In general, state close to the end-user network (i.e. at the CE) is not 
		perceived as problematic as state in the operators network.</t>

		<!-- GL: 
        <t>The authors generally do not see state close to the end-user as
        equally problematic as state in the middle of the network.</t>
		-->

        <t>In typical deployments, 464XLAT is used together with DNS64 
		<xref target="RFC6147"/>, see Section 3.1.2 of <xref target="RFC8683"/>.
        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, and the CLAT functions as an IPv6 router and the PLAT performs a
        stateful NAT64 for these packets. In this case, there is a single
        translation.</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>

<!--*** Comment 1 - For the above 2 paragraphs, is the above case a typical
        deployment? Isn't mobile still overwhelmingly the most common deployer
        of 464? 
        Comment 2 - I think that the above 2 paragraphs would be better moved
        to another section. This is meant to be a overview of how 464XLAT
        works. Combining with DNS64/NAT64 adds in another solution (not part
        of the stated scope of the doc ) which could be done with any of the
        technologies described here whether this is commonly done or not). It's
        not a part of 464XLAT and  it's not unique to it. -->
		
		<!-- GL: for Comment 2 - Yes, it could be put to somewhere else, but, in practice, 
		ONLY 464XLAT is combined with DNS64/NAT64.  RFC 6877 mentions already
		in the Introduction that it can be use together with DNS64 or without it. 
		This is one of the most important advantages of 464XLAT that the vast 
		majority of the traffic does not need to be double translated. 
		I did some Google-ing to chech whether T-Mobile USA uses 464XLAT together 
		with DNS64. Yes it does. See slide 13 of this pdf: 
		https://www.sanog.org/resources/sanog23/SANOG23_464XLAT.pdf
		
		-->


        <figure anchor="xlatarch" align="center" title="Overview of the 464XLAT
        architecture">
          <preamble></preamble>

          <artwork align="left"><![CDATA[
          Private +----------+ Translated  +----------+     _______
  +------+  IPv4  |   CLAT   |    4-6-4    | Stateful |    ( IPv4  )
  | IPv4 |------->| Stateless|------------>|  PLAT    +--( Internet )
  |Device|<-------|   NAT46  |<------------|  NAT64   |   (________)
  +------+        +----------+      ^      +----------+ 
                                    |                    
                              Operator IPv6
                                network
            ]]></artwork>

        <postamble></postamble>
        </figure>

        <t>Note: in mobile networks, CLAT is commonly implemented in the user's
        equipment (UE or smartphone).</t>
      </section>

      <section anchor="dslite_ov" title="Dual-Stack Lite">

        <t>Dual-Stack Lite (DS-Lite) <xref target="RFC6333"/> was the first
        of the considered transition mechanisms to be developed. DS-Lite uses a
        'Basic Broadband Bridging' (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 a centralized 'Address Family Transition
        Router' (AFTR). The AFTR performs  encapsulation/decapsulation of the
        4in6 <xref target="RFC2473"/> traffic and translates the IPv4 payload 
		to public IPv4 source address using a stateful NAPT44 <xref target="RFC2663"/> function.</t>

        <figure anchor="dslitearch" align="center" title="Overview of the
        DS-Lite architecture">
          <preamble></preamble>

          <artwork align="left"><![CDATA[
                                         +-------------+
        Private +----------+ IPv4-in-IPv6|Stateful AFTR|
+------+  IPv4  |    B4    |    tunnel   |------+------+     _______
| IPv4 |------->| Encap./  |------------>|Encap.|      |    ( IPv4  )
|Device|<-------|  decap.  |<------------|  /   | NAPT +--( Internet )
+------+        +----------+      ^      |Decap.|  44  |   (________)
                                  |      +------+------+
                            Operator IPv6
                              network
          ]]></artwork>

        <postamble></postamble>
        </figure>
      </section>

      <section anchor="lw4o6_ov" title="Lightweight 4over6">
        <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 a lwB4). The AFTR
        (called a lwAFTR) function therefore only performs A+P routing and 4in6
        encapsulation/decapsulation.</t>

        <t>Routing to the correct client and IPv4 address sharing is achieved
        using the Address + Port (A+P) model <xref target="RFC6346"/> of
        provisioning each lwB4 with a unique tuple of IPv4 address and a unique range
        of layer-4 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 allocated range of
        layer-4 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 hair-pinning
        traffic through the lwAFTR.</t>

        <figure anchor="lw4o6arch" align="center" title="Overview of the lw4o6
        architecture">
        <preamble></preamble>

        <artwork align="left"><![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>

        <postamble></postamble>
        </figure>
      </section>

     <section anchor="map_e_ov" title="MAP-E">
        <t>Like 464XLAT (<xref target="xlat_ov"/>), MAP-E and MAP-T use 
		<xref target="RFC6052"/> IPv4-embedded IPv6 addresses 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 for direct IPv4 peer-to-peer communication
        between hosts provisioned with common MAP rules.</t>

        <t>The CE (Customer-Edge) router typically performs stateful NAPT44 
        <xref target="RFC2663"/> 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 design parameter. The CE router then
        encapsulates the IPv4 packet in an IPv6 packet <xref target="RFC2473"/>
        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 client, validating the
		   source IPv4 address and layer 4 ports assigned, as well as how to
		   calculate the destination IPv6 address for ingress IPv4 traffic.</t>

        <figure anchor="map-e-arch" align="center" title="Overview of the MAP-E
          architecture">
        <preamble></preamble>

        <artwork align="left"><![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>

        <postamble></postamble>
        </figure>
      </section>

     <section anchor="map_t_ov" title="MAP-T">
        <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>
        
<!-- I think the last sentence can be removed as 'double translation' is not
really equivalent in this case. MAP-T has 3 translations - 1 stateful, 2 stateless
XLAT has 2 translations - 1 statless, 1 stateful -->
<!-- GL: Strictly speaking: you are right. But in a high level view, both translate
 private IPv4 to IPv6 and IPv6 to public IPv4. -->
        <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 - 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"/>. The MAP BR is provisioned with the
        same BMR as the client, enabling the received IPv6 traffic to be
        statelessly NAT64 translated 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>

<!-- Whilst the above is theoritically true, are there implementations in
practice? How would name resolution /serivce discovery work? The node that
generally implements MAP (and gets provisioned with the MAP rule is a CE 
device. -->
<!-- GL: If I remember well, the above statement is from Ole Troan, one of the authors 
of the MAP protocols, thus it is very likely true. However, I myself can neither prove, 
nor confute it.-->
        <figure anchor="map-t-arch" align="center" title="Overview of the MAP-T
        architecture">
        <preamble></preamble>

        <artwork align="left"><![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>

        <postamble></postamble>
        </figure>
      </section>
    </section>

    <section anchor="hl_arch" title="High-level Architectures and their
Consequences">
      <section anchor="sp_net_trav" title="Service Provider Network Traversal">
        <t>For the data-plane, there are two approaches for traversing
        the IPv6 provider network:
        <list style="symbols">
          <t>4-6-4 translation</t>
          <t>4-in-6 encapsulation</t>
        </list></t>

        <texttable anchor="net_trav_table" title="Available Traversal Mechanisms">
          <preamble></preamble>

          <ttcol align="center"></ttcol>
          <ttcol align="center">464XLAT</ttcol>
          <ttcol align="center">DS-Lite</ttcol>
          <ttcol align="center">lw4o6</ttcol>
          <ttcol align="center">MAP-E</ttcol>
          <ttcol align="center">MAP-T</ttcol>

          <c>4-6-4 trans.</c>
          <c>X</c>
          <c></c>
          <c></c>
          <c></c>
          <c>X</c>

          <c>4-6-4 encap.</c>
          <c></c>
          <c>X</c>
          <c>X</c>
          <c>X</c>
          <c></c>

          <postamble></postamble>
        </texttable>

        <t>In the scope of this document, all of the encapsulation based
        mechanisms use IP-in-IP tunnelling <xref target="RFC2473"/>.
        This is a stateless tunneling mechanism which does not require any
        additional tunnel headers.</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-bytes 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
        traffic needing 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 re-assembly
        in the BR node.</t>

        <t>The advice given in <xref target="RFC7597"/> 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 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" title="Network Address Translation">

        <t>For the high-level solution of IPv6 service provider network
        traversal, MAP-T uses double stateless translation. First at the CE
        from IPv4 to IPv6 (NAT46), and then 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"/>.</t>

<!-- Here we're conflation NAT64 with 464XLAT again - see my comment in the 
464XLAT overview -->
<!-- GL: Yes, because they are used together. -->
        <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"/>, 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 layer-4 next-header. The fields in these headers
        can be used for functions such as hashing across equal-cost multipaths
        or ACLs. For encapsulation, there is an IPv6 header followed by an
        IPv4 header. This results in less entropy for hashing algorithms, and
        may mean that devices in the traffic path that perform header inspection
        (e.g. router ACLs or firewalls) require the functionality to look into
        the payload header.</t>

        <t>Solutions using double translation can only carry port-aware IP
        protocols (e.g. TCP, UDP) and ICMP when they are used with IPv4 address
        sharing (please refer to  <xref target="pub_serv"/> for more details).
        Encapsulation based solutions can carry any other protocols
        over IP, too.</t>
		
		<t>An in-depth analysis of stateful NAT64 can be found in <xref target="RFC6889"/>.</t>
		
		
<!-- The above paragraph really needs more detail in there as it oversimplifies
the reality. Encap with address sharing can't carry a non-port aware protocol
such as GRE (without UDP). A stateful CGN is generally capable of performing 
NAT44 (not- NAPT) for non-port aware protocols. -->

<!-- GL: Could you elaborate it in the text? -->

      </section>

      <section anchor="ipv4_sharing" title="IPv4 Address Sharing">
        <t>As public IPv4 address exhaustion is a common motivation for
        deploying IPv6, transition technologies need to provide a solution for
        allowing 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:
        <list style="symbols">
          <t>CGN-based approaches (DS-Lite, 464XLAT)</t>
          <t>A+P-based approaches (lw4o6, MAP-E, MAP-T)</t>
        </list></t>

        <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 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"/> and should also be considered.</t>

        <t>The address sharing efficiency of the five technologies is
        significantly different, it is discussed in 
        <xref target="port_num_eff"/></t>

        <t>lw4o6, MAP-E and MAP-T can also be configured without IPv4 address
        sharing, see the details in <xref target="pub_serv"/>. However, in that
        case, there is no advantage in terms of public IPv4 address saving. In
        the case of 464XLAT, this can be achieved as well through EAMT
        <xref target="RFC7757"/>.</t>

        <t>Conversely, both MAP-E and MAP-T may be configured to provide more
        than one public IPv4 address (i.e., 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"/>.</t>
		
      </section>

      <section anchor="ipv4_pool" title="IPv4 Pool Size Considerations">
		<t>In most networks, it is possible to, using existing data about flows to 
		CDNs/caches or other well-known IPv6-enabled destinations, calculate the 
		percentage of traffic that would turn into IPv6 if it is enabled on that 
		network or 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>Often it is assumed that each user-device (computer, tablet, smartphone) 
		behind a NAT, could simultaneously use about 300 ports. Typically, in the case 
		of a residential subscriber, there will be a maximum of 4 of those devices 
		in use simultaneously, which means a total of 1,200 ports.</t>

		<t>If for example, 80% of the traffic is expected towards IPv6 destinations, 
		only 20% will actually be using IPv4 ports, so in our example, that will mean 
		240 ports required per subscriber.</t>

		<t>From the 65,535 ports available per IPv4 address, we could even consider 
		reserving 1,024 ports, in order to allow customers that need EAMT entries 
		for incoming connections to System Ports (0-1023, also called well-known ports) 
		<xref target="RFC7605"/>, which means 64,511 ports 
		actually available per 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, so it is not necessary 
		to consider if one user is actually using more or less 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, less IPv4/ports), so 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 a 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>An alternative approximation for the other IPv4aaS technologies, 
		when dynamically assignment of addresses is not possible, must ensure 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% of IPv6 traffic, 
		as above, which will allow only 30 subscribers per each IPv4 address, so 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, 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 4 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 and similar mechanisms, so taking that extreme limit is probably 
		not a very a safe choice.</t>

		<t>This extremely reduced number of ports "feature" could also be used in 
		case the CLAT-enabled CE with 464XLAT makes use of the 5-tuple NAT 
		connections tracking, and could also be further extended 
		if the NAT64 also use the 5-tuple.</t>

      </section>

      <section anchor="ce_prov" title="CE Provisioning Considerations">
        <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>

        <texttable anchor="prov_mech_table" title="Available Provisioning
        Mechanisms">
          <preamble></preamble>

          <ttcol align="left"></ttcol>
          <ttcol align="center">464XLAT</ttcol>
          <ttcol align="center">DS-Lite</ttcol>
          <ttcol align="center">lw4o6</ttcol>
          <ttcol align="center">MAP-E</ttcol>
          <ttcol align="center">MAP-T</ttcol>

          <c>DHCPv6 <xref target="RFC8415"/></c>
          <c></c>
          <c>X</c>
          <c>X</c>
          <c>X</c>
          <c>X</c>

          <c>RADIUS <xref target="RFC8658"/></c>
          <c></c>
          <c><xref target="RFC6519"/></c>
          <c>X</c>
          <c>X</c>
          <c>X</c>

          <c>TR-069</c>
          <c>*</c>
          <c>X</c>
          <c>*</c>
          <c>X</c>
          <c>X</c>

          <c>DNS64 <xref target="RFC7050"/></c>
          <c>X</c>
          <c></c>
          <c></c>
          <c></c>
          <c></c>

          <c>YANG <xref target="RFC7950"/></c>
          <c><xref target="RFC8512"/></c>
          <c>X</c>
          <c>X</c>
          <c>X</c>
          <c>X</c>

          <c>DHCP4o6 <xref target="RFC7341"/></c>
          <c></c>
          <c></c>
          <c>X</c>
          <c>X</c>
          <c></c>

          <postamble></postamble>
        </texttable>

        <t>*: Work started at BroadBand Forum (2021).</t>

<!--*** References to RFCs are needed in the first column of the table
        above. -->
      </section>


      <section anchor="multicast" title="Support for Multicast">
        <t>The solutions covered in this document are all intended for
        unicast traffic. <xref target="RFC8114"/> 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 title="Detailed Analysis">
      <section title="Architectural Differences">
        <section title="Basic Comparison">
          <t>The five IPv4aaS technologies can be classified into 2x2=4
          categories on the basis of two aspects:
          <list style="symbols">
            <t>Technology used for service provider network traversal. 
            It can be single/double translation or encapsulation.</t>
            <t>Presence or absence of NAPT44 per-flow state in the
            operator network.
            </t>
          </list></t>

          <texttable anchor="data_plane_table" title="Available Provisioning
            Mechanisms">
            <preamble></preamble>

            <ttcol align="center"></ttcol>
            <ttcol align="center">464XLAT</ttcol>
            <ttcol align="center">DS-Lite</ttcol>
            <ttcol align="center">lw4o6</ttcol>
            <ttcol align="center">MAP-E</ttcol>
            <ttcol align="center">MAP-T</ttcol>

            <c>4-6-4 trans.</c>
            <c>X</c>
            <c></c>
            <c></c>
            <c></c>
            <c>X</c>

            <c>4-in-4 encap.</c>
            <c></c>
            <c>X</c>
            <c>X</c>
            <c>X</c>
            <c></c>

            <c>Per-flow state in op. network</c>
            <c>X</c>
            <c>X</c>
            <c></c>
            <c></c>
            <c></c>
          </texttable>
        </section>
      </section>
      
      <section anchor="port_num_eff" title="Tradeoff between Port Number
Efficiency and Stateless Operation">

      <t>464XLAT and DS-Lite use stateful NAPT at the PLAT/AFTR devices,
      respectively. This may cause scalability issues for the number of clients
      or volume of traffic, but 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/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
      re-provisioning 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 re-provisioned (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 customer public port-allocations and the corresponding
      logging overhead that may be necessary to meet data-retention
      requirements. This is considered in <xref target="logging"/> below.</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, 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 on the example of Google Maps 
      <xref target="MIY2010"/>. 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: 230-270 ports).</t>

      <t>The port number consumption of different applications is highly
      varying and e.g. in the case of web browsing it depends on several
      factors, including the choice of the web page, the web browser, and
      sometimes even the operating system <xref target="REP2014"/>. For
      example, under certain conditions, 120-160 ports were used (URL: 
      sohu.com, browser: Firefox under Ubuntu Linux), and in some other cases
      it was only 3-12 ports (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>Furthermore, assigning too many ports per CE router
      will result in waste of public IPv4 addresses, which is a scarce and
      expensive resource. 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 
      don't need to be pre-defined and is not a limitation for them.</t>

      <t>There is a direct tradeoff between the optimization of client
      port allocations and the associated logging overhead. 
      <xref target="logging"/> discusses this in more depth.</t>

<!-- Aren't CGNs generally deployed using port block allocation these days?
If so, then getting the size of the allocated block right is also important
here. -->
<!-- GL: I do not know, as I am not a network operator. -->

      <t>We note that common CE router NAT44 implementations utilizing
      Netfilter, multiplexes 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 address
      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 and DS-Lite (and also 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 noticed 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:
	  <list style="symbols">
            <t>How their performance scales up with the number of CPU cores?</t>
            <t>To what extent their performance degrades with the number of 
			concurrent connections?</t>
          </list>
      The details of the measurements and their results are available from 
	  	  <xref target="I-D.lencse-v6ops-transition-scalability"/>.
	  </t>
<!--*** +1 on that! -->

      <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, content delivery networks. However, it should be noticed
      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"/> may
      impact all five technologies. However, when ports are allocated
      statically, more customers may get ports from the same public IPv4
      address, which may results in negative consequences with higher
      probability, e.g. many applications and service providers (Sony
      PlayStation Network, OpenDNS, etc.) permanently black-list 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" title="Support for Public Server Operation">
      <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 layer-4 ports.</t>

      <t>Port Control Protocol (PCP) <xref target="RFC6877"/> provides a
      mechanism for a client to request an external public port from a CGN
      device. For server operation, it is required with NAT64/464XLAT, 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 layer-4 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 commonly
      operators 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 layer 4 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,
      obviously there is 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"/>, 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>

<!--** I'm not familiar with EAMT - does this require operator side
      intervention? Maybe a good way to deal with this section would be to
      divide what is possible without and with operator intervention? -->

	<!-- GL: I am currently working on benchmarking three differen stateless 
	NAT64 implementations: TAYGA, Jool and map646. I set the mappings in their
	configurations files. Thus, I would say: yes, it requires... -->  
	  
	  
    </section>

    <section anchor="supp_imp" title="Support and Implementations">
      <section title="OS Support">

<!-- In a future update, this can be expanded to include implementations of
data plane and provisioning mechanisms, as to be useful, you really need both
-->
        <t>A 464XLAT client (CLAT) is implemented in Windows 10, Linux
        (including Android), Windows Mobile, Chrome OS and iOS, but at the time
        of writing is not available in MacOS.</t>

        <t>The remaining four solutions are commonly deployed as functions in
        the CE device only, however in general, except DS-Lite, the vendors
        support is poor.</t>

        <t>The OpenWRT Linux based open-source OS designed for CE devices offers
        a number of different 'opkg' packages as part of the distribution:
        <list style="symbols">
          <t>'464xlat' enables support for 464XLAT CLAT functionality</t>
          <t>'ds-lite' enables support for DSLite B4 functionality</t>
          <t>'map' enables support for MAP-E and lw4o6 CE functionality</t>
          <t>'map-t' enables support for MAP-T CE functionality</t>
        </list></t>

        <t>At the time of publication some free open-source implementations 
		exist for the operator side functionality:

        <list style="hanging" hangIndent="20">
          <t hangText="CLAT, NAT64, EAMT, MAP-T CE, MAP-T BR:"> http://www.jool.mx</t>
          <t hangText="MAP-BR, lwAFTR, CGN, CLAT, NAT64:"> VPP/fd.io 
        https://gerrit.fd.io/r/#/admin/projects/</t>
          <t hangText="lwAFTR:"> https://github.com/Igalia/snabb</t>
          <t hangText="DSLite AFTR:"> https://www.isc.org/downloads/</t>
        </list></t>

      </section>

      <section anchor="cell_broad_supp" title="Support in Cellular and Broadband Networks">
        <t>Several cellular networks use 464XLAT, whereas there are no
        deployments of the four other technologies in cellular networks, as
        they are neither standardised 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 lw4o6 taking over in the last years.</t>
		
		<t>Please refer to Table 2 and Table 3 of <xref target="LEN2019"/>
		for a limited set of deployment information.</t>

<!--*** I still see DS-Lite as being overwhelmingly the most common
        technology here. Do we have any deployment information that was can
        used here?
        Do we have any figures about number of deployments of each type to 
        back the statements up? -->
<!-- GL: I am working on the revison of a paper, which has some tables on the
 deployment of different IPv6 transition technologies.  Ihope that we can cite
 it in the next version. 
 Now (July 8, 2020) I have added the reference. -->
		
		
      </section>

      <section anchor="code_size" title="Implementation Code Sizes">
        <t>As hint to the relative complexity of the mechanisms, the following
        code sizes are reported from the OpenWRT
        implementations of each technology are 17kB, 35kB, 15kB, 35kB, and
        48kB for 464XLAT, lw4o6,
        DS-Lite, MAP-E, MAP-T, and lw4o6, respectively
        (https://openwrt.org/packages/start).</t>

<!-- Worth noting that for many of the above cases, these are for provisioning.
Netfilter is doing that actual work for NAT and encap/decap. -->
<!-- GL: I think, Netfiler only provides you with hooks, but it does not perform the encap/decap. -->
        <t>We note that the support for all five technologies requires much
        less code size than the total sum of the above quantities, because
        they contain a lot of common functions (data plane is shared among
        several of them).</t>
      </section>
    </section>

    <section title="Typical Deployment and Traffic Volume Considerations">
      <section title="Deployment Possibilities">
        <t>Theoretically, all five IPv4aaS technologies could be
        used together with DNS64 + stateful NAT64, as it 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 for deploying also 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 title="Cellular Networks with 464XLAT">
        <t>Figures from existing deployments (end of 2018), show that the typical
        traffic volumes in an IPv6-only cellular network, when 464XLAT
        technology is used together with DNS64, are:

        <list style="symbols">
          <t>75% of traffic is IPv6 end-to-end (no translation)</t>
          <t>24% of traffic uses DNS64 + NAT64 (1 translation)</t>
          <t>Less than 1% of traffic uses the CLAT in addition to NAT64
          (2 translations), due to an IPv4 socket and/or IPv4 literal.</t>
        </list></t>

        <t>Without using DNS64, 25% of the traffic would undergo double
        translation.</t>
        
        <!-- Can we point to the source of this data? Also, are there tangible
        benefits to only going through single translation that can be described.
        -->
		<!-- GL: I have also asked for it, but no one took the resposibility 
		to name the company, where they were taken from. -->
		<!-- Jordi: This info was provided in v6ops by Cameron (T-Mobile) Oct. 2018
		it is factual data, what I'm not sure is if he will agree to name
		the network in an RFC, or if it is good at all to cite networks 
		in a document. I've asked him already a couple of days ago, if he 
		has actual data to share, so we can publish 2018 and 2020 comparison. -->
      </section>

      <section title="Wireline Networks with 464XLAT">
        <t>Figures from several existing deployments (end of 2020), mainly with 
        residential customers, show that the typical traffic volumes in an 
        IPv6-only network, when 464XLAT is used with DNS64, are in the following ranges:

        <list style="symbols">
          <t>65%-85% of traffic is IPv6 end-to-end (no translation)</t>
          <t>14%-34% of traffic uses DNS64 + NAT64 (1 translation)</t>
          <t>Less than 1-2% of traffic uses the CLAT in addition to NAT64
          (2 translations), due to an IPv4 socket and/or IPv4 literal.</t>
        </list></t>

        <t>Without using DNS64, 16%-35% of the traffic would undergo double
        translation.</t>
        
		<!-- Jordi: This info comes from several of my customers, that's why is a "range"
		not an average, I think it makes more sense to talk about ranges as it shows 
		how other networks could be around similar figures. However I've no 
		permission to cite them, and again, I don't think is good to name specific
		networks in an RFC? -->
      </section>

    </section>

    <section title="Load Sharing">
      <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 Multi-Path) load sharing can be used for all
      technologies, however stateful technologies will be impacted by
      changes in network topology or device failure.</t>

      <!--- I'm not sure the last part of that paragraph is true. I've 
      added some text describing the problems below -->
      <!--- GL: It is also from Ole Troan. You can find it in one of the
	  e-mails on the v6ops mailing list. -->
      <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. As each CGN maintains a
      stateful table of active client sessions, this table may need to be
      syncronized between CGN instances. This is necessary for two reasons:
      </t>

      <t><list style="symbols">
      <t>To prevent all active customer sessions being dropped in event
      of a CGN node failure.</t>
      <t>To ensure a matching state table entry for an active session in
      the event of asymmetric routing through different egress and ingress
      CGN nodes.</t>
      </list></t>
    </section>

    <section anchor="logging" title="Logging">
      <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's generates a logging entry. As discussed in 
      <xref target="port_num_eff"/>, 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 logging entry only needs to be
      made when the client's port block is released, which dramatically
      reducing 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). As stateless technologies do not have
      a centralized stateful element which 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"/> was proposed as a solution to 
	  reduce the resource consumption of logging.</t>
	  
    </section>

    <section anchor="optimization" title="Optimization for IPv4-only devices/applications">
      <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 thru 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 
	  (for example, CDNs, caches), or located internally (such as VoIP, etc.), 
	  it is not possible to avoid that overhead.</t>

	  <t>However, in the case of those mechanism 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"/>.</t>

	  <t>Using those optimizations, because the NAT46 has already 
	  translated the IPv4-only flow to IPv6, and the services are 
	  dual-stack, they can be reached without the need to translate 
	  them back to IPv4.</t>
    </section>


  </section>

   <section anchor="performance" title="Performance Comparison">
     <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"/>.</t>
	 
	 <t>The Dual DUT Setup of <xref target="RFC8219"/> makes it possible to use the existing
	 "Benchmarking Methodology for Network Interconnect Devices" 
	 <xref target="RFC2544"/> compliant measurement devices, however, 
	 this solution has two kinds of limitations:
	 <list style="symbols">
         <t>Dual DUT setup has the drawback that the performances of the CE 
		and of the ISP side device (e.g. the CLAT and the 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.</t>
        <t>Measurements procedures for PDV and IPDV measurements are missing
		from the legacy devices, and the old measurement procedure for 
		Latency has been redefined in <xref target="RFC8219"/>.</t>
     </list>
	 </t>
	 
	 <t>The Single DUT Setup of <xref target="RFC8219"/> makes it possible 
	 to benchmark the selected device separately, but it either requires a 
	 special Tester or some trick is need, if we want to use legacy Testers.
	 An example for the latter is our stateless NAT64 measurements testing 
	 Througput and Frame Loss Rate using a legacy <xref target="RFC5180"/> 
	 compliant commercial tester <xref target="LEN2020a"/></t>
	 
	 <t>Siitperf, an <xref target="RFC8219"/> compliant DPDK-based 
	 software Tester for benchmarking stateless NAT64 gateways has been 
	 developed recently and it is available from GitHub 
	 <xref target="SIITperf"/> as free software and documented in 
	 <xref target="LEN2021"/>. Originally, it literally followed the test 
	 frame format of <xref target="RFC2544"/> including "hard wired" source and 
	 destination port numbers, and then it has been complemented with the 
	 random port feature required by <xref target="RFC4814"/>. The new 
	 version is documented in <xref target="LEN2020b"/></t>
	 
	 <t>Further DPDK-based, <xref target="RFC8219"/> compliant software 
	 testers 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"/>.
	 </t>
 
   </section>

   <section anchor="Acknowledgements" title="Acknowledgements">
     <t>The authors would like to thank Ole Troan and Warren Kumari for their 
	 thorough review of this draft and acknowledge the inputs of Mark Andrews, Edwin Cordeiro, 
   Fred Baker, Alexandre Petrescu, Cameron Byrne, Tore Anderson, 
   Mikael Abrahamsson, Gert Doering, Satoru Matsushima, Mohamed Boucadair, 
   Tom Petch, Yannis Nikolopoulos, and Havard Eidnes.</t>
   </section>

   <!-- Possibly a 'Contributors' section ... -->

   <section anchor="IANA" title="IANA Considerations">
     <t>This document does not make any request to IANA.</t>
   </section>

   <section anchor="Security" title="Security Considerations">
     <t>According to the simplest model, the number of bugs is proportional to
     the number of code lines. Please refer to <xref target="code_size"/> for
     code sizes of CE implementations.</t>

     <t>For all five technologies, the CE device typically contains a DNS proxy.
     However, the user may change DNS settings. If it happens and lw4o6, MAP-E
     and MAP-T are used with significantly restricted port set, which is
     required for an 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 thus these
     technologies are theoretically less resilient against cache poisoning, see
     <xref target="RFC5452"/>. However, an efficient cache poisoning attack
     requires that the subscriber operates an 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 as low.</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"/> is planned.</t>
	 
	 <t>As the first step, an initial security analysis of 464XLAT was 
	 done in <xref target="Azz2021"/>.</t>
	 
   </section>
 </middle>

 <!--  *****BACK MATTER ***** -->

 <back>
   <!-- References split into informative and normative -->

   <!-- There are 2 ways to insert reference entries from the citation libraries:
    1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
    2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
       (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

    Both are cited textually in the same manner: by using xref elements.
    If you use the PI option, xml2rfc will, by default, try to find included files in the same
    directory as the including file. You can also define the XML_LIBRARY environment variable
    with a value containing a set of directories to search.  These can be either in the local
    filing system or remote ones accessed by http (http://domain/dir/... ).-->

   <references title="Normative References">
    <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
    &RFC2119;
    &RFC2473;
	&RFC2544;
    &RFC2663;
	&RFC4814;
    &RFC5180;
	&RFC5452;
<!--&RFC6050;-->
    &RFC6052;
    &RFC6146;
    &RFC6147;
	&RFC6180;
    &RFC6269;
    &RFC6333;
    &RFC6346;
    &RFC6519;
    &RFC6877;
	&RFC6889;
	&RFC7050;
	&RFC7341;
	&RFC7393;
	&RFC7422;
    &RFC7757;
<!--&RFC7857;-->
    &RFC7915;
    &RFC7596;
    &RFC7597;
    &RFC7599;
	&RFC7605;
	&RFC7950;
    &RFC8114;
    &RFC8174;
    &RFC8219;
    &RFC8415;
	&RFC8512;
    &RFC8658;
	&RFC8683;

   </references>

   <references title="Informative References">
     <!-- Here we use entities that we defined at the beginning. -->
 
    <?rfc include='reference.I-D.ietf-v6ops-464xlat-optimization'?>

    <?rfc include='reference.I-D.lencse-v6ops-transition-scalability'?> 

    <?rfc include='reference.I-D.lencse-v6ops-transition-benchmarking'?> 


    <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></organization>
        </author>
        <author initials="G." surname="Lencse">
          <organization></organization>
        </author>

        <date month="Dec" year="2021"/>
      </front>
      <seriesInfo name="" value="Infocommunications Journal, vol. 13, no. 4, pp. 10-18"/>
      <seriesInfo name="" value="DOI: 10.36244/ICJ.2021.4.2"/>
    </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></organization>
        </author>
        <author initials="Y." surname="Kadobayashi">
          <organization></organization>
        </author>

        <date day="1" month="Aug" year="2018"/>
      </front>
      <seriesInfo name="" value="Computers &amp; Security (Elsevier), vol. 77, 
      no. 1, pp. 397-411"/>
      <seriesInfo name="" value="DOI: 10.1016/j.cose.2018.04.012"/>
    </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></organization>
        </author>
        <author initials="Y." surname="Kadobayashi">
          <organization></organization>
        </author>

        <date day="1" month="Oct" year="2019" />
      </front>
      <seriesInfo name="" value="IEICE Transactions on Communications, vol. E102-B, no.10, pp. 2021-2035."/>
      <seriesInfo name="" value="DOI: 10.1587/transcom.2018EBR0002"/>
    </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></organization>
        </author>
		
		<date day="15" month="Jun" year="2020" />
     
      </front>
      <seriesInfo name="" value="Telecommunication Systems, vol. 75, pp. 245-257"/>
	  <seriesInfo name="" value="DOI: 10.1007/s11235-020-00681-x"/>
    </reference>

	<reference anchor="LEN2020b" 
    target="http://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></organization>
        </author>
		
		<date day="" month="" year="2020" />
     
      </front>
      <seriesInfo name="" value="International Journal of Advances in Telecommunications, Electrotechnics, Signals and Systems, vol 9, no 3, pp. 18-26"/>
	  <seriesInfo name="" value="DOI: 10.11601/ijates.v9i3.291"/>
    </reference>
	
	<reference anchor="LEN2021" 
    target="https://www.jstage.jst.go.jp/article/transcom/E104.B/2/E104.B_2019EBN0010/_article">
      <front>
        <title>Design and Implementation of a Software Tester for Benchmarking Stateless NAT64 Gateways
        </title>

        <author initials="G." surname="Lencse">
          <organization></organization>
        </author>
		
		<date day="" month="" year="2021" />
     
      </front>
      <seriesInfo name="" value="IEICE Transactions on Communications"/>
	  <seriesInfo name="" value="DOI: 10.1587/transcom.2019EBN0010"/>
    </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></organization>
        </author>

        <date month="May" year="2010"/>
      </front>

      <seriesInfo name="" value="IEICE Trans. Commun., vol.E93-B, no.5, pp.
      1078-1084"/>
      <seriesInfo name="" value="DOI:10.1587/transcom.E93.B.10"/>
    </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="Repas">
          <organization></organization>
        </author>
        <author initials="T." surname="Hajas">
          <organization></organization>
        </author>
        <author initials="G." surname="Lencse">
          <organization></organization>
        </author>

        <date month="July" year="2014"/>
      </front>
      <seriesInfo name="" value="Proc. 37th Internat. Conf. on 
      Telecommunications and Signal Processing (TSP 2014), Berlin, Germany"/>
      <seriesInfo name="" value="DOI: 10.1109/TSP.2015.7296411"/>
    </reference>
	
	<reference anchor="SIITperf" target="https://github.com/lencsegabor/siitperf">
      <front>
        <title>Siitperf: an RFC 8219 compliant SIIT (stateless NAT64) 
		tester</title>

        <author initials="G." surname="Lencse">
          <organization></organization>
        </author>

        <date month="November" year="2019"/>
      </front>
    </reference>
	
   </references>

   <section anchor="change_log" title="Change Log">
    <section title="01 - 02">
      <t>
      <list style="symbols">
        <t>Ian Farrer has joined us as an author.</t>
		<t>Restructuring: the description of the five IPv4aaS technologies was moved
    to a separate section.</t>
		<t>More details and figures were added to the description of the five
    IPv4aaS technologies.</t>
		<t>Section titled "High-level Architectures and their Consequences" has been
    completely rewritten.</t>
		<t>Several additions/clarification throughout Section titled
    "Detailed Analysis".</t>
		<t>Section titled "Performance Analysis" was dropped due to lack of
    results yet.</t>
		<t>Word based text ported to XML.</t>
    <t>Further text cleanups, added text on state sync and load balancing. 
    Additional comments inline that should be considered for future updates.</t>
      </list>
      </t>
    </section>

    <section title="02 - 03">
      <t>
      <list style="symbols">
	    <t>The suggestions of Mohamed Boucadair are incorporated.</t>
        <t>New considerations regarding possible optimizations.</t>
      </list>
      </t>
    </section>
	
    <section title="03 - 04">
      <t>
      <list style="symbols">
	    <t>Section titled "Performance Analysis" was added. It mentions 
		our new benchmarking tool, siitperf, and highlights our plans.</t>
        <t>Some references were updated or added.</t>
      </list>
      </t>
    </section>
	<section title="04 - 05">
      <t>
      <list style="symbols">
        <t>Some references were updated or added.</t>
      </list>
      </t>
    </section>
	<section title="05 - 06">
      <t>
      <list style="symbols">
        <t>Some references were updated or added.</t>
      </list>
      </t>
    </section>	
	<section title="06 - 00-WG Item">
      <t>
      <list style="symbols">
        <t>Stats dated and added for Broadband deployments.</t>
        <t>Other clarifications and references.</t>
        <t>New section: IPv4 Pool Size.</t>
        <t>Typos.</t>
      </list>
      </t>
    </section>
	<section title="00 - 01">
      <t>To facilitate WGLC, the unfinished parts were moved to two new 
	  drafts:
      <list style="symbols">
        <t>New I-D for scale up measurements. (Including the results of iptables.)</t>
        <t>New I-D for benchmarking measurements. (Only a stub.)</t>
      </list>
      </t>
    </section>
	<section title="01 - 02">
      <t>Update on the basis of the AD review.</t>
	  <t>Update of the references.</t>
    </section>	
   </section>
  </back>
</rfc>