RFC 7596

Lightweight 4over6: An Extension to the Dual-Stack Lite Architecture

πŸ“… published July 2015, from ietf

RFC 7596 πŸ“œβœ¨ Lightweight 4over6 (Part 1 of 5)

okay bestie, RFC 7596 is called Lightweight 4over6: An Extension to the Dual-Stack Lite Architecture πŸŽ€. It's a Standards Track doc from July 2015 (ISSN 2070-1721) πŸ’…. The authors are Y. Cui (Tsinghua University), Q. Sun (China Telecom), M. Boucadair (France Telecom), T. Tsou (Huawei Technologies), Y. Lee (Comcast), and I. Farrer (Deutsche Telekom AG) 🫢. The title block doesn't list anything it obsoletes or updates, so it's a fresh start 🌸.

Abstract 🌈

okay so Dual-Stack Lite (DS-Lite) (RFC 6333) is the architecture for carrying IPv4 packets across an IPv6 network πŸ¦‹. This doc adds an extension called "Lightweight 4over6" πŸ’–. It moves the Network Address and Port Translation (NAPT) function from the centralized DS-Lite tunnel concentrator down to the tunnel client in the Customer Premises Equipment (CPE) 🏠. Result: no Carrier Grade NAT function is needed in the concentrator, and the centralized state drops to a per-subscriber level πŸ“‰βœ¨. To delegate NAPT and make IPv4 address sharing work, port-restricted IPv4 addresses get handed out to the CPEs πŸ“. Iconic. πŸ‘‘

Status of This Memo ⭐

This is an Internet Standards Track document πŸŽ€.

It's a product of the Internet Engineering Task Force (IETF) and represents the consensus of the IETF community πŸ’œ. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) πŸ”₯. For more on Internet Standards, check Section 2 of RFC 5741 🧚.

Info about the current status, any errata, and how to send feedback lives at http://www.rfc-editor.org/info/rfc7596 πŸ¦‹.

Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved 🌸.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info), as in effect on the date of publication πŸ“œ. Read these carefully, bestie, because they spell out your rights and restrictions for this document πŸ™ˆ. Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License 🫢.

Table of Contents πŸ—‚οΈ

1. Introduction ....................................................3
2. Conventions .....................................................4
3. Terminology .....................................................5
4. Lightweight 4over6 Architecture .................................6
5. Lightweight B4 Behavior .........................................7
   5.1. Lightweight B4 Provisioning with DHCPv6 ....................7
   5.2. Lightweight B4 Data-Plane Behavior ........................10
        5.2.1. Fragmentation Behavior .............................11
6. Lightweight AFTR Behavior ......................................12
   6.1. Binding Table Maintenance .................................12
   6.2. lwAFTR Data-Plane Behavior ................................13
7. Additional IPv4 Address and Port-Set Provisioning Mechanisms ...14
8. ICMP Processing ................................................14
   8.1. ICMPv4 Processing by the lwAFTR ...........................15
   8.2. ICMPv4 Processing by the lwB4 .............................15
9. Security Considerations ........................................15
10. References ....................................................16
   10.1. Normative References .....................................16
   10.2. Informative References ...................................17
Acknowledgements ..................................................19
Contributors ......................................................19
Authors' Addresses ................................................21

1. Introduction 🧚

okay so Dual-Stack Lite [RFC6333] gives you IPv4 access over an IPv6 network using two well-known tools: IP in IP [RFC2473] and Network Address Translation (NAT) πŸ’–. The DS-Lite architecture has two main functional elements:

  • Basic Bridging BroadBand (B4) element: a function on a dual-stack-capable node (either a directly connected device or a CPE) that creates an IPv4-in-IPv6 tunnel to an AFTR πŸŽ€.
  • Address Family Transition Router (AFTR) element: the combo of an IPv4-in-IPv6 tunnel endpoint and an IPv4-IPv4 NAT, both living on the same node 🌈.

The AFTR does the centralized NAT44 job. It dynamically hands out public IPv4 addresses and ports to a host's traffic (as described in [RFC3022]) ✨. To pull that off, the AFTR has to keep per-flow state in the form of active NAPT sessions πŸ“Š. For service providers with lots of B4 clients, scaling the AFTR can get wildly expensive, fast πŸ’Έ. Keeping per-flow state also adds a big NAPT logging burden in countries where logging is legally required πŸ™ˆ.

This document describes "Lightweight 4over6" (lw4o6), which fixes these problems πŸ¦‹. By moving the NAPT work from the centralized AFTR out to the distributed B4s, you get a few perks πŸ’…:

  • NAPT44 is already widely supported and used in today's CPE devices. lw4o6 uses that to provide private<->public NAPT44, which means the service provider doesn't need a centralized NAT44 function 🏠.
  • The state that has to be kept centrally in the AFTR can drop from per-flow to per-subscriber. That cuts the memory and processing power the AFTR needs 🧠.
  • Less maintained state means way less logging overhead for the service provider πŸ“‰.

Operators' IPv6 and IPv4 addressing architectures stay independent of each other, so flexible IPv4/IPv6 addressing schemes can be deployed 🌸.

Lightweight 4over6 is built for complete independence between IPv6 subnet prefixes and IPv4 addresses, with or without IPv4 address sharing πŸ’œ. To get there, it keeps state for each softwire (per-subscriber state) in the central lwAFTR, with a hub-and-spoke forwarding architecture 🌟. "Mapping of Address and Port with Encapsulation (MAP-E)" [RFC7597] also offers these capabilities. Or, alternatively, it can reduce the amount of centralized state by using rules to express IPv4/IPv6 address mappings 🧚. That creates an algorithmic relationship between the IPv6 subnet and the IPv4 address, and it also allows direct, meshed connectivity between users 🫢.

The tunneling mechanism is the same for DS-Lite and Lightweight 4over6 πŸŽ€. This document covers the changes to DS-Lite needed to implement Lightweight 4over6. Those changes mostly touch the configuration parameters and the provisioning method the functional elements need πŸ’–.

One of Lightweight 4over6's features is keeping per-subscriber state in the service provider's network ✨. This technique is categorized as a "binding approach" [Unified-v4-in-v6], which defines a unified IPv4-in-IPv6 softwire CPE πŸ‘‘.

This document extends the mechanism defined in [RFC7040] by allowing address sharing πŸ¦‹. The solution here is also a variant of Address plus Port (A+P), called "Binding Table Mode" (see Section 4.4 of [RFC6346]) 🌈.

This document focuses on architectural considerations, especially the expected behavior of the functional elements involved and their interfaces πŸ”₯. Deployment-specific stuff like redundancy and provisioning policy is out of scope here πŸ™ˆ.

2. Conventions πŸ’…

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 [RFC2119] 🫢.

3. Terminology 🌸

This document defines the following terms πŸŽ€:

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.

Lightweight B4 (lwB4):        A B4 element [RFC6333] 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.

Lightweight AFTR (lwAFTR):    An AFTR element [RFC6333] 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.

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.).

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.

Throughout the rest of this document, "B4" and "AFTR" should be understood to refer specifically to a DS-Lite implementation πŸ’œ. "lwB4" and "lwAFTR" refer to a Lightweight 4over6 implementation ✨.


Part 2 is next, bestie πŸ§šπŸ’–

4. Lightweight 4over6 Architecture ✨

okay so lw4o6 is basically giving DS-Lite vibes πŸŽ€ lwB4s and an lwAFTR hang out together over an IPv6-enabled network, and both approaches use IPv4-in-IPv6 encapsulation to deliver IPv4 connectivity πŸ¦‹ The big difference is where the NAPT stuff lives, so check out Figure 1 πŸ’…

   +--------+   +---------+  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

Figure 1: Comparison of DS-Lite and Lightweight 4over6 Data Plane

there are three main components in the lw4o6 architecture 🌸

  • The lwB4, which performs the NAPT function and IPv4/IPv6 encapsulation/decapsulation.
  • The lwAFTR, which performs the IPv4/IPv6 encapsulation/decapsulation.
  • The provisioning system, which tells the lwB4 which IPv4 address and port set to use.

the lwB4 is the main character here πŸ‘‘ It's a regular B4 but with NAPT added on top, so it needs to be provisioned with the public IPv4 address and port set it's allowed to use. That info comes through a provisioning mechanism like DHCP, the Port Control Protocol (PCP) [RFC6887], or the Broadband Forum's TR-69 specification [TR069] 🧚

the lwAFTR needs to know the binding between each subscriber's IPv6 address and the IPv4 address and port set allocated to that subscriber πŸ’œ It uses this for ingress filtering upstream and encapsulation downstream. This is per-subscriber state, as opposed to per-flow state in the regular AFTR case, so it's a whole different energy πŸ™ˆ

the consequence is that the info kept by the provisioning mechanism and the info kept by the lwAFTR MUST be synchronized (see Figure 2) 🫢 How that sync actually happens is out of scope for this document, so no spoilers there.

the solution in this document lets requesting CPEs get either a full or a shared IPv4 address. [RFC7040] only does full IPv4 addresses, so this one is literally the upgrade πŸ”₯
                         +------------+
                 /-------|Provisioning|<-----\
                 |       +------------+      |
                 |                           |
                 V                           V
   +--------+   +---------+    IPv4/IPv6     +------+    +-------------+
   |IPv4 LAN|---|lwB4/NAPT|==================|lwAFTR|----|IPv4 Internet|
   +--------+   +---------+                  +------+    +-------------+

Figure 2: Lightweight 4over6 Provisioning Synchronization


5. Lightweight B4 Behavior πŸ“

5.1. Lightweight B4 Provisioning with DHCPv6

okay so with DS-Lite, the B4 only needs one DS-Lite-specific parameter to set up the softwire, which is the IPv6 address of the AFTR πŸ¦‹ Its IPv4 address can come from the well-known range 192.0.0.0/29. so easy, no cap.

lw4o6 is a bit more demanding 😭 a bunch of lw4o6-specific config parameters have to be provisioned to the lwB4:

  • IPv6 address for the lwAFTR
  • IPv4 external (public) address for NAPT44
  • Restricted port set to use for NAPT44
  • IPv6 binding prefix

the lwB4 MUST implement DHCPv6-based configuration using OPTION_S46_CONT_LW, as described in Section 5.3 of [RFC7598] πŸ’… That means the lifetime of the softwire and the derived config info (like the IPv4 shared address and IPv4 address) is tied to the lifetime of the DHCPv6 lease. And if you need stateful IPv4 config or extra IPv4 config info, then DHCP 4o6 [RFC7341] MUST be used. it's giving rules, bestie πŸŽ€

technically it would be possible to run more than one active lw4o6 tunnel at the same time, but this document is only about using a single tunnel 🧚

now the IPv6 binding prefix is provisioned so the Customer Edge (CE) can figure out which prefix to use as the tunnel source 🌈 When the lwB4 gets the config params above, it does a longest-prefix match between the IPv6 binding prefix and its currently active IPv6 prefixes. The result becomes the subnet used for sourcing the lw4o6 tunnel. Then the full /128 address gets built the same way as in [RFC7597] ✨

    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              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Figure 3: Construction of the lw4o6 /128 Prefix

here's the breakdown of each field 🫧

  • Operator Assigned Prefix: IPv6 prefix allocated to the client. If the prefix length is less than 64, it is right-padded with zeros to 64 bits.
  • Padding: Padding (all zeros).
  • IPv4 Address: Public IPv4 address allocated to the client.
  • PSID: Port Set ID. Allocated to the client; left-padded with zeros to 16 bits. If no PSID is provisioned, all zeros.

okay this part is important πŸ‘€ if the lwB4's IPv6 encapsulation source address changes for any reason (like the DHCPv6 lease expiring), the lwB4's dynamic provisioning process MUST be re-initiated. And if the lwB4's public IPv4 address or Port Set ID changes for any reason, the lwB4 MUST flush its NAPT table πŸ’€

an lwB4 MUST support dynamic port-restricted IPv4 address provisioning 🌸 The port-set algorithm for this is described in Section 5.1 of [RFC7597]. For lw4o6, the number of a-bits SHOULD be 0, so each lwB4 gets a single contiguous port set πŸ“

heads up: DHCPv6 provisioning only gives the client one PSID. if the client is using all of its provisioned L4 ports at once, it might not be able to start any more outbound connections 😭 DHCPv6 has no way for the client to ask for more L4 port numbers. other provisioning mechanisms (like PCP-based provisioning [PCP-PORT_SET]) do have that function. IP address sharing issues get more detail in [RFC6269].

unless an lwB4 is getting a full IPv4 address, it is RECOMMENDED that PSIDs containing the system ports (0-1023) not be allocated to lwB4s 🧚 Those reserved ports are more likely to be reserved by middleware, so the recommendation is that they're not handed out to clients unless it's a deliberate assignment. Section 5.2.2 of [RFC6269] analyzes allocating system ports to clients with IPv4 address sharing πŸ’œ

now, if the lwB4 gets an ICMPv6 error message (Type 1, Code 5) from the lwAFTR, it reads that as "no matching entry in the lwAFTR's binding table was found, so the lwAFTR isn't forwarding the IPv4 payload" πŸ™ˆ In that case the lwB4 MAY re-initiate the dynamic port-restricted provisioning process. The lwB4's re-initiation policy SHOULD be configurable πŸŽ€

and when that ICMP error shows up, the lwB4 MUST validate that the source address is the same as the lwAFTR address that's configured. If those addresses don't match, the lwB4 MUST discard the ICMP error message πŸ›‘οΈ fr fr.

to stop forged ICMP messages (the ones using the spoofed lwAFTR address as the source) from reaching lwB4s, the operator can implement network ingress filtering as described in [RFC2827] πŸ¦‹

last but not least, the DNS considerations in Sections 5.5 and 6.4 of [RFC6333] apply to Lightweight 4over6, and lw4o6 implementations MUST comply with all requirements stated there 🫢 no skipping that one, periodt πŸ’…

5.2. Lightweight B4 Data-Plane Behavior πŸ¦‹

okay so the lwB4 gets the same data-plane basics as the original B4, and that's a total win because it means less reinventing the wheel πŸ’… several sections of [RFC6333] give background on this stuff, and the lwB4 MUST implement them since they're shared by both solutions. here's the lineup:

5.2 Encapsulation                 Covering encapsulation and
                                  decapsulation of tunneled traffic

5.3 Fragmentation and Reassembly  Covering MTU and fragmentation
                                  considerations (referencing
                                  [RFC2473])

7.1 Tunneling                     Covering tunneling and Traffic
                                  Class mapping between IPv4 and IPv6
                                  (referencing [RFC2473]).  Also see
                                  [RFC2983]

the lwB4 is doing IPv4 address translation (NAPT44) AND encapsulation and decapsulation, so it's basically a multitasking queen πŸ‘‘ it runs standard NAPT44 from [RFC3022], using the allocated port-restricted address as its external IPv4 address and its range of source ports.

here's the vibe of the whole flow ✨

                    +-------------+
                    |     lwB4    |
  +--------+  IPv4  |------+------| IPv4-in-IPv6  +----------+
  |IPv4 LAN|------->|      |Encap.|-------------->|Configured|
  |        |<-------| NAPT |  or  |<--------------|  lwAFTR  |
  +--------+        |      |Decap.|               +----------+
                    +------+------+

                Figure 4: Working Flow of the lwB4

so hosts in the customer's network behind the lwB4 send IPv4 packets with an [RFC1918] address πŸ™ˆ when the lwB4 gets one of those, it does NAPT44 on the source address and port, using the public IPv4 address and a port number from the allocated port set. then it wraps the packet in 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. last step, the lwB4 forwards the encapsulated packet to the configured lwAFTR. slay πŸ”₯

going the other way, when the lwB4 gets an IPv4-in-IPv6 packet from the lwAFTR, it decapsulates the IPv4 packet out of the IPv6 packet. then it does NAPT44 translation on the destination address and port, based on what's in its local NAPT44 table. 🧚

now the important part, the security checks 🫢 if the IPv6 source address doesn't match the configured lwAFTR address, the packet MUST be discarded. and if the decapsulated IPv4 packet doesn't match the lwB4's configuration (like an invalid destination IPv4 address or port), 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.

the lwB4 is also on the hook for 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, so it's not new drama πŸ’…

and lowkey, an lwB4 can be co-located in a host. in that case, the NAPT44 and encapsulation/decapsulation functions are implemented inside the host itself 🌸

5.2.1. Fragmentation Behavior πŸŽ€

for TCP and UDP traffic, the NAPT44 in the lwB4 MUST conform to the behavior and best current practices documented in [RFC4787], [RFC5508], and [RFC5382]. if the lwB4 supports the Datagram Congestion Control Protocol (DCCP), then the requirements in [RFC5597] MUST be implemented.

the NAPT44 in the lwB4 MUST implement ICMP message handling behavior conforming to the best current practice documented in [RFC5508]. 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 [RFC2473].

ok this one is a little spicy 🌢️ if IPv4 hosts behind different lwB4s share the same IPv4 address and send fragments to the same IPv4 destination host outside the Lightweight 4over6 domain, those hosts may use the same IPv4 fragmentation identifier. that can cause incorrect reassembly of the fragments at the destination host πŸ’€ the IPv4 fragmentation identifier is a 16-bit field, so 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 for the rate at which fragments are sent. but splitting the identifier space this way would increase the probability of reassembly collision for all connections through the lwB4, so it's a trade-off. see also Section 5.3.1 of [RFC6864] πŸ¦‹


6. Lightweight AFTR Behavior 🌈

6.1. Binding Table Maintenance πŸ“‹

the lwAFTR keeps an address binding table that ties together the lwB4's IPv6 address, the allocated IPv4 address, and the restricted port set. this is different from the DS-Lite extended binding table, which is a 5-tuple NAPT table defined in Section 6.6 of [RFC6333]. each entry in the Lightweight 4over6 binding table holds these 3-tuples instead:

  • IPv6 address for a single lwB4
  • Public IPv4 address
  • Restricted port set

each entry has two jobs 🧚 it handles the IPv6 encapsulation of inbound IPv4 packets destined to the lwB4, and it validates outbound IPv4-in-IPv6 packets received from the lwB4 before they get decapsulated.

the lwAFTR doesn't do NAPT, so it has no need for session entries. no sessions, no stress 😌

the lwAFTR MUST synchronize the binding information with the port-restricted address provisioning process. if the lwAFTR doesn't take part in the port-restricted address provisioning process, the binding MUST be synchronized through other methods (e.g., out-of-band static update).

if the lwAFTR does take part in the port-restricted provisioning process, then its binding table MUST be created as part of this process. and for all provisioning processes, the lifetime of binding table entries MUST be synchronized with the lifetime of address allocations. keep those lifetimes in sync, bestie ⏳

6.2. lwAFTR Data-Plane Behavior πŸ’–

a bunch of [RFC6333] sections give background on the AFTR's data-plane functionality, and the lwAFTR MUST implement them since they're common to both solutions. the relevant ones are:

6.2 Encapsulation                 Covering encapsulation and
                                  decapsulation of tunneled traffic

6.3 Fragmentation and Reassembly  Fragmentation and reassembly
                                  considerations (referencing
                                  [RFC2473])

7.1 Tunneling                     Covering tunneling and Traffic
                                  Class mapping between IPv4 and IPv6
                                  (referencing [RFC2473]).  Also see
                                  [RFC2983]

when the lwAFTR gets an IPv4-in-IPv6 packet from an lwB4, it decapsulates the IPv6 header and checks the source addresses and port against 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 βœ…

if no match is found (e.g., no matching IPv4 address entry, or port out of range), the lwAFTR MUST discard the packet or apply a policy (such as redirection) to it. 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.

when the lwAFTR gets 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 natively to the lwB4 over the IPv6 network πŸš€

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.

the lwAFTR MUST support hairpinning of traffic between two lwB4s. it does this by decapsulating and re-encapsulating packets from one lwB4 that need to go to another lwB4 associated with the same AFTR. the hairpinning policy MUST be configurable πŸ”„


7. Additional IPv4 Address and Port-Set Provisioning Mechanisms 🧁

besides the DHCPv6-based mechanism from Section 5.1, a few other IPv4 provisioning protocols have been floated around. these protocols MAY be implemented. the alternatives include:

  • DHCPv4 over DHCPv6: [RFC7341] 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 [RFC7341] and [Dyn-Shared-v4Alloc] to retrieve a shared IPv4 address with a set of ports.
  • PCP [RFC6887]: an lwB4 MAY use [PCP-PORT_SET] to retrieve a restricted IPv4 address and a set of ports.

in a Lightweight 4over6 domain, the binding information MUST be synchronized across the lwB4s, the lwAFTRs, and the provisioning server. no one gets left out of the group chat πŸ«‚

to avoid interworking complexity, it is RECOMMENDED that an operator use a single provisioning mechanism / protocol for their implementation. if 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). one mechanism per friend group, so nobody gets mixed up πŸ’œ


8. ICMP Processing πŸ’…

for both the lwAFTR and the lwB4, ICMPv6 MUST be handled as described in [RFC2473].

ICMPv4 doesn't work in an address-sharing environment without special handling [RFC6269]. because of the port-set style of address sharing, Lightweight 4over6 needs specific ICMP message handling that DS-Lite doesn't require. this is the one place where it's extra, and honestly it's giving main character energy 🌟

8.1. ICMPv4 Processing by the lwAFTR

okay so for inbound ICMP messages, the lwAFTR SHOULD follow these steps 🫢 It's how the lwAFTR handles ICMP errors and gives a port-restricted CPE basic remote IPv4 service diagnostics, and honestly it's giving careful ✨

  1. Check the ICMP Type field.
  2. If the ICMP Type field is 0 or 8 (echo reply or echo request), then the lwAFTR MUST take the value of the ICMP Identifier field as the source port, and use that 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 πŸ™ˆ
  3. If the ICMP Type field is set to any other value, then the lwAFTR MUST use the method described in REQ-3 of [RFC5508] to find the source port inside the transport-layer header in the ICMP packet's data field. The destination IPv4 address and source port pulled out of the ICMP packet are then used for a lookup in the binding table. If a match is found, the lwAFTR MUST forward the ICMP reply packet to the IPv6 address stored in the entry. Otherwise, it MUST discard the packet πŸ’€

Otherwise, the lwAFTR MUST discard all inbound ICMPv4 messages. No exceptions, bestie 🚫

The ICMP policy SHOULD be configurable. Pls make it configurable πŸ™

8.2. ICMPv4 Processing by the lwB4

The lwB4 MUST implement the requirements defined in [RFC5508] for ICMP forwarding. That's the non-negotiable part πŸ’… For ICMP echo request packets that come from the private IPv4 network, the lwB4 SHOULD implement the method described in [RFC6346] and use an available port from its port set as the ICMP identifier. Such a glow-up for the identifier field βœ¨πŸ¦‹


9. Security Considerations

okay this section is SERIOUS, so read it with your whole chest 😭 As the port space for a subscriber shrinks because of address sharing, the randomness of that subscriber's port numbers drops hard. That means it's way easier for an attacker to guess the port number being used, and that can lead to attacks ranging from throughput reduction to broken connections or data corruption. Terrifying, fr fr πŸ’€

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 [RFC6431]), the randomness of the port number is improved, provided that the attacker is outside the Lightweight 4over6 domain and therefore does not know the port-set generation algorithm. Not knowing the algorithm is literally doing all the work here 🧚

The lwAFTR MUST rate-limit ICMPv6 error messages (see Section 5.1) to defend against DoS attacks generated by an abuse user. Rate limiting is non-optional, babe 🚨

More considerations about IP address sharing are discussed in Section 13 of [RFC6269], which is applicable to this solution. Go read that one too, it's iconic πŸ“š

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. lw4o6 does not add any other security considerations specific to these provisioning protocols. So basically, the provisioning protocol's security stuff comes along for the ride, and lw4o6 doesn't add extra drama on top πŸŽ€


10. References

10.1. Normative References

Here are the normative refs, copied exactly so nothing gets lost in translation 🌸

[RFC1918]  Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G.,
           and E. Lear, "Address Allocation for Private Internets",
           BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996,
           <http://www.rfc-editor.org/info/rfc1918>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <http://www.rfc-editor.org/info/rfc2119>.

[RFC2473]  Conta, A. and S. Deering, "Generic Packet Tunneling in
           IPv6 Specification", RFC 2473, DOI 10.17487/RFC2473,
           December 1998, <http://www.rfc-editor.org/info/rfc2473>.

[RFC4787]  Audet, F., Ed., and C. Jennings, "Network Address
           Translation (NAT) Behavioral Requirements for Unicast
           UDP", BCP 127, RFC 4787, DOI 10.17487/RFC4787,
           January 2007, <http://www.rfc-editor.org/info/rfc4787>.

[RFC5382]  Guha, S., Ed., Biswas, K., Ford, B., Sivakumar, S., and P.
           Srisuresh, "NAT Behavioral Requirements for TCP", BCP 142,
           RFC 5382, DOI 10.17487/RFC5382, October 2008,
           <http://www.rfc-editor.org/info/rfc5382>.

[RFC5508]  Srisuresh, P., Ford, B., Sivakumar, S., and S. Guha, "NAT
           Behavioral Requirements for ICMP", BCP 148, RFC 5508,
           DOI 10.17487/RFC5508, April 2009,
           <http://www.rfc-editor.org/info/rfc5508>.

[RFC5597]  Denis-Courmont, R., "Network Address Translation (NAT)
           Behavioral Requirements for the Datagram Congestion
           Control Protocol", BCP 150, RFC 5597,
           DOI 10.17487/RFC5597, September 2009,
           <http://www.rfc-editor.org/info/rfc5597>.

[RFC6333]  Durand, A., Droms, R., Woodyatt, J., and Y. Lee,
           "Dual-Stack Lite Broadband Deployments Following IPv4
           Exhaustion", RFC 6333, DOI 10.17487/RFC6333, August 2011,
           <http://www.rfc-editor.org/info/rfc6333>.

[RFC7598]  Mrugalski, T., Troan, O., Farrer, I., Perreault, S., Dec,
           W., Bao, C., Yeh, L., and X. Deng, "DHCPv6 Options for
           Configuration of Softwire Address and Port-Mapped
           Clients", RFC 7598, DOI 10.17487/RFC7598, July 2015,
           <http://www.rfc-editor.org/info/rfc7598>.

10.2. Informative References

Informative refs next, the ones that are good to know but not required πŸ¦‹

[B4-Trans-DSLite]
           Cui, Y., Sun, Q., Boucadair, M., Tsou, T., Lee, Y., and
           I. Farrer, "Lightweight 4over6: An Extension to the
           DS-Lite Architecture", Work in Progress,
           draft-cui-softwire-b4-translated-ds-lite-11,
           February 2013.

[DSLite-LW-Ext]
           Deng, X., Boucadair, M., and C. Zhou, "NAT offload
           extension to Dual-Stack lite", Work in Progress,
           draft-zhou-softwire-b4-nat-04, October 2011.

[Dyn-Shared-v4Alloc]
           Cui, Y., Sun, Q., Farrer, I., Lee, Y., Sun, Q., and
           M. Boucadair, "Dynamic Allocation of Shared IPv4
           Addresses", Work in Progress,
           draft-ietf-dhc-dynamic-shared-v4allocation-09, May 2015.

[PCP-PORT_SET]
           Sun, Q., Boucadair, M., Sivakumar, S., Zhou, C., Tsou, T.,
           and S. Perreault, "Port Control Protocol (PCP) Extension
           for Port Set Allocation", Work in Progress,
           draft-ietf-pcp-port-set-09, May 2015.

[RFC2827]  Ferguson, P. and D. Senie, "Network Ingress Filtering:
           Defeating Denial of Service Attacks which employ IP Source
           Address Spoofing", BCP 38, RFC 2827, DOI 10.17487/RFC2827,
           May 2000, <http://www.rfc-editor.org/info/rfc2827>.

[RFC2983]  Black, D., "Differentiated Services and Tunnels",
           RFC 2983, DOI 10.17487/RFC2983, October 2000,
           <http://www.rfc-editor.org/info/rfc2983>.

[RFC3022]  Srisuresh, P. and K. Egevang, "Traditional IP Network
           Address Translator (Traditional NAT)", RFC 3022,
           DOI 10.17487/RFC3022, January 2001,
           <http://www.rfc-editor.org/info/rfc3022>.

[RFC6269]  Ford, M., Ed., Boucadair, M., Durand, A., Levis, P., and
           P. Roberts, "Issues with IP Address Sharing", RFC 6269,
           DOI 10.17487/RFC6269, June 2011,
           <http://www.rfc-editor.org/info/rfc6269>.

[RFC6346]  Bush, R., Ed., "The Address plus Port (A+P) Approach to
           the IPv4 Address Shortage", RFC 6346,
           DOI 10.17487/RFC6346, August 2011,
           <http://www.rfc-editor.org/info/rfc6346>.

[RFC6431]  Boucadair, M., Levis, P., Bajko, G., Savolainen, T., and
           T. Tsou, "Huawei Port Range Configuration Options for PPP
           IP Control Protocol (IPCP)", RFC 6431,
           DOI 10.17487/RFC6431, November 2011,
           <http://www.rfc-editor.org/info/rfc6431>.

[RFC6864]  Touch, J., "Updated Specification of the IPv4 ID Field",
           RFC 6864, DOI 10.17487/RFC6864, February 2013,
           <http://www.rfc-editor.org/info/rfc6864>.

[RFC6887]  Wing, D., Ed., Cheshire, S., Boucadair, M., Penno, R., and
           P. Selkirk, "Port Control Protocol (PCP)", RFC 6887,
           DOI 10.17487/RFC6887, April 2013,
           <http://www.rfc-editor.org/info/rfc6887>.

[RFC7040]  Cui, Y., Wu, J., Wu, P., Vautrin, O., and Y. Lee, "Public
           IPv4-over-IPv6 Access Network", RFC 7040,
           DOI 10.17487/RFC7040, November 2013,
           <http://www.rfc-editor.org/info/rfc7040>.

[RFC7341]  Sun, Q., Cui, Y., Siodelski, M., Krishnan, S., and I.
           Farrer, "DHCPv4-over-DHCPv6 (DHCP 4o6) Transport",
           RFC 7341, DOI 10.17487/RFC7341, August 2014,
           <http://www.rfc-editor.org/info/rfc7341>.

[RFC7597]  Troan, O., Ed., Dec, W., Li, X., Bao, C., Matsushima, S.,
           Murakami, T., and T. Taylor, Ed., "Mapping of Address and
           Port with Encapsulation (MAP-E)", RFC 7597,
           DOI 10.17487/RFC7597, July 2015,
           <http://www.rfc-editor.org/info/rfc7597>.

[Stateless-DS-Lite]
           Penno, R., Durand, A., Clauberg, A., and L. Hoffmann,
           "Stateless DS-Lite", Work in Progress,
           draft-penno-softwire-sdnat-02, March 2012.

[TR069]    Broadband Forum TR-069, "CPE WAN Management Protocol",
           Amendment 5, CWMP Version: 1.4, November 2013,
           <https://www.broadband-forum.org>.

[Unified-v4-in-v6]
           Boucadair, M., Farrer, I., Perreault, S., Ed., and S.
           Sivakumar, Ed., "Unified IPv4-in-IPv6 Softwire CPE", Work
           in Progress, draft-ietf-softwire-unified-cpe-01, May 2013.

Acknowledgements

The authors would like to thank Ole Troan, Ralph Droms, and Suresh Krishnan for their comments and feedback. Huge thanks to these legends 🫢🌈

This document is a merge of three documents: [B4-Trans-DSLite], [DSLite-LW-Ext], and [Stateless-DS-Lite]. Three docs becoming one, that's a whole collab arc πŸ§šπŸ’œ

Contributors

The following individuals contributed to this effort. The whole squad πŸ‘‘

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

Authors' Addresses πŸŽ€

okay bestie, this is the part where we meet the brilliant people who wrote the whole thing πŸ’– every author gets their own little contact card, with the address, phone, and email exactly as they appear in the original 🫢

Yong Cui 🌸

Yong Cui
Tsinghua University
Beijing  100084
China

Phone: +86-10-62603059
Email: yong@csnet1.cs.tsinghua.edu.cn

Qiong Sun πŸ¦‹

Qiong Sun
China Telecom
Room 708, No. 118, Xizhimennei Street
Beijing  100035
China

Phone: +86-10-58552936
Email: sunqiong@ctbri.com.cn

Mohamed Boucadair 🧚

Mohamed Boucadair
France Telecom
Rennes  35000
France

Email: mohamed.boucadair@orange.com

Tina Tsou πŸ’œ

Tina Tsou
Huawei Technologies
2330 Central Expressway
Santa Clara, CA  95050
United States

Phone: +1-408-330-4424
Email: tena@huawei.com

Yiu L. Lee πŸ“

Yiu L. Lee
Comcast
One Comcast Center
Philadelphia, PA  19103
United States

Email: yiu_lee@cable.comcast.com

Ian Farrer πŸ‘‘

Ian Farrer
Deutsche Telekom AG
CTO-ATI, Landgrabenweg 151
Bonn, NRW  53227
Germany

Email: ian.farrer@telekom.de
that's the whole squad, iconic!! πŸŒˆπŸ’… thank you to every single one of them 🫢
πŸ“¦ where this page comes from