Internet-Draft | Selective RFRAG | November 2019 |
Thubert | Expires 31 May 2020 | [Page] |
This draft updates RFC 4944 with a simple protocol to recover individual fragments across a route-over mesh network, with a minimal flow control to protect the network against bloat.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 31 May 2020.¶
Copyright (c) 2019 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 (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
In most Low Power and Lossy Network (LLN) applications, the bulk of the traffic consists of small chunks of data (in the order few bytes to a few tens of bytes) at a time. Given that an IEEE Std. 802.15.4 [IEEE.802.15.4] frame can carry a payload of 74 bytes or more, fragmentation is usually not required. However, and though this happens only occasionally, a number of mission critical applications do require the capability to transfer larger chunks of data, for instance to support the firmware upgrade of the LLN nodes or the extraction of logs from LLN nodes. In the former case, the large chunk of data is transferred to the LLN node, whereas in the latter, the large chunk flows away from the LLN node. In both cases, the size can be on the order of 10 kilobytes or more and an end-to-end reliable transport is required.¶
"Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] defines the original 6LoWPAN datagram fragmentation mechanism for LLNs. One critical issue with this original design is that routing an IPv6 [RFC8200] packet across a route-over mesh requires to reassemble the full packet at each hop, which may cause latency along a path and an overall buffer bloat in the network. The "6TiSCH Architecture" [I-D.ietf-6tisch-architecture] recommends to use a fragment forwarding (FF) technique to alleviate those undesirable effects. "LLN Minimal Fragment Forwarding" [I-D.ietf-6lo-minimal-fragment] specifies the general behavior that all FF techniques including this specification follow, and presents the associated caveats. In particular, the routing information is fully indicated in the first fragment, which is always forwarded first. A state is formed and used to forward all the next fragments along the same path. The datagram_tag is locally significant to the Layer-2 source of the packet and is swapped at each hop.¶
"Virtual reassembly buffers in 6LoWPAN" [I-D.ietf-lwig-6lowpan-virtual-reassembly] (VRB) proposes a FF technique that is compatible with [RFC4944] without the need to define a new protocol. However, adding that capability alone to the local implementation of the original 6LoWPAN fragmentation would not address the inherent fragility of fragmentation (see [I-D.ietf-intarea-frag-fragile]) in particular the issues of resources locked on the receiver and the wasted transmissions due to the loss of a single fragment in a whole datagram. [Kent] compares the unreliable delivery of fragments with a mechanism it calls "selective acknowledgements" that recovers the loss of a fragment individually. The paper illustrates the benefits that can be derived from such a method in figures 1, 2 and 3, pages 6 and 7. [RFC4944] as no selective recovery and the whole datagram fails when one fragment is not delivered to the destination 6LoWPAN endpoint. Constrained memory resources are blocked on the receiver until the receiver times out, possibly causing the loss of subsequent packets that can not be received for the lack of buffers.¶
That problem is exacerbated when forwarding fragments over multiple hops since a loss at an intermediate hop will not be discovered by either the source or the destination, and the source will keep on sending fragments, wasting even more resources in the network and possibly contributing to the condition that caused the loss to no avail since the datagram cannot arrive in its entirety. RFC 4944 is also missing signaling to abort a multi-fragment transmission at any time and from either end, and, if the capability to forward fragments is implemented, clean up the related state in the network. It is also lacking flow control capabilities to avoid participating to a congestion that may in turn cause the loss of a fragment and potentially the retransmission of the full datagram.¶
This specification provides a method to forward fragments across a multi-hop route-over mesh, and a selective acknowledgment to recover individual fragments between 6LoWPAN endpoints. The method is designed to limit congestion loss in the network and addresses the requirements that are detailed in Appendix B.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119][RFC8174] when, and only when, they appear in all capitals, as shown here.¶
In this document, readers will encounter terms and concepts that are discussed in "Problem Statement and Requirements for IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Routing" [RFC6606]¶
"LLN Minimal Fragment Forwarding" [I-D.ietf-6lo-minimal-fragment] introduces the generic concept of a Virtual Reassembly Buffer (VRB) and specifies behaviours and caveats that are common to a large family of FF techniques including this, which fully inherits from that specification.¶
Past experience with fragmentation has shown that misassociated or lost fragments can lead to poor network behavior and, occasionally, trouble at application layer. The reader is encouraged to read "IPv4 Reassembly Errors at High Data Rates" [RFC4963] and follow the references for more information.¶
That experience led to the definition of "Path MTU discovery" [RFC8201] (PMTUD) protocol that limits fragmentation over the Internet.¶
Specifically in the case of UDP, valuable additional information can be found in "UDP Usage Guidelines for Application Designers" [RFC8085].¶
Readers are expected to be familiar with all the terms and concepts that are discussed in "IPv6 over Low-Power Wireless Personal Area Networks (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals" [RFC4919] and "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944].¶
"The Benefits of Using Explicit Congestion Notification (ECN)" [RFC8087] provides useful information on the potential benefits and pitfalls of using ECN.¶
Quoting the "Multiprotocol Label Switching (MPLS) Architecture" [RFC3031]: with MPLS, 'packets are "labeled" before they are forwarded' along a Label Switched Path (LSP). At subsequent hops, there is no further analysis of the packet's network layer header. Rather, the label is used as an index into a table which specifies the next hop, and a new label". The MPLS technique is leveraged in the present specification to forward fragments that actually do not have a network layer header, since the fragmentation occurs below IP.¶
This specification uses the following terms:¶
This specification updates the fragmentation mechanism that is specified in "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] for use in route-over LLNs by providing a model where fragments can be forwarded end-to-end across a 6LoWPAN LLN, and where fragments that are lost on the way can be recovered individually. A new format for fragment is introduced and new dispatch types are defined in Section 5.¶
[RFC8138] allows to modify the size of a packet en-route by removing the consumed hops in a compressed Routing Header. It results that fragment_offset and datagram_size (see Section 2.3) must also be modified en-route, whcih is difficult to do in the uncompressed form. This specification expresses those fields in the Compressed Form and allows to modify them en-route (see Section 4.3) easily.¶
Note that consistently with Section 2 of [RFC6282] for the fragmentation mechanism described in Section 5.3 of [RFC4944], any header that cannot fit within the first fragment MUST NOT be compressed when using the fragmentation mechanism described in this specification.¶
This specification implements the generic FF technique specified in "LLN Minimal Fragment Forwarding" [I-D.ietf-6lo-minimal-fragment] in a fashion that enables end-to-end recovery of fragments and some degree of flow control.¶
At the time of this writing, [I-D.ietf-6lo-minimal-fragment] allows for refragmenting in intermediate nodes, meaning that some bytes from a given fragment may be left in the VRB to be added to the next fragment. The reason for this to happen would be the need for space in the outgoing fragment that was not needed in the incoming fragment, for instance because the 6LoWPAN Header Compression is not as efficient on the outgoing link, e.g., if the Interface ID (IID) of the source IPv6 address is elided by the originator on the first hop because it matches the source MAC address, but cannot be on the next hops because the source MAC address changes.¶
This specification cannot allow this operation since fragments are recovered end-to-end based on a sequence number. This means that the fragments that contain a 6LoWPAN-compressed header MUST have enough slack to enable a less efficient compression in the next hops that still fits in one MAC frame. For instance, if the IID of the source IPv6 address is elided by the originator, then it MUST compute the fragment_size as if the MTU was 8 bytes less. This way, the next hop can restore the source IID to the first fragment without impacting the second fragment.¶
This specification introduces a concept of Inter-Frame Gap, which is a configurable interval of time between transmissions to a same next hop. In the case of half duplex interfaces, this InterFrameGap ensures that the next hop has progressed the previous frame and is capable of receiving the next one.¶
In the case of a mesh operating at a single frequency with omnidirectional antennas, a larger InterFrameGap is required to protect the frame against hidden terminal collisions with the previous frame of a same flow that is still progressing along a common path.¶
The Inter-Frame Gap is useful even for unfragmented datagrams, but it becomes a necessity for fragments that are typically generated in a fast sequence and are all sent over the exact same path.¶
The compression of the Hop Limit, of the source and destination addresses in the IPv6 Header, and of the Routing Header, may change en-route in a Route-Over mesh LLN. If the size of the first fragment is modified, then the intermediate node MUST adapt the datagram_size to reflect that difference.¶
The intermediate node MUST also save the difference of datagram_size of the first fragment in the VRB and add it to the datagram_size and to the fragment_offset of all the subsequent fragments for that datagram.¶
This specification enables the 6LoWPAN fragmentation sublayer to provide an MTU up to 2048 bytes to the upper layer, which can be the 6LoWPAN Header Compression sublayer that is defined in the "Compression Format for IPv6 Datagrams" [RFC6282] specification. In order to achieve this, this specification enables the fragmentation and the reliable transmission of fragments over a multihop 6LoWPAN mesh network.¶
This specification provides a technique that is derived from MPLS to forward individual fragments across a 6LoWPAN route-over mesh without reassembly at each hop. The datagram_tag is used as a label; it is locally unique to the node that owns the source MAC address of the fragment, so together the MAC address and the label can identify the fragment globally. A node may build the datagram_tag in its own locally-significant way, as long as the chosen datagram_tag stays unique to the particular datagram for the lifetime of that datagram. It results that the label does not need to be globally unique but also that it must be swapped at each hop as the source MAC address changes.¶
This specification extends RFC 4944 [RFC4944] with 2 new Dispatch types, for Recoverable Fragment (RFRAG) and for the RFRAG Acknowledgment back. The new 6LoWPAN Dispatch types are taken from Page 0 [RFC8025] as indicated in Table 1 in Section 9.¶
In the following sections, a "datagram_tag" extends the semantics defined in [RFC4944] Section 5.3."Fragmentation Type and Header". The datagram_tag is a locally unique identifier for the datagram from the perspective of the sender. This means that the datagram_tag identifies a datagram uniquely in the network when associated with the source of the datagram. As the datagram gets forwarded, the source changes and the datagram_tag must be swapped as detailed in [I-D.ietf-6lo-minimal-fragment].¶
In this specification, if the packet is compressed then the size and offset of the fragments are expressed on the Compressed Form of the packet form as opposed to the uncompressed - native - packet form.¶
The format of the fragment header is shown in Figure 1. It is the same for all fragments. The format has a length and an offset, as well as a sequence field. This would be redundant if the offset was computed as the product of the sequence by the length, but this is not the case. The position of a fragment in the reassembly buffer is neither correlated with the value of the sequence field nor with the order in which the fragments are received. This enables out-of-sequence subfragmenting, e.g., a fragment seq. 5 that is retried end-to-end as smaller fragments seq. 5, 13 and 14 due to a change of MTU along the path between the 6LoWPAN endpoints.¶
There is no requirement on the receiver to check for contiguity of the received fragments, and the sender MUST ensure that when all fragments are acknowledged, then the datagram is fully received. This may be useful in particular in the case where the MTU changes and a fragment sequence is retried with a smaller fragment_size, the remainder of the original fragment being retried with new sequence values.¶
The first fragment is recognized by a sequence of 0; it carries its fragment_size and the datagram_size of the compressed packet before it is fragmented, whereas the other fragments carry their fragment_size and fragment_offset. The last fragment for a datagram is recognized when its fragment_offset and its fragment_size add up to the datagram_size.¶
Recoverable Fragments are sequenced and a bitmap is used in the RFRAG Acknowledgment to indicate the received fragments by setting the individual bits that correspond to their sequence.¶
16 bit unsigned integer.¶
When the Fragment_offset is set to a non-0 value, its semantics depend on the value of the Sequence field as follows:¶
A Fragment_offset that is set to a value of 0 indicates an abort condition and all state regarding the datagram should be cleaned up once the processing of the fragment is complete; the processing of the fragment depends on whether there is a VRB already established for this datagram, and the next hop is still reachable:¶
If the fragment cannot be forwarded or routed, then an abort RFRAG-ACK is sent back to the source as described in Section 6.1.2.¶
This specification also defines a 4-octet RFRAG Acknowledgment bitmap that is used by the reassembling endpoint to confirm selectively the reception of individual fragments. A given offset in the bitmap maps one to one with a given sequence number and indicates which fragment is acknowledged as follows:¶
Figure 3 shows an example Acknowledgment bitmap which indicates that all fragments from sequence 0 to 20 were received, except for fragments 1, 2 and 16 that were lost and must be retried.¶
The RFRAG Acknowledgment Bitmap is included in a RFRAG Acknowledgment header, as follows:¶
The Recoverable Fragment header RFRAG is used to transport a fragment and optionally request an RFRAG Acknowledgment that will confirm the good reception of one or more fragments. An RFRAG Acknowledgment is carried as a standalone fragment header (i.e. with no 6LoWPAN payload) in a message that is propagated back to the 6LoWPAN endpoint that was the originator of the fragments. To achieve this, each hop that performed an MPLS-like operation on fragments reverses that operation for the RFRAG_ACK by sending a frame from the next hop to the previous hop as known by its MAC address in the VRB. The datagram_tag in the RFRAG_ACK is unique to the receiver and is enough information for an intermediate hop to locate the VRB that contains the datagram_tag used by the previous hop and the Layer-2 information associated to it (interface and MAC address).¶
The 6LoWPAN endpoint that fragments the packets at 6LoWPAN level (the sender) also controls the amount of acknowledgments by setting the Ack-Request flag in the RFRAG packets. The sender may set the Ack-Request flag on any fragment to perform congestion control by limiting the number of outstanding fragments, which are the fragments that have been sent but for which reception or loss was not positively confirmed by the reassembling endpoint. The maximum number of outstanding fragments is the Window-Size. It is configurable and may vary in case of ECN notification. When the 6LoWPAN endpoint that reassembles the packets at 6LoWPAN level (the receiver) receives a fragment with the Ack-Request flag set, it MUST send an RFRAG Acknowledgment back to the originator to confirm reception of all the fragments it has received so far.¶
The Ack-Request ('X') set in an RFRAG marks the end of a window. This flag MUST be set on the last fragment if the sender wishes to protect the datagram, and it MAY be set in any intermediate fragment for the purpose of flow control. This ARQ process MUST be protected by a timer, and the fragment that carries the 'X' flag MAY be retried upon time out a configurable amount of times (see Section 7.1). Upon exhaustion of the retries the sender may either abort the transmission of the datagram or retry the datagram from the first fragment with an 'X' flag set in order to reestablish a path and discover which fragments were received over the old path in the acknowledgment bitmap. When the sender of the fragment knows that an underlying link-layer mechanism protects the fragments, it may refrain from using the RFRAG Acknowledgment mechanism, and never set the Ack-Request bit.¶
The RFRAG Acknowledgment can optionally carry an ECN indication for flow control (see Appendix C). The receiver of a fragment with the 'E' (ECN) flag set MUST echo that information by setting the 'E' (ECN) flag in the next RFRAG Acknowledgment.¶
In order to protect the datagram, the sender transfers a controlled number of fragments and flags the last fragment of a window with an RFRAG Acknowledgment Request. The receiver MUST acknowledge a fragment with the acknowledgment request bit set. If any fragment immediately preceeding an acknowledgment request is still missing, the receiver MAY intentionally delay its acknowledgment to allow in-transit fragments to arrive. Because it might defeat the round trip delay computation, delaying the acknowledgment should be configurable and not enabled by default.¶
The receiver MAY issue unsolicited acknowledgments. An unsolicited acknowledgment signals to the sender endpoint that it can resume sending if it had reached its maximum number of outstanding fragments. Another use is to inform that the reassembling endpoint aborted the process of an individual datagram.¶
When all the fragments are received, the receiving endpoint reconstructs the packet, passes it to the upper layer, sends a RFRAG Acknowledgment on the reverse path with a FULL bitmap, and arms a short timer to absorb fragments that are still in flight for that datagram without creating a new state and abort the communication if it keeps going on beyond a reasonable time.¶
Note that acknowledgments might consume precious resources so the use of unsolicited acknowledgments should be configurable and not enabled by default.¶
An observation is that streamlining forwarding of fragments generally reduces the latency over the LLN mesh, providing room for retries within existing upper-layer reliability mechanisms. The sender protects the transmission over the LLN mesh with a retry timer that is computed according to the method detailed in [RFC6298]. It is expected that the upper layer retries obey the recommendations in "UDP Usage Guidelines" [RFC8085], in which case a single round of fragment recovery should fit within the upper layer recovery timers.¶
Fragments are sent in a round robin fashion: the sender sends all the fragments for a first time before it retries any lost fragment; lost fragments are retried in sequence, oldest first. This mechanism enables the receiver to acknowledge fragments that were delayed in the network before they are retried.¶
When a single frequency is used by contiguous hops, the sender should wait a reasonable amount of time between fragments so as to let a fragment progress a few hops and avoid hidden terminal issues. This precaution is not required on channel hopping technologies such as Time Slotted Channel Hopping (TSCH) [RFC6554], where nodes that communicate at Layer-2 are scheduled to send and receive respectively, and different hops operate on different channels.¶
It is assumed that the first Fragment is large enough to carry the IPv6 header and make routing decisions. If that is not so, then this specification MUST NOT be used.¶
This specification extends the Virtual Reassembly Buffer (VRB) technique to forward fragments with no intermediate reconstruction of the entire packet. It inherits operations like datagram_tag Switching and using a timer to clean the VRB when the traffic dries up. In more details, the first fragment carries the IP header and it is routed all the way from the fragmenting endpoint to the reassembling endpoint. Upon the first fragment, the routers along the path install a label-switched path (LSP), and the following fragments are label-switched along that path. As a consequence, the next fragments can only follow the path that was set up by the first fragment and cannot follow an alternate route. The datagram_tag is used to carry the label, that is swapped at each hop. All fragments follow the same path and fragments are delivered in the order at which they are sent.¶
In Route-Over mode, the source and destination MAC addresses in a frame change at each hop. The label that is formed and placed in the datagram_tag is associated to the source MAC and only valid (and unique) for that source MAC. Upon a first fragment (i.e. with a sequence of zero), an intermediate router creates a VRB and the associated LSP state for the tuple (source MAC address, datagram_tag) and the fragment is forwarded along the IPv6 route that matches the destination IPv6 address in the IPv6 header as prescribed by [I-D.ietf-6lo-minimal-fragment], whereas the receiving endpoint allocates a reassembly buffer.¶
The LSP state enables to match the (previous MAC address, datagram_tag) in an incoming fragment to the tuple (next MAC address, swapped datagram_tag) used in the forwarded fragment and points at the VRB. In addition, the router also forms a Reverse LSP state indexed by the MAC address of the next hop and the swapped datagram_tag. This reverse LSP state also points at the VRB and enables to match the (next MAC address, swapped_datagram_tag) found in an RFRAG Acknowledgment to the tuple (previous MAC address, datagram_tag) used when forwarding a Fragment Acknowledgment (RFRAG-ACK) back to the sender endpoint.¶
The first fragment may be received a second time, indicating that it did not reach the destination and was retried. In that case, it SHOULD follow the same path as the first occurrence. It is up to sending endpoint to abort a transmission and then retry it from scratch, which may build an entirely new path.¶
Upon a next fragment (i.e. with a non-zero sequence), an intermediate router looks up a LSP indexed by the tuple (MAC address, datagram_tag) found in the fragment. If it is found, the router forwards the fragment using the associated VRB as prescribed by [I-D.ietf-6lo-minimal-fragment].¶
if the VRB for the tuple is not found, the router builds an RFRAG-ACK to abort the transmission of the packet. The resulting message has the following information:¶
At this point the router is all set and can send the RFRAG-ACK back to the previous router. The RFRAG-ACK should normally be forwarded all the way to the source using the reverse LSP state in the VRBs in the intermediate routers as described in the next section.¶
[I-D.ietf-6lo-minimal-fragment] indicates that the receiving endpoint stores "the actual packet data from the fragments received so far, in a form that makes it possible to detect when the whole packet has been received and can be processed or forwarded". How this is computed in implementation specific but relies on receiving all the bytes up to the datagram_size indicated in the first fragment. An implementation may receive overlapping fragments as the result of retries after an MTU change.¶
Upon an RFRAG-ACK, the router looks up a Reverse LSP indexed by the tuple (MAC address, datagram_tag), which are respectively the source MAC address of the received frame and the received datagram_tag. If it is found, the router forwards the fragment using the associated VRB as prescribed by [I-D.ietf-6lo-minimal-fragment], but using the Reverse LSP so that the RFRAG-ACK flows back to the sender endpoint.¶
If the Reverse LSP is not found, the router MUST silently drop the RFRAG-ACK message.¶
Either way, if the RFRAG-ACK indicates that the fragment was entirely received (FULL bitmap), it arms a short timer, and upon timeout, the VRB and all the associated state are destroyed. Until the timer elapses, fragments of that datagram may still be received, e.g. if the RFRAG-ACK was lost on the way back and the source retried the last fragment. In that case, the router forwards the fragment according to the state in the VRB.¶
This specification does not provide a method to discover the number of hops or the minimal value of MTU along those hops. But should the minimal MTU decrease, it is possible to retry a long fragment (say sequence of 5) with first a shorter fragment of the same sequence (5 again) and then one or more other fragments with a sequence that was not used before (e.g., 13 and 14). Note that Path MTU Discovery is out of scope for this document.¶
A reset is signaled on the forward path with a pseudo fragment that has the fragment_offset, sequence and fragment_size all set to 0, and no data.¶
When the sender or a router on the way decides that a packet should be dropped and the fragmentation process aborted, it generates a reset pseudo fragment and forwards it down the fragment path.¶
Each router next along the path the way forwards the pseudo fragment based on the VRB state. If an acknowledgment is not requested, the VRB and all associated state are destroyed.¶
Upon reception of the pseudo fragment, the receiver cleans up all resources for the packet associated to the datagram_tag. If an acknowledgment is requested, the receiver responds with a NULL bitmap.¶
The other way around, the receiver might need to abort the process of a fragmented packet for internal reasons, for instance if it is out of reassembly buffers, already uses all 256 possible values of the datagram_tag, or if it keeps receiving fragments beyond a reasonable time while it considers that this packet is already fully reassembled and was passed to the upper layer. In that case, the receiver SHOULD indicate so to the sender with a NULL bitmap in a RFRAG Acknowledgment. The RFRAG Acknowledgment is frowarded all the way back to the source of the packet and cleans up all resources on the way. Upon an acknowledgment with a NULL bitmap, the sender endpoint MUST abort the transmission of the fragmented datagram with one exception: In the particular case of the first fragment, it MAY decide to retry via an alternate next hop instead.¶
The text above can be read with the assumption of a serial path between a source and a destination. Section 4.5.3 of the "6TiSCH Architecture" [I-D.ietf-6tisch-architecture] defines the concept of a Track that can be a complex path between a source and a destination with Packet ARQ, Replication, Elimination and Overhearing (PAREO) along the Track. This specification can be used along any subset of the complex Track where the first fragment is flooded. The last RFRAG Acknowledgment is flooded on that same subset in the reverse direction. Intermediate RFRAG Acknowledgments can be flooded on any sub-subset of that reverse subset that reach back to the source.¶
There is no particular configuration on the receiver, as echoing ECN is always on. The configuration only applies to the sender, which is in control of the transmission. The management system SHOULD be capable of providing the parameters below:¶
The management system should monitor the amount of retries and of ECN settings that can be observed from the perspective of the both the sender and the receiver, and may tune the optimum size of Fragment_Size and of the Window_Size, OptWindowSize and OptWindowSize respectively, at the sender. The values should be bounded by the expected number of hops and reduced beyond that when the number of datagrams that can traverse an intermediate point may exceed its capacity and cause a congestion loss. The InterFrameGap is another tool that can be used to increase the spacing between fragments of a same datagram and reduce the ratio of time when a particular intermediate node holds a fragment of that datagram.¶
The considerations in the Security sections of [I-D.ietf-core-cocoa] and [I-D.ietf-6lo-minimal-fragment] apply equally to this specification.¶
The process of recovering fragments does not appear to create any opening for new threat compared to "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] beyond the change of size of the datagram_tag. By reducing to 8 bits, the tag will wrap faster than with [RFC4944]. But for a constrained network where a node is expected to be able to hold only one or a few large packets in memory, 256 is still a large number. Also, the acknowledgement mechanism allows ot clean up the state rapidly once the packet is fully transmitted or aborted.¶
The abstract Virtual Recovery Buffer inherited from [I-D.ietf-6lo-minimal-fragment] may be used to perform a Denial-of-Service (DoS) attack against the intermediate Routers since the routers need to maintain a state per flow. The particular VRB implementation technique described in [I-D.ietf-lwig-6lowpan-virtual-reassembly] allows to realign which data goes in which fragment which causes the intermediate node to store a portion of the data, which adds an attack vector that is not present with this specification. With this specification, the data that is transported in each fragment is conserved and the state to keep does not include any data that would not fit in the previous fragment.¶
This document allocates 4 values in Page 0 for recoverable fragments from the "Dispatch Type Field" registry that was created by "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] and reformatted by "6LoWPAN Paging Dispatch" [RFC8025].¶
The suggested values (to be confirmed by IANA) are indicated in Table 1.¶
Bit Pattern | Page | Header Type | Reference |
11 10100x | 0 | RFRAG - Recoverable Fragment | THIS RFC |
11 10101x | 0 | RFRAG-ACK - RFRAG Acknowledgment | THIS RFC |
The author wishes to thank Michel Veillette, Dario Tedeschi, Laurent Toutain, Carles Gomez Montenegro, Thomas Watteyne and Michael Richardson for in-depth reviews and comments. Also many thanks to Jonathan Hui, Jay Werb, Christos Polyzois, Soumitri Kolavennu, Pat Kinney, Margaret Wasserman, Richard Kelsey, Carsten Bormann and Harry Courtice for their various contributions.¶
There are a number of uses for large packets in Wireless Sensor Networks. Such usages may not be the most typical or represent the largest amount of traffic over the LLN; however, the associated functionality can be critical enough to justify extra care for ensuring effective transport of large packets across the LLN.¶
The list of those usages includes:¶
Uncontrolled firmware download or waveform upload can easily result in a massive increase of the traffic and saturate the network.¶
When a fragment is lost in transmission, the lack of recovery in the original fragmentation system of RFC 4944 implies that all fragments would need to be resent, further contributing to the congestion that caused the initial loss, and potentially leading to congestion collapse.¶
This saturation may lead to excessive radio interference, or random early discard (leaky bucket) in relaying nodes. Additional queuing and memory congestion may result while waiting for a low power next hop to emerge from its sleeping state.¶
Considering that RFC 4944 defines an MTU is 1280 bytes and that in most incarnations (but 802.15.4g) a IEEE Std. 802.15.4 frame can limit the MAC payload to as few as 74 bytes, a packet might be fragmented into at least 18 fragments at the 6LoWPAN shim layer. Taking into account the worst-case header overhead for 6LoWPAN Fragmentation and Mesh Addressing headers will increase the number of required fragments to around 32. This level of fragmentation is much higher than that traditionally experienced over the Internet with IPv4 fragments. At the same time, the use of radios increases the probability of transmission loss and Mesh-Under techniques compound that risk over multiple hops.¶
Mechanisms such as TCP or application-layer segmentation could be used to support end-to-end reliable transport. One option to support bulk data transfer over a frame-size-constrained LLN is to set the Maximum Segment Size to fit within the link maximum frame size. Doing so, however, can add significant header overhead to each 802.15.4 frame. In addition, deploying such a mechanism requires that the end-to-end transport is aware of the delivery properties of the underlying LLN, which is a layer violation, and difficult to achieve from the far end of the IPv6 network.¶
For one-hop communications, a number of Low Power and Lossy Network (LLN) link-layers propose a local acknowledgment mechanism that is enough to detect and recover the loss of fragments. In a multihop environment, an end-to-end fragment recovery mechanism might be a good complement to a hop-by-hop MAC level recovery. This draft introduces a simple protocol to recover individual fragments between 6LoWPAN endpoints that may be multiple hops away. The method addresses the following requirements of a LLN:¶
Considering that a multi-hop LLN can be a very sensitive environment due to the limited queuing capabilities of a large population of its nodes, this draft recommends a simple and conservative approach to Congestion Control, based on TCP congestion avoidance.¶
Congestion on the forward path is assumed in case of packet loss, and packet loss is assumed upon time out. The draft allows to control the number of outstanding fragments, that have been transmitted but for which an acknowledgment was not received yet. It must be noted that the number of outstanding fragments should not exceed the number of hops in the network, but the way to figure the number of hops is out of scope for this document.¶
Congestion on the forward path can also be indicated by an Explicit Congestion Notification (ECN) mechanism. Though whether and how ECN [RFC3168] is carried out over the LoWPAN is out of scope, this draft provides a way for the destination endpoint to echo an ECN indication back to the source endpoint in an acknowledgment message as represented in Figure 4 in Section 5.2.¶
It must be noted that congestion and collision are different topics. In particular, when a mesh operates on a same channel over multiple hops, then the forwarding of a fragment over a certain hop may collide with the forwarding of a next fragment that is following over a previous hop but in a same interference domain. This draft enables an end-to-end flow control, but leaves it to the sender stack to pace individual fragments within a transmit window, so that a given fragment is sent only when the previous fragment has had a chance to progress beyond the interference domain of this hop. In the case of 6TiSCH [I-D.ietf-6tisch-architecture], which operates over the TimeSlotted Channel Hopping [RFC7554] (TSCH) mode of operation of IEEE802.14.5, a fragment is forwarded over a different channel at a different time and it makes full sense to transmit the next fragment as soon as the previous fragment has had its chance to be forwarded at the next hop.¶
From the standpoint of a source 6LoWPAN endpoint, an outstanding fragment is a fragment that was sent but for which no explicit acknowledgment was received yet. This means that the fragment might be on the way, received but not yet acknowledged, or the acknowledgment might be on the way back. It is also possible that either the fragment or the acknowledgment was lost on the way.¶
From the sender standpoint, all outstanding fragments might still be in the network and contribute to its congestion. There is an assumption, though, that after a certain amount of time, a frame is either received or lost, so it is not causing congestion anymore. This amount of time can be estimated based on the round trip delay between the 6LoWPAN endpoints. The method detailed in [RFC6298] is recommended for that computation.¶
The reader is encouraged to read through "Congestion Control Principles" [RFC2914]. Additionally [RFC7567] and [RFC5681] provide deeper information on why this mechanism is needed and how TCP handles Congestion Control. Basically, the goal here is to manage the amount of fragments present in the network; this is achieved by to reducing the number of outstanding fragments over a congested path by throttling the sources.¶
Section 6 describes how the sender decides how many fragments are (re)sent before an acknowledgment is required, and how the sender adapts that number to the network conditions.¶