idnits 2.17.1 draft-ietf-6lo-fragment-recovery-15.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The exact meaning of the all-uppercase expression 'NOT REQUIRED' is not defined in RFC 2119. If it is intended as a requirements expression, it should be rewritten using one of the combinations defined in RFC 2119; otherwise it should not be all-uppercase. (Using the creation date from RFC4944, updated by this document, for RFC5378 checks: 2005-07-13) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (9 March 2020) is 1509 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 4919 ** Downref: Normative reference to an Informational RFC: RFC 6606 == Outdated reference: A later version (-15) exists of draft-ietf-6lo-minimal-fragment-13 == Outdated reference: A later version (-02) exists of draft-ietf-lwig-6lowpan-virtual-reassembly-01 == Outdated reference: A later version (-30) exists of draft-ietf-6tisch-architecture-28 Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 6lo P. Thubert, Ed. 3 Internet-Draft Cisco Systems 4 Updates: 4944 (if approved) 9 March 2020 5 Intended status: Standards Track 6 Expires: 10 September 2020 8 6LoWPAN Selective Fragment Recovery 9 draft-ietf-6lo-fragment-recovery-15 11 Abstract 13 This draft updates RFC 4944 with a simple protocol to recover 14 individual fragments across a route-over mesh network, with a minimal 15 flow control to protect the network against bloat. 17 Status of This Memo 19 This Internet-Draft is submitted in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF). Note that other groups may also distribute 24 working documents as Internet-Drafts. The list of current Internet- 25 Drafts is at https://datatracker.ietf.org/drafts/current/. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 This Internet-Draft will expire on 10 September 2020. 34 Copyright Notice 36 Copyright (c) 2020 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 41 license-info) in effect on the date of publication of this document. 42 Please review these documents carefully, as they describe your rights 43 and restrictions with respect to this document. Code Components 44 extracted from this document must include Simplified BSD License text 45 as described in Section 4.e of the Trust Legal Provisions and are 46 provided without warranty as described in the Simplified BSD License. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 51 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 52 2.1. BCP 14 . . . . . . . . . . . . . . . . . . . . . . . . . 4 53 2.2. References . . . . . . . . . . . . . . . . . . . . . . . 4 54 2.3. Other Terms . . . . . . . . . . . . . . . . . . . . . . . 5 55 3. Updating RFC 4944 . . . . . . . . . . . . . . . . . . . . . . 6 56 4. Extending draft-ietf-6lo-minimal-fragment . . . . . . . . . . 6 57 4.1. Slack in the First Fragment . . . . . . . . . . . . . . . 6 58 4.2. Gap between frames . . . . . . . . . . . . . . . . . . . 7 59 4.3. Flow Control . . . . . . . . . . . . . . . . . . . . . . 7 60 4.4. Modifying the First Fragment . . . . . . . . . . . . . . 8 61 5. New Dispatch types and headers . . . . . . . . . . . . . . . 8 62 5.1. Recoverable Fragment Dispatch type and Header . . . . . . 9 63 5.2. RFRAG Acknowledgment Dispatch type and Header . . . . . . 11 64 6. Fragment Recovery . . . . . . . . . . . . . . . . . . . . . . 12 65 6.1. Forwarding Fragments . . . . . . . . . . . . . . . . . . 15 66 6.1.1. Receiving the first fragment . . . . . . . . . . . . 15 67 6.1.2. Receiving the next fragments . . . . . . . . . . . . 16 68 6.2. Receiving RFRAG Acknowledgments . . . . . . . . . . . . . 16 69 6.3. Aborting the Transmission of a Fragmented Packet . . . . 17 70 6.4. Applying Recoverable Fragmentation along a Diverse 71 Path . . . . . . . . . . . . . . . . . . . . . . . . . . 18 72 7. Management Considerations . . . . . . . . . . . . . . . . . . 18 73 7.1. Protocol Parameters . . . . . . . . . . . . . . . . . . . 19 74 7.2. Observing the network . . . . . . . . . . . . . . . . . . 21 75 8. Security Considerations . . . . . . . . . . . . . . . . . . . 21 76 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 77 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 23 78 11. Normative References . . . . . . . . . . . . . . . . . . . . 23 79 12. Informative References . . . . . . . . . . . . . . . . . . . 24 80 Appendix A. Rationale . . . . . . . . . . . . . . . . . . . . . 27 81 Appendix B. Requirements . . . . . . . . . . . . . . . . . . . . 28 82 Appendix C. Considerations on Flow Control . . . . . . . . . . . 29 83 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 30 85 1. Introduction 87 In most Low Power and Lossy Network (LLN) applications, the bulk of 88 the traffic consists of small chunks of data (on the order of a few 89 bytes to a few tens of bytes) at a time. Given that an IEEE Std. 90 802.15.4 [IEEE.802.15.4] frame can carry a payload of 74 bytes or 91 more, fragmentation is usually not required. However, and though 92 this happens only occasionally, a number of mission critical 93 applications do require the capability to transfer larger chunks of 94 data, for instance to support the firmware upgrade of the LLN nodes 95 or the extraction of logs from LLN nodes. In the former case, the 96 large chunk of data is transferred to the LLN node, whereas in the 97 latter, the large chunk flows away from the LLN node. In both cases, 98 the size can be on the order of 10 kilobytes or more and an end-to- 99 end reliable transport is required. 101 "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" [RFC4944] 102 defines the original 6LoWPAN datagram fragmentation mechanism for 103 LLNs. One critical issue with this original design is that routing 104 an IPv6 [RFC8200] packet across a route-over mesh requires the 105 reassembly of the packet at each hop. The "6TiSCH Architecture" 106 [I-D.ietf-6tisch-architecture] indicates that this may cause latency 107 along a path and impact critical resources such as memory and 108 battery; to alleviate those undesirable effects it recommends using a 109 6LoWPAN Fragment Forwarding (6FF) technique . 111 "LLN Minimal Fragment Forwarding" [FRAG-FWD] specifies the generic 112 behavior that all 6FF techniques including this specification follow, 113 and presents the associated caveats. In particular, the routing 114 information is fully indicated in the first fragment, which is always 115 forwarded first. With this specification, the first fragment is 116 identified by a Sequence of 0 as opposed to a dispatch type in 117 [RFC4944]. A state is formed and used to forward all the next 118 fragments along the same path. The Datagram_Tag is locally 119 significant to the Layer-2 source of the packet and is swapped at 120 each hop, more in Section 6. This specification encodes the 121 Datagram_Tag in one byte, which will saturate if more than 256 122 datagram transit in the fragmented form over a same hop at the same 123 time. This is not realistic at the time of this writing. Should 124 this happen in a new 6LoWPAN technology, a node will need to use 125 several Link-Layer addresses to increase its indexing capacity. 127 "Virtual reassembly buffers in 6LoWPAN" [LWIG-FRAG](VRB) proposes a 128 6FF technique that is compatible with [RFC4944] without the need to 129 define a new protocol. However, adding that capability alone to the 130 local implementation of the original 6LoWPAN fragmentation would not 131 address the inherent fragility of fragmentation (see [FRAG-ILE]) in 132 particular the issues of resources locked on the reassembling 133 endpoint and the wasted transmissions due to the loss of a single 134 fragment in a whole datagram. [Kent] compares the unreliable 135 delivery of fragments with a mechanism it calls "selective 136 acknowledgements" that recovers the loss of a fragment individually. 137 The paper illustrates the benefits that can be derived from such a 138 method in figures 1, 2 and 3, on pages 6 and 7. [RFC4944] has no 139 selective recovery and the whole datagram fails when one fragment is 140 not delivered to the reassembling endpoint. Constrained memory 141 resources are blocked on the reassembling endpoint until it times 142 out, possibly causing the loss of subsequent packets that cannot be 143 received for the lack of buffers. 145 That problem is exacerbated when forwarding fragments over multiple 146 hops since a loss at an intermediate hop will not be discovered by 147 either the fragmenting and reassembling endpoints, and the source 148 will keep on sending fragments, wasting even more resources in the 149 network since the datagram cannot arrive in its entirety, and 150 possibly contributing to the condition that caused the loss. 151 [RFC4944] is also missing signaling to abort a multi-fragment 152 transmission at any time and from either end, and, if the capability 153 to forward fragments is implemented, clean up the related state in 154 the network. It is also lacking flow control capabilities to avoid 155 participating in congestion that may in turn cause the loss of a 156 fragment and potentially the retransmission of the full datagram. 158 This specification provides a method to forward fragments over 159 typically a few hops in a route-over 6LoWPAN mesh, and a selective 160 acknowledgment to recover individual fragments between 6LoWPAN 161 endpoints. The method is designed to limit congestion loss in the 162 network and addresses the requirements that are detailed in 163 Appendix B. 165 2. Terminology 167 2.1. BCP 14 169 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 170 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 171 "OPTIONAL" in this document are to be interpreted as described in BCP 172 14 [RFC2119][RFC8174] when, and only when, they appear in all 173 capitals, as shown here. 175 2.2. References 177 In this document, readers will encounter terms and concepts that are 178 discussed in "IPv6 over Low-Power Wireless Personal Area Networks 179 (6LoWPANs): Overview, Assumptions, Problem Statement, and Goals" 180 [RFC4919], "Transmission of IPv6 Packets over IEEE 802.15.4 Networks" 181 [RFC4944], and "Problem Statement and Requirements for IPv6 over 182 Low-Power Wireless Personal Area Network (6LoWPAN) Routing" 183 [RFC6606]. 185 "LLN Minimal Fragment Forwarding" [FRAG-FWD] discusses the generic 186 concept of a Virtual Reassembly Buffer (VRB) and specifies behaviors 187 and caveats that are common to a large family of 6FF techniques 188 including the mechanism specified by this document, which fully 189 inherits from that specification. It also defines terms used in this 190 document: Compressed Form, Datagram_Tag, Datagram_Size, 191 Fragment_Offset, and 6LoWPAN Fragment Forwarding endpoint (commonly 192 abbreviated as only "endpoint"). 194 Past experience with fragmentation has shown that misassociated or 195 lost fragments can lead to poor network behavior and, occasionally, 196 trouble at the application layer. The reader is encouraged to read 197 "IPv4 Reassembly Errors at High Data Rates" [RFC4963] and follow the 198 references for more information. That experience led to the 199 definition of "Path MTU discovery" [RFC8201] (PMTUD) protocol that 200 limits fragmentation over the Internet. Specifically in the case of 201 UDP, valuable additional information can be found in "UDP Usage 202 Guidelines for Application Designers" [RFC8085]. 204 "The Benefits of Using Explicit Congestion Notification (ECN)" 205 [RFC8087] provides useful information on the potential benefits and 206 pitfalls of using ECN. 208 Quoting the "Multiprotocol Label Switching (MPLS) Architecture" 209 [RFC3031]: with MPLS, 'packets are "labeled" before they are 210 forwarded' along a Label Switched Path (LSP). At subsequent hops, 211 there is no further analysis of the packet's network layer header. 212 Rather, the label is used as an index into a table which specifies 213 the next hop, and a new label". [FRAG-FWD] leverages MPLS to forward 214 fragments that actually do not have a network layer header, since the 215 fragmentation occurs below IP, and this specification makes it 216 reversible so the reverse path can be followed as well. 218 2.3. Other Terms 220 This specification uses the following terms: 222 RFRAG: Recoverable Fragment 224 RFRAG-ACK: Recoverable Fragment Acknowledgement 226 RFRAG Acknowledgment Request: An RFRAG with the Acknowledgement 227 Request flag ('X' flag) set. 229 NULL bitmap: Refers to a bitmap with all bits set to zero. 231 FULL bitmap: Refers to a bitmap with all bits set to one. 233 Reassembling endpoint: The receiving endpoint 235 Fragmenting endpoint: The sending endpoint 237 Forward direction: The direction of a path, which is followed by the 238 RFRAG. 240 Reverse direction: The reverse direction of a path, which is taken 241 by the RFRAG-ACK. 243 3. Updating RFC 4944 245 This specification updates the fragmentation mechanism that is 246 specified in "Transmission of IPv6 Packets over IEEE 802.15.4 247 Networks" [RFC4944] for use in route-over LLNs by providing a model 248 where fragments can be forwarded end-to-end across a 6LoWPAN LLN, and 249 where fragments that are lost on the way can be recovered 250 individually. A new format for fragments is introduced and new 251 dispatch types are defined in Section 5. 253 [RFC8138] allows modifying the size of a packet en route by removing 254 the consumed hops in a compressed Routing Header. This requires that 255 Fragment_Offset and Datagram_Size (see Section 2.3) are also modified 256 en route, which is difficult to do in the uncompressed form. This 257 specification expresses those fields in the Compressed Form and 258 allows modifying them en route (see Section 4.4) easily. 260 Consistently with Section 2 of [RFC6282], for the fragmentation 261 mechanism described in Section 5.3 of [RFC4944], any header that 262 cannot fit within the first fragment MUST NOT be compressed when 263 using the fragmentation mechanism described in this specification. 265 4. Extending draft-ietf-6lo-minimal-fragment 267 This specification implements the generic 6FF technique defined in 268 "LLN Minimal Fragment Forwarding" [FRAG-FWD], provides end-to-end 269 fragment recovery and mechanisms that can be used for flow control. 271 4.1. Slack in the First Fragment 273 [FRAG-FWD] allows for refragmenting in intermediate nodes, meaning 274 that some bytes from a given fragment may be left in the VRB to be 275 added to the next fragment. The need for more space in the outgoing 276 fragment than was needed for the incoming fragment arises when the 277 6LoWPAN Header Compression is not as efficient on the outgoing link 278 or the Link MTU is reduced. 280 This specification cannot allow such a refragmentation operation 281 since the fragments are recovered end-to-end based on a sequence 282 number. The Fragment_Size MUST be tailored to fit the minimal MTU 283 along the path, and the first fragment that contains a 6LoWPAN- 284 compressed header MUST have enough slack to enable a less efficient 285 compression in the next hops to still fits within the Link MTU. If 286 the fragmenting endpoint is also the 6LoWPAN compression endpoint, it 287 will elide the IID of the source IPv6 address if it matches the Link- 288 Layer address [RFC6282]. In a network with a consistent MTU, it MUST 289 compute the Fragment_Size as if the MTU was 8 bytes less, so the next 290 hop can expand the IID within the same fragment. 292 4.2. Gap between frames 294 [FRAG-FWD] requires that a configurable interval of time is inserted 295 between transmissions to the same next hop and in particular between 296 fragments of a same datagram. In the case of half duplex interfaces, 297 this inter-frame gap ensures that the next hop is done forwarding the 298 previous frame and is capable of receiving the next one. 300 In the case of a mesh operating at a single frequency with 301 omnidirectional antennas, a larger inter-frame gap is required to 302 protect the frame against hidden terminal collisions with the 303 previous frame of the same flow that is still progressing along a 304 common path. 306 The inter-frame gap is useful even for unfragmented datagrams, but it 307 becomes a necessity for fragments that are typically generated in a 308 fast sequence and are all sent over the exact same path. 310 4.3. Flow Control 312 The inter-frame gap is the only protection that [FRAG-FWD] imposes by 313 default. This document enables to group fragments in windows and 314 request intermediate acknowledgements so the number of in-flight 315 fragments can be bounded. This document also adds an ECN mechanism 316 that can be used to adapt the size of the window, the size of the 317 fragments, and/or the inter-frame gap to protect the network. 319 This specification enables the fragmenting endpoint to apply a flow 320 control mechanism to tune those parameters, but the mechanism itself 321 is out of scope. In most cases, the expectation is that most 322 datagrams will represent only a few fragments, and that only the last 323 fragment will be acknowledged. A basic implementation of the 324 fragmenting endpoint is NOT REQUIRED to variate the size of the 325 window, the duration of the inter-frame gap or the size of a fragment 326 in the middle of the transmission of a datagram, and it MAY ignore 327 the ECN signal or simply reset the window to 1 (see Appendix C for 328 more) till the end of this datagram upon detecting a congestion. 330 An intermediate node that experiences a congestion MAY set the ECN 331 bit in a fragment, and the reassembling endpoint echoes the ECN bit 332 at most once at the next opportunity to acknowledge back. 334 The size of the fragments is typically computed from the Link MTU to 335 maximize the size of the resulting frames. The size of the window 336 and the duration of the inter-frame gap SHOULD be configurable, to 337 roughly adapt the size of the window to the number of hops in an 338 average path, and to follow the general recommendations in 339 [FRAG-FWD], respectively. 341 4.4. Modifying the First Fragment 343 The compression of the Hop Limit, of the source and destination 344 addresses in the IPv6 Header, and of the Routing Header may change en 345 route in a Route-Over mesh LLN. If the size of the first fragment is 346 modified, then the intermediate node MUST adapt the Datagram_Size, 347 encoded in the Fragment_Size field, to reflect that difference. 349 The intermediate node MUST also save the difference of Datagram_Size 350 of the first fragment in the VRB and add it to the Fragment_Offset of 351 all the subsequent fragments that it forwards for that datagram. 353 5. New Dispatch types and headers 355 This document specifies an alternate to the 6LoWPAN fragmentation 356 sublayer [RFC4944] to emulate an Link MTU up to 2048 bytes for the 357 upper layer, which can be the 6LoWPAN Header Compression sublayer 358 that is defined in the "Compression Format for IPv6 Datagrams" 359 [RFC6282] specification. This specification also provides a reliable 360 transmission of the fragments over a multihop 6LoWPAN route-over mesh 361 network and a minimal flow control to reduce the chances of 362 congestion loss. 364 A 6LoWPAN Fragment Forwarding [FRAG-FWD] technique derived from MPLS 365 enables the forwarding of individual fragments across a 6LoWPAN 366 route-over mesh without reassembly at each hop. The Datagram_Tag is 367 used as a label; it is locally unique to the node that owns the 368 source Link-Layer address of the fragment, so together the Link-Layer 369 address and the label can identify the fragment globally within the 370 lifetime of the datagram. A node may build the Datagram_Tag in its 371 own locally-significant way, as long as the chosen Datagram_Tag stays 372 unique to the particular datagram for its lifetime. The result is 373 that the label does not need to be globally unique but also that it 374 must be swapped at each hop as the source Link-Layer address changes. 376 In the following sections, a "Datagram_Tag" extends the semantics 377 defined in [RFC4944] Section 5.3."Fragmentation Type and Header". 378 The Datagram_Tag is a locally unique identifier for the datagram from 379 the perspective of the sender. This means that the Datagram_Tag 380 identifies a datagram uniquely in the network when associated with 381 the source of the datagram. As the datagram gets forwarded, the 382 source changes and the Datagram_Tag must be swapped as detailed in 383 [FRAG-FWD]. 385 This specification extends RFC 4944 [RFC4944] with 2 new Dispatch 386 types, for Recoverable Fragment (RFRAG) and for the RFRAG 387 Acknowledgment back. The new 6LoWPAN Dispatch types are taken from 388 Page 0 [RFC8025] as indicated in Table 1 in Section 9. 390 5.1. Recoverable Fragment Dispatch type and Header 392 In this specification, if the packet is compressed then the size and 393 offset of the fragments are expressed with respect to the Compressed 394 Form of the packet form as opposed to the uncompressed (native) form. 396 The format of the fragment header is shown in Figure 1. It is the 397 same for all fragments though the Fragment_Offset is overloaded. The 398 format has a length and an offset, as well as a Sequence field. This 399 would be redundant if the offset was computed as the product of the 400 Sequence by the length, but this is not the case. The position of a 401 fragment in the reassembly buffer is neither correlated with the 402 value of the Sequence field nor with the order in which the fragments 403 are received. This enables refragmenting to cope with an MTU 404 deduction, see the example of the fragment seq. 5 that is retried 405 end-to-end as smaller fragments seq. 13 and 14 in Section 6.2. 407 The first fragment is recognized by a Sequence of 0; it carries its 408 Fragment_Size and the Datagram_Size of the compressed packet before 409 it is fragmented, whereas the other fragments carry their 410 Fragment_Size and Fragment_Offset. The last fragment for a datagram 411 is recognized when its Fragment_Offset and its Fragment_Size add up 412 to the stored Datagram_Size of the packet identified by the sender 413 Link-Layer address and the Datagram_Tag. 415 1 2 3 416 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 417 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 418 |1 1 1 0 1 0 0|E| Datagram_Tag | 419 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 420 |X| Sequence| Fragment_Size | Fragment_Offset | 421 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 423 X set == Ack-Request 425 Figure 1: RFRAG Dispatch type and Header 427 X: 1 bit; Ack-Request: when set, the fragmenting endpoint requires 428 an RFRAG Acknowledgment from the reassembling endpoint. 430 E: 1 bit; Explicit Congestion Notification; the "E" flag is cleared 431 by the source of the fragment and set by intermediate routers to 432 signal that this fragment experienced congestion along its path. 434 Fragment_Size: 10-bit unsigned integer; the size of this fragment in 435 a unit that depends on the Link-Layer technology. Unless 436 overridden by a more specific specification, that unit is the 437 byte, which allows fragments up to 1024 bytes. 439 Datagram_Tag: 8 bits; an identifier of the datagram that is locally 440 unique to the Link-Layer sender. 442 Sequence: 5-bit unsigned integer; the sequence number of the 443 fragment in the acknowledgement bitmap. Fragments are numbered 444 [0..N] where N is in [0..31]. A Sequence of 0 indicates the first 445 fragment in a datagram, but non-zero values are not indicative of 446 the position in the reassembly buffer. 448 Fragment_Offset: 16-bit unsigned integer. 450 When the Fragment_Offset is set to a non-0 value, its semantics 451 depend on the value of the Sequence field as follows: 453 * For a first fragment (i.e., with a Sequence of 0), this field 454 indicates the Datagram_Size of the compressed datagram, to help 455 the reassembling endpoint allocate an adapted buffer for the 456 reception and reassembly operations. The fragment may be 457 stored for local reassembly. Alternatively, it may be routed 458 based on the destination IPv6 address. In that case, a VRB 459 state must be installed as described in Section 6.1.1. 460 * When the Sequence is not 0, this field indicates the offset of 461 the fragment in the Compressed Form of the datagram. The 462 fragment may be added to a local reassembly buffer or forwarded 463 based on an existing VRB as described in Section 6.1.2. 465 A Fragment_Offset that is set to a value of 0 indicates an abort 466 condition and all state regarding the datagram should be cleaned 467 up once the processing of the fragment is complete; the processing 468 of the fragment depends on whether there is a VRB already 469 established for this datagram, and the next hop is still 470 reachable: 472 * if a VRB already exists and the next hop is still reachable, 473 the fragment is to be forwarded along the associated Label 474 Switched Path (LSP) as described in Section 6.1.2, without 475 checking the value of the Sequence field; 476 * else, if the Sequence is 0, then the fragment is to be routed 477 as described in Section 6.1.1, but no state is conserved 478 afterwards. In that case, the session if it exists is aborted 479 and the packet is also forwarded in an attempt to clean up the 480 next hops along the path indicated by the IPv6 header (possibly 481 including a routing header). 482 * else (the Sequence is nonzero and either no VRB exists or the 483 next hop is unavailable), the fragment cannot be forwarded or 484 routed; the fragment is discarded and an abort RFRAG-ACK is 485 sent back to the source as described in Section 6.1.2. 487 There is no requirement on the reassembling endpoint to check that 488 the received fragments are consecutive and non-overlapping. The 489 fragmenting endpoint knows that the datagram is fully received when 490 the acknowledged fragments cover the whole datagram, which is always 491 the case with a FULL bitmap. This may be useful in particular in the 492 case where the MTU changes and a fragment Sequence is retried with a 493 smaller Fragment_Size, the remainder of the original fragment being 494 retried with new Sequence values. 496 Recoverable Fragments are sequenced and a bitmap is used in the RFRAG 497 Acknowledgment to indicate the received fragments by setting the 498 individual bits that correspond to their sequence. 500 5.2. RFRAG Acknowledgment Dispatch type and Header 502 This specification also defines a 4-byte RFRAG Acknowledgment bitmap 503 that is used by the reassembling endpoint to confirm selectively the 504 reception of individual fragments. A given offset in the bitmap maps 505 one-to-one with a given sequence number and indicates which fragment 506 is acknowledged as follows: 508 1 2 3 509 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 510 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 511 | RFRAG Acknowledgment Bitmap | 512 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 513 ^ ^ 514 | | bitmap indicating whether: 515 | +----- Fragment with Sequence 9 was received 516 +----------------------- Fragment with Sequence 0 was received 518 Figure 2: RFRAG Acknowledgment Bitmap Encoding 520 Figure 3 shows an example Acknowledgment bitmap which indicates that 521 all fragments from Sequence 0 to 20 were received, except for 522 fragments 1, 2 and 16 were lost and must be retried. 524 1 2 3 525 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 526 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 527 |1|0|0|1|1|1|1|1|1|1|1|1|1|1|1|1|0|1|1|1|1|0|0|0|0|0|0|0|0|0|0|0| 528 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 530 Figure 3: Example RFRAG Acknowledgment Bitmap 532 The RFRAG Acknowledgment Bitmap is included in an RFRAG 533 Acknowledgment header, as follows: 535 1 2 3 536 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 537 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 538 |1 1 1 0 1 0 1|E| Datagram_Tag | 539 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 540 | RFRAG Acknowledgment Bitmap (32 bits) | 541 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 543 Figure 4: RFRAG Acknowledgment Dispatch type and Header 545 E: 1 bit; Explicit Congestion Notification Echo 547 When set, the fragmenting endpoint indicates that at least one of 548 the acknowledged fragments was received with an Explicit 549 Congestion Notification, indicating that the path followed by the 550 fragments is subject to congestion. More in Appendix C. 552 Datagram_Tag: 8 bits; an identifier of the datagram that is locally 553 unique to the Link-Layer recipient. 555 RFRAG Acknowledgment Bitmap: An RFRAG Acknowledgment Bitmap, whereby 556 setting the bit at offset x indicates that fragment x was 557 received, as shown in Figure 2. A NULL bitmap indicates that the 558 fragmentation process is aborted. A FULL bitmap indicates that 559 the fragmentation process is complete; all fragments were received 560 at the reassembly endpoint. 562 6. Fragment Recovery 564 The Recoverable Fragment header RFRAG is used to transport a fragment 565 and optionally request an RFRAG Acknowledgment that will confirm the 566 good reception of one or more fragments. An RFRAG Acknowledgment is 567 carried as a standalone fragment header (i.e., with no 6LoWPAN 568 payload) in a message that is propagated back to the fragmenting 569 endpoint. To achieve this, each hop that performed an MPLS-like 570 operation on fragments reverses that operation for the RFRAG_ACK by 571 sending a frame from the next hop to the previous hop as known by its 572 Link-Layer address in the VRB. The Datagram_Tag in the RFRAG_ACK is 573 unique to the reassembling endpoint and is enough information for an 574 intermediate hop to locate the VRB that contains the Datagram_Tag 575 used by the previous hop and the Layer-2 information associated with 576 it (interface and Link-Layer address). 578 The fragmenting endpoint that fragments the packets at the 6LoWPAN 579 level also controls the number of acknowledgments by setting the Ack- 580 Request flag in the RFRAG packets. The fragmenting endpoint may set 581 the Ack-Request flag on any fragment to perform congestion control by 582 limiting the number of outstanding fragments, which are the fragments 583 that have been sent but for which reception or loss was not 584 positively confirmed by the reassembling endpoint. The maximum 585 number of outstanding fragments is controlled by the Window-Size. It 586 is configurable and may vary in case of ECN notification. When the 587 endpoint that reassembles the packets at the 6LoWPAN level receives a 588 fragment with the Ack-Request flag set, it MUST send an RFRAG 589 Acknowledgment back to the originator to confirm reception of all the 590 fragments it has received so far. 592 The Ack-Request ('X') set in an RFRAG marks the end of a window. 593 This flag MUST be set on the last fragment if the fragmenting 594 endpoint wishes to perform an automatic repeat request (ARQ) process 595 for the datagram, and it MAY be set in any intermediate fragment for 596 the purpose of flow control. 598 This ARQ process MUST be protected by a Retransmission Time Out (RTO) 599 timer, and the fragment that carries the 'X' flag MAY be retried upon 600 a time out for a configurable number of times (see Section 7.1) with 601 an exponential backoff. Upon exhaustion of the retries the 602 fragmenting endpoint may either abort the transmission of the 603 datagram or resend the first fragment with an 'X' flag set in order 604 to establish a new path for the datagram and obtain the list of 605 fragments that were received over the old path in the acknowledgment 606 bitmap. When the knows that an underlying link-layer mechanism 607 protects the fragments, it may refrain from using the RFRAG 608 Acknowledgment mechanism, and never set the Ack-Request bit. 610 The reassembling endpoint MAY issue unsolicited acknowledgments. An 611 unsolicited acknowledgment signals to the fragmenting endpoint that 612 it can resume sending in case it has reached its maximum number of 613 outstanding fragments. Another use is to inform the fragmenting 614 endpoint that the reassembling endpoint aborted the processing of an 615 individual datagram. 617 The RFRAG Acknowledgment carries an ECN indication for flow control 618 (see Appendix C). The reassembling endpoint of a fragment with the 619 'E' (ECN) flag set MUST echo that information at most once by setting 620 the 'E' (ECN) flag in the next RFRAG Acknowledgment. 622 In order to protect the datagram, the fragmenting endpoint transfers 623 a controlled number of fragments and flags the last fragment of a 624 window with an RFRAG Acknowledgment Request. The reassembling 625 endpoint MUST acknowledge a fragment with the acknowledgment request 626 bit set. If any fragment immediately preceding an acknowledgment 627 request is still missing, the reassembling endpoint MAY intentionally 628 delay its acknowledgment to allow in-transit fragments to arrive. 630 Because it might defeat the round-trip delay computation, delaying 631 the acknowledgment should be configurable and not enabled by default. 633 When enough fragments are received to cover the whole datagram, the 634 reassembling endpoint reconstructs the packet, passes it to the upper 635 layer, sends an RFRAG Acknowledgment on the reverse path with a FULL 636 bitmap, and arms a short timer, e.g., on the order of an average 637 round-trip delay in the network. The FULL bitmap is used as opposed 638 to a bitmap that acknowledges only the received fragments to let the 639 intermediate nodes know that the datagram is fully received. As the 640 timer runs, the reassembling endpoint absorbs the fragments that were 641 still in flight for that datagram without creating a new state, 642 acknowledging the ones that that bear an Ack-Request with an FRAG 643 Acknowledgment and the FULL bitmap. The reassembling endpoint aborts 644 the communication if fragments with matching source and Datagram-Tag 645 continue to be received after the timer expires. 647 Note that acknowledgments might consume precious resources so the use 648 of unsolicited acknowledgments should be configurable and not enabled 649 by default. 651 An observation is that streamlining forwarding of fragments generally 652 reduces the latency over the LLN mesh, providing room for retries 653 within existing upper-layer reliability mechanisms. The fragmenting 654 endpoint protects the transmission over the LLN mesh with a retry 655 timer that is configured for a use case and may be adapted 656 dynamically, e.g., according to the method detailed in [RFC6298]. It 657 is expected that the upper layer retries obey the recommendations in 658 [RFC8085], in which case a single round of fragment recovery should 659 fit within the upper layer recovery timers. 661 Fragments are sent in a round-robin fashion: the fragmenting endpoint 662 sends all the fragments of the datagram for a first time before it 663 retries any lost fragment; lost fragments are retried in sequence, 664 oldest first through the whole datagram. This mechanism enables the 665 reassembling endpoint to acknowledge fragments that were delayed in 666 the network before they are retried. 668 When a single radio frequency is used by contiguous hops, the 669 fragmenting endpoint should insert a delay between the frames (e.g., 670 carrying fragments) that are sent to the same next hop. The delay 671 should cover multiple transmissions so as to let a frame progress a 672 few hops and avoid hidden terminal issues. This precaution is not 673 required on channel hopping technologies such as Time Slotted Channel 674 Hopping (TSCH) [RFC6554], where nodes that communicate at Layer-2 are 675 scheduled to send and receive respectively, and different hops 676 operate on different channels. 678 6.1. Forwarding Fragments 680 It is assumed that the first fragment is large enough to carry the 681 IPv6 header and make routing decisions. If that is not so, then this 682 specification MUST NOT be used. 684 This specification extends the Virtual Reassembly Buffer (VRB) 685 technique to forward fragments with no intermediate reconstruction of 686 the entire packet. It inherits operations like Datagram_Tag 687 switching and using a timer to clean the VRB once the traffic ceases. 688 The first fragment carries the IP header and creates a path from the 689 fragmenting endpoint to the reassembling endpoint that all the other 690 fragments follow. Upon receiving the first fragment, the routers 691 along the path install a label-switched path (LSP), and the following 692 fragments are label-switched along that path. As a consequence, the 693 next fragments can only follow the path that was set up by the first 694 fragment and cannot follow an alternate route. The Datagram_Tag is 695 used to carry the label, which is swapped in each hop. 697 6.1.1. Receiving the first fragment 699 In Route-Over mode, the source and destination Link-Layer addresses 700 in a frame change at each hop. The label that is formed and placed 701 in the Datagram_Tag by the sender is associated with the source Link- 702 Layer address and only valid (and temporarily unique) for that source 703 Link-Layer address. 705 Upon receiving the first fragment (i.e., with a Sequence of 0), an 706 intermediate router creates a VRB and the associated LSP state 707 indexed by the incoming interface, the previous-hop Link-Layer 708 address, and the Datagram_Tag, and forwards the fragment along the 709 IPv6 route that matches the destination IPv6 address in the IPv6 710 header until it reaches the reassembling endpoint, as prescribed by 711 [FRAG-FWD]. The LSP state enables to match the next incoming 712 fragments of a datagram to the abstract forwarding information of 713 next interface, source and next-hop Link-Layer addresses, and swapped 714 Datagram_Tag. 716 In addition, the router also forms a reverse LSP state indexed by the 717 interface to the next hop, the Link-Layer address the router uses as 718 source for that datagram, and the swapped Datagram_Tag. This reverse 719 LSP state enables matching the tuple (interface, destination Link- 720 Layer address, Datagram_Tag) found in an RFRAG Acknowledgment to the 721 abstract forwarding information (previous interface, previous Link- 722 Layer address, Datagram_Tag) used to forward the Fragment 723 Acknowledgment (RFRAG-ACK) back to the fragmenting endpoint. 725 6.1.2. Receiving the next fragments 727 Upon receiving the next fragment (i.e., with a non-zero Sequence), an 728 intermediate router looks up a LSP indexed by the tuple (incoming 729 interface, previous-hop Link-Layer address, Datagram_Tag) found in 730 the fragment. If it is found, the router forwards the fragment using 731 the associated VRB as prescribed by [FRAG-FWD]. 733 If the VRB for the tuple is not found, the router builds an RFRAG-ACK 734 to abort the transmission of the packet. The resulting message has 735 the following information: 737 * The source and destination Link-Layer addresses are swapped from 738 those found in the fragment and the same interface is used 739 * The Datagram_Tag is set to the Datagram_Tag found in the fragment 740 * A NULL bitmap is used to signal the abort condition 742 At this point the router is all set and can send the RFRAG-ACK back 743 to the previous router. The RFRAG-ACK should normally be forwarded 744 all the way to the source using the reverse LSP state in the VRBs in 745 the intermediate routers as described in the next section. 747 [FRAG-FWD] indicates that the reassembling endpoint stores "the 748 actual packet data from the fragments received so far, in a form that 749 makes it possible to detect when the whole packet has been received 750 and can be processed or forwarded". How this is computed is 751 implementation specific but relies on receiving all the bytes up to 752 the Datagram_Size indicated in the first fragment. An implementation 753 may receive overlapping fragments as the result of retries after an 754 MTU change. 756 6.2. Receiving RFRAG Acknowledgments 758 Upon receipt of an RFRAG-ACK, the router looks up a reverse LSP 759 indexed by the interface and destination Link-Layer address of the 760 received frame and the received Datagram_Tag in the RFRAG-ACK. If it 761 is found, the router forwards the fragment using the associated VRB 762 as prescribed by [FRAG-FWD], but using the reverse LSP so that the 763 RFRAG-ACK flows back to the fragmenting endpoint. 765 If the reverse LSP is not found, the router MUST silently drop the 766 RFRAG-ACK message. 768 Either way, if the RFRAG-ACK indicates that the fragment was entirely 769 received (FULL bitmap), it arms a short timer, and upon timeout, the 770 VRB and all the associated state are destroyed. Until the timer 771 elapses, fragments of that datagram may still be received, e.g. if 772 the RFRAG-ACK was lost on the path back and the source retried the 773 last fragment. In that case, the router forwards the fragment 774 according to the state in the VRB. 776 This specification does not provide a method to discover the number 777 of hops or the minimal value of MTU along those hops. In a typical 778 case, the MTU is constant and the same across the network. But 779 should the minimal MTU along the path decrease, it is possible to 780 retry a long fragment (say Sequence of 5) with several shorter 781 fragments with a Sequence that was not used before (e.g., 13 and 14). 782 Fragment 5 is marked as abandoned and will not be retried anymore. 783 Note that when this mechanism is in place, it is hard to predict the 784 total number of fragments that will be needed or the final shape of 785 the bitmap that would cover the whole packet. This is why the FULL 786 bitmap is used when the reassembling endpoint gets the whole datagram 787 regardless of which fragments were actually used to do so. 788 Intermediate nodes will unabiguously know that the process is 789 complete. Note that Path MTU Discovery is out of scope for this 790 document. 792 6.3. Aborting the Transmission of a Fragmented Packet 794 A reset is signaled on the forward path with a pseudo fragment that 795 has the Fragment_Offset set to 0. The sender of a reset SHOULD also 796 set the Sequence and Fragment_Size field to 0. 798 When the fragmenting endpoint or a router on the path decides that a 799 packet should be dropped and the fragmentation process aborted, it 800 generates a reset pseudo fragment and forwards it down the fragment 801 path. 803 Each router next along the path the way forwards the pseudo fragment 804 based on the VRB state. If an acknowledgment is not requested, the 805 VRB and all associated state are destroyed. 807 Upon reception of the pseudo fragment, the reassembling endpoint 808 cleans up all resources for the packet associated with the 809 Datagram_Tag. If an acknowledgment is requested, the reassembling 810 endpoint responds with a NULL bitmap. 812 The other way around, the reassembling endpoint might need to abort 813 the processing of a fragmented packet for internal reasons, for 814 instance if it is out of reassembly buffers, already uses all 256 815 possible values of the Datagram_Tag, or if it keeps receiving 816 fragments beyond a reasonable time while it considers that this 817 packet is already fully reassembled and was passed to the upper 818 layer. In that case, the reassembling endpoint SHOULD indicate so to 819 the fragmenting endpoint with a NULL bitmap in an RFRAG 820 Acknowledgment. The RFRAG Acknowledgment is forwarded all the way 821 back to the source of the packet and cleans up all resources on the 822 path. Upon an acknowledgment with a NULL bitmap, the fragmenting 823 endpoint MUST abort the transmission of the fragmented datagram with 824 one exception: In the particular case of the first fragment, it MAY 825 decide to retry via an alternate next hop instead. 827 6.4. Applying Recoverable Fragmentation along a Diverse Path 829 The text above can be read with the assumption of a serial path 830 between a source and a destination. Section 4.5.3 of the "6TiSCH 831 Architecture" [I-D.ietf-6tisch-architecture] defines the concept of a 832 Track that can be a complex path between a source and a destination 833 with Packet ARQ, Replication, Elimination and Overhearing (PAREO) 834 along the Track. This specification can be used along any subset of 835 the complex Track where the first fragment is flooded. The last 836 RFRAG Acknowledgment is flooded on that same subset in the reverse 837 direction. Intermediate RFRAG Acknowledgments can be flooded on any 838 sub-subset of that reverse subset that reach back to the source. 840 7. Management Considerations 842 This specification extends "On Forwarding 6LoWPAN Fragments over a 843 Multihop IPv6 Network" [FRAG-FWD] and requires the same parameters in 844 the reassembling endpoint and on intermediate nodes. There is no new 845 parameter as echoing ECN is always on. These parameters typically 846 include the reassembly time-out at the reassembling endpoint and an 847 inactivity clean-up timer on the intermediate nodes, and the number 848 of messages that can be processed in parallel in all nodes. 850 The configuration settings introduced by this specification only 851 apply to the fragmenting endpoint, which is in full control of the 852 transmission. LLNs vary a lot in size (there can be thousands of 853 nodes in a mesh), in speed (from 10 Kbps to several Mbps at the PHY 854 layer), in traffic density, and in optimizations that are desired 855 (e.g., the selection of a RPL [RFC6550] Objective Function [RFC6552] 856 impacts the shape of the routing graph). 858 For that reason, only a very generic guidance can be given on the 859 settings of the fragmenting endpoint and on whether complex 860 algorithms are needed to perform flow control or estimate the round- 861 trip time. To cover the most complex use cases, this specification 862 enables the fragmenting endpoint to vary the fragment size, the 863 window size, and the inter-frame gap, based on the number of losses, 864 the observed variations of the round-trip time and the setting of the 865 ECN bit. 867 7.1. Protocol Parameters 869 The management system SHOULD be capable of providing the parameters 870 listed in this section and an implementation MUST abide by those 871 parameters and in particular never exceed the minimum and maximum 872 configured boundaries. 874 An implementation must control the rate at which it sends packets 875 over the same path to allow the next hop to forward a packet before 876 it gets the next. In a wireless network that uses the same frequency 877 along a path, more time must be inserted to avoid hidden terminal 878 issues between fragments (more in Section 4.2). 880 This is controlled by the following parameter: 882 inter-frame gap: Indicates the minimum amount of time between 883 transmissions. The inter-frame gap protects the propagation of 884 one transmission before the next one is triggered and creates a 885 duty cycle that controls the ratio of air time and memory in 886 intermediate nodes that a particular datagram will use. 888 An implementation should consider the generic recommendations from 889 the IETF in the matter of flow control and rate management in 890 [RFC5033]. To control the flow, an implementation may use a dynamic 891 value of the window size (Window_Size), adapt the fragment size 892 (Fragment_Size), and insert an inter-frame gap that is longer than 893 necessary. In a large network where nodes contend for the bandwidth, 894 a larger Fragment_Size consumes less bandwidth but also reduces 895 fluidity and incurs higher chances of loss in transmission. This is 896 controlled by the following parameters: 898 MinFragmentSize: The MinFragmentSize is the minimum value for the 899 Fragment_Size. 901 OptFragmentSize: The OptFragmentSize is the value for the 902 Fragment_Size that the fragmenting endpoint should use to start 903 with. It is greater than or equal to MinFragmentSize. It is less 904 than or equal to MaxFragmentSize. For the first fragment, it must 905 account for the expansion of the IPv6 addresses and of the Hop 906 Limit field within MTU. For all fragments, it is a balance 907 between the expected fluidity and the overhead of Link-Layer and 908 6LoWPAN headers. For a small MTU, the idea is to keep it close to 909 the maximum, whereas for larger MTUs, it might makes sense to keep 910 it short enough, so that the duty cycle of the transmitter is 911 bounded, e.g., to transmit at least 10 frames per second. 913 MaxFragmentSize: The MaxFragmentSize is the maximum value for the 914 Fragment_Size. It MUST be lower than the minimum MTU along the 915 path. A large value augments the chances of buffer bloat and 916 transmission loss. The value MUST be less than 512 if the unit 917 that is defined for the PHY layer is the byte. 919 MinWindowSize: The minimum value of Window_Size that the fragmenting 920 endpoint can use. A value of 1 is RECOMMENDED. 922 OptWindowSize: The OptWindowSize is the value for the Window_Size 923 that the fragmenting endpoint should use to start with. It is 924 greater than or equal to MinWindowSize. It is less than or equal 925 to MaxWindowSize. A rule of a thumb for OptWindowSize could be an 926 estimation of the one-way trip time divided by the inter-frame 927 gap. If the acknowledgement back is too costly, it is possible to 928 set this to 32, meaning that only the last Fragment is 929 acknowledged in the first round. 931 MaxWindowSize: The maximum value of Window_Size that the fragmenting 932 endpoint can use. The value MUST be strictly less than 33. 934 An implementation may perform its estimate of the RTO or use a 935 configured one. The ARQ process is controlled by the following 936 parameters: 938 MinARQTimeOut: The minimum amount of time a node should wait for an 939 RFRAG Acknowledgment before it takes the next action. It MUST be 940 more than the maximum expected round-trip time in the respective 941 network. 943 OptARQTimeOut: The initial value of the RTO, which is the amount of 944 time that a fragmenting endpoint should wait for an RFRAG 945 Acknowledgment before it takes the next action. It is greater 946 than or equal to MinARQTimeOut. It is less than or equal to 947 MaxARQTimeOut. See Appendix C for recommendations on computing 948 the round-trip time. By default a value of 3 times the maximum 949 expected round-trip time in the respective network is RECOMMENDED. 951 MaxARQTimeOut: The maximum amount of time a node should wait for the 952 RFRAG Acknowledgment before it takes the next action. It must 953 cover the longest expected round-trip time, and be several times 954 less than the time-out that covers the recomposition buffer at the 955 reassembling endpoint, which is typically on the order of the 956 minute. An upper bound can be estimated to ensure that the 957 datagram is either fully transmitted or dropped before an upper 958 layer decides to retry it. 960 MaxFragRetries: The maximum number of retries for a particular 961 fragment. A default value of 3 is RECOMMENDED. An upper bound 962 can be estimated to ensure that the datagram is either fully 963 transmitted or dropped before an upper layer decides to retry it. 965 MaxDatagramRetries: The maximum number of retries from scratch for a 966 particular datagram. A default value of 1 is RECOMMENDED. An 967 upper bound can be estimated to ensure that the datagram is either 968 fully transmitted or dropped before an upper layer decides to 969 retry it. 971 An implementation may be capable of performing flow control based on 972 ECN; see in Appendix C. This is controlled by the following 973 parameter: 975 UseECN: Indicates whether the fragmenting endpoint should react to 976 ECN. The fragmenting endpoint may react to ECN by varying the 977 Window_Size between MinWindowSize and MaxWindowSize, varying the 978 Fragment_Size between MinFragmentSize and MaxFragmentSize, and/or 979 by increasing or reducing the inter-frame gap. With this 980 specification, if UseECN is set and a fragmenting endpoint detects 981 a congestion, it resets the Window_Size to 1 till the end of the 982 datagram, whereas if UseECN is reset, the endpoint does not react 983 to congestion. Future specifications may provide additional 984 parameters and capabilities. 986 7.2. Observing the network 988 The management system should monitor the number of retries and of ECN 989 settings that can be observed from the perspective of both the 990 fragmenting endpoint and the reassembling endpoint with regards to 991 the other endpoint. It may then tune the optimum size of 992 Fragment_Size and of Window_Size, OptFragmentSize, and OptWindowSize, 993 respectively, at the fragmenting endpoint towards a particular 994 reassembling endpoint, applicable to the next datagrams. The values 995 should be bounded by the expected number of hops and reduced beyond 996 that when the number of datagrams that can traverse an intermediate 997 point may exceed its capacity and cause a congestion loss. The 998 inter-frame gap is another tool that can be used to increase the 999 spacing between fragments of the same datagram and reduce the ratio 1000 of time when a particular intermediate node holds a fragment of that 1001 datagram. 1003 8. Security Considerations 1005 This document specifies an instantiation of a 6FF technique and 1006 inherits from the generic description in [FRAG-FWD]. The 1007 considerations in the Security Section of [FRAG-FWD] equally apply to 1008 this document. 1010 In addition to the threats detailed therein, an attacker that is on- 1011 path can prematurely end the transmission of a datagram by sending a 1012 RFRAG Acknowledgment to the fragmenting endpoint. It can also cause 1013 extra transmissions of fragments by resetting bits in the RFRAG 1014 Acknowledgment bitmap, and of RFRAG Acknowledgments by forcing the 1015 Ack-Request bit in fragments that it forwards. As indicated in 1016 [FRAG-FWD], Secure joining and the Link-Layer security are REQUIRED 1017 to protect against those attacks. 1019 This specification does not recommend a particular algorithm for the 1020 estimation of the duration of the RTO that covers the detection of 1021 the loss of a fragment with the 'X' flag set; regardless, an attacker 1022 on the path may slow down or discard packets, which in turn can 1023 affect the throughput of fragmented packets. 1025 Compared to "Transmission of IPv6 Packets over IEEE 802.15.4 1026 Networks" [RFC4944], this specification reduces the Datagram_Tag to 8 1027 bits and the tag wraps faster than with [RFC4944]. But for a 1028 constrained network where a node is expected to be able to hold only 1029 one or a few large packets in memory, 256 is still a large number. 1030 Also, the acknowledgement mechanism allows cleaning up the state 1031 rapidly once the packet is fully transmitted or aborted. 1033 The abstract Virtual Recovery Buffer inherited from [FRAG-FWD] may be 1034 used to perform a Denial-of-Service (DoS) attack against the 1035 intermediate Routers since the routers need to maintain a state per 1036 flow. The particular VRB implementation technique described in 1037 [LWIG-FRAG] allows realigning which data goes in which fragment, 1038 which causes the intermediate node to store a portion of the data, 1039 which adds an attack vector that is not present with this 1040 specification. With this specification, the data that is transported 1041 in each fragment is conserved and the state to keep does not include 1042 any data that would not fit in the previous fragment. 1044 9. IANA Considerations 1046 This document allocates 2 patterns for a total of 4 dispatch values 1047 in Page 0 for recoverable fragments from the "Dispatch Type Field" 1048 registry that was created by "Transmission of IPv6 Packets over IEEE 1049 802.15.4 Networks" [RFC4944] and reformatted by "6LoWPAN Paging 1050 Dispatch" [RFC8025]. 1052 The suggested patterns (to be confirmed by IANA) are indicated in 1053 Table 1. 1055 +-------------+------+----------------------------------+-----------+ 1056 | Bit Pattern | Page | Header Type | Reference | 1057 +=============+======+==================================+===========+ 1058 | 11 10100x | 0 | RFRAG - Recoverable Fragment | THIS RFC | 1059 +-------------+------+----------------------------------+-----------+ 1060 | 11 10100x | 1-14 | Unassigned | | 1061 +-------------+------+----------------------------------+-----------+ 1062 | 11 10100x | 15 | Reserved for Experimental Use | RFC 8025 | 1063 +-------------+------+----------------------------------+-----------+ 1064 | 11 10101x | 0 | RFRAG-ACK - RFRAG | THIS RFC | 1065 | | | Acknowledgment | | 1066 +-------------+------+----------------------------------+-----------+ 1067 | 11 10101x | 1-14 | Unassigned | | 1068 +-------------+------+----------------------------------+-----------+ 1069 | 11 10101x | 15 | Reserved for Experimental Use | RFC 8025 | 1070 +-------------+------+----------------------------------+-----------+ 1072 Table 1: Additional Dispatch Value Bit Patterns 1074 10. Acknowledgments 1076 The author wishes to thank Michel Veillette, Dario Tedeschi, Laurent 1077 Toutain, Carles Gomez Montenegro, Thomas Watteyne, and Michael 1078 Richardson for in-depth reviews and comments. Also many thanks to 1079 Roman Danyliw, Peter Yee, Colin Perkins, Tirumaleswar Reddy Konda, 1080 Eric Vyncke, Warren Kumari, Magnus Westerlund, Erik Nordmark, and 1081 especially Benjamin Kaduk and Mirja Kuhlewind for their careful 1082 reviews and for helping through the IETF Last Call and IESG review 1083 process, and to Jonathan Hui, Jay Werb, Christos Polyzois, Soumitri 1084 Kolavennu, Pat Kinney, Margaret Wasserman, Richard Kelsey, Carsten 1085 Bormann, and Harry Courtice for their various contributions in the 1086 long process that lead to this document. 1088 11. Normative References 1090 [RFC6298] Paxson, V., Allman, M., Chu, J., and M. Sargent, 1091 "Computing TCP's Retransmission Timer", RFC 6298, 1092 DOI 10.17487/RFC6298, June 2011, 1093 . 1095 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1096 Requirement Levels", BCP 14, RFC 2119, 1097 DOI 10.17487/RFC2119, March 1997, 1098 . 1100 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1101 "Transmission of IPv6 Packets over IEEE 802.15.4 1102 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1103 . 1105 [RFC4919] Kushalnagar, N., Montenegro, G., and C. Schumacher, "IPv6 1106 over Low-Power Wireless Personal Area Networks (6LoWPANs): 1107 Overview, Assumptions, Problem Statement, and Goals", 1108 RFC 4919, DOI 10.17487/RFC4919, August 2007, 1109 . 1111 [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 1112 Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, 1113 DOI 10.17487/RFC6282, September 2011, 1114 . 1116 [RFC6606] Kim, E., Kaspar, D., Gomez, C., and C. Bormann, "Problem 1117 Statement and Requirements for IPv6 over Low-Power 1118 Wireless Personal Area Network (6LoWPAN) Routing", 1119 RFC 6606, DOI 10.17487/RFC6606, May 2012, 1120 . 1122 [RFC8025] Thubert, P., Ed. and R. Cragie, "IPv6 over Low-Power 1123 Wireless Personal Area Network (6LoWPAN) Paging Dispatch", 1124 RFC 8025, DOI 10.17487/RFC8025, November 2016, 1125 . 1127 [RFC8138] Thubert, P., Ed., Bormann, C., Toutain, L., and R. Cragie, 1128 "IPv6 over Low-Power Wireless Personal Area Network 1129 (6LoWPAN) Routing Header", RFC 8138, DOI 10.17487/RFC8138, 1130 April 2017, . 1132 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1133 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1134 May 2017, . 1136 [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1137 (IPv6) Specification", STD 86, RFC 8200, 1138 DOI 10.17487/RFC8200, July 2017, 1139 . 1141 [FRAG-FWD] Watteyne, T., Thubert, P., and C. Bormann, "On Forwarding 1142 6LoWPAN Fragments over a Multihop IPv6 Network", Work in 1143 Progress, Internet-Draft, draft-ietf-6lo-minimal-fragment- 1144 13, 5 March 2020, . 1147 12. Informative References 1149 [RFC8201] McCann, J., Deering, S., Mogul, J., and R. Hinden, Ed., 1150 "Path MTU Discovery for IP version 6", STD 87, RFC 8201, 1151 DOI 10.17487/RFC8201, July 2017, 1152 . 1154 [RFC7567] Baker, F., Ed. and G. Fairhurst, Ed., "IETF 1155 Recommendations Regarding Active Queue Management", 1156 BCP 197, RFC 7567, DOI 10.17487/RFC7567, July 2015, 1157 . 1159 [RFC3031] Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol 1160 Label Switching Architecture", RFC 3031, 1161 DOI 10.17487/RFC3031, January 2001, 1162 . 1164 [RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion 1165 Control", RFC 5681, DOI 10.17487/RFC5681, September 2009, 1166 . 1168 [RFC2914] Floyd, S., "Congestion Control Principles", BCP 41, 1169 RFC 2914, DOI 10.17487/RFC2914, September 2000, 1170 . 1172 [RFC3168] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition 1173 of Explicit Congestion Notification (ECN) to IP", 1174 RFC 3168, DOI 10.17487/RFC3168, September 2001, 1175 . 1177 [RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly 1178 Errors at High Data Rates", RFC 4963, 1179 DOI 10.17487/RFC4963, July 2007, 1180 . 1182 [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., 1183 Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, 1184 JP., and R. Alexander, "RPL: IPv6 Routing Protocol for 1185 Low-Power and Lossy Networks", RFC 6550, 1186 DOI 10.17487/RFC6550, March 2012, 1187 . 1189 [RFC6552] Thubert, P., Ed., "Objective Function Zero for the Routing 1190 Protocol for Low-Power and Lossy Networks (RPL)", 1191 RFC 6552, DOI 10.17487/RFC6552, March 2012, 1192 . 1194 [RFC6554] Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6 1195 Routing Header for Source Routes with the Routing Protocol 1196 for Low-Power and Lossy Networks (RPL)", RFC 6554, 1197 DOI 10.17487/RFC6554, March 2012, 1198 . 1200 [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using 1201 IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the 1202 Internet of Things (IoT): Problem Statement", RFC 7554, 1203 DOI 10.17487/RFC7554, May 2015, 1204 . 1206 [RFC8085] Eggert, L., Fairhurst, G., and G. Shepherd, "UDP Usage 1207 Guidelines", BCP 145, RFC 8085, DOI 10.17487/RFC8085, 1208 March 2017, . 1210 [RFC8087] Fairhurst, G. and M. Welzl, "The Benefits of Using 1211 Explicit Congestion Notification (ECN)", RFC 8087, 1212 DOI 10.17487/RFC8087, March 2017, 1213 . 1215 [RFC5033] Floyd, S. and M. Allman, "Specifying New Congestion 1216 Control Algorithms", BCP 133, RFC 5033, 1217 DOI 10.17487/RFC5033, August 2007, 1218 . 1220 [LWIG-FRAG] 1221 Bormann, C. and T. Watteyne, "Virtual reassembly buffers 1222 in 6LoWPAN", Work in Progress, Internet-Draft, draft-ietf- 1223 lwig-6lowpan-virtual-reassembly-01, 11 March 2019, 1224 . 1227 [FRAG-ILE] Bonica, R., Baker, F., Huston, G., Hinden, R., Troan, O., 1228 and F. Gont, "IP Fragmentation Considered Fragile", Work 1229 in Progress, Internet-Draft, draft-ietf-intarea-frag- 1230 fragile-17, 30 September 2019, 1231 . 1234 [I-D.ietf-6tisch-architecture] 1235 Thubert, P., "An Architecture for IPv6 over the TSCH mode 1236 of IEEE 802.15.4", Work in Progress, Internet-Draft, 1237 draft-ietf-6tisch-architecture-28, 29 October 2019, 1238 . 1241 [IEEE.802.15.4] 1242 IEEE, "IEEE Standard for Low-Rate Wireless Networks", 1243 IEEE Standard 802.15.4, DOI 10.1109/IEEE 1244 P802.15.4-REVd/D01, 1245 . 1247 [Kent] Kent, C. and J. Mogul, ""Fragmentation Considered 1248 Harmful", In Proc. SIGCOMM '87 Workshop on Frontiers in 1249 Computer Communications Technology", 1250 DOI 10.1145/55483.55524, August 1987, 1251 . 1254 Appendix A. Rationale 1256 There are a number of uses for large packets in Wireless Sensor 1257 Networks. Such usages may not be the most typical or represent the 1258 largest amount of traffic over the LLN; however, the associated 1259 functionality can be critical enough to justify extra care for 1260 ensuring effective transport of large packets across the LLN. 1262 The list of those usages includes: 1264 Towards the LLN node: Firmware update: For example, a new version 1265 of the LLN node software is downloaded from a system manager 1266 over unicast or multicast services. Such a reflashing 1267 operation typically involves updating a large number of similar 1268 LLN nodes over a relatively short period of time. 1270 Packages of Commands: A number of commands or 1271 a full configuration can be packaged as a single message to 1272 ensure consistency and enable atomic execution or complete roll 1273 back. Until such commands are fully received and interpreted, 1274 the intended operation will not take effect. 1276 From the LLN node: Waveform captures: A number of consecutive 1277 samples are measured at a high rate for a short time and then 1278 transferred from a sensor to a gateway or an edge server as a 1279 single large report. 1281 Data logs: LLN nodes may generate large logs of 1282 sampled data for later extraction. LLN nodes may also generate 1283 system logs to assist in diagnosing problems on the node or 1284 network. 1286 Large data packets: Rich data types might 1287 require more than one fragment. 1289 Uncontrolled firmware download or waveform upload can easily result 1290 in a massive increase of the traffic and saturate the network. 1292 When a fragment is lost in transmission, the lack of recovery in the 1293 original fragmentation system of RFC 4944 implies that all fragments 1294 would need to be resent, further contributing to the congestion that 1295 caused the initial loss, and potentially leading to congestion 1296 collapse. 1298 This saturation may lead to excessive radio interference, or random 1299 early discard (leaky bucket) in relaying nodes. Additional queuing 1300 and memory congestion may result while waiting for a low power next 1301 hop to emerge from its sleeping state. 1303 Considering that RFC 4944 defines an MTU is 1280 bytes and that in 1304 most incarnations (except 802.15.4g) a IEEE Std. 802.15.4 frame can 1305 limit the Link-Layer payload to as few as 74 bytes, a packet might be 1306 fragmented into at least 18 fragments at the 6LoWPAN shim layer. 1307 Taking into account the worst-case header overhead for 6LoWPAN 1308 Fragmentation and Mesh Addressing headers will increase the number of 1309 required fragments to around 32. This level of fragmentation is much 1310 higher than that traditionally experienced over the Internet with 1311 IPv4 fragments. At the same time, the use of radios increases the 1312 probability of transmission loss and Mesh-Under techniques compound 1313 that risk over multiple hops. 1315 Mechanisms such as TCP or application-layer segmentation could be 1316 used to support end-to-end reliable transport. One option to support 1317 bulk data transfer over a frame-size-constrained LLN is to set the 1318 Maximum Segment Size to fit within the link maximum frame size. 1319 Doing so, however, can add significant header overhead to each 1320 802.15.4 frame and cause extraneous acknowledgements across the LLN 1321 compared to the method in this specification. 1323 Appendix B. Requirements 1325 For one-hop communications, a number of Low Power and Lossy Network 1326 (LLN) link-layers propose a local acknowledgment mechanism that is 1327 enough to detect and recover the loss of fragments. In a multihop 1328 environment, an end-to-end fragment recovery mechanism might be a 1329 good complement to a hop-by-hop MAC recovery. This draft introduces 1330 a simple protocol to recover individual fragments between 6FF 1331 endpoints that may be multiple hops away. 1333 The method addresses the following requirements of an LLN: 1335 Number of fragments: The recovery mechanism must support highly 1336 fragmented packets, with a maximum of 32 fragments per packet. 1338 Minimum acknowledgment overhead: Because the radio is half duplex, 1339 and because of silent time spent in the various medium access 1340 mechanisms, an acknowledgment consumes roughly as many resources 1341 as a data fragment. 1343 The new end-to-end fragment recovery mechanism should be able to 1344 acknowledge multiple fragments in a single message and not require 1345 an acknowledgment at all if fragments are already protected at a 1346 lower layer. 1348 Controlled latency: The recovery mechanism must succeed or give up 1349 within the time boundary imposed by the recovery process of the 1350 Upper Layer Protocols. 1352 Optional congestion control: The aggregation of multiple concurrent 1353 flows may lead to the saturation of the radio network and 1354 congestion collapse. 1356 The recovery mechanism should provide means for controlling the 1357 number of fragments in transit over the LLN. 1359 Appendix C. Considerations on Flow Control 1361 Considering that a multi-hop LLN can be a very sensitive environment 1362 due to the limited queuing capabilities of a large population of its 1363 nodes, this draft recommends a simple and conservative approach to 1364 Congestion Control, based on TCP congestion avoidance. 1366 Congestion on the forward path is assumed in case of packet loss, and 1367 packet loss is assumed upon time out. The draft allows controlling 1368 the number of outstanding fragments that have been transmitted but 1369 for which an acknowledgment was not received yet and are still 1370 covered by the ARQ timer. 1372 Congestion on the forward path can also be indicated by an Explicit 1373 Congestion Notification (ECN) mechanism. Though whether and how ECN 1374 [RFC3168] is carried out over the LoWPAN is out of scope, this draft 1375 provides a way for the destination endpoint to echo an ECN indication 1376 back to the fragmenting endpoint in an acknowledgment message as 1377 represented in Figure 4 in Section 5.2. While the support of echoing 1378 the ECN at the reassembling endpoint in mandatory, this specification 1379 does not provide the flow control mechanism that react to the 1380 congestion at the fragmenting endpoint. A minimalistic behaviour 1381 could be to reset the window to 1 so the fragments are sent and 1382 acknowledged one by one till the end of the datagram. 1384 It must be noted that congestion and collision are different topics. 1385 In particular, when a mesh operates on the same channel over multiple 1386 hops, then the forwarding of a fragment over a certain hop may 1387 collide with the forwarding of the next fragment that is following 1388 over a previous hop but in the same interference domain. This draft 1389 enables end-to-end flow control, but leaves it to the fragmenting 1390 endpoint stack to pace individual fragments within a transmit window, 1391 so that a given fragment is sent only when the previous fragment has 1392 had a chance to progress beyond the interference domain of this hop. 1393 In the case of 6TiSCH [I-D.ietf-6tisch-architecture], which operates 1394 over the TimeSlotted Channel Hopping [RFC7554] (TSCH) mode of 1395 operation of IEEE802.14.5, a fragment is forwarded over a different 1396 channel at a different time and it makes full sense to transmit the 1397 next fragment as soon as the previous fragment has had its chance to 1398 be forwarded at the next hop. 1400 From the standpoint of a source 6LoWPAN endpoint, an outstanding 1401 fragment is a fragment that was sent but for which no explicit 1402 acknowledgment was received yet. This means that the fragment might 1403 be on the path, received but not yet acknowledged, or the 1404 acknowledgment might be on the path back. It is also possible that 1405 either the fragment or the acknowledgment was lost on the way. 1407 From the fragmenting endpoint standpoint, all outstanding fragments 1408 might still be in the network and contribute to its congestion. 1409 There is an assumption, though, that after a certain amount of time, 1410 a frame is either received or lost, so it is not causing congestion 1411 anymore. This amount of time can be estimated based on the round- 1412 trip time between the 6LoWPAN endpoints. For the lack of a more 1413 adapted technique, the method detailed in "Computing TCP's 1414 Retransmission Timer" [RFC6298] may be used for that computation. 1416 The reader is encouraged to read through "Congestion Control 1417 Principles" [RFC2914]. Additionally [RFC7567] and [RFC5681] provide 1418 deeper information on why this mechanism is needed and how TCP 1419 handles Congestion Control. Basically, the goal here is to manage 1420 the number of fragments present in the network; this is achieved by 1421 to reducing the number of outstanding fragments over a congested path 1422 by throttling the sources. 1424 Section 6 describes how the fragmenting endpoint decides how many 1425 fragments are (re)sent before an acknowledgment is required, and how 1426 the fragmenting endpoint adapts that number to the network 1427 conditions. 1429 Author's Address 1431 Pascal Thubert (editor) 1432 Cisco Systems, Inc 1433 Building D 1434 45 Allee des Ormes - BP1200 1435 06254 MOUGINS - Sophia Antipolis 1436 France 1438 Phone: +33 497 23 26 34 1439 Email: pthubert@cisco.com