<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>

<rfc category="std" number="7596" submissionType="IETF" consensus="yes"
     ipr="trust200902">

  <front>
    <title abbrev="Lightweight 4over6">Lightweight 4over6: An Extension to the
    Dual-Stack Lite Architecture</title>

    <author fullname="Yong Cui" initials="Y" surname="Cui">
      <organization>Tsinghua University</organization>

      <address>
        <postal>
          <street></street>

          <city>Beijing</city>

          <code>100084</code>

          <country>China</country>
        </postal>

        <phone>+86-10-62603059</phone>

        <email>yong@csnet1.cs.tsinghua.edu.cn</email>
      </address>
    </author>

    <author fullname="Qiong Sun" initials="Q.S" surname="Sun">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street>Room 708, No. 118, Xizhimennei Street</street>

          <city>Beijing</city>

          <code>100035</code>

          <country>China</country>
        </postal>

        <phone>+86-10-58552936</phone>

        <email>sunqiong@ctbri.com.cn</email>
      </address>
    </author>

    <author fullname="Mohamed Boucadair" initials="M.B" surname="Boucadair">
      <organization>France Telecom</organization>

      <address>
        <postal>
          <street></street>

          <city>Rennes</city>

          <code>35000</code>

          <region></region>

          <country>France</country>
        </postal>

        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>

    <author fullname="Tina Tsou" initials="T.T" surname="Tsou">
      <organization>Huawei Technologies</organization>

      <address>
        <postal>
          <street>2330 Central Expressway</street>

          <city>Santa Clara</city>

          <region>CA</region>

          <code>95050</code>

          <country>United States</country>
        </postal>

        <phone>+1-408-330-4424</phone>

        <email>tena@huawei.com</email>
      </address>
    </author>

    <author fullname="Yiu L. Lee" initials="Y" surname="Lee">
      <organization>Comcast</organization>

      <address>
        <postal>
          <street>One Comcast Center</street>

          <city>Philadelphia</city>

          <region>PA</region>

          <code>19103</code>

          <country>United States</country>
        </postal>

        <email>yiu_lee@cable.comcast.com</email>
      </address>
    </author>

    <author fullname="Ian Farrer" initials="I.F" surname="Farrer">
      <organization>Deutsche Telekom AG</organization>

      <address>
        <postal>
          <street>CTO-ATI, Landgrabenweg 151</street>

          <city>Bonn</city>

          <region>NRW</region>

          <code>53227</code>

          <country>Germany</country>
        </postal>

        <email>ian.farrer@telekom.de</email>
      </address>
    </author>

    <date month="July" year="2015" />

    <workgroup>Softwire Working Group</workgroup>

<keyword>address sharing, address exhaustion, aplusp, A+P, IPv4 service
continuity, IPv4 over IPv6 connectivity</keyword>

    <abstract>
      <t>Dual-Stack Lite (DS-Lite) (RFC 6333) describes an architecture
      for transporting IPv4 packets over an IPv6 network. This document
      specifies an extension to DS-Lite called "Lightweight 4over6",
      which moves the Network Address and Port Translation (NAPT)
      function from the centralized DS-Lite tunnel concentrator to the
      tunnel client located in the Customer Premises Equipment (CPE).
      This removes the requirement for a Carrier Grade NAT function in
      the tunnel concentrator and reduces the amount of centralized
      state that must be held to a per-subscriber level. In order to
      delegate the NAPT function and make IPv4 address sharing possible,
      port-restricted IPv4 addresses are allocated to the CPEs.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>Dual-Stack Lite (DS-Lite) <xref target="RFC6333"></xref> defines a
      model for providing IPv4 access over an IPv6 network using two
      well-known technologies: IP in IP <xref target="RFC2473"></xref> and
      Network Address Translation (NAT). The DS&nbhy;Lite architecture
      defines two major functional elements as follows:</t>

      <t><list style="hanging">
          <t hangText="Basic Bridging BroadBand (B4) element:">
          A function implemented on a dual-stack-capable node (either a
          directly connected device or a CPE) that creates an
          IPv4-in-IPv6 tunnel to an AFTR.</t>

          <t hangText="Address Family Transition Router (AFTR) element:">
          The combination of an IPv4-in-IPv6 tunnel endpoint and an IPv4-IPv4
          NAT implemented on the same node.</t>
        </list>As the AFTR performs the centralized NAT44 function, it
      dynamically assigns public IPv4 addresses and ports to a requesting
      host's
      traffic (as described in <xref target="RFC3022"></xref>). To achieve
      this, the AFTR must dynamically maintain per-flow state in the form of
      active NAPT sessions. For service providers with a large number of B4
      clients, the size and associated costs for scaling the AFTR can quickly
      become prohibitive. Maintaining per-flow state can also place a
      large NAPT logging overhead on the service provider in countries
      where logging is a legal requirement.</t>

      <t>This document describes a mechanism called "Lightweight 4over6"
      (lw4o6), which provides a solution for these problems. By relocating the
      NAPT functionality from the centralized AFTR to the distributed B4s, a
      number of benefits can be realized:<list style="symbols">
          <t>NAPT44 functionality is already widely supported and used in
          today's CPE devices. &nbsp;lw4o6 uses this to provide
          private&lt;-&gt;public NAPT44, meaning that the service provider
          does not need a centralized NAT44 function.</t>

          <t>The amount of state that must be maintained centrally in the AFTR
          can be reduced from per-flow to per-subscriber. This reduces the
          amount of resources (memory and processing power) necessary in the
          AFTR.</t>

          <t>The reduction of maintained state results in a greatly reduced
          logging overhead on the service provider.</t>
        </list></t>

      <t>Operators' IPv6 and IPv4 addressing architectures remain independent
      of each other. Therefore, flexible IPv4/IPv6 addressing schemes can be
      deployed.</t>

      <t>Lightweight 4over6 is a solution designed specifically for complete
      independence between IPv6 subnet prefixes and IPv4 addresses with or
      without IPv4 address sharing. This is accomplished by maintaining
      state for each softwire (per-subscriber state) in the central lwAFTR
      and a hub-and-spoke forwarding architecture. "Mapping of Address and Port
      with Encapsulation (MAP&nbhy;E)" <xref target="RFC7597"></xref> also
      offers these capabilities or, alternatively, allows for a reduction of
      the amount of centralized state using rules to express IPv4/IPv6
      address mappings. This introduces an algorithmic relationship
      between the IPv6 subnet and IPv4 address. This relationship also
      allows the option of direct, meshed connectivity between users.</t>

      <t>The tunneling mechanism remains the same for DS-Lite and Lightweight
      4over6. This document describes the changes to DS-Lite that are
      necessary to implement Lightweight 4over6. These changes mainly concern
      the configuration parameters and provisioning method necessary for the
      functional elements.</t>

      <t>One of the features of Lightweight 4over6 is to keep
      per-subscriber state in the service provider's network.  This
      technique is categorized as a "binding approach"
      <xref target="Unified-v4-in-v6"></xref> that defines a
      unified IPv4-in-IPv6 softwire CPE.</t>

      <t>This document extends the mechanism defined in <xref
      target="RFC7040"></xref> by allowing address sharing. The solution in
      this document is also a variant of Address plus Port (A+P)
      called "Binding Table Mode" (see Section 4.4
      of <xref target="RFC6346"></xref>).</t>

      <t>This document focuses on architectural considerations,
      particularly on the expected behavior of the involved functional
      elements and their interfaces. Deployment-specific issues such as
      redundancy and provisioning policy are out of scope for this
      document.</t>
    </section>

    <section anchor="conventions" title="Conventions">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119"></xref>.</t>
    </section>

    <section title="Terminology">
      <t>This document defines the following terms:<list hangIndent="30"
          style="hanging">
          <t hangText="Lightweight 4over6 (lw4o6):">An IPv4-over-IPv6
          hub-and-spoke mechanism that extends DS-Lite by moving the IPv4
          translation (NAPT44) function from the AFTR to the B4.</t>

          <t hangText="Lightweight B4 (lwB4):">A B4 element
          <xref target="RFC6333"></xref> that supports Lightweight 4over6
          extensions. An lwB4 is a function implemented on
          a dual-stack-capable node -- either a directly connected device
          or a CPE -- that supports port-restricted IPv4 address allocation,
          implements NAPT44 functionality, and creates a tunnel to an
          lwAFTR.</t>

          <t hangText="Lightweight AFTR (lwAFTR):">An AFTR element
          <xref target="RFC6333"></xref> that supports the
          Lightweight 4over6 extension. An lwAFTR is an
          IPv4-in-IPv6 tunnel endpoint that maintains per-subscriber address
          binding only and does not perform a NAPT44 function.</t>

          <t hangText="Restricted port set:">A non-overlapping range of
          allowed external ports allocated to the lwB4 to use for NAPT44.
          Source ports of IPv4 packets sent by the B4 must belong to the
          assigned port set. The port set is used for all port-aware IP
          protocols (TCP, UDP, the Stream Control Transmission Protocol
	  (SCTP), etc.).</t>

          <t hangText="Port-restricted IPv4 address:">A public IPv4 address
          with a restricted port set. In Lightweight 4over6, multiple B4s may
          share the same IPv4 address; however, their port sets must be
          non-overlapping.</t>
        </list></t>

      <t>Throughout the remainder of this document, the terms "B4" and
      "AFTR" should be understood to refer specifically to a DS-Lite
      implementation. The terms "lwB4" and "lwAFTR" refer to a
       Lightweight 4over6 implementation.</t>

      <t></t>
    </section>

    <section title="Lightweight 4over6 Architecture">
      <t>The Lightweight 4over6 architecture is functionally similar to
      DS&nbhy;Lite. &nbsp;lwB4s and an lwAFTR are connected through an
      IPv6-enabled network. Both approaches use an IPv4-in-IPv6 encapsulation
      scheme to deliver IPv4 connectivity. The following figure shows the
      data plane with the main functional change between DS-Lite and lw4o6:</t>

      <figure title="Comparison of DS-Lite and Lightweight 4over6 Data Plane" anchor="fig1"><artwork><![CDATA[
+--------+   +---------+  IPv4-in-IPv6  +---------+   +-------------+
|IPv4 LAN|---|    B4   |================|AFTR/NAPT|---|IPv4 Internet|
+--------+   +---------+                +---------+   +-------------+
               DS-Lite NAPT model: all state in the AFTR


+--------+   +---------+  IPv4-in-IPv6  +------+   +-------------+
|IPv4 LAN|---|lwB4/NAPT|================|lwAFTR|---|IPv4 Internet|
+--------+   +---------+                +------+   +-------------+
                        lw4o6 NAPT model:
        subscriber state in the lwAFTR, NAPT state in the lwB4
]]></artwork> </figure>

      <t>There are three main components in the Lightweight 4over6
      architecture:</t>

      <t><list style="symbols">
          <t>The lwB4, which performs the NAPT function and IPv4/IPv6
          encapsulation/decapsulation.</t>

          <t>The lwAFTR, which performs the IPv4/IPv6
          encapsulation/decapsulation.</t>

          <t>The provisioning system, which tells the lwB4 which IPv4 address
          and port set to use.</t>
        </list></t>

      <t>The lwB4 differs from a regular B4 in that it now performs the NAPT
      functionality. This means that it needs to be provisioned with the
      public IPv4 address and port set it is allowed to use. This information
      is provided through a provisioning mechanism such as DHCP, the
      Port Control Protocol (PCP) <xref target="RFC6887"></xref>, or the
      Broadband Forum's TR-69 specification <xref target="TR069"/>.</t>

      <t>The lwAFTR needs to know the binding between the IPv6 address of
      each subscriber as well as the IPv4 address and port set allocated
      to each subscriber. This information is used to perform ingress filtering
      upstream and encapsulation downstream. Note that this is per-subscriber
      state, as opposed to per-flow state in the regular AFTR case.</t>

      <t>The consequence of this architecture is that the information
      maintained by the provisioning mechanism and the one maintained by the
      lwAFTR MUST be synchronized (see <xref target="fig2"/>). The
      precise mechanism whereby this synchronization occurs is out of
      scope for this document.</t>

      <t>The solution specified in this document allows the assignment of
      either a full or a shared IPv4 address to requesting CPEs. <xref
      target="RFC7040"></xref> provides a mechanism for assigning a full IPv4
      address only.</t>

      <figure title="Lightweight 4over6 Provisioning Synchronization" anchor="fig2">
        <artwork><![CDATA[
                          +------------+
                  /-------|Provisioning|<-----\
                  |       +------------+      |
                  |                           |
                  V                           V
+--------+   +---------+    IPv4/IPv6     +------+    +-------------+
|IPv4 LAN|---|lwB4/NAPT|==================|lwAFTR|----|IPv4 Internet|
+--------+   +---------+                  +------+    +-------------+
        ]]></artwork> </figure>
    </section>

    <section title="Lightweight B4 Behavior">
      <section anchor="lwb4pro"
               title="Lightweight B4 Provisioning with DHCPv6">
        <t>With DS-Lite, the B4 element only needs to be configured with a
        single DS-Lite-specific parameter so that it can set up the softwire
        (the IPv6 address of the AFTR). Its IPv4 address can be taken from the
        well-known range 192.0.0.0/29.</t>

        <t>In lw4o6, a number of lw4o6-specific configuration parameters must
        be provisioned to the lwB4. These are:</t>

        <t><list style="symbols">
            <t>IPv6 address for the lwAFTR</t>

            <t>IPv4 external (public) address for NAPT44</t>

            <t>Restricted port set to use for NAPT44</t>

            <t>IPv6 binding prefix</t>
          </list></t>

        <t>The lwB4 MUST implement DHCPv6-based configuration using
        OPTION_S46_CONT_LW as described in Section 5.3 of <xref
        target="RFC7598"></xref>. This means that the
        lifetime of the softwire and the derived configuration information
        (e.g., IPv4 shared address, IPv4 address) are bound to the lifetime of
        the DHCPv6 lease. If stateful IPv4 configuration or additional IPv4
        configuration information is required, DHCP 4o6 <xref
        target="RFC7341"></xref> MUST be used.</t>

        <t>Although it would be possible to extend lw4o6 to have more than one
        active lw4o6 tunnel configured simultaneously, this document is only
        concerned with the use of a single tunnel.</t>

        <t>The IPv6 binding prefix field is provisioned so that the 
        Customer Edge (CE) can identify the correct prefix to use as
        the tunnel source. On receipt of the necessary configuration
        parameters listed above, the lwB4 performs a longest-prefix
        match between the IPv6 binding prefix and its currently active
        IPv6 prefixes. The result forms the subnet to be used for sourcing
        the lw4o6 tunnel. The full /128 address is then constructed in the
        same manner as <xref target="RFC7597"></xref>.</t>

        <figure title="Construction of the lw4o6 /128 Prefix" anchor="fig3">
          <artwork><![CDATA[           
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  Operator Assigned Prefix                     |
.                        (64 bits)                              .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Zero Padding          |         IPv4 Address          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       IPv4 Addr cont.         |             PSID              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork> </figure>

        <t><list hangIndent="14" style="hanging">
            <t hangText="Operator Assigned Prefix:"><vspace/>
            IPv6 prefix allocated to the client. If the prefix length
            is less than 64, it is right-padded with zeros to 64 bits.</t>

            <t hangText="Padding:">Padding (all zeros).</t>

            <t hangText="IPv4 Address:">Public IPv4 address allocated to the
            client.</t>

            <t hangText="PSID:">Port Set ID.  Allocated to the client;
            left-padded with zeros to 16 bits. If no PSID is provisioned,
            all zeros.</t>
          </list></t>

        <t>In the event that the lwB4's IPv6 encapsulation source address is
        changed for any reason (such as the DHCPv6 lease expiring), the lwB4's
        dynamic provisioning process MUST be re-initiated. When the lwB4's
        public IPv4 address or Port Set ID is changed for any reason, the lwB4
        MUST flush its NAPT table.</t>

        <t>An lwB4 MUST support dynamic port-restricted IPv4 address
        provisioning. The port-set algorithm for provisioning this is
        described in Section 5.1 of <xref target="RFC7597"></xref>.
        For lw4o6, the number of a-bits SHOULD be 0, thus allocating a
        single contiguous port set to each lwB4.</t>

        <t>Provisioning of the lwB4 using DHCPv6 as described here allocates a
        single PSID to the client. In the event that the client is
        concurrently using all of the provisioned L4 ports, it may be unable to
        initiate any additional outbound connections. DHCPv6-based
        provisioning does not provide a mechanism for the client to request
        more L4 port numbers. Other provisioning mechanisms (e.g., PCP-based
        provisioning <xref target="PCP-PORT_SET"></xref>) provide
        this function. Issues relevant to IP address sharing are discussed in
        more detail in <xref target="RFC6269"></xref>.</t>

        <t>Unless an lwB4 is being allocated a full IPv4 address, it is
        RECOMMENDED that PSIDs containing the system ports (0-1023) not be
        allocated to lwB4s. The reserved ports are more likely to be reserved
        by middleware, and therefore we recommend that they not be issued to
        clients other than as a deliberate assignment. Section 5.2.2 of <xref
        target="RFC6269"></xref> provides analysis of allocating system ports
        to clients with IPv4 address sharing.</t>

        <t>In the event that the lwB4 receives an ICMPv6 error message (Type
        1, Code 5) originating from the lwAFTR, the lwB4 interprets this to
        mean that no matching entry in the lwAFTR's binding table has been
        found, so the IPv4 payload is not being forwarded by the lwAFTR. The
        lwB4 MAY then re-initiate the dynamic port-restricted provisioning
        process. The lwB4's re-initiation policy SHOULD be configurable.</t>

        <t>On receipt of such an ICMP error message, the lwB4 MUST validate
        the source address to be the same as the lwAFTR address that is
        configured. In the event that these addresses do not match, the lwB4
        MUST discard the ICMP error message.</t>

        <t>In order to prevent forged ICMP messages (using the spoofed lwAFTR
        address as the source) from being sent to lwB4s, the operator can
        implement network ingress filtering as described in <xref
        target="RFC2827"></xref>.</t>

        <t>The DNS considerations described in Sections 5.5 and 6.4 of
        <xref target="RFC6333"></xref> apply to Lightweight 4over6; lw4o6
        implementations MUST comply with all requirements stated there.</t>
      </section>

      <section title="Lightweight B4 Data-Plane Behavior">
        <t>Several sections of <xref target="RFC6333"></xref> provide
        background information on the B4's data-plane functionality and MUST
        be implemented by the lwB4, as they are common to both solutions. The
        relevant sections are:</t>

        <t><list hangIndent="34" style="hanging">
            <t hangText="5.2 Encapsulation">Covering encapsulation and
            decapsulation of tunneled traffic</t>

            <t hangText="5.3 Fragmentation and Reassembly">Covering MTU and
            fragmentation considerations (referencing <xref
            target="RFC2473"></xref>)</t>

            <t hangText="7.1 Tunneling">Covering tunneling and Traffic Class
            mapping between IPv4 and IPv6 (referencing <xref
            target="RFC2473"></xref>). Also see <xref target="RFC2983"></xref></t>
          </list></t>

        <t>The lwB4 element performs IPv4 address translation (NAPT44) as well
        as encapsulation and decapsulation. It runs standard NAPT44 <xref
        target="RFC3022"></xref> using the allocated port-restricted address
        as its external IPv4 address and range of source ports.</t>

        <t>The working flow of the lwB4 is illustrated in
        <xref target="fig4"/>.</t>

        <figure title="Working Flow of the lwB4" anchor="fig4">
          <artwork><![CDATA[
                     +-------------+
                     |     lwB4    |
   +--------+  IPv4  |------+------| IPv4-in-IPv6  +----------+
   |IPv4 LAN|------->|      |Encap.|-------------->|Configured|  
   |        |<-------| NAPT |  or  |<--------------|  lwAFTR  |
   +--------+        |      |Decap.|               +----------+
                     +------+------+                 
        ]]></artwork> </figure>

        <t>Hosts connected to the customer's network behind the lwB4 source
        IPv4 packets with an <xref target="RFC1918"></xref> address. When the
        lwB4 receives such an IPv4 packet, it performs a NAPT44 function on
        the source address and port by using the public IPv4 address and a
        port number from the allocated port set. Then, it encapsulates the
        packet with an IPv6 header. The destination IPv6 address is the
        lwAFTR's IPv6 address, and the source IPv6 address is the lwB4's IPv6
        tunnel endpoint address. Finally, the lwB4 forwards the encapsulated
        packet to the configured lwAFTR.</t>

        <t>When the lwB4 receives an IPv4-in-IPv6 packet from the lwAFTR, it
        decapsulates the IPv4 packet from the IPv6 packet. Then, it performs
        NAPT44 translation on the destination address and port, based on the
        available information in its local NAPT44 table.</t>

        <t>If the IPv6 source address does not match the configured lwAFTR
        address, then the packet MUST be discarded. If the decapsulated IPv4
        packet does not match the lwB4's configuration (i.e., invalid
        destination IPv4 address or port), then the packet MUST be dropped. An
        ICMPv4 error message (Type 3, Code 13 -- Destination Unreachable,
        Communication Administratively Prohibited) MAY be sent back to the
        lwAFTR. The ICMP policy SHOULD be configurable.</t>

        <t>The lwB4 is responsible for performing Application Layer Gateway
        (ALG) functions (e.g., SIP, FTP) and other NAPT traversal
        mechanisms (e.g., Universal Plug and Play (UPnP) IGD (Internet Gateway
	Device), the NAT Port Mapping Protocol (NAT-PMP),
        manual binding configuration, PCP) for the internal hosts, if
        necessary. This requirement is typical for NAPT44 gateways available
        today.</t>

        <t>It is possible that an lwB4 is co-located in a host. In this case,
        the functions of NAPT44 and encapsulation/decapsulation are
        implemented inside the host.</t>

        <section title="Fragmentation Behavior">
          <t>For TCP and UDP traffic, the NAPT44 implemented in the lwB4 MUST
          conform to the behavior and best current practices documented in
          <xref target="RFC4787"></xref>, <xref target="RFC5508"></xref>, and
          <xref target="RFC5382"></xref>. If the lwB4 supports the
          Datagram Congestion Control Protocol (DCCP), then the
          requirements in <xref target="RFC5597"></xref> MUST be
          implemented.</t>

          <t>The NAPT44 in the lwB4 MUST implement ICMP message handling
          behavior conforming to the best current practice documented in
          <xref target="RFC5508"></xref>. If the lwB4 receives an ICMP error
          (for errors detected inside the IPv6 tunnel), the node relays the
          ICMP error message to the original source (the lwAFTR). This
          behavior SHOULD be implemented conforming to Section 8 of <xref
          target="RFC2473"></xref>.</t>

          <t>If IPv4 hosts behind different lwB4s sharing the same 
          IPv4 address send fragments to the same IPv4 destination host
          outside the Lightweight 4over6 domain, those hosts may use 
          the same IPv4 fragmentation identifier, resulting in incorrect 
          reassembly of the fragments at the destination host. Given 
          that the IPv4 fragmentation identifier is a 16-bit field, 
          it could be used similarly to port ranges: An lwB4 could rewrite 
          the IPv4 fragmentation identifier to be within its allocated 
          port set, if the resulting fragment identifier space is large 
          enough related to the rate at which fragments are sent. However, 
          splitting the identifier space in this fashion would increase 
          the probability of reassembly collision for all connections
          through the lwB4. See also Section 5.3.1 of <xref
          target="RFC6864"/>.</t>
          </section>
      </section>
    </section>

    <section title="Lightweight AFTR Behavior">
      <section title="Binding Table Maintenance">
        <t>The lwAFTR maintains an address binding table containing the
        binding between the lwB4's IPv6 address, the allocated IPv4 address,
        and the restricted port set. Unlike the DS-Lite extended binding
        table, which is a 5-tuple NAPT table and is defined in
        Section 6.6 of <xref target="RFC6333"></xref>, each entry in the
        Lightweight 4over6 binding table contains the following
        3-tuples:</t>

        <t><list style="symbols">
            <t>IPv6 address for a single lwB4</t>

            <t>Public IPv4 address</t>

            <t>Restricted port set</t>
          </list>The entry has two functions: the IPv6 encapsulation of
        inbound IPv4 packets destined to the lwB4 and the validation of
        outbound IPv4-in-IPv6 packets received from the lwB4 for
        decapsulation.</t>

        <t>The lwAFTR does not perform NAPT and so does not need session
        entries.</t>

        <t>The lwAFTR MUST synchronize the binding information with the
        port-restricted address provisioning process. If the lwAFTR does not
        participate in the port-restricted address provisioning process, the
        binding MUST be synchronized through other methods (e.g., out-of-band
        static update).</t>

        <t>If the lwAFTR participates in the port-restricted provisioning
        process, then its binding table MUST be created as part of this
        process.</t>

        <t>For all provisioning processes, the lifetime of binding table
        entries MUST be synchronized with the lifetime of address
        allocations.</t>

      </section>

      <section title="lwAFTR Data-Plane Behavior">
        <t>Several sections of <xref target="RFC6333"></xref> provide
        background information on the AFTR's data-plane functionality and MUST
        be implemented by the lwAFTR, as they are common to both solutions.
        The relevant sections are:</t>

        <t><list hangIndent="34" style="hanging">
            <t hangText="6.2 Encapsulation">Covering encapsulation and
            decapsulation of tunneled traffic</t>

            <t hangText="6.3 Fragmentation and Reassembly">Fragmentation and
            reassembly considerations (referencing <xref
            target="RFC2473"></xref>)</t>

            <t hangText="7.1 Tunneling">Covering tunneling and Traffic Class
            mapping between IPv4 and IPv6 (referencing <xref
            target="RFC2473"></xref>). Also see <xref target="RFC2983"></xref></t>
          </list></t>

        <t>When the lwAFTR receives an IPv4-in-IPv6 packet from an lwB4, it
        decapsulates the IPv6 header and verifies the source addresses and
        port in the binding table. If both the source IPv4 and IPv6 addresses
        match a single entry in the binding table and the source port is in
        the allowed port set for that entry, the lwAFTR forwards the packet to
        the IPv4 destination.</t>

        <t>If no match is found (e.g., no matching IPv4 address entry, port
        out of range), the lwAFTR MUST discard or implement a policy
        (such as redirection) on the packet. An ICMPv6 Type 1, Code 5
        (Destination Unreachable, source address failed ingress/egress policy)
        error message MAY be sent back to the requesting lwB4. The ICMP
        policy SHOULD be configurable.</t>

        <t>When the lwAFTR receives an inbound IPv4 packet, it uses the IPv4
        destination address and port to look up the destination lwB4's IPv6
        address in its binding table. If a match is found, the lwAFTR
        encapsulates the IPv4 packet. The source is the lwAFTR's IPv6 address,
        and the destination is the lwB4's IPv6 address from the matched entry.
        Then, the lwAFTR forwards the packet to the lwB4 natively over the
        IPv6 network.</t>

        <t>If no match is found, the lwAFTR MUST discard the packet. An ICMPv4
        Type 3, Code 1 (Destination Unreachable, Host Unreachable) error
        message MAY be sent back. The ICMP policy SHOULD be configurable.</t>

        <t>The lwAFTR MUST support hairpinning of traffic between two lwB4s,
        by performing decapsulation and re-encapsulation of packets from one
        lwB4 that need to be sent to another lwB4 associated with the same
        AFTR. The hairpinning policy MUST be configurable.</t>
      </section>
    </section>

    <section title="Additional IPv4 Address and Port-Set Provisioning Mechanisms">
      <t>In addition to the DHCPv6-based mechanism described in
      <xref target="lwb4pro"/>, several other IPv4 provisioning
      protocols have been suggested. These protocols MAY be
      implemented. These alternatives include:</t>

      <t><list style="symbols">
          <t>DHCPv4 over DHCPv6: <xref target="RFC7341"></xref> describes
          implementing DHCPv4 messages over an IPv6-only service provider's
          network. This enables leasing of IPv4 addresses and makes DHCPv4
          options available to the DHCPv4-over-DHCPv6 client. An lwB4 MAY 
          implement <xref target="RFC7341"/> and 
          <xref target="Dyn-Shared-v4Alloc"/> to 
          retrieve a shared IPv4 address with a set of ports.</t>

          <t>PCP <xref target="RFC6887"></xref>: an lwB4 MAY use <xref
          target="PCP-PORT_SET"></xref> to retrieve a restricted IPv4
          address and a set of ports.</t>
        </list></t>

      <t>In a Lightweight 4over6 domain, the binding information MUST be
      synchronized across the lwB4s, the lwAFTRs, and the provisioning
      server.</t>

      <t>To prevent interworking complexity, it is RECOMMENDED that an
      operator use a single provisioning mechanism / protocol for their
      implementation. In the event that more than one provisioning mechanism /
      protocol needs to be used (for example, during a migration to a new
      provisioning mechanism), the operator SHOULD ensure that each
      provisioning mechanism has a discrete set of resources (e.g., IPv4
      address/PSID pools, as well as lwAFTR tunnel addresses and
      binding tables).</t>
    </section>

    <section title="ICMP Processing">
      <t>For both the lwAFTR and the lwB4, ICMPv6 MUST be handled as described
      in <xref target="RFC2473"></xref>.</t>

      <t>ICMPv4 does not work in an address-sharing environment without
      special handling <xref target="RFC6269"></xref>. Due to the port-set
      style of address sharing, Lightweight 4over6 requires specific ICMP
      message handling not required by DS-Lite.</t>

      <section title="ICMPv4 Processing by the lwAFTR">
        <t>For inbound ICMP messages, the following behavior SHOULD be
        implemented by the lwAFTR to provide ICMP error handling and basic
        remote IPv4 service diagnostics for a port-restricted CPE:</t>

        <t><list style="numbers">
            <t>Check the ICMP Type field.</t>

            <t>If the ICMP Type field is set to 0 or 8 (echo reply or
            request), then the lwAFTR MUST take the value of the ICMP
            Identifier field as the source port and use this value to
            look up the binding table for an encapsulation destination.
            If a match is found, the lwAFTR forwards the ICMP packet to
            the IPv6 address stored in the entry; otherwise, it MUST
            discard the packet.</t>

            <t>If the ICMP Type field is set to any other value, then the
            lwAFTR MUST use the method described in REQ-3 of <xref
            target="RFC5508"></xref> to locate the source port within the
            transport-layer header in the ICMP packet's data field. The
            destination IPv4 address and source port extracted from the ICMP
            packet are then used to make a lookup in the binding table. If a
            match is found, it MUST forward the ICMP reply packet to the IPv6
            address stored in the entry; otherwise, it MUST discard the
            packet.</t>
          </list></t>

        <t>Otherwise, the lwAFTR MUST discard all inbound ICMPv4 messages.</t>

        <t>The ICMP policy SHOULD be configurable.</t>
      </section>

      <section title="ICMPv4 Processing by the lwB4">
        <t>The lwB4 MUST implement the requirements defined in <xref
        target="RFC5508"></xref> for ICMP forwarding. For ICMP echo request
        packets originating from the private IPv4 network, the lwB4 SHOULD
        implement the method described in <xref target="RFC6346"></xref> and
        use an available port from its port set as the ICMP identifier.</t>
      </section>
    </section>

    <section title="Security Considerations">
      <t>As the port space for a subscriber shrinks due to address sharing,
      the randomness for the port numbers of the subscriber is decreased
      significantly. This means that it is much easier for an attacker to
      guess the port number used, which could result in attacks ranging
      from throughput reduction to broken connections or data corruption.</t>

      <t>The port set for a subscriber can be a set of contiguous ports or
      non-contiguous ports. Contiguous port sets do not reduce this threat.
      However, with non-contiguous port sets (which may be generated in a
      pseudorandom way <xref target="RFC6431"></xref>), the randomness of the
      port number is improved, provided that the attacker is outside the
      Lightweight 4over6 domain and hence does not know the port-set
      generation algorithm.</t>

      <t>The lwAFTR MUST rate-limit ICMPv6 error messages (see <xref
      target="lwb4pro"></xref>) to defend against DoS attacks generated by an
      abuse user.</t>

      <t>More considerations about IP address sharing are discussed in
      Section 13 of <xref target="RFC6269"></xref>, which is applicable
      to this solution.</t>

      <t>This document describes a number of different protocols that may be
      used for the provisioning of lw4o6. In each case, the security
      considerations relevant to the provisioning protocol are also relevant
      to the provisioning of lw4o6 using that protocol. &nbsp;lw4o6 does not
      add any other security considerations specific to these
      provisioning protocols.</t>
    </section>
  </middle>

  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.1918"?>

      <?rfc include="reference.RFC.2119" ?>

      <?rfc include="reference.RFC.2473"?>

      <?rfc include="reference.RFC.4787"?>

      <?rfc include="reference.RFC.5382"?>

      <?rfc include="reference.RFC.5508"?>

      <?rfc include="reference.RFC.5597"?>

      <?rfc include="reference.RFC.6333"?>

<!-- draft-ietf-softwire-map-dhcp (RFC 7598; "n+2" per RFC Ed. Note) -->
<reference anchor='RFC7598' target="http://www.rfc-editor.org/info/rfc7598">
<front>
<title>DHCPv6 Options for Configuration of Softwire Address and Port-Mapped Clients</title>
<author initials='T' surname='Mrugalski' fullname='Tomek Mrugalski'>
    <organization />
</author>
<author initials='O' surname='Troan' fullname='Ole Troan'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<author initials='S' surname='Perreault' fullname='Simon Perreault'>
    <organization />
</author>
<author initials='W' surname='Dec' fullname='Wojciech Dec'>
    <organization />
</author>
<author initials='C' surname='Bao' fullname='Congxiao Bao'>
    <organization />
</author>
<author initials='L' surname='Yeh' fullname='Leaf Yeh'>
    <organization />
</author>
<author initials='X' surname='Deng' fullname='Xiaohong Deng'>
    <organization />
</author>
<date month='July' year='2015' />
</front>
<seriesInfo name='RFC' value='7598' />
<seriesInfo name='DOI' value='10.17487/RFC7598'/>
</reference>

    </references>

    <references title="Informative References">
      <?rfc include="reference.RFC.2983"?>

      <?rfc include="reference.RFC.3022"?>

      <?rfc include="reference.RFC.6269"?>

      <?rfc include="reference.RFC.6346"?>

      <?rfc include="reference.RFC.6431"?>

      <?rfc include="reference.RFC.6887"?>

      <?rfc include="reference.RFC.6864"?>

      <?rfc include="reference.RFC.7040"?>

<!-- draft-ietf-softwire-map (RFC 7597; "n+1" per RFC Ed. Note) -->
<reference anchor='RFC7597' target="http://www.rfc-editor.org/info/rfc7597">
<front>
<title>Mapping of Address and Port with Encapsulation (MAP-E)</title>
<author initials='O' surname='Troan' fullname='Ole Troan' role="editor">
    <organization />
</author>
<author initials='W' surname='Dec' fullname='Wojciech Dec'>
    <organization />
</author>
<author initials='X' surname='Li' fullname='Xing Li'>
    <organization />
</author>
<author initials='C' surname='Bao' fullname='Congxiao Bao'>
    <organization />
</author>
<author initials='S' surname='Matsushima' fullname='Satoru Matsushima'>
    <organization />
</author>
<author initials='T' surname='Murakami' fullname='Tetsuya Murakami'>
    <organization />
</author>
<author initials='T' surname='Taylor' fullname='Tom Taylor' role="editor">
    <organization />
</author>
<date month='July' year='2015' />
</front>
<seriesInfo name='RFC' value='7597' />
<seriesInfo name='DOI' value='10.17487/RFC7597'/>
</reference>

<!-- draft-cui-softwire-b4-translated-ds-lite (Expired; replaced by
  this doc., but listed as being one of the three doc.s merged into
  this doc.) -->
<reference anchor='B4-Trans-DSLite'>
<front>
<title>Lightweight 4over6: An Extension to the DS-Lite Architecture</title>
<author initials='Y' surname='Cui' fullname='Yong Cui'>
    <organization />
</author>
<author initials='Q' surname='Sun' fullname='Qiong Sun'>
    <organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='T' surname='Tsou' fullname='Tina Tsou'>
    <organization />
</author>
<author initials='Y' surname='Lee' fullname='Yiu Lee'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<date month='February' year='2013' />
</front>
<seriesInfo name='Work in Progress,' value='draft-cui-softwire-b4-translated-ds-lite-11' />
</reference>

<!-- draft-zhou-softwire-b4-nat (Expired) -->
<reference anchor='DSLite-LW-Ext'>
<front>
<title>NAT offload extension to Dual-Stack lite</title>
<author initials='X' surname='Deng' fullname='Xiaohong Deng'>
    <organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='C' surname='Zhou' fullname='Cathy Zhou'>
    <organization />
</author>
<date month='October' year='2011' />
</front>
<seriesInfo name='Work in Progress,' value='draft-zhou-softwire-b4-nat-04' />
</reference>

<!-- draft-penno-softwire-sdnat (Expired) -->
<reference anchor='Stateless-DS-Lite'>
<front>
<title>Stateless DS-Lite</title>
<author initials='R' surname='Penno' fullname='Reinaldo Penno'>
    <organization />
</author>
<author initials='A' surname='Durand' fullname='Alain Durand'>
    <organization />
</author>
<author initials='A' surname='Clauberg' fullname='Axel Clauberg'>
    <organization />
</author>
<author initials='L' surname='Hoffmann' fullname='Lionel Hoffmann'>
    <organization />
</author>
<date month='March' year='2012' />
</front>
<seriesInfo name='Work in Progress,' value='draft-penno-softwire-sdnat-02' />
</reference>

<!-- draft-ietf-dhc-dynamic-shared-v4allocation (AUTH) -->
<reference anchor='Dyn-Shared-v4Alloc'>
<front>
<title>Dynamic Allocation of Shared IPv4 Addresses</title>
<author initials='Y' surname='Cui' fullname='Yong Cui'>
    <organization />
</author>
<author initials='Q' surname='Sun' fullname='Qiong Sun'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<author initials='Y' surname='Lee' fullname='Yiu Lee'>
    <organization />
</author>
<author initials='Q' surname='Sun' fullname='Qi Sun'>
    <organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<date month='May' year='2015' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-dhc-dynamic-shared-v4allocation-09' />
</reference>

<!-- draft-ietf-pcp-port-set (I-D Exists / WG Document) -->
<reference anchor='PCP-PORT_SET'>
<front>
<title>Port Control Protocol (PCP) Extension for Port Set Allocation</title>
<author initials='Q' surname='Sun' fullname='Qiong Sun'>
<organization />
</author>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='S' surname='Sivakumar' fullname='Senthil Sivakumar'>
    <organization />
</author>
<author initials='C' surname='Zhou' fullname='Cathy Zhou'>
    <organization />
</author>
<author initials='T' surname='Tsou' fullname='Tina Tsou'>
    <organization />
</author>
<author initials='S' surname='Perreault' fullname='Simon Perreault'>
    <organization />
</author>
<date month='May' year='2015' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-pcp-port-set-09' />
</reference>

<!-- draft-ietf-softwire-unified-cpe (Expired) -->
<reference anchor='Unified-v4-in-v6'>
<front>
<title>Unified IPv4-in-IPv6 Softwire CPE</title>
<author initials='M' surname='Boucadair' fullname='Mohamed Boucadair'>
    <organization />
</author>
<author initials='I' surname='Farrer' fullname='Ian Farrer'>
    <organization />
</author>
<author initials='S' surname='Perreault' fullname='Simon Perreault' role="editor">
    <organization />
</author>
<author initials='S' surname='Sivakumar' fullname='Senthil Sivakumar' role="editor">
    <organization />
</author>
<date month='May' year='2013' />
</front>
<seriesInfo name='Work in Progress,' value='draft-ietf-softwire-unified-cpe-01' />
</reference>

      <?rfc include="reference.RFC.7341"?>

      <?rfc include="reference.RFC.2827"?>

<reference anchor="TR069" target="https://www.broadband-forum.org">
<front>
<title>CPE WAN Management Protocol</title>
<author><organization>Broadband Forum TR-069</organization></author>
<date month="November" year="2013"/>
</front>
<seriesInfo name="Amendment 5," value="CWMP Version: 1.4"/>
</reference>

    </references>

    <section title="Acknowledgements" numbered="no">
      <t>The authors would like to thank Ole Troan, Ralph Droms, and Suresh
      Krishnan for their comments and feedback.</t>

      <t>This document is a merge of three documents: <xref
      target="B4-Trans-DSLite"></xref>, <xref target="DSLite-LW-Ext"></xref>,
      and <xref target="Stateless-DS-Lite"></xref>.</t>
    </section>

    <section title="Contributors" numbered="no">
      <t>The following individuals contributed to this effort:</t>

<figure><artwork><![CDATA[
Jianping Wu
Tsinghua University
Department of Computer Science, Tsinghua University
Beijing  100084
China
Phone: +86-10-62785983
Email: jianping@cernet.edu.cn

Peng Wu
Tsinghua University
Department of Computer Science, Tsinghua University
Beijing  100084
China
Phone: +86-10-62785822
Email: pengwu.thu@gmail.com

Qi Sun
Tsinghua University
Beijing  100084
China
Phone: +86-10-62785822
Email: sunqi@csnet1.cs.tsinghua.edu.cn

Chongfeng Xie
China Telecom
Room 708, No. 118, Xizhimennei Street
Beijing  100035
China
Phone: +86-10-58552116
Email: xiechf@ctbri.com.cn

Xiaohong Deng
The University of New South Wales
Sydney  NSW 2052
Australia
Email: dxhbupt@gmail.com

Cathy Zhou
Huawei Technologies
Section B, Huawei Industrial Base, Bantian Longgang
Shenzhen  518129
China
Email: cathyzhou@huawei.com

Alain Durand
Juniper Networks
1194 North Mathilda Avenue
Sunnyvale, CA  94089-1206
United States
Email: adurand@juniper.net

Reinaldo Penno
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA  95134
United States
Email: repenno@cisco.com

Axel Clauberg
Deutsche Telekom AG
CTO-ATI
Landgrabenweg 151
Bonn  53227
Germany
Email: axel.clauberg@telekom.de

Lionel Hoffmann
Bouygues Telecom
TECHNOPOLE
13/15 Avenue du Marechal Juin
Meudon  92360
France
Email: lhoffman@bouyguestelecom.fr

Maoke Chen (a.k.a. Noriyuki Arai)
BBIX, Inc. 
Tokyo Shiodome Building, Higashi-Shimbashi 1-9-1
Minato-ku, Tokyo  105-7310
Japan
Email: maoke@bbix.net
]]></artwork></figure>

    </section>
  </back>
</rfc>
