idnits 2.17.1 draft-ietf-lpwan-ipv6-static-context-hc-01.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: ---------------------------------------------------------------------------- ** The document is more than 15 pages and seems to lack a Table of Contents. 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 727: '...within a single L2 data unit, it SHALL...' RFC 2119 keyword, line 739: '... option MUST be used for all fragmen...' RFC 2119 keyword, line 745: '...le, the receiver MUST NOT issue acknow...' RFC 2119 keyword, line 746: '... sender MUST NOT perform fragment tr...' RFC 2119 keyword, line 760: '...ability suboption MUST be used for all...' (14 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 02, 2017) is 2612 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) == Outdated reference: A later version (-10) exists of draft-ietf-lpwan-overview-01 Summary: 4 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). 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: September 3, 2017 IMT-Atlantique 6 C. Gomez 7 Universitat Politecnica de Catalunya 8 March 02, 2017 10 LPWAN Static Context Header Compression (SCHC) and fragmentation for 11 IPv6 and UDP 12 draft-ietf-lpwan-ipv6-static-context-hc-01 14 Abstract 16 This document describes a header compression scheme and fragmentation 17 functionality for IPv6/UDP protocols. These techniques are 18 especially tailored for LPWAN (Low Power Wide Area Network) networks 19 and could be extended to other protocol stacks. 21 The Static Context Header Compression (SCHC) offers a great level of 22 flexibility when processing the header fields. Static context means 23 that information stored in the context which, describes field values, 24 does not change during the packet transmission, avoiding complex 25 resynchronization mechanisms, incompatible with LPWAN 26 characteristics. In most of the cases, IPv6/UDP headers are reduced 27 to a small identifier. 29 This document describes the generic compression/decompression process 30 and applies it to IPv6/UDP headers. Similar mechanisms for other 31 protocols such as CoAP will be described in a separate document. 32 Moreover, this document specifies fragmentation and reassembly 33 mechanims for SCHC compressed packets exceeding the L2 pdu size and 34 for the case where the SCHC compression is not possible then the 35 IPv6/UDP packet is sent. 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at http://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on September 3, 2017. 54 Copyright Notice 56 Copyright (c) 2017 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (http://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the Simplified BSD License. 69 1. Introduction 71 Header compression is mandatory to efficiently bring Internet 72 connectivity to the node within a LPWAN network 73 [I-D.minaburo-lp-wan-gap-analysis]. 75 Some LPWAN networks properties can be exploited for an efficient 76 header compression: 78 o Topology is star oriented, therefore all the packets follow the 79 same path. For the needs of this draft, the architecture can be 80 summarized to Things or End-Systems (ES) exchanging information 81 with LPWAN Application Server (LA) through a Network Gateway (NG). 83 o Traffic flows are mostly known in advanced, since End-Systems 84 embed built-in applications. Contrary to computers or 85 smartphones, new applications cannot be easily installed. 87 The Static Context Header Compression (SCHC) is defined for this 88 environment. SCHC uses a context where header information is kept in 89 order, this context is static the values on the header fields do not 90 change during time, avoiding complex resynchronization mechanisms, 91 incompatible with LPWAN characteristics. In most of the cases, IPv6/ 92 UDP headers are reduced to a small context identifier. 94 The SCHC header compression is indedependent of the specific LPWAN 95 technology over which it will be used. 97 On the other hand, LPWAN technologies are characterized, among 98 others, by a very reduced data unit and/or payload size 99 [I-D.ietf-lpwan-overview]. However, some of these technologies do 100 not support layer two fragmentation, therefore the only option for 101 these to support IPv6 when header compression is not possible (and, 102 in particular, its MTU requirement of 1280 bytes [RFC2460]) is the 103 use of fragmentation mechanism at the adaptation layer below IPv6. 104 This specification defines fragmentation functionality to support the 105 IPv6 MTU requirements over LPWAN technologies. 107 2. Vocabulary 109 This section defines the terminology and aconyms used in this 110 document. 112 o CDF: Compression/Decompression Function. A function that is used 113 for both functionnalities to compress a header field or to recover 114 its original value in the decompression phase. 116 o Context: A set of rules used to compress/decompress headers 118 o ES: End System. Node connected to the LPWAN. An ES may implement 119 SCHC. 121 o LA: LPWAN Application. An application sending/consuming IPv6 122 packets to/from the End System. 124 o LC: LPWAN Compressor/Decompressor. A process in the network to 125 achieve compression/decompressing headers. LC uses SCHC rules to 126 perform compression and decompression. 128 o MO: Matching Operator. An operator used to compare a value 129 contained in a header field with a value contained in a rule. 131 o Rule: A set of header field values. 133 o Rule ID: An identifier for a rule, LC and ES share the same rule 134 ID for a specific flow. Rule ID is sent on the LPWAN. 136 o TV: Target value. A value contained in the rule that will be 137 matched with the value of a header field. 139 3. Static Context Header Compression 141 Static Context Header Compression (SCHC) avoids context 142 synchronization, which is the most bandwidth-consuming operation in 143 other header compression mechanisms such as RoHC. Based on the fact 144 that the nature of data flows is highly predictable in LPWAN 145 networks, a static context may be stored on the End-System (ES). The 146 context must be stored in both ends. It can also be learned by using 147 a provisionning protocol that is out of the scope of this draft. 149 End-System Appl Servers 150 +-----------------+ +---------------+ 151 | APP1 APP2 APP3 | |APP1 APP2 APP3| 152 | | | | 153 | UDP | | UDP | 154 | IPv6 | | IPv6 | 155 | | | | 156 | LC (contxt)| | | 157 +--------+--------+ +-------+-------+ 158 | +--+ +--+ +-----------+ . 159 +~~ |RG| === |NG| === |LC (contxt)| ... Internet ... 160 +--+ +--+ +-----+-----+ 162 Figure 1: Architecture 164 Figure 1 based on [I-D.ietf-lpwan-overview] terminology represents 165 the architecture for compression/decompression. The Thing or End- 166 System is running applications which produce IPv6 or IPv6/UDP flows. 167 These flows are compressed by a LPWAN Compressor (LC) to reduce the 168 headers size. Resulting information is sent on a layer two (L2) 169 frame to the LPWAN Radio Network to a Radio Gateway (RG) which 170 forwards the frame to a Network Gateway. The Network Gateway sends 171 the data to a LC for decompression which shares the same rules with 172 the ES. The LC can be located on the Network Gateway or in another 173 places if a tunnel is established between the NG and the LC. This 174 architecture forms a star topology. After decompression, the packet 175 can be sent on the Internet to one or several LPWAN Application 176 Servers (LA). 178 The principle is exactly the same in the other direction. 180 The context contains a list of rules (cf. Figure 2). Each rule 181 contains itself a list of fields descriptions composed of a field 182 identifier (FID), a target value (TV), a matching operator (MO) and a 183 Compression/Decompression Function (CDF). 185 +-----------------------------------------------------------------+ 186 | Rule N | 187 +----------------------------------------------------------------+ | 188 | Rule i | | 189 +---------------------------------------------------------------+ | | 190 | Rule 1 | | | 191 |+--------+--------------+-------------------+-----------------+| | | 192 ||Field 1 | Target Value | Matching Operator | Comp/Decomp Fct || | | 193 |+--------+--------------+-------------------+-----------------+| | | 194 ||Field 2 | Target Value | Matching Operator | Comp/Decomp Fct || | | 195 |+--------+--------------+-------------------+-----------------+| | | 196 ||... | ... | ... | ... || | | 197 |+--------+--------------+-------------------+-----------------+| |-+ 198 ||Field N | Target Value | Matching Operator | Comp/Decomp Fct || | 199 |+--------+--------------+-------------------+-----------------+|-+ 200 | | 201 +---------------------------------------------------------------+ 203 Figure 2: Compression Decompression Context 205 The rule does not describe the original packet format which must be 206 known from the compressor/decompressor. The rule just describes the 207 compression/decompression behavior for the header fields. In the 208 rule, it is recommended to describe the header field in the same 209 order they appear in the packet. 211 The main idea of the compression scheme is to send the rule id to the 212 other end instead of known field values. When a value is known by 213 both ends, it is not necessary to send it on the LPWAN network. 215 The field description is composed of different entries: 217 o A Field ID (FID) is a unique value to define the field. 219 o A Target Value (TV) is the value used to make the comparison with 220 the packet header field. The Target Value can be of any type 221 (integer, strings,...). It can be a single value or a more 222 complex structure (array, list,...). It can be considered as a 223 CBOR structure. 225 o A Matching Operator (MO) is the operator used to make the 226 comparison between the field value and the Target Value. The 227 Matching Operator may require some parameters, which can be 228 considered as a CBOR structure. MO is only used during the 229 compression phase. 231 o A Compression Decompression Function (CDF) is used to describe the 232 compression and the decompression process. The CDF may require 233 some parameters, which can be considered as a CBOR structure. 235 3.1. Rule ID 237 Rule IDs are sent between both compression/decompression elements. 238 The size of the rule ID is not specified in this document and can 239 vary regarding the LPWAN technology, the number of flows,... 241 Some values in the rule ID space may be reserved for goals other than 242 header compression, for example fragmentation. 244 Rule IDs are specific to an ES. Two ESs may use the same rule ID for 245 different header compression. The LC needs to combine the rule ID 246 with the ES L2 address to find the appropriate rule. 248 3.2. Packet processing 250 The compression/decompression process follows several steps: 252 o compression rule selection: the goal is to identify which rule(s) 253 will be used to compress the headers. Each field is associated to 254 a matching operator for compression. Each header field's value is 255 compared to the corresponding target value stored in the rule for 256 that field using the matching operator. If all the fields in the 257 packet's header satisfied all the matching operators of a rule, 258 the packet is processed using Compression Decompression Function 259 associated with the fields. Otherwise the next rule is tested. 260 If no eligible rule is found, then the packet is sent without 261 compression, which may require using the fragmentation procedure. 263 o sending: The rule ID is sent to the other end followed by 264 information resulting from the compression of header fields. This 265 information is sent in the order expressed in the rule for the 266 matching fields. The way the rule ID is sent depends on the layer 267 two technology and will be specified in a specific document. For 268 example, it can either be included in a Layer 2 header or sent in 269 the first byte of the L2 payload. 271 o decompression: The receiver identifies the sender through its 272 device-id (e.g. MAC address) and selects the appropriate rule 273 through the rule ID. This rule gives the compressed header format 274 and associates these values to header fields. It applies the CDF 275 function to reconstruct the original header fields. CDF of 276 Compute-* must be applied after the other CDFs. 278 4. Matching operators 280 This document describes basic matching operators (MO)s which must be 281 known by both LC, endpoints involved in the header compression/ 282 decompression. They are not typed and can be applied indifferently 283 to integer, string or any other type. The MOs and their definition 284 are provided next: 286 o equal: a field value in a packet matches with a field value in a 287 rule if they are equal. 289 o ignore: no check is done between a field value in a packet and a 290 field value in the rule. The result of the matching is always 291 true. 293 o MSB(length): a field value of a size equal to "length" bits in a 294 packet matches with a field value in a rule if the most 295 significant "length" bits are equal. 297 o match-mapping: The goal of mapping-sent is to reduce the size of a 298 field by allocating a shorter value. The Target Value contains a 299 list of pairs. Each pair is composed of a value and a short ID. 300 This operator matches if a field value is equal to one of the 301 pairs' values. 303 Matching Operators may need a list of parameters to proceed to the 304 matching. For instance MSB requires an integer indicating the number 305 of bits to test. 307 5. Compression Decompression Functions (CDF) 309 The Compression Decompression Functions (CDF) describes the action 310 taken during the compression of headers fields, and inversely, the 311 action taken by the decompressor to restore the original value. 313 /--------------------+-------------+---------------------------\ 314 | Function | Compression | Decompression | 315 | | | | 316 +--------------------+-------------+---------------------------+ 317 |not-sent |elided |use value stored in ctxt | 318 |value-sent |send |build from received value | 319 |LSB(length) |send LSB |ctxt value OR rcvd value | 320 |compute-length |elided |compute length | 321 |compute-UDP-checksum|elided |compute UDP checksum | 322 |ESiid-DID |elided |build IID from L2 ES addr | 323 |LAiid-DID |elided |build IID from L2 LA addr | 324 |mapping-sent |send index |value from index on a table| 325 \--------------------+-------------+---------------------------/ 327 Figure 3: Compression and Decompression Functions 329 Figure 3 sumarizes the functions defined to compress and decompress a 330 field. The first column gives the function's name. The second and 331 third columns outlines the compression/decompression behavior. 333 Compression is done in the rule order and compressed values are sent 334 in that order in the compressed message. The receiver must be able 335 to find the size of each compressed field which can be given by the 336 rule or may be sent with the compressed header. 338 5.1. not-sent CDF 340 Not-sent function is generally used when the field value is specified 341 in the rule and therefore known by the both Compressor and 342 Decompressor. This function is generally used with the "equal" MO. 343 If MO is "ignore", there is a risk to have a decompressed field value 344 different from the compressed field. 346 The compressor does not send any value on the compressed header for 347 that field on which compression is applied. 349 The decompressor restores the field value with the target value 350 stored in the matched rule. 352 5.2. value-sent CDF 354 The value-sent function is generally used when the field value is not 355 known by both Compressor and Decompressor. The value is sent in the 356 compressed message header. Both Compressor and Decompressor must 357 know the size of the field, either implicitely (the size is known by 358 both sides) or explicitely in the compressed header field by 359 indicating the length. This function is generally used with the 360 "ignore" MO. 362 The compressor sends the Target Value stored on the rule in the 363 compressed header message. The decompressor restores the field value 364 with the one received from the LPWAN 366 5.3. LSB CDF 368 LSB function is used to send a fixed part of the packet field header 369 to the other end. This function is used together with the "MSB" MO 371 The compressor sends the "length" Least Significant Bits. The 372 decompressor combines with an OR operator the value received with the 373 Target Value. 375 5.4. ESiid-DID, LAiid-DID CDF 377 These functions are used to process respectively the End System and 378 the LA Device Identifier (DID). 380 The IID value is computed from the device ID present in the Layer 2 381 header. The computation depends on the technology and the device ID 382 size. 384 5.5. mapping-sent 386 mapping-sent is used to send a smaller index associated to the field 387 value in the Target Value. This function is used together with the 388 "match-mapping" MO. 390 The compressor looks in the TV to find the field value and send the 391 corresponding index. The decompressor uses this index to restore the 392 field value. 394 5.6. Compute-* 396 These functions are used by the decompressor to compute the 397 compressed field value based on received information. Compressed 398 fields are elided during the compression and reconstructed during the 399 decompression. 401 o compute-length: compute the length assigned to this field. For 402 instance, regarding the field ID, this CDF may be used to compute 403 IPv6 length or UDP length. 405 o compute-checksum: compute a checksum from the information already 406 received by the LC. This field may be used to compute UDP 407 checksum. 409 6. Application to IPv6 and UDP headers 411 This section lists the different IPv6 and UDP header fields and how 412 they can be compressed. 414 6.1. IPv6 version field 416 This field always holds the same value, therefore the TV is 6, the MO 417 is "equal" and the CDF "not-sent". 419 6.2. IPv6 Traffic class field 421 If the DiffServ field identified by the rest of the rule do not vary 422 and is known by both sides, the TV should contain this wellknown 423 value, the MO should be "equal" and the CDF must be "not-sent. 425 If the DiffServ field identified by the rest of the rule varies over 426 time or is not known by both sides, then there are two possibilities 427 depending on the variability of the value, the first one there is 428 without compression and the original value is sent, or the sencond 429 where the values can be computed by sending only the LSB bits: 431 o TV is not set, MO is set to "ignore" and CDF is set to "value- 432 sent" 434 o TV contains a stable value, MO is MSB(X) and CDF is set to 435 LSB(8-X) 437 6.3. Flow label field 439 If the Flow Label field identified by the rest of the rule does not 440 vary and is known by both sides, the TV should contain this well- 441 known value, the MO should be "equal" and the CDF should be "not- 442 sent". 444 If the Flow Label field identified by the rest of the rule varies 445 during time or is not known by both sides, there are two 446 possibilities dpending on the variability of the value, the first one 447 is without compression and then the value is sent and the second 448 where only part of the value is sent and the decompressor needs to 449 compute the original value: 451 o TV is not set, MO is set to "ignore" and CDF is set to "value- 452 sent" 454 o TV contains a stable value, MO is MSB(X) and CDF is set to 455 LSB(20-X) 457 6.4. Payload Length field 459 If the LPWAN technology does not add padding, this field can be 460 elided for the transmission on the LPWAN network. The LC recompute 461 the original payload length value. The TV is not set, the MO is set 462 to "ignore" and the CDF is "compute-IPv6-length". 464 If the payload is small, the TV can be set to 0x0000, the MO set to 465 "MSB (16-s)" and the CDF to "LSB (s)". The 's' parameter depends on 466 the maximum packet length. 468 On other cases, the payload length field must be sent and the CDF is 469 replaced by "value-sent". 471 6.5. Next Header field 473 If the Next Header field identified by the rest of the rule does not 474 vary and is known by both sides, the TV should contain this Next 475 Header value, the MO should be "equal" and the CDF should be "not- 476 sent". 478 If the Next header field identified by the rest of the rule varies 479 during time or is not known by both sides, then TV is not set, MO is 480 set to "ignore" and CDF is set to "value-sent". 482 6.6. Hop Limit field 484 The End System is generally a host and does not forward packets, 485 therefore the Hop Limit value is constant. So the TV is set with a 486 default value, the MO is set to "equal" and the CDF is set to "not- 487 sent". 489 Otherwise the value is sent on the LPWAN: TV is not set, MO is set to 490 ignore and CDF is set to "value-sent". 492 6.7. IPv6 addresses fields 494 As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit 495 long fields; one for the prefix and one for the Interface Identifier 496 (IID). These fields should be compressed. To allow a single rule, 497 these values are identified by their role (ES or LA) and not by their 498 position in the frame (source or destination). The LC must be aware 499 of the traffic direction (upstream, downstream) to select the 500 appropriate field. 502 6.7.1. IPv6 source and destination prefixes 504 Both ends must be synchronized with the appropriate prefixes. For a 505 specific flow, the source and destination prefix can be unique and 506 stored in the context. It can be either a link-local prefix or a 507 global prefix. In that case, the TV for the source and destination 508 prefixes contains the values, the MO is set to "equal" and the CDF is 509 set to "not-sent". 511 In case the rule allows several prefixes, static mapping must be 512 used. The different prefixes are listed in the TV associated with a 513 short ID. The MO is set to "match-mapping" and the CDF is set to 514 "mapping-sent". 516 Otherwise the TV contains the prefix, the MO is set to "equal" and 517 the CDF is set to value-sent. 519 6.7.2. IPv6 source and destination IID 521 If the ES or LA IID are based on an LPWAN address, then the IID can 522 be reconstructed with information coming from the LPWAN header. In 523 that case, the TV is not set, the MO is set to "ignore" and the CDF 524 is set to "ESiid-DID" or "LAiid-DID". Note that the LPWAN technology 525 is generally carrying a single device identifier corresponding to the 526 ES. The LC may also not be aware of these values. 528 For privacy reasons or if the ES address is changing over time, it 529 maybe better to use a static value. In that case, the TV contains 530 the value, the MO operator is set to "equal" and the CDF is set to 531 "not-sent". 533 If several IIDs are possible, then the TV contains the list of 534 possible IID, the MO is set to "match-mapping" and the CDF is set to 535 "mapping-sent". 537 Otherwise the value variation of the IID may be reduced to few bytes. 538 In that case, the TV is set to the stable part of the IID, the MO is 539 set to MSB and the CDF is set to LSB. 541 Finally, the IID can be sent on the LPWAN. In that case, the TV is 542 not set, the MO is set to "ignore" and the CDF is set to "value- 543 sent". 545 6.8. IPv6 extensions 547 No extension rules are currently defined. They can be based on the 548 MOs and CDFs described above. 550 6.9. UDP source and destination port 552 To allow a single rule, the UDP port values are identified by their 553 role (ES or LA) and not by their position in the frame (source or 554 destination). The LC must be aware of the traffic direction 555 (upstream, downstream) to select the appropriate field. The 556 following rules apply for ES and LA port numbers. 558 If both ends knows the port number, it can be elided. The TV 559 contains the port number, the MO is set to "equal" and the CDF is set 560 to "not-sent". 562 If the port variation is on few bits, the TV contains the stable part 563 of the port number, the MO is set to "MSB" and the CDF is set to 564 "LSB". 566 If some well-known values are used, the TV can contain the list of 567 this values, the MO is set to "match-mapping" and the CDF is set to 568 "mapping-sent". 570 Otherwise the port numbers are sent on the LPWAN. The TV is not set, 571 the MO is set to "ignore" and the CDF is set to "value-sent". 573 6.10. UDP length field 575 If the LPWAN technology does not introduce padding, the UDP length 576 can be computed from the received data. In that case the TV is not 577 set, the MO is set to "ignore" and the CDF is set to "compute-UDP- 578 length". 580 If the payload is small, the TV can be set to 0x0000, the MO set to 581 "MSB" and the CDF to "LSB". 583 On other cases, the length must be sent and the CDF is replaced by 584 "value-sent". 586 6.11. UDP Checksum field 588 IPv6 mandates a checksum in the protocol above IP. Nevertheless, if 589 a more efficient mechanism such as L2 CRC or MIC is carried by or 590 over the L2 (such as in the LPWAN fragmentation process (see XXXX)), 591 the UDP checksum transmission can be avoided. In that case, the TV 592 is not set, the MO is set to "ignore" and the CDF is set to "compute- 593 UDP-checksum". 595 In other cases the checksum must be explicitly sent. The TV is not 596 set, the MO is set to "ignore" and the CDF is set to "value-sent". 598 7. Examples 600 This section gives some scenarios of the compression mechanism for 601 IPv6/UDP. The goal is to illustrate the SCHC behavior. 603 7.1. IPv6/UDP compression 605 The most common case using the mechanisms defined in this document 606 will be a LPWAN end-system that embeds some applications running over 607 CoAP. In this example, three flows are considered. The first flow 608 is for the device management based on CoAP using Link Local IPv6 609 addresses and UDP ports 123 and 124 for ES and LA, respectively. The 610 second flow will be a CoAP server for measurements done by the end- 611 system (using ports 5683) and Global IPv6 Address prefixes 612 alpha::IID/64 to beta::1/64. The last flow is for legacy 613 applications using different ports numbers, the destination IPv6 614 address prefix is gamma::1/64. 616 Figure 4 presents the protocol stack for this End-System. IPv6 and 617 UDP are represented with dotted lines since these protocols are 618 compressed on the radio link. 620 Managment Data 621 +----------+---------+---------+ 622 | CoAP | CoAP | legacy | 623 +----||----+---||----+---||----+ 624 . UDP . UDP | UDP | 625 ................................ 626 . IPv6 . IPv6 . IPv6 . 627 +------------------------------+ 628 | SCHC Header compression | 629 | and fragmentation | 630 +------------------------------+ 631 | 6LPWA L2 technologies | 632 +------------------------------+ 633 End System or LPWA GW 635 Figure 4: Simplified Protocol Stack for LP-WAN 637 Note that in some LPWAN technologies, only the End Systems have a 638 device ID. Therefore, when such technologie are used, it is 639 necessary to define statically an IID for the Link Local address for 640 the LPWAN compressor. 642 Rule 0 643 +----------------+---------+--------+-------------++------+ 644 | Field | Value | Match | Function || Sent | 645 +----------------+---------+----------------------++------+ 646 |IPv6 version |6 | equal | not-sent || | 647 |IPv6 DiffServ |0 | equal | not-sent || | 648 |IPv6 Flow Label |0 | equal | not-sent || | 649 |IPv6 Length | | ignore | comp-IPv6-l || | 650 |IPv6 Next Header|17 | equal | not-sent || | 651 |IPv6 Hop Limit |255 | ignore | not-sent || | 652 |IPv6 ESprefix |FE80::/64| equal | not-sent || | 653 |IPv6 ESiid | | ignore | ESiid-DID || | 654 |IPv6 LCprefix |FE80::/64| equal | not-sent || | 655 |IPv6 LAiid |::1 | equal | not-sent || | 656 +================+=========+========+=============++======+ 657 |UDP ESport |123 | equal | not-sent || | 658 |UDP LAport |124 | equal | not-sent || | 659 |UDP Length | | ignore | comp-length || | 660 |UDP checksum | | ignore | comp-chk || | 661 +================+=========+========+=============++======+ 663 Rule 1 664 +----------------+---------+--------+-------------++------+ 665 | Field | Value | Match | Function || Sent | 666 +----------------+---------+--------+-------------++------+ 667 |IPv6 version |6 | equal | not-sent || | 668 |IPv6 DiffServ |0 | equal | not-sent || | 669 |IPv6 Flow Label |0 | equal | not-sent || | 670 |IPv6 Length | | ignore | comp-IPv6-l || | 671 |IPv6 Next Header|17 | equal | not-sent || | 672 |IPv6 Hop Limit |255 | ignore | not-sent || | 673 |IPv6 ESprefix |alpha/64 | equal | not-sent || | 674 |IPv6 ESiid | | ignore | ESiid-DID || | 675 |IPv6 LAprefix |beta/64 | equal | not-sent || | 676 |IPv6 LAiid |::1000 | equal | not-sent || | 677 +================+=========+========+=============++======+ 678 |UDP ESport |5683 | equal | not-sent || | 679 |UDP LAport |5683 | equal | not-sent || | 680 |UDP Length | | ignore | comp-length || | 681 |UDP checksum | | ignore | comp-chk || | 682 +================+=========+========+=============++======+ 684 Rule 2 685 +----------------+---------+--------+-------------++------+ 686 | Field | Value | Match | Function || Sent | 687 +----------------+---------+--------+-------------++------+ 688 |IPv6 version |6 | equal | not-sent || | 689 |IPv6 DiffServ |0 | equal | not-sent || | 690 |IPv6 Flow Label |0 | equal | not-sent || | 691 |IPv6 Length | | ignore | comp-IPv6-l || | 692 |IPv6 Next Header|17 | equal | not-sent || | 693 |IPv6 Hop Limit |255 | ignore | not-sent || | 694 |IPv6 ESprefix |alpha/64 | equal | not-sent || | 695 |IPv6 ESiid | | ignore | ESiid-DID || | 696 |IPv6 LAprefix |gamma/64 | equal | not-sent || | 697 |IPv6 LAiid |::1000 | equal | not-sent || | 698 +================+=========+========+=============++======+ 699 |UDP ESport |8720 | MSB(12)| LSB(4) || lsb | 700 |UDP LAport |8720 | MSB(12)| LSB(4) || lsb | 701 |UDP Length | | ignore | comp-length || | 702 |UDP checksum | | ignore | comp-chk || | 703 +================+=========+========+=============++======+ 705 Figure 5: Context rules 707 All the fields described in the three rules Figure 5 are present in 708 the IPv6 and UDP headers. The ESDevice-ID value is found in the L2 709 header. 711 The second and third rules use global addresses. The way the ES 712 learns the prefix is not in the scope of the document. 714 The third rule compresses port numbers to 4 bits. 716 8. Fragmentation 718 8.1. Overview 720 Fragmentation in LPWAN is mandatory and it is used if after the SCHC 721 header compression the size of the packet is larger than the L2 data 722 unit maximum payload or if the SCHC header compression is not able to 723 compress the packet. In LPWAN technologies the L2 data unit size 724 typically varies from tens to hundreds of bytes. If the entire IPv6 725 datagram fits within a single L2 data unit, the fragmentation 726 mechanims is not used and the packet is sent unfragmented. 727 If the datagram does not fit within a single L2 data unit, it SHALL 728 be broken into fragments. 730 Moreover, LPWAN technologies impose some strict limitations on 731 traffic; therefore it is desirable to enable optional fragment 732 retransmission, while a single fragment loss should not lead to 733 retransmitting the full datagram. To preserve energy, Things (End 734 Systems) are sleeping most of the time and may receive data during a 735 short period of time after transmission. 737 This specification enables two main fragment delivery reliability 738 options, namely: Unreliable and Reliable. The same reliability 739 option MUST be used for all fragments of a packet. Note that the 740 fragment delivery reliability option to be used is not necessarily 741 tied to the particular characteristics of the underlying L2 LPWAN 742 technology (e.g. Unreliable may be used on top of an L2 LPWAN 743 technology with symmetric characteristics for uplink and downlink). 745 In Unreliable, the receiver MUST NOT issue acknowledgments and the 746 sender MUST NOT perform fragment transmission retries. 748 In Reliable, there exist two possible suboptions, namely: packet mode 749 and window mode. In packet mode, the receiver may transmit one 750 acknowledgment (ACK) after all fragments carrying an IPv6 packet have 751 been transmitted. The ACK informs the sender about received and 752 missing fragments from the IPv6 packet. In window mode, an ACK may 753 be transmitted by the fragment receiver after a window of fragments 754 have been sent. A window of fragments is a subset of the fragments 755 needed to carry an IPv6 packet. In this mode, the ACK informs the 756 sender about received and missing fragments from the window of 757 fragments. In either mode, upon receipt of an ACK that informs about 758 any lost fragments, the sender may retransmit the lost fragments. 759 The maximum number of ACK and retransmission rounds is TBD. In 760 Reliable, the same reliability suboption MUST be used for all 761 fragments of a packet. 763 Some LPWAN deployments may benefit from conditioning the creation and 764 transmission of an ACK to the detection of at least one fragment loss 765 (per-packet or per-window), thus leading to negative ACK (NACK)- 766 oriented behavior, while not having such condition may be preferred 767 for other scenarios. 769 This document does not make any decision as to whether Unreliable or 770 Reliable are used, or whether in Reliable a fragment receiver 771 generates ACKs per packet or per window, or whether the transmission 772 of such ACKs is conditioned to the detection of fragment losses or 773 not. A complete specification of the receiver and sender behaviors 774 that correspond to each acknowledgment policy is also out of scope. 775 Nevertheless, this document does provide examples of the different 776 reliability options described. 778 8.2. Fragment format 780 A fragment comprises a fragmentation header and a fragment payload, 781 and conforms to the format shown in Figure 6. The fragment payload 782 carries a subset of either the IPv6 packet after header compression 783 or an IPv6 packet which could not be compressed. A fragment is the 784 payload in the L2 protocol data unit (PDU). 786 +---------------+-----------------------+ 787 | Fragm. Header | Fragment payload | 788 +---------------+-----------------------+ 790 Figure 6: Fragment format. 792 8.3. Fragmentation header formats 794 Fragments except the last one SHALL 795 contain the fragmentation header as defined in Figure 7. The total 796 size of this fragmentation header is R bits. 798 <----------- R -----------> 799 <-- N --> 800 +----- ... -----+-- ... --+ 801 | Rule ID | CFN | 802 +----- ... -----+-- ... --+ 804 Figure 7: Fragmentation Header for Fragments except the Last One 806 The last fragment SHALL contain a fragmentation header that conforms 807 to the format shown in Figure 8. The total size of this 808 fragmentation header is R+M bits. 810 <----------- R ----------> 811 <-- N --> <---- M -----> 812 +----- ... -----+-- ... --+---- ... ----+ 813 | Rule ID | 11..1 | MIC | 814 +----- ... -----+-- ... --+---- ... ----+ 816 Figure 8: Fragmentation Header for the Last Fragment 818 Rule ID: this field has a size of R - N bits in all fragments. Rule 819 ID may be used to signal whether Unreliable or Reliable are in use, 820 and within the latter, whether window mode or packet mode are used. 822 CFN: CFN stands for Compressed Fragment Number. The size of the CFN 823 field is N bits. In Unreliable, N=1. For Reliable, N equal to or 824 greater than 3 is recommended. This field is an unsigned integer 825 that carries a non-absolute fragment number. The CFN MUST be set 826 sequentially decreasing from 2^N - 2 for the first fragment, and MUST 827 wrap from 0 back to 2^N - 2 (e.g. for N=3, the first fragment has 828 CFN=6, subsequent CFNs are set sequentially and in decreasing order, 829 and CFN will wrap from 0 back to 6). The CFN for the last fragment 830 has all bits set to 1. Note that, by this definition, the CFN value 831 of 2^N - 1 is only used to identify a fragment as the last fragment 832 carrying a subset of the IPv6 packet being transported, and thus the 833 CFN does not strictly correspond to the N least significant bits of 834 the actual absolute fragment number. It is also important to note 835 that, for N=1, the last fragment of the packet will carry a CFN equal 836 to 1, while all previous fragments will carry a CFN of 0. 838 MIC: MIC stands for Message Integrity Check. This field has a size 839 of M bits. It is computed by the sender over the complete IPv6 840 packet before fragmentation by using the TBD algorithm. The MIC 841 allows to check for errors in the reassembled IPv6 packet, while it 842 also enables compressing the UDP checksum by use of SCHC. 844 8.4. ACK format 846 The format of an ACK is shown in Figure 9: 848 <----- R ----> 849 +-+-+-+-+-+-+-+-+----- ... ---+ 850 | Rule ID | bitmap | 851 +-+-+-+-+-+-+-+-+----- ... ---+ 853 Figure 9: Format of an ACK 855 Rule ID: In all ACKs, Rule ID has a size of R bits and SHALL be set 856 to TBD_ACK to signal that the message is an ACK. 858 bitmap: size of the bitmap field of an ACK can be equal to 0 or 859 Ceiling(Number_of_Fragments/8) octets, where Number_of_Fragments 860 denotes the number of fragments of a window (in window mode) or the 861 number of fragments that carry the IPv6 packet (in packet mode). The 862 bitmap is a sequence of bits, where the n-th bit signals whether the 863 n-th fragment transmitted has been correctly received (n-th bit set 864 to 1) or not (n-th bit set to 0). Remaining bits with bit order 865 greater than the number of fragments sent (as determined by the 866 receiver) are set to 0, except for the last bit in the bitmap, which 867 is set to 1 if the last fragment (carrying the MIC) has been 868 correctly received, and 0 otherwise. Absence of the bitmap in an ACK 869 confirms correct reception of all fragments to be acknowledged by 870 means of the ACK. 872 Figure 10 shows an example of an ACK in packet mode, where the bitmap 873 indicates that the second and the ninth fragments have not been 874 correctly received. In this example, the IPv6 packet is carried by 875 eleven fragments in total, therefore the bitmap in has a size of two 876 bytes. 878 1 879 <----- R ----> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 880 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 881 | Rule ID |1|0|1|1|1|1|1|1|0|1|1|0|0|0|0|1| 882 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 884 Figure 10: Example of the Bitmap in an ACK 886 Figure 11 shows an example of an ACK in window mode (N=3), where the 887 bitmap indicates that the second and the fifth fragments have not 888 been correctly received. 890 <----- R ----> 0 1 2 3 4 5 6 7 891 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 892 | Rule ID |1|0|1|1|0|1|1|1| 893 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 895 Figure 11: Example of the bitmap in an ACK (in window mode, for N=3) 897 Figure 12 illustrates an ACK without bitmap. 899 <----- R ----> 900 +-+-+-+-+-+-+-+-+ 901 | Rule ID | 902 +-+-+-+-+-+-+-+-+ 904 Figure 12: Example of an ACK without bitmap 906 8.5. Baseline mechanism 908 The receiver of link fragments SHALL use (1) the sender's L2 source 909 address (if present), (2) the destination's L2 address (if present), 910 and (3) Rule ID to identify all the fragments that belong to a given 911 datagram. The fragment receiver SHALL determine the fragment 912 delivery reliability option in use for the fragment based on the Rule 913 ID field in that fragment. 915 Upon receipt of a link fragment, the receiver starts constructing the 916 original unfragmented packet. It uses the CFN and the order of 917 arrival of each fragment to determine the location of the individual 918 fragments within the original unfragmented packet. For example, it 919 may place the data payload of the fragments within a payload datagram 920 reassembly buffer at the location determined from the CFN and order 921 of arrival of the fragments, and the fragment payload sizes. Note 922 that the size of the original, unfragmented IPv6 packet cannot be 923 determined from fragmentation headers. 925 In Reliable, when a fragment with all CFN bits set to 0 is received, 926 the recipient MAY transmit an ACK for the last window of fragments 927 sent. Note that the first fragment of the window is the one sent 928 with CFN=2^N-2. In window mode, the fragment with CFN=0 is 929 considered the last fragment of its window, except for the last 930 fragment (with all CFN bits set to 1). The last fragment of a packet 931 is also the last fragment of the last window. 933 Once the recipient has received the last fragment, it checks for the 934 integrity of the reassembled IPv6 datagram, based on the MIC 935 received. In Unreliable, if the integrity check indicates that the 936 reassembled IPv6 datagram does not match the original IPv6 datagram 937 (prior to fragmentation), the reassembled IPv6 datagram MUST be 938 discarded. In Reliable, upon receipt of the last fragment (i.e. with 939 all CFN bits set to 1), the recipient MAY transmit an ACK for the 940 last window of fragments sent (window mode) or for the whole set of 941 fragments sent that carry a complete IPv6 packet (packet mode). In 942 Reliable, the sender retransmits any lost fragments reported in the 943 ACK. A maximum of TBD iterations of ACK and fragment retransmission 944 rounds are allowed per-window or per-IPv6-packet in window mode or in 945 packet mode, respectively. A complete specification of the 946 mechanisms needed to enable the above described fragment delivery 947 reliability options is out of the scope of this document. 949 If a fragment recipient disassociates from its L2 network, the 950 recipient MUST discard all link fragments of all partially 951 reassembled payload datagrams, and fragment senders MUST discard all 952 not yet transmitted link fragments of all partially transmitted 953 payload (e.g., IPv6) datagrams. Similarly, when a node first 954 receives a fragment of a packet, it starts a reassembly timer. When 955 this time expires, if the entire packet has not been reassembled, the 956 existing fragments MUST be discarded and the reassembly state MUST be 957 flushed. The reassembly timeout MUST be set to a maximum of TBD 958 seconds). 960 8.6. Examples 962 This section provides examples of different fragment delivery 963 reliability options possible on the basis of this specification. 965 Figure 13 illustrates the transmission of an IPv6 packet that needs 966 11 fragments in Unreliable. 968 Sender Receiver 969 |-------CFN=0-------->| 970 |-------CFN=0-------->| 971 |-------CFN=0-------->| 972 |-------CFN=0-------->| 973 |-------CFN=0-------->| 974 |-------CFN=0-------->| 975 |-------CFN=0-------->| 976 |-------CFN=0-------->| 977 |-------CFN=0-------->| 978 |-------CFN=0-------->| 979 |-------CFN=1-------->|MIC checked => 981 Figure 13: Transmission of an IPv6 packet carried by 11 fragments in 982 Unreliable 984 Figure 14 illustrates the transmission of an IPv6 packet that needs 985 11 fragments in Reliable, for N=3, NACK-oriented packet mode, without 986 losses. 988 Sender Receiver 989 |-------CFN=6-------->| 990 |-------CFN=5-------->| 991 |-------CFN=4-------->| 992 |-------CFN=3-------->| 993 |-------CFN=2-------->| 994 |-------CFN=1-------->| 995 |-------CFN=0-------->| 996 |-------CFN=6-------->| 997 |-------CFN=5-------->| 998 |-------CFN=4-------->| 999 |-------CFN=7-------->|MIC checked => 1000 (no NACK) 1002 Figure 14: Transmission of an IPv6 packet carried by 11 fragments in 1003 Reliable, for N=3, NACK-oriented packet mode; no losses. 1005 Figure 15 illustrates the transmission of an IPv6 packet that needs 1006 11 fragments in Reliable, for N=3, NACK-oriented packet mode, with 1007 three losses. 1009 Sender Receiver 1010 |-------CFN=6-------->| 1011 |-------CFN=5-------->| 1012 |-------CFN=4---X---->| 1013 |-------CFN=3-------->| 1014 |-------CFN=2---X---->| 1015 |-------CFN=1-------->| 1016 |-------CFN=0-------->| 1017 |-------CFN=6-------->| 1018 |-------CFN=5-------->| 1019 |-------CFN=4---X---->| 1020 |-------CFN=7-------->|MIC checked => 1021 |<-------NACK---------|Bitmap:1101011110100000 1022 |-------CFN=4-------->| 1023 |-------CFN=2-------->| 1024 |-------CFN=4-------->|MIC checked => 1025 (no NACK) 1027 Figure 15: Transmission of an IPv6 packet carried by 11 fragments in 1028 Reliable, for N=3, NACK-oriented packet mode; three losses. 1030 Figure 16 illustrates the transmission of an IPv6 packet that needs 1031 11 fragments in Reliable, window mode, for N=3, without losses. 1032 Receiver feedback is NACK-oriented. Note: in window mode, an 1033 additional bit will be needed to number windows. 1035 Sender Receiver 1036 |-------CFN=6-------->| 1037 |-------CFN=5-------->| 1038 |-------CFN=4-------->| 1039 |-------CFN=3-------->| 1040 |-------CFN=2-------->| 1041 |-------CFN=1-------->| 1042 |-------CFN=0-------->| 1043 (no NACK) 1044 |-------CFN=6-------->| 1045 |-------CFN=5-------->| 1046 |-------CFN=4-------->| 1047 |-------CFN=7-------->|MIC checked => 1048 (no NACK) 1050 Figure 16: Transmission of an IPv6 packet carried by 11 fragments in 1051 Reliable, for N=3, NACK-oriented window mode; without losses. 1053 Figure 17 illustrates the transmission of an IPv6 packet that needs 1054 11 fragments in Reliable, window mode, for N=3, with three losses. 1055 Receiver feedback is NACK-oriented. Note: in window mode, an 1056 additional bit will be needed to number windows. 1058 Sender Receiver 1059 |-------CFN=6-------->| 1060 |-------CFN=5-------->| 1061 |-------CFN=4---X---->| 1062 |-------CFN=3-------->| 1063 |-------CFN=2---X---->| 1064 |-------CFN=1-------->| 1065 |-------CFN=0-------->| 1066 |<-------NACK---------|Bitmap:11010110 1067 |-------CFN=4-------->| 1068 |-------CFN=2-------->| 1069 (no NACK) 1070 |-------CFN=6-------->| 1071 |-------CFN=5-------->| 1072 |-------CFN=4---X---->| 1073 |-------CFN=7-------->|MIC checked => 1074 |<-------NACK---------|Bitmap:11010000 1075 |-------CFN=4-------->|MIC checked => 1076 (no NACK) 1078 Figure 17: Transmission of an IPv6 packet carried by 11 fragments in 1079 Reliable, for N=3, NACK-oriented window mode; three losses. 1081 Figure 18 illustrates the transmission of an IPv6 packet that needs 1082 11 fragments in Reliable, packet mode, for N=3, without losses. 1083 Receiver feedback is positive-ACK-oriented. 1085 Sender Receiver 1086 |-------CFN=6-------->| 1087 |-------CFN=5-------->| 1088 |-------CFN=4-------->| 1089 |-------CFN=3-------->| 1090 |-------CFN=2-------->| 1091 |-------CFN=1-------->| 1092 |-------CFN=0-------->| 1093 |-------CFN=6-------->| 1094 |-------CFN=5-------->| 1095 |-------CFN=4-------->| 1096 |-------CFN=7-------->|MIC checked => 1097 |<-------ACK----------|no bitmap 1098 (End) 1100 Figure 18: Transmission of an IPv6 packet carried by 11 fragments in 1101 Reliable, for N=3, packet mode, positive-ACK-oriented; no losses. 1103 Figure 19 illustrates the transmission of an IPv6 packet that needs 1104 11 fragments in Reliable, packet mode, for N=3, with three losses. 1105 Receiver feedback is positive-ACK-oriented. 1107 Sender Receiver 1108 |-------CFN=6-------->| 1109 |-------CFN=5-------->| 1110 |-------CFN=4---X---->| 1111 |-------CFN=3-------->| 1112 |-------CFN=2---X---->| 1113 |-------CFN=1-------->| 1114 |-------CFN=0-------->| 1115 |-------CFN=6-------->| 1116 |-------CFN=5-------->| 1117 |-------CFN=4---X---->| 1118 |-------CFN=7-------->|MIC checked => 1119 |<-------ACK----------|bitmap:1101011110100000 1120 |-------CFN=4-------->| 1121 |-------CFN=2-------->| 1122 |-------CFN=4-------->|MIC checked => 1123 |<-------ACK----------|no bitmap 1124 (End) 1126 Figure 19: Transmission of an IPv6 packet carried by 11 fragments in 1127 Reliable, for N=3, packet mode, positive-ACK-oriented; with three 1128 losses. 1130 8.6.1. Reliable, window mode, ACK-oriented 1132 Figure 20 illustrates the transmission of an IPv6 packet that needs 1133 11 fragments in Reliable, window mode, for N=3, without losses. 1134 Receiver feedback is positive-ACK-oriented. Note: in window mode, an 1135 additional bit will be needed to number windows. 1137 Sender Receiver 1138 |-------CFN=6-------->| 1139 |-------CFN=5-------->| 1140 |-------CFN=4-------->| 1141 |-------CFN=3-------->| 1142 |-------CFN=2-------->| 1143 |-------CFN=1-------->| 1144 |-------CFN=0-------->| 1145 |<-------ACK----------|no bitmap 1146 |-------CFN=6-------->| 1147 |-------CFN=5-------->| 1148 |-------CFN=4-------->| 1149 |-------CFN=7-------->|MIC checked => 1150 |<-------ACK----------|no bitmap 1151 (End) 1153 Figure 20: Transmission of an IPv6 packet carried by 11 fragments in 1154 Reliable, for N=3, window mode, positive-ACK-oriented; no losses. 1156 Figure 21 illustrates the transmission of an IPv6 packet that needs 1157 11 fragments in Reliable, window mode, for N=3, with three losses. 1158 Receiver feedback is positive-ACK-oriented. Note: in window mode, an 1159 additional bit will be needed to number windows. 1161 Sender Receiver 1162 |-------CFN=6-------->| 1163 |-------CFN=5-------->| 1164 |-------CFN=4---X---->| 1165 |-------CFN=3-------->| 1166 |-------CFN=2---X---->| 1167 |-------CFN=1-------->| 1168 |-------CFN=0-------->| 1169 |<-------ACK----------|bitmap:11010110 1170 |-------CFN=4-------->| 1171 |-------CFN=2-------->| 1172 |<-------ACK----------|no bitmap 1173 |-------CFN=6-------->| 1174 |-------CFN=5-------->| 1175 |-------CFN=4---X---->| 1176 |-------CFN=7-------->|MIC checked => 1177 |<-------ACK----------|bitmap:11010000 1178 |-------CFN=4-------->|MIC checked => 1179 |<-------ACK----------|no bitmap 1180 (End) 1182 Figure 21: Transmission of an IPv6 packet carried by 11 fragments in 1183 Reliable, for N=3, window mode, positive-ACK-oriented; with three 1184 losses. 1186 9. Security considerations 1188 9.1. Security considerations for header compression 1190 TBD 1192 9.2. Security considerations for fragmentation 1194 This subsection describes potential attacks to LPWAN fragmentation 1195 and proposes countermeasures, based on existing analysis of attacks 1196 to 6LoWPAN fragmentation {HHWH}. 1198 A node can perform a buffer reservation attack by sending a first 1199 fragment to a target. Then, the receiver will reserve buffer space 1200 for the whole packet on the basis of the datagram size announced in 1201 that first fragment. Other incoming fragmented packets will be 1202 dropped while the reassembly buffer is occupied during the reassembly 1203 timeout. Once that timeout expires, the attacker can repeat the same 1204 procedure, and iterate, thus creating a denial of service attack. 1205 The (low) cost to mount this attack is linear with the number of 1206 buffers at the target node. However, the cost for an attacker can be 1207 increased if individual fragments of multiple packets can be stored 1208 in the reassembly buffer. To further increase the attack cost, the 1209 reassembly buffer can be split into fragment-sized buffer slots. 1210 Once a packet is complete, it is processed normally. If buffer 1211 overload occurs, a receiver can discard packets based on the sender 1212 behavior, which may help identify which fragments have been sent by 1213 an attacker. 1215 In another type of attack, the malicious node is required to have 1216 overhearing capabilities. If an attacker can overhear a fragment, it 1217 can send a spoofed duplicate (e.g. with random payload) to the 1218 destination. A receiver cannot distinguish legitimate from spoofed 1219 fragments. Therefore, the original IPv6 packet will be considered 1220 corrupt and will be dropped. To protect resource-constrained nodes 1221 from this attack, it has been proposed to establish a binding among 1222 the fragments to be transmitted by a node, by applying content- 1223 chaining to the different fragments, based on cryptographic hash 1224 functionality. The aim of this technique is to allow a receiver to 1225 identify illegitimate fragments. 1227 Further attacks may involve sending overlapped fragments (i.e. 1228 comprising some overlapping parts of the original IPv6 datagram). 1229 Implementers should make sure that correct operation is not affected 1230 by such event. 1232 10. Acknowledgements 1234 Thanks to Dominique Barthel, Carsten Bormann, Arunprabhu Kandasamy, 1235 Antony Markovski, Alexander Pelov, Pascal Thubert, Juan Carlos Zuniga 1236 for useful design consideration. 1238 In the fragmentation section, the authors have reused parts of text 1239 available in section 5.3 of RFC 4944, and would like to thank the 1240 authors of RFC 4944. 1242 Carles Gomez has been funded in part by the Spanish Government 1243 (Ministerio de Educacion, Cultura y Deporte) through the Jose 1244 Castillejo grant CAS15/00336, and by the ERDF and the Spanish 1245 Government through project TEC2016-79988-P. Part of his contribution 1246 to this work has been carried out during his stay as a visiting 1247 scholar at the Computer Laboratory of the University of Cambridge. 1249 11. References 1251 11.1. Normative References 1253 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1254 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, 1255 December 1998, . 1257 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1258 "Transmission of IPv6 Packets over IEEE 802.15.4 1259 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1260 . 1262 11.2. Informative References 1264 [I-D.ietf-lpwan-overview] 1265 Farrell, S., "LPWAN Overview", draft-ietf-lpwan- 1266 overview-01 (work in progress), February 2017. 1268 [I-D.minaburo-lp-wan-gap-analysis] 1269 Minaburo, A., Pelov, A., and L. Toutain, "LP-WAN GAP 1270 Analysis", draft-minaburo-lp-wan-gap-analysis-01 (work in 1271 progress), February 2016. 1273 Authors' Addresses 1275 Ana Minaburo 1276 Acklio 1277 2bis rue de la Chataigneraie 1278 35510 Cesson-Sevigne Cedex 1279 France 1281 Email: ana@ackl.io 1283 Laurent Toutain 1284 IMT-Atlantique 1285 2 rue de la Chataigneraie 1286 CS 17607 1287 35576 Cesson-Sevigne Cedex 1288 France 1290 Email: Laurent.Toutain@imt-atlantique.fr 1292 Carles Gomez 1293 Universitat Politecnica de Catalunya 1294 C/Esteve Terradas, 7 1295 08860 Castelldefels 1296 Spain 1298 Email: carlesgo@entel.upc.edu