idnits 2.17.1 draft-ietf-lpwan-ipv6-static-context-hc-06.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 : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 632: '...ot fit a single L2 data unit, it SHALL...' RFC 2119 keyword, line 665: '...liability option MUST be used for all ...' RFC 2119 keyword, line 675: '...on, the receiver MUST NOT issue acknow...' RFC 2119 keyword, line 799: '... except the last one SHALL contain the...' RFC 2119 keyword, line 813: '... SHALL...' (21 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (September 12, 2017) is 2418 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '1' on line 1493 -- Looks like a reference, but probably isn't: '2' on line 1496 -- Looks like a reference, but probably isn't: '8' on line 1518 -- Looks like a reference, but probably isn't: '4' on line 1525 ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) == Outdated reference: A later version (-10) exists of draft-ietf-lpwan-overview-06 Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 lpwan Working Group A. Minaburo 3 Internet-Draft Acklio 4 Intended status: Informational L. Toutain 5 Expires: March 16, 2018 IMT-Atlantique 6 C. Gomez 7 Universitat Politecnica de Catalunya 8 September 12, 2017 10 LPWAN Static Context Header Compression (SCHC) and fragmentation for 11 IPv6 and UDP 12 draft-ietf-lpwan-ipv6-static-context-hc-06 14 Abstract 16 This document describes a header compression scheme and fragmentation 17 functionality for very low bandwidth networks. These techniques are 18 especially tailored for LPWAN (Low Power Wide Area Network) networks. 20 The Static Context Header Compression (SCHC) offers a great level of 21 flexibility when processing the header fields and must be used for 22 these kind of networks. A common context stored in a LPWAN device 23 and in the network is used. This context keeps information that will 24 not be transmitted in the constrained network. Static context means 25 that information stored in the context, which describes field values, 26 does not change during packet transmission. This avoids complex 27 resynchronization mechanisms, which are incompatible with LPWAN 28 characteristics. In most cases, IPv6/UDP headers are reduced to a 29 small identifier called Rule ID. But sometimes, a packet will not be 30 compressed enough by SCHC to fit in one L2 PDU, and the SCHC 31 fragmentation protocol will be used. 33 This document describes the SCHC compression/decompression framework 34 and applies it to IPv6/UDP headers. Similar solutions for other 35 protocols such as CoAP will be described in separate documents. 36 Moreover, this document specifies a fragmentation and reassembly 37 mechanism that is used in two situations: for SCHC-compressed packets 38 that still exceed the L2 PDU size; and for the case where the SCHC 39 compression cannot be performed. 41 Status of This Memo 43 This Internet-Draft is submitted in full conformance with the 44 provisions of BCP 78 and BCP 79. 46 Internet-Drafts are working documents of the Internet Engineering 47 Task Force (IETF). Note that other groups may also distribute 48 working documents as Internet-Drafts. The list of current Internet- 49 Drafts is at https://datatracker.ietf.org/drafts/current/. 51 Internet-Drafts are draft documents valid for a maximum of six months 52 and may be updated, replaced, or obsoleted by other documents at any 53 time. It is inappropriate to use Internet-Drafts as reference 54 material or to cite them other than as "work in progress." 56 This Internet-Draft will expire on March 16, 2018. 58 Copyright Notice 60 Copyright (c) 2017 IETF Trust and the persons identified as the 61 document authors. All rights reserved. 63 This document is subject to BCP 78 and the IETF Trust's Legal 64 Provisions Relating to IETF Documents 65 (https://trustee.ietf.org/license-info) in effect on the date of 66 publication of this document. Please review these documents 67 carefully, as they describe your rights and restrictions with respect 68 to this document. Code Components extracted from this document must 69 include Simplified BSD License text as described in Section 4.e of 70 the Trust Legal Provisions and are provided without warranty as 71 described in the Simplified BSD License. 73 Table of Contents 75 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 76 2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4 77 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 78 4. Static Context Header Compression . . . . . . . . . . . . . . 6 79 4.1. SCHC Rules . . . . . . . . . . . . . . . . . . . . . . . 7 80 4.2. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . 9 81 4.3. Packet processing . . . . . . . . . . . . . . . . . . . . 9 82 4.4. Matching operators . . . . . . . . . . . . . . . . . . . 10 83 4.5. Compression Decompression Actions (CDA) . . . . . . . . . 11 84 4.5.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . 12 85 4.5.2. value-sent CDA . . . . . . . . . . . . . . . . . . . 12 86 4.5.3. mapping-sent . . . . . . . . . . . . . . . . . . . . 12 87 4.5.4. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . 13 88 4.5.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . 13 89 4.5.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . 13 90 5. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 14 91 5.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 14 92 5.2. Reliability options: definition . . . . . . . . . . . . . 14 93 5.3. Reliability options: discussion . . . . . . . . . . . . . 15 94 5.4. Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 16 95 5.5. Formats . . . . . . . . . . . . . . . . . . . . . . . . . 17 96 5.5.1. Fragment format . . . . . . . . . . . . . . . . . . . 17 97 5.5.2. Fragmentation header formats . . . . . . . . . . . . 17 98 5.5.3. ACK format . . . . . . . . . . . . . . . . . . . . . 19 99 5.6. Baseline mechanism . . . . . . . . . . . . . . . . . . . 21 100 5.7. Supporting multiple window sizes . . . . . . . . . . . . 24 101 5.8. Aborting fragmented IPv6 datagram transmissions . . . . . 24 102 5.9. Downlink fragment transmission . . . . . . . . . . . . . 24 103 6. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 25 104 6.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 25 105 6.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 25 106 6.3. Flow label field . . . . . . . . . . . . . . . . . . . . 25 107 6.4. Payload Length field . . . . . . . . . . . . . . . . . . 26 108 6.5. Next Header field . . . . . . . . . . . . . . . . . . . . 26 109 6.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 26 110 6.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 27 111 6.7.1. IPv6 source and destination prefixes . . . . . . . . 27 112 6.7.2. IPv6 source and destination IID . . . . . . . . . . . 27 113 6.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 28 114 6.9. UDP source and destination port . . . . . . . . . . . . . 28 115 6.10. UDP length field . . . . . . . . . . . . . . . . . . . . 28 116 6.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 29 117 7. Security considerations . . . . . . . . . . . . . . . . . . . 29 118 7.1. Security considerations for header compression . . . . . 29 119 7.2. Security considerations for fragmentation . . . . . . . . 29 120 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 30 121 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 122 9.1. Normative References . . . . . . . . . . . . . . . . . . 30 123 9.2. Informative References . . . . . . . . . . . . . . . . . 31 124 Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 31 125 Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 33 126 Appendix C. Allocation of Rule IDs for fragmentation . . . . . . 37 127 Appendix D. Note . . . . . . . . . . . . . . . . . . . . . . . . 38 128 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 38 130 1. Introduction 132 Header compression is mandatory to efficiently bring Internet 133 connectivity to the node within a LPWAN network. Some LPWAN networks 134 properties can be exploited to get an efficient header compression: 136 o Topology is star-oriented, therefore all the packets follow the 137 same path. For the needs of this draft, the architecture can be 138 summarized to Devices (Dev) exchanging information with LPWAN 139 Application Server (App) through a Network Gateway (NGW). 141 o Traffic flows are mostly known in advance, since devices embed 142 built-in applications. Contrary to computers or smartphones, new 143 applications cannot be easily installed. 145 The Static Context Header Compression (SCHC) is defined for this 146 environment. SCHC uses a context where header information is kept in 147 the header format order. This context is static (the values on the 148 header fields do not change over time) avoiding complex 149 resynchronization mechanisms, incompatible with LPWAN 150 characteristics. In most of the cases, IPv6/UDP headers are reduced 151 to a small context identifier. 153 The SCHC header compression mechanism is independent from the 154 specific LPWAN technology over which it will be used. 156 LPWAN technologies are also characterized, among others, by a very 157 reduced data unit and/or payload size [I-D.ietf-lpwan-overview]. 158 However, some of these technologies do not support layer two 159 fragmentation, therefore the only option for them to support the IPv6 160 MTU requirement of 1280 bytes [RFC2460] is the use of a fragmentation 161 protocol at the adaptation layer below IPv6. This draft defines also 162 a fragmentation functionality to support the IPv6 MTU requirements 163 over LPWAN technologies. Such functionality has been designed under 164 the assumption that data unit reordering will not happen between the 165 entity performing fragmentation and the entity performing reassembly. 167 2. LPWAN Architecture 169 LPWAN technologies have similar architectures but different 170 terminology. We can identify different types of entities in a 171 typical LPWAN network, see Figure 1: 173 o Devices (Dev) are the end-devices or hosts (e.g. sensors, 174 actuators, etc.). There can be a high density of devices per radio 175 gateway. 177 o The Radio Gateway (RG), which is the end point of the constrained 178 link. 180 o The Network Gateway (NGW) is the interconnection node between the 181 Radio Gateway and the Internet. 183 o LPWAN-AAA Server, which controls the user authentication and the 184 applications. We use the term LPWAN-AAA server because we are not 185 assuming that this entity speaks RADIUS or Diameter as many/most AAA 186 servers do, but equally we don't want to rule that out, as the 187 functionality will be similar. 189 o Application Server (App) 190 +------+ 191 () () () | |LPWAN-| 192 () () () () / \ +---------+ | AAA | 193 () () () () () () / \=====| ^ |===|Server| +-----------+ 194 () () () | | <--|--> | +------+ |APPLICATION| 195 () () () () / \==========| v |=============| (App) | 196 () () () / \ +---------+ +-----------+ 197 Dev Radio Gateways NGW 199 Figure 1: LPWAN Architecture 201 3. Terminology 203 This section defines the terminology and acronyms used in this 204 document. 206 o App: LPWAN Application. An application sending/receiving IPv6 207 packets to/from the Device. 209 o APP-IID: Application Interface Identifier. Second part of the 210 IPv6 address to identify the application interface 212 o Bi: Bidirectional, it can be used in both senses 214 o CDA: Compression/Decompression Action. An action that is perfomed 215 for both functionnalities to compress a header field or to recover 216 its original value in the decompression phase. 218 o Context: A set of rules used to compress/decompress headers 220 o Dev: Device. Node connected to the LPWAN. A Dev may implement 221 SCHC. 223 o Dev-IID: Device Interface Identifier. Second part of the IPv6 224 address to identify the device interface 226 o DI: Direction Indicator is a differentiator for matching in order 227 to be able to have different values for both sides. 229 o DTag: Datagram Tag is a fragmentation header field that is set to 230 the same value for all fragments carrying the same IPv6 datagram. 232 o Dw: Down Link direction for compression, from SCHC C/D to Dev 234 o FCN: Fragment Compressed Number is a fragmentation header field 235 that carries an efficient representation of a larger-sized 236 fragment number. 238 o FID: Field Indentifier is an index to describe the header fields 239 in the Rule 241 o FP: Field Position is a list of possible correct values that a 242 field may use 244 o IID: Interface Identifier. See the IPv6 addressing architecture 245 [RFC7136] 247 o MIC: Message Integrity Check. A fragmentation header field 248 computed over an IPv6 packet before fragmentation, used for error 249 detection after IPv6 packet reassembly. 251 o MO: Matching Operator. An operator used to match a value 252 contained in a header field with a value contained in a Rule. 254 o Rule: A set of header field values. 256 o Rule ID: An identifier for a rule, SCHC C/D and Dev share the same 257 Rule ID for a specific flow. 259 o SCHC C/D: Static Context Header Compression Compressor/ 260 Decompressor. A process in the network to achieve compression/ 261 decompressing headers. SCHC C/D uses SCHC rules to perform 262 compression and decompression. 264 o TV: Target value. A value contained in the Rule that will be 265 matched with the value of a header field. 267 o Up: Up Link direction for compression, from Dev to SCHC C/D. 269 o W: Window bit. A fragmentation header field used in Window mode 270 (see section 9), which carries the same value for all fragments of 271 a window. 273 4. Static Context Header Compression 275 Static Context Header Compression (SCHC) avoids context 276 synchronization, which is the most bandwidth-consuming operation in 277 other header compression mechanisms such as RoHC [RFC5795]. Based on 278 the fact that the nature of data flows is highly predictable in LPWAN 279 networks, some static contexts may be stored on the Device (Dev). 280 The contexts must be stored in both ends, and it can either be 281 learned by a provisioning protocol or by out of band means or it can 282 be pre-provisioned, etc. The way the context is learned on both 283 sides is out of the scope of this document. 285 Dev App 286 +--------------+ +--------------+ 287 |APP1 APP2 APP3| |APP1 APP2 APP3| 288 | | | | 289 | UDP | | UDP | 290 | IPv6 | | IPv6 | 291 | | | | 292 | SCHC C/D | | | 293 | (context) | | | 294 +-------+------+ +-------+------+ 295 | +--+ +----+ +---------+ . 296 +~~ |RG| === |NGW | === |SCHC C/D |... Internet .. 297 +--+ +----+ |(context)| 298 +---------+ 300 Figure 2: Architecture 302 Figure 2 represents the architecture for compression/decompression, 303 it is based on [I-D.ietf-lpwan-overview] terminology. The Device is 304 sending applications flows using IPv6 or IPv6/UDP protocols. These 305 flows are compressed by an Static Context Header Compression 306 Compressor/Decompressor (SCHC C/D) to reduce headers size. Resulting 307 information is sent on a layer two (L2) frame to a LPWAN Radio 308 Network (RG) which forwards the frame to a Network Gateway (NGW). 309 The NGW sends the data to a SCHC C/D for decompression which shares 310 the same rules with the Dev. The SCHC C/D can be located on the 311 Network Gateway (NGW) or in another place as long as a tunnel is 312 established between the NGW and the SCHC C/D. The SCHC C/D in both 313 sides must share the same set of Rules. After decompression, the 314 packet can be sent on the Internet to one or several LPWAN 315 Application Servers (App). 317 The SCHC C/D process is bidirectional, so the same principles can be 318 applied in the other direction. 320 4.1. SCHC Rules 322 The main idea of the SCHC compression scheme is to send the Rule id 323 to the other end instead of sending known field values. This Rule id 324 identifies a rule that match as much as possible the original packet 325 values. When a value is known by both ends, it is not necessary sent 326 through the LPWAN network. 328 The context contains a list of rules (cf. Figure 3). Each Rule 329 contains itself a list of fields descriptions composed of a field 330 identifier (FID), a field position (FP), a direction indicator (DI), 331 a target value (TV), a matching operator (MO) and a Compression/ 332 Decompression Action (CDA). 334 /--------------------------------------------------------------\ 335 | Rule N | 336 /--------------------------------------------------------------\| 337 | Rule i || 338 /--------------------------------------------------------------\|| 339 | (FID) Rule 1 ||| 340 |+-------+--+--+------------+-----------------+---------------+||| 341 ||Field 1|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 342 |+-------+--+--+------------+-----------------+---------------+||| 343 ||Field 2|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 344 |+-------+--+--+------------+-----------------+---------------+||| 345 ||... |..|..| ... | ... | ... |||| 346 |+-------+--+--+------------+-----------------+---------------+||/ 347 ||Field N|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| 348 |+-------+--+--+------------+-----------------+---------------+|/ 349 | | 350 \--------------------------------------------------------------/ 352 Figure 3: Compression/Decompression Context 354 The Rule does not describe the original packet format which must be 355 known from the compressor/decompressor. The rule just describes the 356 compression/decompression behavior for the header fields. In the 357 rule, the description of the header field must be performed in the 358 format packet order. 360 The Rule also describes the compressed header fields which are 361 transmitted regarding their position in the rule which is used for 362 data serialization on the compressor side and data deserialization on 363 the decompressor side. 365 The Context describes the header fields and its values with the 366 following entries: 368 o A Field ID (FID) is a unique value to define the header field. 370 o A Field Position (FP) indicating if several instances of the field 371 exist in the headers which one is targeted. The default position 372 is 1 374 o A direction indicator (DI) indicating the packet direction. Three 375 values are possible: 377 * UP LINK (Up) when the field or the value is only present in 378 packets sent by the Dev to the App, 380 * DOWN LINK (Dw) when the field or the value is only present in 381 packet sent from the App to the Dev and 383 * BIDIRECTIONAL (Bi) when the field or the value is present 384 either upstream or downstream. 386 o A Target Value (TV) is the value used to make the comparison with 387 the packet header field. The Target Value can be of any type 388 (integer, strings,...). For instance, it can be a single value or 389 a more complex structure (array, list,...), such as a JSON or a 390 CBOR structure. 392 o A Matching Operator (MO) is the operator used to make the 393 comparison between the Field Value and the Target Value. The 394 Matching Operator may require some parameters. MO is only used 395 during the compression phase. 397 o A Compression Decompression Action (CDA) is used to describe the 398 compression and the decompression process. The CDA may require 399 some parameters, CDA are used in both compression and 400 decompression phases. 402 4.2. Rule ID 404 Rule IDs are sent between both compression/decompression elements. 405 The size of the Rule ID is not specified in this document, it is 406 implementation-specific and can vary regarding the LPWAN technology, 407 the number of flows, among others. 409 Some values in the Rule ID space may be reserved for goals other than 410 header compression as fragmentation. (See Section 5). 412 Rule IDs are specific to a Dev. Two Devs may use the same Rule ID for 413 different header compression. To identify the correct Rule ID, the 414 SCHC C/D needs to combine the Rule ID with the Dev L2 identifier to 415 find the appropriate Rule. 417 4.3. Packet processing 419 The compression/decompression process follows several steps: 421 o compression Rule selection: The goal is to identify which Rule(s) 422 will be used to compress the packet's headers. When doing 423 compression from Dw to Up the SCHC C/D needs to find the correct 424 Rule to use by identifying its Dev-ID and the Rule-ID. In the Up 425 situation only the Rule-ID is used. The next step is to choose 426 the fields by their direction, using the direction indicator (DI), 427 so the fields that do not correspond to the appropriated DI will 428 be excluded. Next, then the fields are identified according to 429 their field identifier (FID) and field position (FP). If the 430 field position does not correspond then the Rule is not use and 431 the SCHC take next Rule. Once the DI and the FP correspond to the 432 header information, each field's value is then compared to the 433 corresponding target value (TV) stored in the Rule for that 434 specific field using the matching operator (MO). If all the 435 fields in the packet's header satisfy all the matching operators 436 (MOs) of a Rule (i.e. all results are True), the fields of the 437 header are then processed according to the Compression/ 438 Decompression Actions (CDAs) and a compressed header is obtained. 439 Otherwise the next rule is tested. If no eligible rule is found, 440 then the header must be sent without compression, in which case 441 the fragmentation process must be required. 443 o sending: The Rule ID is sent to the other end followed by 444 information resulting from the compression of header fields, 445 directly followed by the payload. The product of field 446 compression is sent in the order expressed in the Rule for the 447 matching fields. The way the Rule ID is sent depends on the 448 specific LPWAN layer two technology and will be specified in a 449 specific document, and is out of the scope of this document. For 450 example, it can be either included in a Layer 2 header or sent in 451 the first byte of the L2 payload. (cf. Figure 4). 453 o decompression: In both directions, The receiver identifies the 454 sender through its device-id (e.g. MAC address) and selects the 455 appropriate Rule through the Rule ID. This Rule gives the 456 compressed header format and associates these values to the header 457 fields. It applies the CDA action to reconstruct the original 458 header fields. The CDA application order can be different of the 459 order given by the Rule. For instance Compute-* may be applied at 460 end, after the other CDAs. 462 If after using SCHC compression and adding the payload to the L2 463 frame the datagram is not multiple of 8 bits, padding may be used. 465 +--- ... --+-------------- ... --------------+-----------+--...--+ 466 | Rule ID |Compressed Hdr Fields information| payload |padding| 467 +--- ... --+-------------- ... --------------+-----------+--...--+ 469 Figure 4: LPWAN Compressed Format Packet 471 4.4. Matching operators 473 Matching Operators (MOs) are functions used by both SCHC C/D 474 endpoints involved in the header compression/decompression. They are 475 not typed and can be applied indifferently to integer, string or any 476 other data type. The result of the operation can either be True or 477 False. MOs are defined as follows: 479 o equal: A field value in a packet matches with a TV in a Rule if 480 they are equal. 482 o ignore: No check is done between a field value in a packet and a 483 TV in the Rule. The result of the matching is always true. 485 o MSB(length): A matching is obtained if the most significant bits 486 of the length field value bits of the header are equal to the TV 487 in the rule. The MSB Matching Operator needs a parameter, 488 indicating the number of bits, to proceed to the matching. 490 o match-mapping: The goal of mapping-sent is to reduce the size of a 491 field by allocating a shorter value. The Target Value contains a 492 list of values. Each value is identified by a short ID (or 493 index). This operator matches if a field value is equal to one of 494 those target values. 496 4.5. Compression Decompression Actions (CDA) 498 The Compression Decompression Action (CDA) describes the actions 499 taken during the compression of headers fields, and inversely, the 500 action taken by the decompressor to restore the original value. 502 /--------------------+-------------+----------------------------\ 503 | Action | Compression | Decompression | 504 | | | | 505 +--------------------+-------------+----------------------------+ 506 |not-sent |elided |use value stored in ctxt | 507 |value-sent |send |build from received value | 508 |mapping-sent |send index |value from index on a table | 509 |LSB(length) |send LSB |TV OR received value | 510 |compute-length |elided |compute length | 511 |compute-checksum |elided |compute UDP checksum | 512 |Deviid |elided |build IID from L2 Dev addr | 513 |Appiid |elided |build IID from L2 App addr | 514 \--------------------+-------------+----------------------------/ 516 Figure 5: Compression and Decompression Functions 518 Figure 5 sumarizes the basics functions defined to compress and 519 decompress a field. The first column gives the action's name. The 520 second and third columns outlines the compression/decompression 521 behavior. 523 Compression is done in the rule order and compressed values are sent 524 in that order in the compressed message. The receiver must be able 525 to find the size of each compressed field which can be given by the 526 rule or may be sent with the compressed header. 528 If the field is identified as variable, then its size must be sent 529 first using the following coding: 531 o If the size is between 0 and 14 bytes it is sent using 4 bits. 533 o For values between 15 and 255, the first 4 bit sent are set to 1 534 and the size is sent using 8 bits. 536 o For higher value, the first 12 bits are set to 1 and the size is 537 sent on 2 bytes. 539 4.5.1. not-sent CDA 541 Not-sent function is generally used when the field value is specified 542 in the rule and therefore known by the both Compressor and 543 Decompressor. This action is generally used with the "equal" MO. If 544 MO is "ignore", there is a risk to have a decompressed field value 545 different from the compressed field. 547 The compressor does not send any value on the compressed header for 548 the field on which compression is applied. 550 The decompressor restores the field value with the target value 551 stored in the matched rule. 553 4.5.2. value-sent CDA 555 The value-sent action is generally used when the field value is not 556 known by both Compressor and Decompressor. The value is sent in the 557 compressed message header. Both Compressor and Decompressor must 558 know the size of the field, either implicitly (the size is known by 559 both sides) or explicitly in the compressed header field by 560 indicating the length. This function is generally used with the 561 "ignore" MO. 563 4.5.3. mapping-sent 565 mapping-sent is used to send a smaller index associated to the list 566 of values in the Target Value. This function is used together with 567 the "match-mapping" MO. 569 The compressor looks in the TV to find the field value and send the 570 corresponding index. The decompressor uses this index to restore the 571 field value. 573 The number of bits sent is the minimal size to code all the possible 574 indexes. 576 4.5.4. LSB CDA 578 LSB action is used to avoid sending the known part of the packet 579 field header to the other end. This action is used together with the 580 "MSB" MO. A length can be specified in the rule to indicate how many 581 bits have to be sent. If not length is specified, the number of bits 582 sent are the field length minus the bits length specified in the MSB 583 MO. 585 The compressor sends the "length" Least Significant Bits. The 586 decompressor combines the value received with the Target Value. 588 If this action is made on a variable length field, the remaining size 589 in byte has to be sent before. 591 4.5.5. DEViid, APPiid CDA 593 These functions are used to process respectively the Dev and the App 594 Interface Identifiers (Deviid and Appiid) of the IPv6 addresses. 595 Appiid CDA is less common, since current LPWAN technologies frames 596 contain a single address. 598 The IID value may be computed from the Device ID present in the Layer 599 2 header. The computation is specific for each LPWAN technology and 600 may depend on the Device ID size. 602 In the downstream direction, these CDA may be used to determine the 603 L2 addresses used by the LPWAN. 605 4.5.6. Compute-* 607 These classes of functions are used by the decompressor to compute 608 the compressed field value based on received information. Compressed 609 fields are elided during compression and reconstructed during 610 decompression. 612 o compute-length: compute the length assigned to this field. For 613 instance, regarding the field ID, this CDA may be used to compute 614 IPv6 length or UDP length. 616 o compute-checksum: compute a checksum from the information already 617 received by the SCHC C/D. This field may be used to compute UDP 618 checksum. 620 5. Fragmentation 622 5.1. Overview 624 Fragmentation supported in LPWAN is mandatory when the underlying 625 LPWAN technology is not capable of fulfilling the IPv6 MTU 626 requirement. Fragmentation is used after SCHC header compression 627 when the size of the resulting compressed packet is larger than the 628 L2 data unit maximum payload. In LPWAN technologies, the L2 data 629 unit size typically varies from tens to hundreds of bytes. If the 630 entire datagram fits within a single L2 data unit, the fragmentation 631 mechanism is not used and the packet is sent unfragmented. 632 Otherwise, the datagram does not fit a single L2 data unit, it SHALL 633 be broken into fragments. 635 Moreover, LPWAN technologies impose some strict limitations on 636 traffic; therefore it is desirable to enable optional fragment 637 retransmission, while a single fragment loss should not lead to 638 retransmitting the full datagram. On the other hand, in order to 639 preserve energy, Devices are sleeping most of the time and may 640 receive data during a short period of time after transmission. In 641 order to adapt to the capabilities of various LPWAN technologies, 642 this specification allows a gradation of fragment delivery 643 reliability. This document does not make any decision with regard to 644 which fragment delivery reliability option was used over a specific 645 LPWAN technology. 647 An important consideration is that LPWAN networks typically follow 648 the star topology, and therefore data unit reordering is not expected 649 in such networks. This specification assumes that reordering will 650 not happen between the entity performing fragmentation and the entity 651 performing reassembly. This assumption allows to reduce complexity 652 and overhead of the fragmentation mechanism. 654 5.2. Reliability options: definition 656 This specification defines the following three fragment delivery 657 reliability options: 659 o No ACK 661 o Window mode - ACK "always" 663 o Window mode - ACK on error 665 The same reliability option MUST be used for all fragments of a 666 packet. It is up to implementers and/or representatives of the 667 underlying LPWAN technology to decide which reliability option to use 668 and whether the same reliability option applies to all IPv6 packets 669 or not. Note that the reliability option to be used is not 670 necessarily tied to the particular characteristics of the underlying 671 L2 LPWAN technology (e.g. the No ACK reliability option may be used 672 on top of an L2 LPWAN technology with symmetric characteristics for 673 uplink and downlink). 675 In the No ACK option, the receiver MUST NOT issue acknowledgments 676 (ACK). 678 In Window mode - ACK "always", an ACK is transmitted by the fragment 679 receiver after a window of fragments have been sent. A window of 680 fragments is a subset of the full set of fragments needed to carry an 681 IPv6 packet. In this mode, the ACK informs the sender about received 682 and/or missed fragments from the window of fragments. Upon receipt 683 of an ACK that informs about any lost fragments, the sender 684 retransmits the lost fragments. When an ACK is not received by the 685 fragment sender, the latter retransmits a fragment, which serves as 686 an ACK request. The maximum number of ACK requests is 687 MAX_ACK_REQUESTS. The default value of MAX_ACK_REQUESTS is not 688 stated in this document, and it is expected to be defined in other 689 documents (e.g. technology- specific profiles). 691 In Window mode - ACK on error, an ACK is transmitted by the fragment 692 receiver after a window of fragments have been sent, only if at least 693 one of the fragments in the window has been lost. In this mode, the 694 ACK informs the sender about received and/or missed fragments from 695 the window of fragments. Upon receipt of an ACK that informs about 696 any lost fragments, the sender retransmits the lost fragments. The 697 maximum number of ACKs to be sent by the receiver for a specific 698 window, denoted MAX_ACKS_PER_WINDOW, is not stated in this document, 699 and it is expected to be defined in other documents (e.g. technology- 700 specific profiles). 702 This document does not make any decision as to which fragment 703 delivery reliability option(s) are supported by a specific LPWAN 704 technology. 706 Examples of the different reliability options described are provided 707 in Appendix A. 709 5.3. Reliability options: discussion 711 This section discusses the properties of each fragment delivery 712 reliability option defined in the previous section. 714 No ACK is the most simple fragment delivery reliability option. With 715 this option, the receiver does not generate overhead in the form of 716 ACKs. However, this option does not enhance delivery reliability 717 beyond that offered by the underlying LPWAN technology. 719 The Window mode - ACK on error option is based on the optimistic 720 expectation that the underlying links will offer relatively low L2 721 data unit loss probability. This option reduces the number of ACKs 722 transmitted by the fragment receiver compared to the Window mode - 723 ACK "always" option. This may be specially beneficial in asymmetric 724 scenarios, e.g. where fragmented data are sent uplink and the 725 underlying LPWAN technology downlink capacity or message rate is 726 lower than the uplink one. However, if an ACK is lost, the sender 727 assumes that all fragments covered by the ACK have been successfully 728 delivered. In contrast, the Window mode - ACK "always" option does 729 not suffer that issue, at the expense of an ACK overhead increase. 731 The Window mode - ACK "always" option provides flow control. In 732 addition, it is able to handle long bursts of lost fragments, since 733 detection of such events can be done before end of the IPv6 packet 734 transmission, as long as the window size is short enough. However, 735 such benefit comes at the expense of higher ACK overhead. 737 5.4. Tools 739 This subsection describes the different tools that are used to enable 740 the described fragmentation functionality and the different 741 reliability options supported. Each tool has a corresponding header 742 field format that is defined in the next subsection. The list of 743 tools follows: 745 o Rule ID. The Rule ID is used in fragments and in ACKs. The Rule 746 ID in a fragment is set to a value that indicates that the data unit 747 being carried is a fragment. This also allows to interleave non- 748 fragmented IPv6 datagrams with fragments that carry a larger IPv6 749 datagram. Rule ID may also be used to signal which reliability 750 option is in use for the IPv6 packet being carried. Rule ID may also 751 be used to signal the window size if multiple sizes are supported 752 (see 9.7). In an ACK, the Rule ID signals that the message this Rule 753 ID is prepended to is an ACK. 755 o Fragment Compressed Number (FCN). The FCN is included in all 756 fragments. This field can be understood as a truncated, efficient 757 representation of a larger-sized fragment number, and does not carry 758 an absolute fragment number. A special FCN value denotes the last 759 fragment that carries a fragmented IPv6 packet. In Window mode, the 760 FCN is augmented with the W bit, which has the purpose of avoiding 761 possible ambiguity for the receiver that might arise under certain 762 conditions. 764 o Datagram Tag (DTag). The DTag field, if present, is set to the 765 same value for all fragments carrying the same IPv6 datagram, allows 766 to interleave fragments that correspond to different IPv6 datagrams. 768 o Message Integrity Check (MIC). It is computed by the sender over 769 the complete IPv6 packet before fragmentation by using the TBD 770 algorithm. The MIC allows the receiver to check for errors in the 771 reassembled IPv6 packet, while it also enables compressing the UDP 772 checksum by use of SCHC. 774 o Bitmap. The bitmap is a sequence of bits included in the ACK for a 775 given window, that provides feedback on whether each fragment of the 776 current window has been received or not. 778 5.5. Formats 780 This section defines the fragment format, the fragmentation header 781 formats, and the ACK format. 783 5.5.1. Fragment format 785 A fragment comprises a fragmentation header and a fragment payload, 786 and conforms to the format shown in Figure 6. The fragment payload 787 carries a subset of either an IPv6 packet after header compression or 788 an IPv6 packet which could not be compressed. A fragment is the 789 payload in the L2 protocol data unit (PDU). 791 +---------------+-----------------------+ 792 | Fragm. Header | Fragment payload | 793 +---------------+-----------------------+ 795 Figure 6: Fragment format. 797 5.5.2. Fragmentation header formats 799 In the No ACK option, fragments except the last one SHALL contain the 800 fragmentation header as defined in Figure 7. The total size of this 801 fragmentation header is R bits. 803 <------------ R ----------> 804 <--T--> <--N--> 805 +-- ... --+- ... -+- ... -+ 806 | Rule ID | DTag | FCN | 807 +-- ... --+- ... -+- ... -+ 809 Figure 7: Fragmentation Header for Fragments except the Last One, No 810 ACK option 812 In any of the Window mode options, fragments except the last one 813 SHALL 814 contain the fragmentation header as defined in Figure 8. The total 815 size of this fragmentation header is R bits. 817 <------------ R ----------> 818 <--T--> 1 <--N--> 819 +-- ... --+- ... -+-+- ... -+ 820 | Rule ID | DTag |W| FCN | 821 +-- ... --+- ... -+-+- ... -+ 823 Figure 8: Fragmentation Header for Fragments except the Last One, 824 Window mode 826 In the No ACK option, the last fragment of an IPv6 datagram SHALL 827 contain a fragmentation header that conforms to the format shown in 828 Figure 9. The total size of this fragmentation header is R+M bits. 830 <------------- R ------------> 831 <- T -> <- N -> <---- M -----> 832 +---- ... ---+- ... -+- ... -+---- ... ----+ 833 | Rule ID | DTag | 11..1 | MIC | 834 +---- ... ---+- ... -+- ... -+---- ... ----+ 836 Figure 9: Fragmentation Header for the Last Fragment, No ACK option 838 In any of the Window modes, the last fragment of an IPv6 datagram 839 SHALL contain a fragmentation header that conforms to the format 840 shown in Figure 10. The total size of this fragmentation header is 841 R+M bits. 843 <------------ R ------------> 844 <- T -> 1 <- N -> <---- M -----> 845 +-- ... --+- ... -+-+- ... -+---- ... ----+ 846 | Rule ID | DTag |W| 11..1 | MIC | 847 +-- ... --+- ... -+-+- ... -+---- ... ----+ 849 Figure 10: Fragmentation Header for the Last Fragment, Window mode 851 o Rule ID: This field has a size of R - T - N - 1 bits when Window 852 mode is used. In No ACK mode, the Rule ID field has a size of R - 853 T - N bits. 855 o DTag: The size of the DTag field is T bits, which may be set to a 856 value greater than or equal to 0 bits. The DTag field in all 857 fragments that carry the same IPv6 datagram MUST be set to the 858 same value. DTag MUST be set sequentially increasing from 0 to 859 2^T - 1, and MUST wrap back from 2^T - 1 to 0. 861 o FCN: This field is an unsigned integer, with a size of N bits, 862 that carries the FCN of the fragment. In the No ACK option, N=1. 863 For the rest of options, N equal to or greater than 3 is 864 recommended. The FCN MUST be set sequentially decreasing from the 865 highest FCN in the window (which will be used for the first 866 fragment), and MUST wrap from 0 back to the highest FCN in the 867 window. The highest FCN in the window, denoted MAX_WIND_FCN, MUST 868 be a value equal to or smaller than 2^N-2, see further details on 869 this at the end of 9.5.3. (Example 1: for N=5, MAX_WIND_FCN may 870 be configured to be 30, then subsequent FCNs are set sequentially 871 and in decreasing order, and FCN will wrap from 0 back to 30. 872 Example 2: for N=5, MAX_WIND_FCN may be set to 23, then subsequent 873 FCNs are set sequentially and in decreasing order, and the FCN 874 will wrap from 0 back to 23). The FCN for the last fragment has 875 all bits set to 1. Note that, by this definition, the FCN value 876 of 2^N - 1 is only used to identify a fragment as the last 877 fragment carrying a subset of the IPv6 packet being transported, 878 and thus the FCN does not correspond to the N least significant 879 bits of the actual absolute fragment number. It is also important 880 to note that, for N=1, the last fragment of the packet will carry 881 a FCN equal to 1, while all previous fragments will carry a FCN of 882 0. 884 o W: W is a 1-bit field. This field carries the same value for all 885 fragments of a window, and it is complemented for the next window. 886 The initial value for this field is 1. 888 o MIC: This field, which has a size of M bits, carries the MIC for 889 the IPv6 packet. 891 The values for R, N, MAX_WIND_FCN, T and M are not specified in this 892 document, and have to be determined in other documents (e.g. 893 technology-specific profile documents). 895 5.5.3. ACK format 897 The format of an ACK is shown in Figure 11: 899 <-------- R -------> 900 <- T -> 1 901 +---- ... --+-... -+-+----- ... ---+ 902 | Rule ID | DTag |W| bitmap | 903 +---- ... --+-... -+-+----- ... ---+ 905 Figure 11: Format of an ACK 907 Rule ID: In all ACKs, Rule ID has a size of R - T - 1 bits. 909 DTag: DTag has a size of T bits. DTag carries the same value as the 910 DTag field in the fragments carrying the IPv6 datagram for which this 911 ACK is intended. 913 W: This field has a size of 1 bit. In all ACKs, the W bit carries 914 the same value as the W bit carried by the fragments whose reception 915 is being positively or negatively acknowledged by the ACK. 917 bitmap: This field carries the bitmap sent by the receiver to inform 918 the sender about whether fragments in the current window have been 919 received or not. Size of the bitmap field of an ACK can be equal to 920 0 or Ceiling(Number_of_Fragments/8) octets, where Number_of_Fragments 921 denotes the number of fragments of a window. The bitmap is a 922 sequence of bits, where the n-th bit signals whether the n-th 923 fragment transmitted in the current window has been correctly 924 received (n-th bit set to 1) or not (n-th bit set to 0). Remaining 925 bits with bit order greater than the number of fragments sent (as 926 determined by the receiver) are set to 0, except for the last bit in 927 the bitmap, which is set to 1 if the last fragment of the window has 928 been correctly received, and 0 otherwise. Feedback on reception of 929 the fragment with FCN = 2^N - 1 (last fragment carrying an IPv6 930 packet) is only given by the last bit of the corresponding bitmap. 931 Absence of the bitmap in an ACK confirms correct reception of all 932 fragments to be acknowledged by means of the ACK. Note that absence 933 of the bitmap in an ACK may be determined based on the size of the L2 934 payload. 936 Figure 12 shows an example of an ACK (N=3), where the bitmap 937 indicates that the second and the fifth fragments have not been 938 correctly received. 940 <------- R -------> 941 <- T -> 0 1 2 3 4 5 6 7 942 +---- ... --+-... -+-+-+-+-+-+-+-+-+-+ 943 | Rule ID | DTag |W|1|0|1|1|0|1|1|1| 944 +---- ... --+-... -+-+-+-+-+-+-+-+-+-+ 946 Figure 12: Example of the bitmap in an ACK (in Window mode, for N=3) 948 Figure 13 illustrates an ACK without a bitmap. 950 <------- R -------> 951 <- T -> 952 +---- ... --+-... -+-+ 953 | Rule ID | DTag |W| 954 +---- ... --+-... -+-+ 956 Figure 13: Example of an ACK without a bitmap 958 Note that, in order to exploit the available L2 payload space to the 959 fullest, a bitmap may have a size smaller than 2^N bits. In that 960 case, the window in use will have a size lower than 2^N-1 fragments. 961 For example, if the maximum available space for a bitmap is 56 bits, 962 N can be set to 6, and the window size can be set to a maximum of 56 963 fragments, thus MAX_WIND_FCN will be equal to 55 in this example. 965 5.6. Baseline mechanism 967 The receiver of link fragments SHALL use (1) the sender's L2 source 968 address (if present), (2) the destination's L2 address (if present), 969 (3) Rule ID and (4) DTag (the latter, if present) to identify all the 970 fragments that belong to a given IPv6 datagram. The fragment 971 receiver may determine the fragment delivery reliability option in 972 use for the fragment based on the Rule ID field in that fragment. 974 Upon receipt of a link fragment, the receiver starts constructing the 975 original unfragmented packet. It uses the FCN and the order of 976 arrival of each fragment to determine the location of the individual 977 fragments within the original unfragmented packet. For example, it 978 may place the data payload of the fragments within a payload datagram 979 reassembly buffer at the location determined from the FCN and order 980 of arrival of the fragments, and the fragment payload sizes. In 981 Window mode, the fragment receiver also uses the W bit in the 982 received fragments. Note that the size of the original, unfragmented 983 IPv6 packet cannot be determined from fragmentation headers. 985 When Window mode - ACK on error is used, the fragment receiver starts 986 a timer (denoted "ACK on Error Timer") upon reception of the first 987 fragment for an IPv6 datagram. The initial value for this timer is 988 not provided by this specification, and is expected to be defined in 989 additional documents. This timer is reset and restarted every time 990 that a new fragment carrying data from the same IPv6 datagram is 991 received. In Window mode - ACK on error, after reception of the last 992 fragment of a window (i.e. the fragment with FCN=0 or FCN=2^N-1), if 993 fragment losses have been detected by the fragment receiver in the 994 current window, the fragment receiver MUST transmit an ACK reporting 995 its available information with regard to successfully received and 996 missing fragments from the current window. Upon expiration of the 997 "ACK on Error Timer", an ACK MUST be transmitted by the fragment 998 receiver to report received and not received fragments for the 999 current window. The "ACK on Error Timer" is then reset and 1000 restarted. When the last fragment of the IPv6 datagram is received, 1001 if all fragments of that last window of the packet have been 1002 received, the "ACK on Error Timer" is stopped. In Window mode - ACK 1003 on error, the fragment sender retransmits any lost fragments reported 1004 in an ACK. The maximum number of ACKs to be sent by the receiver for 1005 a specific window, denoted MAX_ACKS_PER_WINDOW, is not stated in this 1006 document, and it is expected to be defined in other documents (e.g. 1007 technology-specific profiles). In Window mode - ACK on error, when a 1008 fragment sender has transmitted the last fragment of a window, or it 1009 has retransmitted the last fragment within the set of lost fragments 1010 reported in an ACK, it is assumed that the time the fragment sender 1011 will wait to receive an ACK is smaller than the transmission time of 1012 MAX_WIND_FCN + 1 fragments (i.e. the time required to transmit a 1013 complete window of fragments). This aspect must be carefully 1014 considered if Window mode - ACK on error is used, in particular 1015 taking into account the latency characteristics of the underlying L2 1016 technology. 1018 Note that, in Window mode, the first fragment of the window is the 1019 one with FCN set to MAX_WIND_FCN. Also note that, in Window mode, 1020 the fragment with FCN=0 is considered the last fragment of its 1021 window, except for the last fragment of the whole packet (with all 1022 FCN bits set to 1, i.e. FCN=2^N-1), which is also the last fragment 1023 of the last window. 1025 If Window mode - ACK "always" is used, upon receipt of the last 1026 fragment of a window (i.e. the fragment with CFN=0 or CFN=2^N-1), or 1027 upon receipt of the last retransmitted fragment from the set of lost 1028 fragments reported by the last ACK sent by the fragment receiver (if 1029 any), the fragment receiver MUST send an ACK to the fragment sender. 1030 The ACK provides feedback on the fragments received and those not 1031 received that correspond to the last window. Once all fragments of a 1032 window have been received by the fragment receiver (including 1033 retransmitted fragments, if any), the latter sends an ACK without a 1034 bitmap to the sender, in order to report successful reception of all 1035 fragments of the window to the fragment sender. 1037 When Window mode - ACK "always" is used, the fragment sender starts a 1038 timer (denoted "ACK Always Timer") after the first transmission 1039 attempt of the last fragment of a window (i.e. the fragment with 1040 FCN=0 or FCN=2^N-1). In the same reliability option, if one or more 1041 fragments are reported by an ACK to be lost, the sender retransmits 1042 those fragments and starts the "ACK Always Timer" after the last 1043 retransmitted fragment (i.e. the fragment with the lowest FCN) among 1044 the set of lost fragments reported by the ACK. The initial value for 1045 the "ACK Always Timer" is not provided by this specification, and it 1046 is expected to be defined in additional documents. Upon expiration 1047 of the timer, if no ACK has been received since the timer start, the 1048 next action to be performed by the fragment sender depends on whether 1049 the current window is the last window of the IPv6 packet or not. If 1050 the current window is not the last one, the sender retransmits the 1051 last fragment sent at the moment of timer expiration (which may or 1052 may not be the fragment with FCN=0), and it reinitializes and 1053 restarts the timer. Otherwise (i.e. the current window is the last 1054 one), the sender retransmits the fragment with FCN=2^N-1; if the 1055 fragment sender knows that the fragment with FCN=2^N-1 has already 1056 been successfully received, the fragment sender MAY opt to send a 1057 fragment with FCN=2^N-1 and without a data payload. Note that 1058 retransmitting a fragment sent as described serves as an ACK request. 1059 The maximum number of requests for a specific ACK, denoted 1060 MAX_ACK_REQUESTS, is not stated in this document, and it is expected 1061 to be defined in other documents (e.g. technology-specific profiles). 1062 In Window mode - ACK "Always", the fragment sender retransmits any 1063 lost fragments reported in an ACK. When the fragment sender receives 1064 an ACK that confirms correct reception of all fragments of a window, 1065 if there are further fragments to be sent for the same IPv6 datagram, 1066 the fragment sender proceeds to transmitting subsequent fragments of 1067 the next window. 1069 If the recipient receives the last fragment of an IPv6 datagram (i.e. 1070 the fragment with FCN=2^N-1), it checks for the integrity of the 1071 reassembled IPv6 datagram, based on the MIC received. In No ACK, if 1072 the integrity check indicates that the reassembled IPv6 datagram does 1073 not match the original IPv6 datagram (prior to fragmentation), the 1074 reassembled IPv6 datagram MUST be discarded. In Window mode, a MIC 1075 check is also performed by the fragment receiver after reception of 1076 each subsequent fragment retransmitted after the first MIC check. In 1077 Window mode - ACK "always", if a MIC check indicates that the IPv6 1078 datagram has been successfully reassembled, the fragment receiver 1079 sends an ACK without a bitmap to the fragment sender. In the same 1080 reliability option, after receiving a fragment with FCN=2^N-1, the 1081 fragment receiver sends an ACK to the fragment sender, even if it is 1082 not the first fragment with FCN=2^N-1 received by the fragment 1083 receiver. 1085 If a fragment recipient disassociates from its L2 network, the 1086 recipient MUST discard all link fragments of all partially 1087 reassembled payload datagrams, and fragment senders MUST discard all 1088 not yet transmitted link fragments of all partially transmitted 1089 payload (e.g., IPv6) datagrams. Similarly, when either end of the 1090 LPWAN link first receives a fragment of a packet, it starts a 1091 reassembly timer. When this time expires, if the entire packet has 1092 not been reassembled, the existing fragments MUST be discarded and 1093 the reassembly state MUST be flushed. The value for this timer is 1094 not provided by this specification, and is expected to be defined in 1095 technology-specific profile documents. 1097 5.7. Supporting multiple window sizes 1099 For Window mode operation, implementers may opt to support a single 1100 window size or multiple window sizes. The latter, when feasible, may 1101 provide performance optimizations. For example, a large window size 1102 may be used for IPv6 packets that need to be carried by a large 1103 number of fragments. However, when the number of fragments required 1104 to carry an IPv6 packet is low, a smaller window size, and thus a 1105 shorter bitmap, may be sufficient to provide feedback on all 1106 fragments. If multiple window sizes are supported, the Rule ID may 1107 be used to signal the window size in use for a specific IPv6 packet 1108 transmission. 1110 5.8. Aborting fragmented IPv6 datagram transmissions 1112 For several reasons, a fragment sender or a fragment receiver may 1113 want to abort the on-going transmission of one or several fragmented 1114 IPv6 datagrams. The entity (either the fragment sender or the 1115 fragment receiver) that triggers abortion transmits to the other 1116 endpoint a data unit with an L2 payload that only comprises a Rule ID 1117 (of size R bits), which signals abortion of all on-going fragmented 1118 IPv6 packet transmissions. The specific value to be used for the 1119 Rule ID of this abortion signal is not defined in this document, and 1120 is expected to be defined in future documents. 1122 Upon transmission or reception of the abortion signal, both entities 1123 MUST release any resources allocated for the fragmented IPv6 datagram 1124 transmissions being aborted. 1126 5.9. Downlink fragment transmission 1128 In some LPWAN technologies, as part of energy-saving techniques, 1129 downlink transmission is only possible immediately after an uplink 1130 transmission. In order to avoid potentially high delay for 1131 fragmented IPv6 datagram transmission in the downlink, the fragment 1132 receiver MAY perform an uplink transmission as soon as possible after 1133 reception of a fragment that is not the last one. Such uplink 1134 transmission may be triggered by the L2 (e.g. an L2 ACK sent in 1135 response to a fragment encapsulated in a L2 frame that requires an L2 1136 ACK) or it may be triggered from an upper layer. 1138 6. SCHC Compression for IPv6 and UDP headers 1140 This section lists the different IPv6 and UDP header fields and how 1141 they can be compressed. 1143 6.1. IPv6 version field 1145 This field always holds the same value, therefore the TV is 6, the MO 1146 is "equal" and the "CDA "not-sent"". 1148 6.2. IPv6 Traffic class field 1150 If the DiffServ field identified by the rest of the rule do not vary 1151 and is known by both sides, the TV should contain this well-known 1152 value, the MO should be "equal" and the CDA must be "not-sent. 1154 If the DiffServ field identified by the rest of the rule varies over 1155 time or is not known by both sides, then there are two possibilities 1156 depending on the variability of the value, the first one is to do not 1157 compressed the field and sends the original value, or the second 1158 where the values can be computed by sending only the LSB bits: 1160 o TV is not set to any value, MO is set to "ignore" and CDA is set 1161 to "value-sent" 1163 o TV contains a stable value, MO is MSB(X) and CDA is set to LSB 1165 6.3. Flow label field 1167 If the Flow Label field identified by the rest of the rule does not 1168 vary and is known by both sides, the TV should contain this well- 1169 known value, the MO should be "equal" and the CDA should be "not- 1170 sent". 1172 If the Flow Label field identified by the rest of the rule varies 1173 during time or is not known by both sides, there are two 1174 possibilities depending on the variability of the value, the first 1175 one is without compression and then the value is sent and the second 1176 where only part of the value is sent and the decompressor needs to 1177 compute the original value: 1179 o TV is not set, MO is set to "ignore" and CDA is set to "value- 1180 sent" 1182 o TV contains a stable value, MO is MSB(X) and CDA is set to LSB 1184 6.4. Payload Length field 1186 If the LPWAN technology does not add padding, this field can be 1187 elided for the transmission on the LPWAN network. The SCHC C/D 1188 recomputes the original payload length value. The TV is not set, the 1189 MO is set to "ignore" and the CDA is "compute-IPv6-length". 1191 If the payload length needs to be sent and does not need to be coded 1192 in 16 bits, the TV can be set to 0x0000, the MO set to "MSB (16-s)" 1193 and the CDA to "LSB". The 's' parameter depends on the expected 1194 maximum packet length. 1196 On other cases, the payload length field must be sent and the CDA is 1197 replaced by "value-sent". 1199 6.5. Next Header field 1201 If the Next Header field identified by the rest of the rule does not 1202 vary and is known by both sides, the TV should contain this Next 1203 Header value, the MO should be "equal" and the CDA should be "not- 1204 sent". 1206 If the Next header field identified by the rest of the rule varies 1207 during time or is not known by both sides, then TV is not set, MO is 1208 set to "ignore" and CDA is set to "value-sent". A matching-list may 1209 also be used. 1211 6.6. Hop Limit field 1213 The End System is generally a device and does not forward packets, 1214 therefore the Hop Limit value is constant. So the TV is set with a 1215 default value, the MO is set to "equal" and the CDA is set to "not- 1216 sent". 1218 Otherwise the value is sent on the LPWAN: TV is not set, MO is set to 1219 ignore and CDA is set to "value-sent". 1221 Note that the field behavior differs in upstream and downstream. In 1222 upstream, since there is no IP forwarding between the Dev and the 1223 SCHC C/D, the value is relatively constant. On the other hand, the 1224 downstream value depends of Internet routing and may change more 1225 frequently. One solution could be to use the Direction Indicator 1226 (DI) to distinguish both directions to elide the field in the 1227 upstream direction and send the value in the downstream direction. 1229 6.7. IPv6 addresses fields 1231 As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit 1232 long fields; one for the prefix and one for the Interface Identifier 1233 (IID). These fields should be compressed. To allow a single rule, 1234 these values are identified by their role (DEV or APP) and not by 1235 their position in the frame (source or destination). The SCHC C/D 1236 must be aware of the traffic direction (upstream, downstream) to 1237 select the appropriate field. 1239 6.7.1. IPv6 source and destination prefixes 1241 Both ends must be synchronized with the appropriate prefixes. For a 1242 specific flow, the source and destination prefix can be unique and 1243 stored in the context. It can be either a link-local prefix or a 1244 global prefix. In that case, the TV for the source and destination 1245 prefixes contains the values, the MO is set to "equal" and the CDA is 1246 set to "not-sent". 1248 In case the rule allows several prefixes, mapping-list must be used. 1249 The different prefixes are listed in the TV associated with a short 1250 ID. The MO is set to "match-mapping" and the CDA is set to "mapping- 1251 sent". 1253 Otherwise the TV contains the prefix, the MO is set to "equal" and 1254 the CDA is set to value-sent. 1256 6.7.2. IPv6 source and destination IID 1258 If the DEV or APP IID are based on an LPWAN address, then the IID can 1259 be reconstructed with information coming from the LPWAN header. In 1260 that case, the TV is not set, the MO is set to "ignore" and the CDA 1261 is set to "DEViid" or "APPiid". Note that the LPWAN technology is 1262 generally carrying a single device identifier corresponding to the 1263 DEV. The SCHC C/D may also not be aware of these values. 1265 If the DEV address has a static value that is not derived from an 1266 IEEE EUI-64, then TV contains the actual Dev address value, the MO 1267 operator is set to "equal" and the CDA is set to "not-sent". 1269 If several IIDs are possible, then the TV contains the list of 1270 possible IIDs, the MO is set to "match-mapping" and the CDA is set to 1271 "mapping-sent". 1273 Otherwise the value variation of the IID may be reduced to few bytes. 1274 In that case, the TV is set to the stable part of the IID, the MO is 1275 set to MSB and the CDA is set to LSB. 1277 Finally, the IID can be sent on the LPWAN. In that case, the TV is 1278 not set, the MO is set to "ignore" and the CDA is set to "value- 1279 sent". 1281 6.8. IPv6 extensions 1283 No extension rules are currently defined. They can be based on the 1284 MOs and CDAs described above. 1286 6.9. UDP source and destination port 1288 To allow a single rule, the UDP port values are identified by their 1289 role (DEV or APP) and not by their position in the frame (source or 1290 destination). The SCHC C/D must be aware of the traffic direction 1291 (upstream, downstream) to select the appropriate field. The 1292 following rules apply for DEV and APP port numbers. 1294 If both ends know the port number, it can be elided. The TV contains 1295 the port number, the MO is set to "equal" and the CDA is set to "not- 1296 sent". 1298 If the port variation is on few bits, the TV contains the stable part 1299 of the port number, the MO is set to "MSB" and the CDA is set to 1300 "LSB". 1302 If some well-known values are used, the TV can contain the list of 1303 this values, the MO is set to "match-mapping" and the CDA is set to 1304 "mapping-sent". 1306 Otherwise the port numbers are sent on the LPWAN. The TV is not set, 1307 the MO is set to "ignore" and the CDA is set to "value-sent". 1309 6.10. UDP length field 1311 If the LPWAN technology does not introduce padding, the UDP length 1312 can be computed from the received data. In that case the TV is not 1313 set, the MO is set to "ignore" and the CDA is set to "compute-UDP- 1314 length". 1316 If the payload is small, the TV can be set to 0x0000, the MO set to 1317 "MSB" and the CDA to "LSB". 1319 On other cases, the length must be sent and the CDA is replaced by 1320 "value-sent". 1322 6.11. UDP Checksum field 1324 IPv6 mandates a checksum in the protocol above IP. Nevertheless, if 1325 a more efficient mechanism such as L2 CRC or MIC is carried by or 1326 over the L2 (such as in the LPWAN fragmentation process (see section 1327 Section 5)), the UDP checksum transmission can be avoided. In that 1328 case, the TV is not set, the MO is set to "ignore" and the CDA is set 1329 to "compute-UDP-checksum". 1331 In other cases the checksum must be explicitly sent. The TV is not 1332 set, the MO is set to "ignore" and the CDF is set to "value-sent". 1334 7. Security considerations 1336 7.1. Security considerations for header compression 1338 A malicious header compression could cause the reconstruction of a 1339 wrong packet that does not match with the original one, such 1340 corruption may be detected with end-to-end authentication and 1341 integrity mechanisms. Denial of Service may be produced but its 1342 arise other security problems that may be solved with or without 1343 header compression. 1345 7.2. Security considerations for fragmentation 1347 This subsection describes potential attacks to LPWAN fragmentation 1348 and suggests possible countermeasures. 1350 A node can perform a buffer reservation attack by sending a first 1351 fragment to a target. Then, the receiver will reserve buffer space 1352 for the IPv6 packet. Other incoming fragmented packets will be 1353 dropped while the reassembly buffer is occupied during the reassembly 1354 timeout. Once that timeout expires, the attacker can repeat the same 1355 procedure, and iterate, thus creating a denial of service attack. 1356 The (low) cost to mount this attack is linear with the number of 1357 buffers at the target node. However, the cost for an attacker can be 1358 increased if individual fragments of multiple packets can be stored 1359 in the reassembly buffer. To further increase the attack cost, the 1360 reassembly buffer can be split into fragment-sized buffer slots. 1361 Once a packet is complete, it is processed normally. If buffer 1362 overload occurs, a receiver can discard packets based on the sender 1363 behavior, which may help identify which fragments have been sent by 1364 an attacker. 1366 In another type of attack, the malicious node is required to have 1367 overhearing capabilities. If an attacker can overhear a fragment, it 1368 can send a spoofed duplicate (e.g. with random payload) to the 1369 destination. If the LPWAN technology does not support suitable 1370 protection (e.g. source authentication and frame counters to prevent 1371 replay attacks), a receiver cannot distinguish legitimate from 1372 spoofed fragments. Therefore, the original IPv6 packet will be 1373 considered corrupt and will be dropped. To protect resource- 1374 constrained nodes from this attack, it has been proposed to establish 1375 a binding among the fragments to be transmitted by a node, by 1376 applying content-chaining to the different fragments, based on 1377 cryptographic hash functionality. The aim of this technique is to 1378 allow a receiver to identify illegitimate fragments. 1380 Further attacks may involve sending overlapped fragments (i.e. 1381 comprising some overlapping parts of the original IPv6 datagram). 1382 Implementers should make sure that correct operation is not affected 1383 by such event. 1385 8. Acknowledgements 1387 Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier, 1388 Arunprabhu Kandasamy, Antony Markovski, Alexander Pelov, Pascal 1389 Thubert, Juan Carlos Zuniga and Diego Dujovne for useful design 1390 consideration and comments. 1392 9. References 1394 9.1. Normative References 1396 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1397 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, 1398 December 1998, . 1400 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1401 "Transmission of IPv6 Packets over IEEE 802.15.4 1402 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1403 . 1405 [RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust 1406 Header Compression (ROHC) Framework", RFC 5795, 1407 DOI 10.17487/RFC5795, March 2010, 1408 . 1410 [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 1411 Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, 1412 February 2014, . 1414 9.2. Informative References 1416 [I-D.ietf-lpwan-overview] 1417 Farrell, S., "LPWAN Overview", draft-ietf-lpwan- 1418 overview-06 (work in progress), July 2017. 1420 Appendix A. SCHC Compression Examples 1422 This section gives some scenarios of the compression mechanism for 1423 IPv6/UDP. The goal is to illustrate the SCHC behavior. 1425 The most common case using the mechanisms defined in this document 1426 will be a LPWAN Dev that embeds some applications running over CoAP. 1427 In this example, three flows are considered. The first flow is for 1428 the device management based on CoAP using Link Local IPv6 addresses 1429 and UDP ports 123 and 124 for Dev and App, respectively. The second 1430 flow will be a CoAP server for measurements done by the Device (using 1431 ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to 1432 beta::1/64. The last flow is for legacy applications using different 1433 ports numbers, the destination IPv6 address prefix is gamma::1/64. 1435 Figure 14 presents the protocol stack for this Device. IPv6 and UDP 1436 are represented with dotted lines since these protocols are 1437 compressed on the radio link. 1439 Management Data 1440 +----------+---------+---------+ 1441 | CoAP | CoAP | legacy | 1442 +----||----+---||----+---||----+ 1443 . UDP . UDP | UDP | 1444 ................................ 1445 . IPv6 . IPv6 . IPv6 . 1446 +------------------------------+ 1447 | SCHC Header compression | 1448 | and fragmentation | 1449 +------------------------------+ 1450 | LPWAN L2 technologies | 1451 +------------------------------+ 1452 DEV or NGW 1454 Figure 14: Simplified Protocol Stack for LP-WAN 1456 Note that in some LPWAN technologies, only the Devs have a device ID. 1457 Therefore, when such technologies are used, it is necessary to define 1458 statically an IID for the Link Local address for the SCHC C/D. 1460 Rule 0 1461 +----------------+--+--+---------+--------+-------------++------+ 1462 | Field |FP|DI| Value | Match | Comp Decomp || Sent | 1463 | | | | | Opera. | Action ||[bits]| 1464 +----------------+--+--+---------+----------------------++------+ 1465 |IPv6 version |1 |Bi|6 | equal | not-sent || | 1466 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 1467 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 1468 |IPv6 Length |1 |Bi| | ignore | comp-length || | 1469 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 1470 |IPv6 Hop Limit |1 |Bi|255 | ignore | not-sent || | 1471 |IPv6 DEVprefix |1 |Bi|FE80::/64| equal | not-sent || | 1472 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 1473 |IPv6 APPprefix |1 |Bi|FE80::/64| equal | not-sent || | 1474 |IPv6 APPiid |1 |Bi|::1 | equal | not-sent || | 1475 +================+==+==+=========+========+=============++======+ 1476 |UDP DEVport |1 |Bi|123 | equal | not-sent || | 1477 |UDP APPport |1 |Bi|124 | equal | not-sent || | 1478 |UDP Length |1 |Bi| | ignore | comp-length || | 1479 |UDP checksum |1 |Bi| | ignore | comp-chk || | 1480 +================+==+==+=========+========+=============++======+ 1482 Rule 1 1483 +----------------+--+--+---------+--------+-------------++------+ 1484 | Field |FP|DI| Value | Match | Action || Sent | 1485 | | | | | Opera. | Action ||[bits]| 1486 +----------------+--+--+---------+--------+-------------++------+ 1487 |IPv6 version |1 |Bi|6 | equal | not-sent || | 1488 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 1489 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 1490 |IPv6 Length |1 |Bi| | ignore | comp-length || | 1491 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 1492 |IPv6 Hop Limit |1 |Bi|255 | ignore | not-sent || | 1493 |IPv6 DEVprefix |1 |Bi|[alpha/64, match- | mapping-sent|| [1] | 1494 | |1 |Bi|fe80::/64] mapping| || | 1495 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 1496 |IPv6 APPprefix |1 |Bi|[beta/64,| match- | mapping-sent|| [2] | 1497 | | | |alpha/64,| mapping| || | 1498 | | | |fe80::64]| | || | 1499 |IPv6 APPiid |1 |Bi|::1000 | equal | not-sent || | 1500 +================+==+==+=========+========+=============++======+ 1501 |UDP DEVport |1 |Bi|5683 | equal | not-sent || | 1502 |UDP APPport |1 |Bi|5683 | equal | not-sent || | 1503 |UDP Length |1 |Bi| | ignore | comp-length || | 1504 |UDP checksum |1 |Bi| | ignore | comp-chk || | 1505 +================+==+==+=========+========+=============++======+ 1507 Rule 2 1508 +----------------+--+--+---------+--------+-------------++------+ 1509 | Field |FP|DI| Value | Match | Action || Sent | 1510 | | | | | Opera. | Action ||[bits]| 1511 +----------------+--+--+---------+--------+-------------++------+ 1512 |IPv6 version |1 |Bi|6 | equal | not-sent || | 1513 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 1514 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 1515 |IPv6 Length |1 |Bi| | ignore | comp-length || | 1516 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 1517 |IPv6 Hop Limit |1 |Up|255 | ignore | not-sent || | 1518 |IPv6 Hop Limit |1 |Dw| | ignore | value-sent || [8] | 1519 |IPv6 DEVprefix |1 |Bi|alpha/64 | equal | not-sent || | 1520 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 1521 |IPv6 APPprefix |1 |Bi|gamma/64 | equal | not-sent || | 1522 |IPv6 APPiid |1 |Bi|::1000 | equal | not-sent || | 1523 +================+==+==+=========+========+=============++======+ 1524 |UDP DEVport |1 |Bi|8720 | MSB(12)| LSB(4) || [4] | 1525 |UDP APPport |1 |Bi|8720 | MSB(12)| LSB(4) || [4] | 1526 |UDP Length |1 |Bi| | ignore | comp-length || | 1527 |UDP checksum |1 |Bi| | ignore | comp-chk || | 1528 +================+==+==+=========+========+=============++======+ 1530 Figure 15: Context rules 1532 All the fields described in the three rules depicted on Figure 15 are 1533 present in the IPv6 and UDP headers. The DEViid-DID value is found 1534 in the L2 header. 1536 The second and third rules use global addresses. The way the Dev 1537 learns the prefix is not in the scope of the document. 1539 The third rule compresses port numbers to 4 bits. 1541 Appendix B. Fragmentation Examples 1543 This section provides examples of different fragment delivery 1544 reliability options possible on the basis of this specification. 1546 Figure 16 illustrates the transmission of an IPv6 packet that needs 1547 11 fragments in the No ACK option. 1549 Sender Receiver 1550 |-------FCN=0-------->| 1551 |-------FCN=0-------->| 1552 |-------FCN=0-------->| 1553 |-------FCN=0-------->| 1554 |-------FCN=0-------->| 1555 |-------FCN=0-------->| 1556 |-------FCN=0-------->| 1557 |-------FCN=0-------->| 1558 |-------FCN=0-------->| 1559 |-------FCN=0-------->| 1560 |-------FCN=1-------->|MIC checked => 1562 Figure 16: Transmission of an IPv6 packet carried by 11 fragments in 1563 the No ACK option 1565 Figure 17 illustrates the transmission of an IPv6 packet that needs 1566 11 fragments in Window mode - ACK on error, for N=3, without losses. 1568 Sender Receiver 1569 |-----W=1, FCN=6----->| 1570 |-----W=1, FCN=5----->| 1571 |-----W=1, FCN=4----->| 1572 |-----W=1, FCN=3----->| 1573 |-----W=1, FCN=2----->| 1574 |-----W=1, FCN=1----->| 1575 |-----W=1, FCN=0----->| 1576 (no ACK) 1577 |-----W=0, FCN=6----->| 1578 |-----W=0, FCN=5----->| 1579 |-----W=0, FCN=4----->| 1580 |-----W=0, FCN=7----->|MIC checked => 1581 (no ACK) 1583 Figure 17: Transmission of an IPv6 packet carried by 11 fragments in 1584 Window mode - ACK on error, for N=3 and MAX_WIND_FCN=6, without 1585 losses. 1587 Figure 18 illustrates the transmission of an IPv6 packet that needs 1588 11 fragments in Window mode - ACK on error, for N=3, with three 1589 losses. 1591 Sender Receiver 1592 |-----W=1, FCN=6----->| 1593 |-----W=1, FCN=5----->| 1594 |-----W=1, FCN=4--X-->| 1595 |-----W=1, FCN=3----->| 1596 |-----W=1, FCN=2--X-->| 1597 |-----W=1, FCN=1----->| 1598 |-----W=1, FCN=0----->| 1599 |<-----ACK, W=1-------|Bitmap:11010111 1600 |-----W=1, FCN=4----->| 1601 |-----W=1, FCN=2----->| 1602 (no ACK) 1603 |-----W=0, FCN=6----->| 1604 |-----W=0, FCN=5----->| 1605 |-----W=0, FCN=4--X-->| 1606 |-----W=0, FCN=7----->|MIC checked 1607 |<-----ACK, W=0-------|Bitmap:11000001 1608 |-----W=0, FCN=4----->|MIC checked => 1609 (no ACK) 1611 Figure 18: Transmission of an IPv6 packet carried by 11 fragments in 1612 Window mode - ACK on error, for N=3 and MAX_WIND_FCN=6, three losses. 1614 Figure 19 illustrates the transmission of an IPv6 packet that needs 1615 11 fragments in Window mode - ACK "always", for N=3 and 1616 MAX_WIND_FCN=6, without losses. Note: in Window mode, an additional 1617 bit will be needed to number windows. 1619 Sender Receiver 1620 |-----W=1, FCN=6----->| 1621 |-----W=1, FCN=5----->| 1622 |-----W=1, FCN=4----->| 1623 |-----W=1, FCN=3----->| 1624 |-----W=1, FCN=2----->| 1625 |-----W=1, FCN=1----->| 1626 |-----W=1, FCN=0----->| 1627 |<-----ACK, W=1-------|no bitmap 1628 |-----W=0, FCN=6----->| 1629 |-----W=0, FCN=5----->| 1630 |-----W=0, FCN=4----->| 1631 |-----W=0, FCN=7----->|MIC checked => 1632 |<-----ACK, W=0-------|no bitmap 1633 (End) 1635 Figure 19: Transmission of an IPv6 packet carried by 11 fragments in 1636 Window mode - ACK "always", for N=3 and MAX_WIND_FCN=6, no losses. 1638 Figure 20 illustrates the transmission of an IPv6 packet that needs 1639 11 fragments in Window mode - ACK "always", for N=3 and 1640 MAX_WIND_FCN=6, with three losses. 1642 Sender Receiver 1643 |-----W=1, FCN=6----->| 1644 |-----W=1, FCN=5----->| 1645 |-----W=1, FCN=4--X-->| 1646 |-----W=1, FCN=3----->| 1647 |-----W=1, FCN=2--X-->| 1648 |-----W=1, FCN=1----->| 1649 |-----W=1, FCN=0----->| 1650 |<-----ACK, W=1-------|bitmap:11010111 1651 |-----W=1, FCN=4----->| 1652 |-----W=1, FCN=2----->| 1653 |<-----ACK, W=1-------|no bitmap 1654 |-----W=0, FCN=6----->| 1655 |-----W=0, FCN=5----->| 1656 |-----W=0, FCN=4--X-->| 1657 |-----W=0, FCN=7----->|MIC checked 1658 |<-----ACK, W=0-------|bitmap:11000001 1659 |-----W=0, FCN=4----->|MIC checked => 1660 |<-----ACK, W=0-------|no bitmap 1661 (End) 1663 Figure 20: Transmission of an IPv6 packet carried by 11 fragments in 1664 Window mode - ACK "Always", for N=3, and MAX_WIND_FCN=6, with three 1665 losses. 1667 Appendix C illustrates the transmission of an IPv6 packet that needs 1668 28 fragments in Window mode - ACK "always", for N=5 and 1669 MAX_WIND_FCN=23, with two losses. Note that MAX_WIND_FCN=23 may be 1670 useful when the maximum possible bitmap size, considering the maximum 1671 lower layer technology payload size and the value of R, is 3 bytes. 1672 Note also that the FCN of the last fragment of the packet is the one 1673 with FCN=31 (i.e. FCN=2^N-1 for N=5, or equivalently, all FCN bits 1674 set to 1). 1676 Sender Receiver 1677 |-----W=1, CFN=23----->| 1678 |-----W=1, CFN=22----->| 1679 |-----W=1, CFN=21--X-->| 1680 |-----W=1, CFN=20----->| 1681 |-----W=1, CFN=19----->| 1682 |-----W=1, CFN=18----->| 1683 |-----W=1, CFN=17----->| 1684 |-----W=1, CFN=16----->| 1685 |-----W=1, CFN=15----->| 1686 |-----W=1, CFN=14----->| 1687 |-----W=1, CFN=13----->| 1688 |-----W=1, CFN=12----->| 1689 |-----W=1, CFN=11----->| 1690 |-----W=1, CFN=10--X-->| 1691 |-----W=1, CFN=9 ----->| 1692 |-----W=1, CFN=8 ----->| 1693 |-----W=1, CFN=7 ----->| 1694 |-----W=1, CFN=6 ----->| 1695 |-----W=1, CFN=5 ----->| 1696 |-----W=1, CFN=4 ----->| 1697 |-----W=1, CFN=3 ----->| 1698 |-----W=1, CFN=2 ----->| 1699 |-----W=1, CFN=1 ----->| 1700 |-----W=1, CFN=0 ----->| 1701 |<------ACK, W=1-------|bitmap:110111111111101111111111 1702 |-----W=1, CFN=21----->| 1703 |-----W=1, CFN=10----->| 1704 |<------ACK, W=1-------|no bitmap 1705 |-----W=0, CFN=23----->| 1706 |-----W=0, CFN=22----->| 1707 |-----W=0, CFN=21----->| 1708 |-----W=0, CFN=31----->|MIC checked => 1709 |<------ACK, W=0-------|no bitmap 1710 (End) 1712 Appendix C. Allocation of Rule IDs for fragmentation 1714 A set of Rule IDs are allocated to support different aspects of 1715 fragmentation functionality as per this document. The allocation of 1716 IDs is to be defined in other documents. The set MAY include: 1718 o one ID or a subset of IDs to identify a fragment as well as its 1719 reliability option and its window size, if multiple of these are 1720 supported. 1722 o one ID to identify the ACK message. 1724 o one ID to identify the Abort message as per Section 9.8. 1726 Appendix D. Note 1728 Carles Gomez has been funded in part by the Spanish Government 1729 (Ministerio de Educacion, Cultura y Deporte) through the Jose 1730 Castillejo grant CAS15/00336, and by the ERDF and the Spanish 1731 Government through project TEC2016-79988-P. Part of his contribution 1732 to this work has been carried out during his stay as a visiting 1733 scholar at the Computer Laboratory of the University of Cambridge. 1735 Authors' Addresses 1737 Ana Minaburo 1738 Acklio 1739 2bis rue de la Chataigneraie 1740 35510 Cesson-Sevigne Cedex 1741 France 1743 Email: ana@ackl.io 1745 Laurent Toutain 1746 IMT-Atlantique 1747 2 rue de la Chataigneraie 1748 CS 17607 1749 35576 Cesson-Sevigne Cedex 1750 France 1752 Email: Laurent.Toutain@imt-atlantique.fr 1754 Carles Gomez 1755 Universitat Politecnica de Catalunya 1756 C/Esteve Terradas, 7 1757 08860 Castelldefels 1758 Spain 1760 Email: carlesgo@entel.upc.edu