idnits 2.17.1 draft-ietf-lpwan-ipv6-static-context-hc-05.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 942: '...within a single L2 data unit, it SHALL...' RFC 2119 keyword, line 975: '...liability option MUST be used for all ...' RFC 2119 keyword, line 985: '...on, the receiver MUST NOT issue acknow...' RFC 2119 keyword, line 1107: '... except the last one SHALL contain the...' RFC 2119 keyword, line 1121: '... 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 (July 01, 2017) is 2490 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Looks like a reference, but probably isn't: '1' on line 879 -- Looks like a reference, but probably isn't: '2' on line 882 -- Looks like a reference, but probably isn't: '8' on line 904 -- Looks like a reference, but probably isn't: '4' on line 911 ** Obsolete normative reference: RFC 2460 (Obsoleted by RFC 8200) == Outdated reference: A later version (-10) exists of draft-ietf-lpwan-overview-04 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: January 2, 2018 IMT-Atlantique 6 C. Gomez 7 Universitat Politecnica de Catalunya 8 July 01, 2017 10 LPWAN Static Context Header Compression (SCHC) and fragmentation for 11 IPv6 and UDP 12 draft-ietf-lpwan-ipv6-static-context-hc-05 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, avoiding complex 27 resynchronization mechanisms, incompatible with LPWAN 28 characteristics. In most of the cases, IPv6/UDP headers are reduced 29 to a small identifier called Rule ID. But sometimes the SCHC header 30 compression mechanisms will not be enough to send the compressed 31 packet in one L2 PDU, so the SCHC Fragmentation protocol must be used 32 when needed. 34 This document describes SCHC compression/decompression mechanism 35 framework and applies it to IPv6/UDP headers. Similar solutions for 36 other protocols such as CoAP will be described in separate documents. 37 Moreover, this document specifies fragmentation and reassembly 38 mechanim for SCHC compressed packets exceeding the L2 PDU size and 39 for the case where the SCHC compression is not possible then the 40 packet is sent using the fragmentation protocol. 42 Status of This Memo 44 This Internet-Draft is submitted in full conformance with the 45 provisions of BCP 78 and BCP 79. 47 Internet-Drafts are working documents of the Internet Engineering 48 Task Force (IETF). Note that other groups may also distribute 49 working documents as Internet-Drafts. The list of current Internet- 50 Drafts is at http://datatracker.ietf.org/drafts/current/. 52 Internet-Drafts are draft documents valid for a maximum of six months 53 and may be updated, replaced, or obsoleted by other documents at any 54 time. It is inappropriate to use Internet-Drafts as reference 55 material or to cite them other than as "work in progress." 57 This Internet-Draft will expire on January 2, 2018. 59 Copyright Notice 61 Copyright (c) 2017 IETF Trust and the persons identified as the 62 document authors. All rights reserved. 64 This document is subject to BCP 78 and the IETF Trust's Legal 65 Provisions Relating to IETF Documents 66 (http://trustee.ietf.org/license-info) in effect on the date of 67 publication of this document. Please review these documents 68 carefully, as they describe your rights and restrictions with respect 69 to this document. Code Components extracted from this document must 70 include Simplified BSD License text as described in Section 4.e of 71 the Trust Legal Provisions and are provided without warranty as 72 described in the Simplified BSD License. 74 Table of Contents 76 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 77 2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4 78 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 79 4. Static Context Header Compression . . . . . . . . . . . . . . 6 80 4.1. SCHC Rules . . . . . . . . . . . . . . . . . . . . . . . 7 81 4.2. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . 9 82 4.3. Packet processing . . . . . . . . . . . . . . . . . . . . 9 83 5. Matching operators . . . . . . . . . . . . . . . . . . . . . 10 84 6. Compression Decompression Actions (CDA) . . . . . . . . . . . 11 85 6.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . . . 12 86 6.2. value-sent CDA . . . . . . . . . . . . . . . . . . . . . 12 87 6.3. mapping-sent . . . . . . . . . . . . . . . . . . . . . . 12 88 6.4. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . . . 13 89 6.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . . . 13 90 6.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . . . 13 91 7. Application to IPv6 and UDP headers . . . . . . . . . . . . . 14 92 7.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 14 93 7.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 14 94 7.3. Flow label field . . . . . . . . . . . . . . . . . . . . 14 95 7.4. Payload Length field . . . . . . . . . . . . . . . . . . 15 96 7.5. Next Header field . . . . . . . . . . . . . . . . . . . . 15 97 7.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 15 98 7.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 16 99 7.7.1. IPv6 source and destination prefixes . . . . . . . . 16 100 7.7.2. IPv6 source and destination IID . . . . . . . . . . . 16 101 7.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 17 102 7.9. UDP source and destination port . . . . . . . . . . . . . 17 103 7.10. UDP length field . . . . . . . . . . . . . . . . . . . . 17 104 7.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 18 105 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 18 106 8.1. IPv6/UDP compression . . . . . . . . . . . . . . . . . . 18 107 9. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 21 108 9.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 21 109 9.2. Reliability options: definition . . . . . . . . . . . . . 22 110 9.3. Reliability options: discussion . . . . . . . . . . . . . 23 111 9.4. Tools . . . . . . . . . . . . . . . . . . . . . . . . . . 23 112 9.5. Formats . . . . . . . . . . . . . . . . . . . . . . . . . 24 113 9.5.1. Fragment format . . . . . . . . . . . . . . . . . . . 24 114 9.5.2. Fragmentation header formats . . . . . . . . . . . . 25 115 9.5.3. ACK format . . . . . . . . . . . . . . . . . . . . . 27 116 9.6. Baseline mechanism . . . . . . . . . . . . . . . . . . . 28 117 9.7. Supporting multiple window sizes . . . . . . . . . . . . 31 118 9.8. Aborting fragmented IPv6 datagram transmissions . . . . . 31 119 9.9. Downlink fragment transmission . . . . . . . . . . . . . 31 120 10. Security considerations . . . . . . . . . . . . . . . . . . . 31 121 10.1. Security considerations for header compression . . . . . 31 122 10.2. Security considerations for fragmentation . . . . . . . 32 123 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 32 124 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 33 125 12.1. Normative References . . . . . . . . . . . . . . . . . . 33 126 12.2. Informative References . . . . . . . . . . . . . . . . . 33 127 Appendix A. Fragmentation examples . . . . . . . . . . . . . . . 33 128 Appendix B. Rule IDs for fragmentation . . . . . . . . . . . . . 36 129 Appendix C. Note . . . . . . . . . . . . . . . . . . . . . . . . 37 130 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 37 132 1. Introduction 134 Header compression is mandatory to efficiently bring Internet 135 connectivity to the node within a LPWAN network. Some LPWAN networks 136 properties can be exploited to get an efficient header compression: 138 o Topology is star-oriented, therefore all the packets follow the 139 same path. For the needs of this draft, the architecture can be 140 summarized to Devices (Dev) exchanging information with LPWAN 141 Application Server (App) through a Network Gateway (NGW). 143 o Traffic flows are mostly known in advance, since devices embed 144 built-in applications. Contrary to computers or smartphones, new 145 applications cannot be easily installed. 147 The Static Context Header Compression (SCHC) is defined for this 148 environment. SCHC uses a context where header information is kept in 149 the header format order. This context is static (the values on the 150 header fields do not change over time) avoiding complex 151 resynchronization mechanisms, incompatible with LPWAN 152 characteristics. In most of the cases, IPv6/UDP headers are reduced 153 to a small context identifier. 155 The SCHC header compression mechanism is independent from the 156 specific LPWAN technology over which it will be used. 158 LPWAN technologies are also characterized, among others, by a very 159 reduced data unit and/or payload size [I-D.ietf-lpwan-overview]. 160 However, some of these technologies do not support layer two 161 fragmentation, therefore the only option for them to support the IPv6 162 MTU requirement of 1280 bytes [RFC2460] is the use of a fragmentation 163 protocol at the adaptation layer below IPv6. This draft defines also 164 a fragmentation functionality to support the IPv6 MTU requirements 165 over LPWAN technologies. Such functionality has been designed under 166 the assumption that data unit reordering will not happen between the 167 entity performing fragmentation and the entity performing reassembly. 169 2. LPWAN Architecture 171 LPWAN technologies have similar architectures but different 172 terminology. We can identify different types of entities in a 173 typical LPWAN network, see Figure 1: 175 o Devices (Dev) are the end-devices or hosts (e.g. sensors, 176 actuators, etc.). There can be a high density of devices per radio 177 gateway. 179 o The Radio Gateway (RG), which is the end point of the constrained 180 link. 182 o The Network Gateway (NGW) is the interconnection node between the 183 Radio Gateway and the Internet. 185 o LPWAN-AAA Server, which controls the user authentication and the 186 applications. We use the term LPWAN-AAA server because we are not 187 assuming that this entity speaks RADIUS or Diameter as many/most AAA 188 servers do, but equally we don't want to rule that out, as the 189 functionality will be similar. 191 o Application Server (App) 193 +------+ 194 () () () | |LPWAN-| 195 () () () () / \ +---------+ | AAA | 196 () () () () () () / \=====| ^ |===|Server| +-----------+ 197 () () () | | <--|--> | +------+ |APPLICATION| 198 () () () () / \==========| v |=============| (App) | 199 () () () / \ +---------+ +-----------+ 200 Dev Radio Gateways NGW 202 Figure 1: LPWAN Architecture 204 3. Terminology 206 This section defines the terminology and acronyms used in this 207 document. 209 o App: LPWAN Application. An application sending/receiving IPv6 210 packets to/from the Device. 212 o APP-IID: Application Interface Identifier. Second part of the 213 IPv6 address to identify the application interface 215 o Bi: Bidirectional, it can be used in both senses 217 o CDA: Compression/Decompression Action. An action that is perfomed 218 for both functionnalities to compress a header field or to recover 219 its original value in the decompression phase. 221 o Context: A set of rules used to compress/decompress headers 223 o Dev: Device. Node connected to the LPWAN. A Dev may implement 224 SCHC. 226 o Dev-IID: Device Interface Identifier. Second part of the IPv6 227 address to identify the device interface 229 o DI: Direction Indicator is a differentiator for matching in order 230 to be able to have different values for both sides. 232 o Dw: Down Link direction for compression, from SCHC C/D to Dev 234 o FID: Field Indentifier is an index to describe the header fields 235 in the Rule 237 o FP: Field Position is a list of possible correct values that a 238 field may use 240 o IID: Interface Identifier. See the IPv6 addressing architecture 241 [RFC7136] 243 o MO: Matching Operator. An operator used to match a value 244 contained in a header field with a value contained in a Rule. 246 o Rule: A set of header field values. 248 o Rule ID: An identifier for a rule, SCHC C/D and Dev share the same 249 Rule ID for a specific flow. 251 o SCHC C/D: Static Context Header Compression Compressor/ 252 Decompressor. A process in the network to achieve compression/ 253 decompressing headers. SCHC C/D uses SCHC rules to perform 254 compression and decompression. 256 o TV: Target value. A value contained in the Rule that will be 257 matched with the value of a header field. 259 o Up: Up Link direction for compression, from Dev to SCHC C/D 261 4. Static Context Header Compression 263 Static Context Header Compression (SCHC) avoids context 264 synchronization, which is the most bandwidth-consuming operation in 265 other header compression mechanisms such as RoHC [RFC5795]. Based on 266 the fact that the nature of data flows is highly predictable in LPWAN 267 networks, some static contexts may be stored on the Device (Dev). 268 The contexts must be stored in both ends, and it can either be 269 learned by a provisioning protocol or by out of band means or it can 270 be pre-provosioned, etc. The way the context is learned on both 271 sides is out of the scope of this document. 273 Dev App 274 +--------------+ +--------------+ 275 |APP1 APP2 APP3| |APP1 APP2 APP3| 276 | | | | 277 | UDP | | UDP | 278 | IPv6 | | IPv6 | 279 | | | | 280 | SCHC C/D | | | 281 | (context) | | | 282 +-------+------+ +-------+------+ 283 | +--+ +----+ +---------+ . 284 +~~ |RG| === |NGW | === |SCHC C/D |... Internet .. 285 +--+ +----+ |(context)| 286 +---------+ 288 Figure 2: Architecture 290 Figure 2 represents the architecture for compression/decompression, 291 it is based on [I-D.ietf-lpwan-overview] terminology. The Device is 292 sending applications flows using IPv6 or IPv6/UDP protocols. These 293 flows are compressed by an Static Context Header Compression 294 Compressor/Decompressor (SCHC C/D) to reduce headers size. Resulting 295 information is sent on a layer two (L2) frame to a LPWAN Radio 296 Network (RG) which forwards the frame to a Network Gateway (NGW). 297 The NGW sends the data to a SCHC C/D for decompression which shares 298 the same rules with the Dev. The SCHC C/D can be located on the 299 Network Gateway (NGW) or in another place as long as a tunnel is 300 established between the NGW and the SCHC C/D. The SCHC C/D in both 301 sides must share the same set of Rules. After decompression, the 302 packet can be sent on the Internet to one or several LPWAN 303 Application Servers (App). 305 The SCHC C/D process is bidirectional, so the same principles can be 306 applied in the other direction. 308 4.1. SCHC Rules 310 The main idea of the SCHC compression scheme is to send the Rule id 311 to the other end instead of sending known field values. This Rule id 312 identifies a rule that match as much as possible the original packet 313 values. When a value is known by both ends, it is not necessary sent 314 through the LPWAN network. 316 The context contains a list of rules (cf. Figure 3). Each Rule 317 contains itself a list of fields descriptions composed of a field 318 identifier (FID), a field position (FP), a direction indicator (DI), 319 a target value (TV), a matching operator (MO) and a Compression/ 320 Decompression Action (CDA). 322 /--------------------------------------------------------------\ 323 | Rule N | 324 /--------------------------------------------------------------\| 325 | Rule i || 326 /--------------------------------------------------------------\|| 327 | (FID) Rule 1 ||| 328 |+-------+--+--+------------+-----------------+---------------+||| 329 ||Field 1|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 330 |+-------+--+--+------------+-----------------+---------------+||| 331 ||Field 2|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| 332 |+-------+--+--+------------+-----------------+---------------+||| 333 ||... |..|..| ... | ... | ... |||| 334 |+-------+--+--+------------+-----------------+---------------+||/ 335 ||Field N|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| 336 |+-------+--+--+------------+-----------------+---------------+|/ 337 | | 338 \--------------------------------------------------------------/ 340 Figure 3: Compression/Decompression Context 342 The Rule does not describe the original packet format which must be 343 known from the compressor/decompressor. The rule just describes the 344 compression/decompression behavior for the header fields. In the 345 rule, the description of the header field must be performed in the 346 format packet order. 348 The Rule also describes the compressed header fields which are 349 transmitted regarding their position in the rule which is used for 350 data serialization on the compressor side and data deserialization on 351 the decompressor side. 353 The Context describes the header fields and its values with the 354 following entries: 356 o A Field ID (FID) is a unique value to define the header field. 358 o A Field Position (FP) indicating if several instances of the field 359 exist in the headers which one is targeted. The default position 360 is 1 362 o A direction indicator (DI) indicating the packet direction. Three 363 values are possible: 365 * UP LINK (Up) when the field or the value is only present in 366 packets sent by the Dev to the App, 368 * DOWN LINK (Dw) when the field or the value is only present in 369 packet sent from the App to the Dev and 371 * BIDIRECTIONAL (Bi) when the field or the value is present 372 either upstream or downstream. 374 o A Target Value (TV) is the value used to make the comparison with 375 the packet header field. The Target Value can be of any type 376 (integer, strings,...). For instance, it can be a single value or 377 a more complex structure (array, list,...), such as a JSON or a 378 CBOR structure. 380 o A Matching Operator (MO) is the operator used to make the 381 comparison between the Field Value and the Target Value. The 382 Matching Operator may require some parameters. MO is only used 383 during the compression phase. 385 o A Compression Decompression Action (CDA) is used to describe the 386 compression and the decompression process. The CDA may require 387 some parameters, CDA are used in both compression and 388 decompression phases. 390 4.2. Rule ID 392 Rule IDs are sent between both compression/decompression elements. 393 The size of the Rule ID is not specified in this document, it is 394 implementation-specific and can vary regarding the LPWAN technology, 395 the number of flows, among others. 397 Some values in the Rule ID space may be reserved for goals other than 398 header compression as fragmentation. (See Section 9). 400 Rule IDs are specific to a Dev. Two Devs may use the same Rule ID for 401 different header compression. To identify the correct Rule ID, the 402 SCHC C/D needs to combine the Rule ID with the Dev L2 identifier to 403 find the appropriate Rule. 405 4.3. Packet processing 407 The compression/decompression process follows several steps: 409 o compression Rule selection: The goal is to identify which Rule(s) 410 will be used to compress the packet's headers. When doing 411 compression from Dw to Up the SCHC C/D needs to find the correct 412 Rule to use by identifying its Dev-ID and the Rule-ID. In the Up 413 situation only the Rule-ID is used. The next step is to choose 414 the fields by their direction, using the direction indicator (DI), 415 so the fields that do not correspond to the appropiated DI will be 416 excluded. Next, then the fields are identified according to their 417 field identifier (FID) and field position (FP). If the field 418 position does not correspond then the Rule is not use and the SCHC 419 take next Rule. Once the DI and the FP correspond to the header 420 information, each field's value is then compared to the 421 corresponding target value (TV) stored in the Rule for that 422 specific field using the matching operator (MO). If all the 423 fields in the packet's header satisfy all the matching operators 424 (MOs) of a Rule (i.e. all results are True), the fields of the 425 header are then processed according to the Compression/ 426 Decompession Actions (CDAs) and a compressed header is obtained. 427 Otherwise the next rule is tested. If no eligible rule is found, 428 then the header must be sent without compression, in which case 429 the fragmentation process must be required. 431 o sending: The Rule ID is sent to the other end followed by 432 information resulting from the compression of header fields, 433 directly followed by the payload. The product of field 434 compression is sent in the order expressed in the Rule for the 435 matching fields. The way the Rule ID is sent depends on the 436 specific LPWAN layer two technology and will be specified in a 437 specific document, and is out of the scope of this document. For 438 example, it can be either included in a Layer 2 header or sent in 439 the first byte of the L2 payload. (cf. Figure 4). 441 o decompression: In both directions, The receiver identifies the 442 sender through its device-id (e.g. MAC address) and selects the 443 appropriate Rule through the Rule ID. This Rule gives the 444 compressed header format and associates these values to the header 445 fields. It applies the CDA action to reconstruct the original 446 header fields. The CDA application order can be different of the 447 order given by the Rule. For instance Compute-* may be applied at 448 end, after the other CDAs. 450 If after using SCHC compression and adding the payload to the L2 451 frame the datagram is not multiple of 8 bits, padding may be used. 453 +--- ... ---+-------------- ... --------------+-------------+--...--+ 454 | Rule ID |Compressed Hdr Fields information| payload |padding| 455 +--- ... ---+-------------- ... --------------+-------------+--...--+ 457 Figure 4: LPWAN Compressed Format Packet 459 5. Matching operators 461 Matching Operators (MOs) are functions used by both SCHC C/D 462 endpoints involved in the header compression/decompression. They are 463 not typed and can be applied indifferently to integer, string or any 464 other data type. The result of the operation can either be True or 465 False. MOs are defined as follows: 467 o equal: A field value in a packet matches with a TV in a Rule if 468 they are equal. 470 o ignore: No check is done between a field value in a packet and a 471 TV in the Rule. The result of the matching is always true. 473 o MSB(length): A matching is obtained if the most significant bits 474 of the length field value bits of the header are equal to the TV 475 in the rule. The MSB Matching Operator needs a parameter, 476 indicating the number of bits, to proceed to the matching. 478 o match-mapping: The goal of mapping-sent is to reduce the size of a 479 field by allocating a shorter value. The Target Value contains a 480 list of values. Each value is idenfied by a short ID (or index). 481 This operator matches if a field value is equal to one of those 482 target values. 484 6. Compression Decompression Actions (CDA) 486 The Compression Decompression Action (CDA) describes the actions 487 taken during the compression of headers fields, and inversely, the 488 action taken by the decompressor to restore the original value. 490 /--------------------+-------------+----------------------------\ 491 | Action | Compression | Decompression | 492 | | | | 493 +--------------------+-------------+----------------------------+ 494 |not-sent |elided |use value stored in ctxt | 495 |value-sent |send |build from received value | 496 |mapping-sent |send index |value from index on a table | 497 |LSB(length) |send LSB |TV OR received value | 498 |compute-length |elided |compute length | 499 |compute-checksum |elided |compute UDP checksum | 500 |Deviid |elided |build IID from L2 Dev addr | 501 |Appiid |elided |build IID from L2 App addr | 502 \--------------------+-------------+----------------------------/ 504 Figure 5: Compression and Decompression Functions 506 Figure 5 sumarizes the basics functions defined to compress and 507 decompress a field. The first column gives the action's name. The 508 second and third columns outlines the compression/decompression 509 behavior. 511 Compression is done in the rule order and compressed values are sent 512 in that order in the compressed message. The receiver must be able 513 to find the size of each compressed field which can be given by the 514 rule or may be sent with the compressed header. 516 If the field is identified as variable, then its size must be sent 517 first using the following coding: 519 o If the size is between 0 and 14 bytes it is sent using 4 bits. 521 o For values between 15 and 255, the first 4 bit sent are set to 1 522 and the size is sent using 8 bits. 524 o For higher value, the first 12 bits are set to 1 and the size is 525 sent on 2 bytes. 527 6.1. not-sent CDA 529 Not-sent function is generally used when the field value is specified 530 in the rule and therefore known by the both Compressor and 531 Decompressor. This action is generally used with the "equal" MO. If 532 MO is "ignore", there is a risk to have a decompressed field value 533 different from the compressed field. 535 The compressor does not send any value on the compressed header for 536 the field on which compression is applied. 538 The decompressor restores the field value with the target value 539 stored in the matched rule. 541 6.2. value-sent CDA 543 The value-sent action is generally used when the field value is not 544 known by both Compressor and Decompressor. The value is sent in the 545 compressed message header. Both Compressor and Decompressor must 546 know the size of the field, either implicitly (the size is known by 547 both sides) or explicitly in the compressed header field by 548 indicating the length. This function is generally used with the 549 "ignore" MO. 551 6.3. mapping-sent 553 mapping-sent is used to send a smaller index associated to the list 554 of values in the Target Value. This function is used together with 555 the "match-mapping" MO. 557 The compressor looks in the TV to find the field value and send the 558 corresponding index. The decompressor uses this index to restore the 559 field value. 561 The number of bits sent is the minimal size to code all the possible 562 indexes. 564 6.4. LSB CDA 566 LSB action is used to avoid sending the known part of the packet 567 field header to the other end. This action is used together with the 568 "MSB" MO. A length can be specified in the rule to indicate how many 569 bits have to be sent. If not length is specified, the number of bits 570 sent are the field length minus the bits length specified in the MSB 571 MO. 573 The compressor sends the "length" Least Significant Bits. The 574 decompressor combines the value received with the Target Value. 576 If this action is made on a variable length field, the remaning size 577 in byte has to be sent before. 579 6.5. DEViid, APPiid CDA 581 These functions are used to process respectively the Dev and the App 582 Interface Identifiers (Deviid and Appiid) of the IPv6 addresses. 583 Appiid CDA is less common, since current LPWAN technologies frames 584 contain a single address. 586 The IID value may be computed from the Device ID present in the Layer 587 2 header. The computation is specific for each LPWAN technology and 588 may depend on the Device ID size. 590 In the downstream direction, these CDA may be used to determine the 591 L2 addresses used by the LPWAN. 593 6.6. Compute-* 595 These classes of functions are used by the decompressor to compute 596 the compressed field value based on received information. Compressed 597 fields are elided during compression and reconstructed during 598 decompression. 600 o compute-length: compute the length assigned to this field. For 601 instance, regarding the field ID, this CDA may be used to compute 602 IPv6 length or UDP length. 604 o compute-checksum: compute a checksum from the information already 605 received by the SCHC C/D. This field may be used to compute UDP 606 checksum. 608 7. Application to IPv6 and UDP headers 610 This section lists the different IPv6 and UDP header fields and how 611 they can be compressed. 613 7.1. IPv6 version field 615 This field always holds the same value, therefore the TV is 6, the MO 616 is "equal" and the "CDA "not-sent"". 618 7.2. IPv6 Traffic class field 620 If the DiffServ field identified by the rest of the rule do not vary 621 and is known by both sides, the TV should contain this well-known 622 value, the MO should be "equal" and the CDA must be "not-sent. 624 If the DiffServ field identified by the rest of the rule varies over 625 time or is not known by both sides, then there are two possibilities 626 depending on the variability of the value, the first one is to do not 627 compressed the field and sends the original value, or the second 628 where the values can be computed by sending only the LSB bits: 630 o TV is not set to any value, MO is set to "ignore" and CDA is set 631 to "value-sent" 633 o TV contains a stable value, MO is MSB(X) and CDA is set to LSB 635 7.3. Flow label field 637 If the Flow Label field identified by the rest of the rule does not 638 vary and is known by both sides, the TV should contain this well- 639 known value, the MO should be "equal" and the CDA should be "not- 640 sent". 642 If the Flow Label field identified by the rest of the rule varies 643 during time or is not known by both sides, there are two 644 possibilities depending on the variability of the value, the first 645 one is without compression and then the value is sent and the second 646 where only part of the value is sent and the decompressor needs to 647 compute the original value: 649 o TV is not set, MO is set to "ignore" and CDA is set to "value- 650 sent" 652 o TV contains a stable value, MO is MSB(X) and CDA is set to LSB 654 7.4. Payload Length field 656 If the LPWAN technology does not add padding, this field can be 657 elided for the transmission on the LPWAN network. The SCHC C/D 658 recomputes the original payload length value. The TV is not set, the 659 MO is set to "ignore" and the CDA is "compute-IPv6-length". 661 If the payload length needs to be sent and does not need to be coded 662 in 16 bits, the TV can be set to 0x0000, the MO set to "MSB (16-s)" 663 and the CDA to "LSB". The 's' parameter depends on the expected 664 maximum packet length. 666 On other cases, the payload length field must be sent and the CDA is 667 replaced by "value-sent". 669 7.5. Next Header field 671 If the Next Header field identified by the rest of the rule does not 672 vary and is known by both sides, the TV should contain this Next 673 Header value, the MO should be "equal" and the CDA should be "not- 674 sent". 676 If the Next header field identified by the rest of the rule varies 677 during time or is not known by both sides, then TV is not set, MO is 678 set to "ignore" and CDA is set to "value-sent". A matching-list may 679 also be used. 681 7.6. Hop Limit field 683 The End System is generally a device and does not forward packets, 684 therefore the Hop Limit value is constant. So the TV is set with a 685 default value, the MO is set to "equal" and the CDA is set to "not- 686 sent". 688 Otherwise the value is sent on the LPWAN: TV is not set, MO is set to 689 ignore and CDA is set to "value-sent". 691 Note that the field behavior differs in upstream and downstream. In 692 upstream, since there is no IP forwarding between the Dev and the 693 SCHC C/D, the value is relatively constant. On the other hand, the 694 downstream value depends of Internet routing and may change more 695 frequently. One solution could be to use the Direction Indicator 696 (DI) to distinguish both directions to elide the field in the 697 upstream direction and send the value in the downstream direction. 699 7.7. IPv6 addresses fields 701 As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit 702 long fields; one for the prefix and one for the Interface Identifier 703 (IID). These fields should be compressed. To allow a single rule, 704 these values are identified by their role (DEV or APP) and not by 705 their position in the frame (source or destination). The SCHC C/D 706 must be aware of the traffic direction (upstream, downstream) to 707 select the appropriate field. 709 7.7.1. IPv6 source and destination prefixes 711 Both ends must be synchronized with the appropriate prefixes. For a 712 specific flow, the source and destination prefix can be unique and 713 stored in the context. It can be either a link-local prefix or a 714 global prefix. In that case, the TV for the source and destination 715 prefixes contains the values, the MO is set to "equal" and the CDA is 716 set to "not-sent". 718 In case the rule allows several prefixes, mapping-list must be used. 719 The different prefixes are listed in the TV associated with a short 720 ID. The MO is set to "match-mapping" and the CDA is set to "mapping- 721 sent". 723 Otherwise the TV contains the prefix, the MO is set to "equal" and 724 the CDA is set to value-sent. 726 7.7.2. IPv6 source and destination IID 728 If the DEV or APP IID are based on an LPWAN address, then the IID can 729 be reconstructed with information coming from the LPWAN header. In 730 that case, the TV is not set, the MO is set to "ignore" and the CDA 731 is set to "DEViid" or "APPiid". Note that the LPWAN technology is 732 generally carrying a single device identifier corresponding to the 733 DEV. The SCHC C/D may also not be aware of these values. 735 If the DEV address has a static value that is not derivated from an 736 IEEE EUI-64, then TV contains the actual Dev address value, the MO 737 operator is set to "equal" and the CDA is set to "not-sent". 739 If several IIDs are possible, then the TV contains the list of 740 possible IIDs, the MO is set to "match-mapping" and the CDA is set to 741 "mapping-sent". 743 Otherwise the value variation of the IID may be reduced to few bytes. 744 In that case, the TV is set to the stable part of the IID, the MO is 745 set to MSB and the CDA is set to LSB. 747 Finally, the IID can be sent on the LPWAN. In that case, the TV is 748 not set, the MO is set to "ignore" and the CDA is set to "value- 749 sent". 751 7.8. IPv6 extensions 753 No extension rules are currently defined. They can be based on the 754 MOs and CDAs described above. 756 7.9. UDP source and destination port 758 To allow a single rule, the UDP port values are identified by their 759 role (DEV or APP) and not by their position in the frame (source or 760 destination). The SCHC C/D must be aware of the traffic direction 761 (upstream, downstream) to select the appropriate field. The 762 following rules apply for DEV and APP port numbers. 764 If both ends know the port number, it can be elided. The TV contains 765 the port number, the MO is set to "equal" and the CDA is set to "not- 766 sent". 768 If the port variation is on few bits, the TV contains the stable part 769 of the port number, the MO is set to "MSB" and the CDA is set to 770 "LSB". 772 If some well-known values are used, the TV can contain the list of 773 this values, the MO is set to "match-mapping" and the CDA is set to 774 "mapping-sent". 776 Otherwise the port numbers are sent on the LPWAN. The TV is not set, 777 the MO is set to "ignore" and the CDA is set to "value-sent". 779 7.10. UDP length field 781 If the LPWAN technology does not introduce padding, the UDP length 782 can be computed from the received data. In that case the TV is not 783 set, the MO is set to "ignore" and the CDA is set to "compute-UDP- 784 length". 786 If the payload is small, the TV can be set to 0x0000, the MO set to 787 "MSB" and the CDA to "LSB". 789 On other cases, the length must be sent and the CDA is replaced by 790 "value-sent". 792 7.11. UDP Checksum field 794 IPv6 mandates a checksum in the protocol above IP. Nevertheless, if 795 a more efficient mechanism such as L2 CRC or MIC is carried by or 796 over the L2 (such as in the LPWAN fragmentation process (see section 797 Section 9)), the UDP checksum transmission can be avoided. In that 798 case, the TV is not set, the MO is set to "ignore" and the CDA is set 799 to "compute-UDP-checksum". 801 In other cases the checksum must be explicitly sent. The TV is not 802 set, the MO is set to "ignore" and the CDF is set to "value-sent". 804 8. Examples 806 This section gives some scenarios of the compression mechanism for 807 IPv6/UDP. The goal is to illustrate the SCHC behavior. 809 8.1. IPv6/UDP compression 811 The most common case using the mechanisms defined in this document 812 will be a LPWAN Dev that embeds some applications running over CoAP. 813 In this example, three flows are considered. The first flow is for 814 the device management based on CoAP using Link Local IPv6 addresses 815 and UDP ports 123 and 124 for Dev and App, respectively. The second 816 flow will be a CoAP server for measurements done by the Device (using 817 ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to 818 beta::1/64. The last flow is for legacy applications using different 819 ports numbers, the destination IPv6 address prefix is gamma::1/64. 821 Figure 6 presents the protocol stack for this Device. IPv6 and UDP 822 are represented with dotted lines since these protocols are 823 compressed on the radio link. 825 Managment Data 826 +----------+---------+---------+ 827 | CoAP | CoAP | legacy | 828 +----||----+---||----+---||----+ 829 . UDP . UDP | UDP | 830 ................................ 831 . IPv6 . IPv6 . IPv6 . 832 +------------------------------+ 833 | SCHC Header compression | 834 | and fragmentation | 835 +------------------------------+ 836 | LPWAN L2 technologies | 837 +------------------------------+ 838 DEV or NGW 840 Figure 6: Simplified Protocol Stack for LP-WAN 842 Note that in some LPWAN technologies, only the Devs have a device ID. 843 Therefore, when such technologies are used, it is necessary to define 844 statically an IID for the Link Local address for the SCHC C/D. 846 Rule 0 847 +----------------+--+--+---------+--------+-------------++------+ 848 | Field |FP|DI| Value | Match | Comp Decomp || Sent | 849 | | | | | Opera. | Action ||[bits]| 850 +----------------+--+--+---------+----------------------++------+ 851 |IPv6 version |1 |Bi|6 | equal | not-sent || | 852 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 853 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 854 |IPv6 Length |1 |Bi| | ignore | comp-length || | 855 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 856 |IPv6 Hop Limit |1 |Bi|255 | ignore | not-sent || | 857 |IPv6 DEVprefix |1 |Bi|FE80::/64| equal | not-sent || | 858 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 859 |IPv6 APPprefix |1 |Bi|FE80::/64| equal | not-sent || | 860 |IPv6 APPiid |1 |Bi|::1 | equal | not-sent || | 861 +================+==+==+=========+========+=============++======+ 862 |UDP DEVport |1 |Bi|123 | equal | not-sent || | 863 |UDP APPport |1 |Bi|124 | equal | not-sent || | 864 |UDP Length |1 |Bi| | ignore | comp-length || | 865 |UDP checksum |1 |Bi| | ignore | comp-chk || | 866 +================+==+==+=========+========+=============++======+ 868 Rule 1 869 +----------------+--+--+---------+--------+-------------++------+ 870 | Field |FP|DI| Value | Match | Action || Sent | 871 | | | | | Opera. | Action ||[bits]| 872 +----------------+--+--+---------+--------+-------------++------+ 873 |IPv6 version |1 |Bi|6 | equal | not-sent || | 874 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 875 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 876 |IPv6 Length |1 |Bi| | ignore | comp-length || | 877 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 878 |IPv6 Hop Limit |1 |Bi|255 | ignore | not-sent || | 879 |IPv6 DEVprefix |1 |Bi|[alpha/64, match- | mapping-sent|| [1] | 880 | |1 |Bi|fe80::/64] mapping| || | 881 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 882 |IPv6 APPprefix |1 |Bi|[beta/64,| match- | mapping-sent|| [2] | 883 | | | |alpha/64,| mapping| || | 884 | | | |fe80::64]| | || | 885 |IPv6 APPiid |1 |Bi|::1000 | equal | not-sent || | 886 +================+==+==+=========+========+=============++======+ 887 |UDP DEVport |1 |Bi|5683 | equal | not-sent || | 888 |UDP APPport |1 |Bi|5683 | equal | not-sent || | 889 |UDP Length |1 |Bi| | ignore | comp-length || | 890 |UDP checksum |1 |Bi| | ignore | comp-chk || | 891 +================+==+==+=========+========+=============++======+ 893 Rule 2 894 +----------------+--+--+---------+--------+-------------++------+ 895 | Field |FP|DI| Value | Match | Action || Sent | 896 | | | | | Opera. | Action ||[bits]| 897 +----------------+--+--+---------+--------+-------------++------+ 898 |IPv6 version |1 |Bi|6 | equal | not-sent || | 899 |IPv6 DiffServ |1 |Bi|0 | equal | not-sent || | 900 |IPv6 Flow Label |1 |Bi|0 | equal | not-sent || | 901 |IPv6 Length |1 |Bi| | ignore | comp-length || | 902 |IPv6 Next Header|1 |Bi|17 | equal | not-sent || | 903 |IPv6 Hop Limit |1 |Up|255 | ignore | not-sent || | 904 |IPv6 Hop Limit |1 |Dw| | ignore | value-sent || [8] | 905 |IPv6 DEVprefix |1 |Bi|alpha/64 | equal | not-sent || | 906 |IPv6 DEViid |1 |Bi| | ignore | DEViid || | 907 |IPv6 APPprefix |1 |Bi|gamma/64 | equal | not-sent || | 908 |IPv6 APPiid |1 |Bi|::1000 | equal | not-sent || | 909 +================+==+==+=========+========+=============++======+ 910 |UDP DEVport |1 |Bi|8720 | MSB(12)| LSB(4) || [4] | 911 |UDP APPport |1 |Bi|8720 | MSB(12)| LSB(4) || [4] | 912 |UDP Length |1 |Bi| | ignore | comp-length || | 913 |UDP checksum |1 |Bi| | ignore | comp-chk || | 914 +================+==+==+=========+========+=============++======+ 916 Figure 7: Context rules 918 All the fields described in the three rules depicted on Figure 7 are 919 present in the IPv6 and UDP headers. The DEViid-DID value is found 920 in the L2 header. 922 The second and third rules use global addresses. The way the Dev 923 learns the prefix is not in the scope of the document. 925 The third rule compresses port numbers to 4 bits. 927 9. Fragmentation 929 9.1. Overview 931 Fragmentation supported in LPWAN is mandatory when the underlying 932 LPWAN technology is not capable of fulfilling the IPv6 MTU 933 requirement. Fragmentation is used if, after SCHC header 934 compression, the size of the resulting IPv6 packet is larger than the 935 L2 data unit maximum payload. Fragmentation is also used if SCHC 936 header compression has not been able to compress an IPv6 packet that 937 is larger than the L2 data unit maximum payload. In LPWAN 938 technologies, the L2 data unit size typically varies from tens to 939 hundreds of bytes. If the entire IPv6 datagram fits within a single 940 L2 data unit, the fragmentation mechanism is not used and the packet 941 is sent unfragmented. 942 If the datagram does not fit within a single L2 data unit, it SHALL 943 be broken into fragments. 945 Moreover, LPWAN technologies impose some strict limitations on 946 traffic; therefore it is desirable to enable optional fragment 947 retransmission, while a single fragment loss should not lead to 948 retransmitting the full IPv6 datagram. On the other hand, in order 949 to preserve energy, Devices are sleeping most of the time and may 950 receive data during a short period of time after transmission. In 951 order to adapt to the capabilities of various LPWAN technologies, 952 this specification allows for a gradation of fragment delivery 953 reliability. This document does not make any decision with regard to 954 which fragment delivery reliability option is used over a specific 955 LPWAN technology. 957 An important consideration is that LPWAN networks typically follow 958 the star topology, and therefore data unit reordering is not expected 959 in such networks. This specification assumes that reordering will 960 not happen between the entity performing fragmentation and the entity 961 performing reassembly. This assumption allows to reduce complexity 962 and overhead of the fragmentation mechanism. 964 9.2. Reliability options: definition 966 This specification defines the following three fragment delivery 967 reliability options: 969 o No ACK 971 o Window mode - ACK "always" 973 o Window mode - ACK on error 975 The same reliability option MUST be used for all fragments of a 976 packet. It is up to implementers and/or representatives of the 977 underlying LPWAN technology to decide which reliability option to use 978 and whether the same reliability option applies to all IPv6 packets 979 or not. Note that the reliability option to be used is not 980 necessarily tied to the particular characteristics of the underlying 981 L2 LPWAN technology (e.g. the No ACK reliability option may be used 982 on top of an L2 LPWAN technology with symmetric characteristics for 983 uplink and downlink). 985 In the No ACK option, the receiver MUST NOT issue acknowledgments 986 (ACK). 988 In Window mode - ACK "always", an ACK is transmitted by the fragment 989 receiver after a window of fragments have been sent. A window of 990 fragments is a subset of the full set of fragments needed to carry an 991 IPv6 packet. In this mode, the ACK informs the sender about received 992 and/or missing fragments from the window of fragments. Upon receipt 993 of an ACK that informs about any lost fragments, the sender 994 retransmits the lost fragments, as long as a maximum of 995 MAX_FRAG_RETRIES is not exceeded for each one of those fragments. 996 The default value of MAX_FRAG_RETRIES is not stated in this document, 997 and it is expected to be defined in other documents (e.g. technology- 998 specific profiles). 1000 In Window mode - ACK on error, an ACK is transmitted by the fragment 1001 receiver after a window of fragments have been sent, only if at least 1002 one of the fragments in the window has been lost. In this mode, the 1003 ACK informs the sender about received and/or missing fragments from 1004 the window of fragments. Upon receipt of an ACK that informs about 1005 any lost fragments, the sender retransmits the lost fragments. The 1006 maximum number of ACKs to be sent by the receiver for a specific 1007 window, denoted MAX_ACKS_PER_WINDOW, is not stated in this document, 1008 and it is expected to be defined in other documents (e.g. technology- 1009 specific profiles). 1011 This document does not make any decision as to which fragment 1012 delivery reliability option(s) need to be supported over a specific 1013 LPWAN technology. 1015 Examples of the different reliability options described are provided 1016 in Appendix A. 1018 9.3. Reliability options: discussion 1020 This section discusses the properties of each fragment delivery 1021 reliability option defined in the previous section. 1023 No ACK is the most simple fragment delivery reliability option. With 1024 this option, the receiver does not generate overhead in the form of 1025 ACKs. However, this option does not enhance delivery reliability 1026 beyond that offered by the underlying LPWAN technology. 1028 The Window mode - ACK on error option is based on the optimistic 1029 expectation that the underlying links will offer relatively low L2 1030 data unit loss probability. This option reduces the number of ACKs 1031 transmitted by the fragment receiver compared to the Window mode - 1032 ACK "always" option. This may be especially beneficial in asymmetric 1033 scenarios, e.g. where fragmented data are sent uplink and the 1034 underlying LPWAN technology downlink capacity or message rate is 1035 lower than the uplink one. However, if an ACK is lost, the sender 1036 assumes that all fragments covered by the ACK have been successfully 1037 delivered. In contrast, the Window mode - ACK "always" option does 1038 not suffer that issue, at the expense of an ACK overhead increase. 1040 The Window mode - ACK "always" option provides flow control. In 1041 addition, it is able to handle long bursts of lost fragments, since 1042 detection of such events can be done before end of the IPv6 packet 1043 transmission, as long as the window size is short enough. However, 1044 such benefit comes at the expense of higher ACK overhead. 1046 9.4. Tools 1048 This subsection describes the different tools that are used to enable 1049 the described fragmentation functionality and the different 1050 reliability options supported. Each tool has a corresponding header 1051 field format that is defined in the next subsection. The list of 1052 tools follows: 1054 o Rule ID. The Rule ID is used in fragments and in ACKs. The Rule 1055 ID in a fragment is set to a value that indicates that the data unit 1056 being carried is a fragment. This also allows to interleave non- 1057 fragmented IPv6 datagrams with fragments that carry a larger IPv6 1058 datagram. Rule ID may also be used to signal which reliability 1059 option is in use for the IPv6 packet being carried. In an ACK, the 1060 Rule ID signals that the message this Rule ID is prepended to is an 1061 ACK. 1063 o Compressed Fragment Number (CFN). The CFN is included in all 1064 fragments. This field can be understood as a truncated, efficient 1065 representation of a larger-sized fragment number, and does not 1066 necessarily carry an absolute fragment number. A special CFN value 1067 signals the last fragment that carries a fragmented IPv6 packet. In 1068 Window mode, the CFN is augmented with the W bit, which has the 1069 purpose of avoiding possible ambiguity for the receiver that might 1070 arise under certain conditions 1072 o Datagram Tag (DTag). The DTag field, if present, is set to the 1073 same value for all fragments carrying the same IPv6 datagram, allows 1074 to interleave fragments that correspond to different IPv6 datagrams. 1076 o Message Integrity Check (MIC). It is computed by the sender over 1077 the complete IPv6 packet before fragmentation by using the TBD 1078 algorithm. The MIC allows the receiver to check for errors in the 1079 reassembled IPv6 packet, while it also enables compressing the UDP 1080 checksum by use of SCHC. 1082 o Bitmap. The bitmap is a sequence of bits included in the ACK for a 1083 given window, that provides feedback on whether each fragment of the 1084 current window has been received or not. 1086 9.5. Formats 1088 This section defines the fragment format, the fragmentation header 1089 formats, and the ACK format. 1091 9.5.1. Fragment format 1093 A fragment comprises a fragmentation header and a fragment payload, 1094 and conforms to the format shown in Figure 8. The fragment payload 1095 carries a subset of either the IPv6 packet after header compression 1096 or an IPv6 packet which could not be compressed. A fragment is the 1097 payload in the L2 protocol data unit (PDU). 1099 +---------------+-----------------------+ 1100 | Fragm. Header | Fragment payload | 1101 +---------------+-----------------------+ 1103 Figure 8: Fragment format. 1105 9.5.2. Fragmentation header formats 1107 In the No ACK option, fragments except the last one SHALL contain the 1108 fragmentation header as defined in Figure 9. The total size of this 1109 fragmentation header is R bits. 1111 <------------ R ----------> 1112 <--T--> <--N--> 1113 +-- ... --+- ... -+- ... -+ 1114 | Rule ID | DTag | CFN | 1115 +-- ... --+- ... -+- ... -+ 1117 Figure 9: Fragmentation Header for Fragments except the Last One, No 1118 ACK option 1120 In any of the Window mode options, fragments except the last one 1121 SHALL 1122 contain the fragmentation header as defined in Figure 10. The total 1123 size of this fragmentation header is R bits. 1125 <------------ R ----------> 1126 <--T--> 1 <--N--> 1127 +-- ... --+- ... -+-+- ... -+ 1128 | Rule ID | DTag |W| CFN | 1129 +-- ... --+- ... -+-+- ... -+ 1131 Figure 10: Fragmentation Header for Fragments except the Last One, 1132 Window mode 1134 In the No ACK option, the last fragment of an IPv6 datagram SHALL 1135 contain a fragmentation header that conforms to the format shown in 1136 Figure 11. The total size of this fragmentation header is R+M bits. 1138 <------------- R ------------> 1139 <- T -> <- N -> <---- M -----> 1140 +---- ... ---+- ... -+- ... -+---- ... ----+ 1141 | Rule ID | DTag | 11..1 | MIC | 1142 +---- ... ---+- ... -+- ... -+---- ... ----+ 1144 Figure 11: Fragmentation Header for the Last Fragment, No ACK option 1146 In any of the Window modes, the last fragment of an IPv6 datagram 1147 SHALL contain a fragmentation header that conforms to the format 1148 shown in Figure 12. The total size of this fragmentation header is 1149 R+M bits. 1151 <------------ R ------------> 1152 <- T -> 1 <- N -> <---- M -----> 1153 +-- ... --+- ... -+-+- ... -+---- ... ----+ 1154 | Rule ID | DTag |W| 11..1 | MIC | 1155 +-- ... --+- ... -+-+- ... -+---- ... ----+ 1157 Figure 12: Fragmentation Header for the Last Fragment, Window mode 1159 o Rule ID: This field has a size of R - T - N - 1 bits when Window 1160 mode is used. In No ACK mode, the Rule ID field has a size of R - 1161 T - N bits. 1163 o DTag: The size of the DTag field is T bits, which may be set to a 1164 value greater than or equal to 0 bits. The DTag field in all 1165 fragments that carry the same IPv6 datagram MUST be set to the 1166 same value. DTag MUST be set sequentially increasing from 0 to 1167 2^T - 1, and MUST wrap back from 2^T - 1 to 0. 1169 o CFN: This field is an unsigned integer, with a size of N bits, 1170 that carries the CFN of the fragment. In the No ACK option, N=1. 1171 For the rest of options, N equal to or greater than 3 is 1172 recommended. The CFN MUST be set sequentially decreasing from the 1173 highest CFN in the window (which will be used for the first 1174 fragment), and MUST wrap from 0 back to the highest CFN in the 1175 window. The highest CFN in the window MUST be a value equal to or 1176 smaller than 2^N-2. (Example 1: for N=5, the highest CFN value 1177 may be configured to be 30, then subsequent CFNs are set 1178 sequentially and in decreasing order, and CFN will wrap from 0 1179 back to 30. Example 2: for N=5, the highest CFN value may be set 1180 to 23, then subsequent CFNs are set sequentially and in decreasing 1181 order, and the CFN will wrap from 0 back to 23). The CFN for the 1182 last fragment has all bits set to 1. Note that, by this 1183 definition, the CFN value of 2^N - 1 is only used to identify a 1184 fragment as the last fragment carrying a subset of the IPv6 packet 1185 being transported, and thus the CFN does not strictly correspond 1186 to the N least significant bits of the actual absolute fragment 1187 number. It is also important to note that, for N=1, the last 1188 fragment of the packet will carry a CFN equal to 1, while all 1189 previous fragments will carry a CFN of 0. 1191 o W: W is a 1-bit field. This field carries the same value for all 1192 fragments of a window, and it is complemented for the next window. 1193 The initial value for this field is 1. 1195 o MIC: This field, which has a size of M bits, carries the MIC for 1196 the IPv6 packet. 1198 The values for R, N, T and M are not specified in this document, and 1199 have to be determined in other documents (e.g. technology-specific 1200 profile documents). 1202 9.5.3. ACK format 1204 The format of an ACK is shown in Figure 13: 1206 <-------- R -------> 1207 <- T -> 1 1208 +---- ... --+-... -+-+----- ... ---+ 1209 | Rule ID | DTag |W| bitmap | 1210 +---- ... --+-... -+-+----- ... ---+ 1212 Figure 13: Format of an ACK 1214 Rule ID: In all ACKs, Rule ID has a size of R - T - 1 bits. 1216 DTag: DTag has a size of T bits. DTag carries the same value as the 1217 DTag field in the fragments carrying the IPv6 datagram for which this 1218 ACK is intended. 1220 W: This field has a size of 1 bit. In all ACKs, the W bit carries 1221 the same value as the W bit carried by the fragments whose reception 1222 is being positively or negatively acknowledged by the ACK. 1224 bitmap: This field carries the bitmap sent by the receiver to inform 1225 the sender about whether fragments in the current window have been 1226 received or not. Size of the bitmap field of an ACK can be equal to 1227 0 or Ceiling(Number_of_Fragments/8) octets, where Number_of_Fragments 1228 denotes the number of fragments of a window. The bitmap is a 1229 sequence of bits, where the n-th bit signals whether the n-th 1230 fragment transmitted in the current window has been correctly 1231 received (n-th bit set to 1) or not (n-th bit set to 0). Remaining 1232 bits with bit order greater than the number of fragments sent (as 1233 determined by the receiver) are set to 0, except for the last bit in 1234 the bitmap, which is set to 1 if the last fragment of the window has 1235 been correctly received, and 0 otherwise. Feedback on reception of 1236 the fragment with CFN = 2^N - 1 (last fragment carrying an IPv6 1237 packet) is only given by the last bit of the corresponding bitmap. 1238 Absence of the bitmap in an ACK confirms correct reception of all 1239 fragments to be acknowledged by means of the ACK. 1241 Figure 14 shows an example of an ACK (N=3), where the bitmap 1242 indicates that the second and the fifth fragments have not been 1243 correctly received. 1245 <------- R -------> 1246 <- T -> 0 1 2 3 4 5 6 7 1247 +---- ... --+-... -+-+-+-+-+-+-+-+-+-+ 1248 | Rule ID | DTag |W|1|0|1|1|0|1|1|1| 1249 +---- ... --+-... -+-+-+-+-+-+-+-+-+-+ 1251 Figure 14: Example of the bitmap in an ACK (in Window mode, for N=3) 1253 Figure 15 illustrates an ACK without a bitmap. 1255 <------- R -------> 1256 <- T -> 1257 +---- ... --+-... -+-+ 1258 | Rule ID | DTag |W| 1259 +---- ... --+-... -+-+ 1261 Figure 15: Example of an ACK without a bitmap 1263 Note that, in order to exploit the available L2 payload space to the 1264 fullest, a bitmap may have a size smaller than 2^N bits. In that 1265 case, the window in use will have a size lower than 2^N-1 fragments. 1266 For example, if the maximum available space for a bitmap is 56 bits, 1267 N can be set to 6, and the window size can be set to a maximum of 56 1268 fragments. 1270 9.6. Baseline mechanism 1272 The receiver of link fragments SHALL use (1) the sender's L2 source 1273 address (if present), (2) the destination's L2 address (if present), 1274 (3) Rule ID and (4) DTag (the latter, if present) to identify all the 1275 fragments that belong to a given IPv6 datagram. The fragment 1276 receiver may determine the fragment delivery reliability option in 1277 use for the fragment based on the Rule ID field in that fragment. 1279 Upon receipt of a link fragment, the receiver starts constructing the 1280 original unfragmented packet. It uses the CFN and the order of 1281 arrival of each fragment to determine the location of the individual 1282 fragments within the original unfragmented packet. For example, it 1283 may place the data payload of the fragments within a payload datagram 1284 reassembly buffer at the location determined from the CFN and order 1285 of arrival of the fragments, and the fragment payload sizes. In 1286 Window mode, the fragment receiver also uses the W bit in the 1287 received fragments. Note that the size of the original, unfragmented 1288 IPv6 packet cannot be determined from fragmentation headers. 1290 When Window mode - ACK on error is used, the fragment receiver starts 1291 a timer (denoted "ACK on Error Timer") upon reception of the first 1292 fragment for an IPv6 datagram. The initial value for this timer is 1293 not provided by this specification, and is expected to be defined in 1294 additional documents. This timer is reset and restarted every time 1295 that a new fragment carrying data from the same IPv6 datagram is 1296 received. In Window mode - ACK on error, after reception of the last 1297 fragment of a window (i.e. the fragment with CFN=0 or CFN=2^N-1), if 1298 fragment losses have been detected by the fragment receiver in the 1299 current window, the fragment receiver MUST transmit an ACK reporting 1300 its available information with regard to sucessfully received and 1301 missing fragments from the current window. Upon expiration of the 1302 "ACK on Error Timer", if the receiver knows that at least one 1303 fragment of the current window has been lost, an ACK MUST be 1304 transmitted by the fragment receiver to report received and not 1305 received fragments for the current window. The "ACK on Error Timer" 1306 is then reset and restarted. In Window mode - ACK on error, the 1307 fragment sender retransmits any lost fragments reported in an ACK. 1308 The maximum number of ACKs to be sent by the receiver for a specific 1309 window, denoted MAX_ACKS_PER_WINDOW, is not stated in this document, 1310 and it is expected to be defined in other documents (e.g. technology- 1311 specific profiles). 1313 Note that, in Window mode, the first fragment of the window is the 1314 one with CFN=2^N-2. Also note that, in Window mode, the fragment 1315 with CFN=0 is considered the last fragment of its window, except for 1316 the last fragment of the whole packet (with all CFN bits set to 1, 1317 i.e. CFN=2^N-1), which is also the last fragment of the last window. 1319 If Window mode - ACK "always" is used, upon receipt of the last 1320 fragment of a window (i.e. the fragment with CFN=0 or CFN=2^N-1), the 1321 fragment receiver MUST send an ACK to the fragment sender. The ACK 1322 provides feedback on the fragments received and those not received 1323 that correspond to the last window. Once all fragments of a window 1324 have been received by the fragment receiver (including retransmitted 1325 fragments, if any), the latter sends an ACK without a bitmap to the 1326 sender, in order to report sucessful reception of all fragments of 1327 the window to the fragment sender. 1329 When Window mode - ACK "always" is used, the fragment sender starts a 1330 timer (denoted "ACK Always Timer") after the first transmission 1331 attempt of the last fragment of a window (i.e. the fragment with 1332 CFN=0 or CFN=2^N-1). In the same reliability option, if one or more 1333 fragments are reported by an ACK to be lost, the sender retransmits 1334 those fragments and starts the "ACK Always Timer" after the last 1335 retransmitted fragment (i.e. the fragment with the lowest CFN) among 1336 the set of lost fragments reported by the ACK. The initial value for 1337 the "ACK Always Timer" is not provided by this specification, and it 1338 is expected to be defined in additional documents. Upon expiration 1339 of the timer, if no ACK has been received since the timer start, the 1340 sender retransmits the last fragment sent, and it reinitializes and 1341 restarts the timer. Note that retransmitting the last fragment sent 1342 as described serves as an ACK request. The maximum number of 1343 requests for a specific ACK, denoted MAX_ACK_REQUESTS, is not stated 1344 in this document, and it is expected to be defined in other documents 1345 (e.g. technology-specific profiles). In Window mode - ACK "Always", 1346 the fragment sender retransmits any lost fragments reported in an 1347 ACK, as long as the number of retries for each one of those fragments 1348 does not exceed MAX_FRAG_RETRIES. The default value for 1349 MAX_FRAG_RETRIES is not provided in this document and it is expected 1350 to be defined in additional documents. When the fragment sender 1351 receives an ACK that confirms correct reception of all fragments of a 1352 window, if there are further fragments to be sent for the same IPv6 1353 datagram, the fragment sender proceeds to transmitting subsequent 1354 fragments of the next window. 1356 If the recipient receives the last fragment of an IPv6 datagram (i.e. 1357 the fragment with CFN=2^N-1), it checks for the integrity of the 1358 reassembled IPv6 datagram, based on the MIC received. In No ACK 1359 mode, if the integrity check indicates that the reassembled IPv6 1360 datagram does not match the original IPv6 datagram (prior to 1361 fragmentation), the reassembled IPv6 datagram MUST be discarded. If 1362 Window mode - ACK "Always" is used, the recipient MUST transmit an 1363 ACK to the fragment sender. The ACK provides feedback on the 1364 fragments from the last window that have been received or not per the 1365 information available at the receiver. If Window mode - ACK on error 1366 is used, the recipient MUST NOT transmit an ACK to the sender if no 1367 losses have been detected for the last window. If losses have been 1368 detected, the recipient MUST then transmit an ACK to the sender to 1369 provide feedback on the transmission of the last window of fragments. 1371 If a fragment recipient disassociates from its L2 network, the 1372 recipient MUST discard all link fragments of all partially 1373 reassembled payload datagrams, and fragment senders MUST discard all 1374 not yet transmitted link fragments of all partially transmitted 1375 payload (e.g., IPv6) datagrams. Similarly, when a node first 1376 receives a fragment of a packet, it starts a reassembly timer. When 1377 this time expires, if the entire packet has not been reassembled, the 1378 existing fragments MUST be discarded and the reassembly state MUST be 1379 flushed. The value for this timer is not provided by this 1380 specification, and is expected to be defined in technology-specific 1381 profile documents. 1383 9.7. Supporting multiple window sizes 1385 For Window mode operation, implementers may opt to support a single 1386 window size or multiple window sizes. The latter, when feasible, may 1387 provide performance optimizations. For example, a large window size 1388 may be used for IPv6 packets that need to be carried by a large 1389 number of fragments. However, when the number of fragments required 1390 to carry an IPv6 packet is low, a smaller window size, and thus a 1391 shorter bitmap, may be sufficient to provide feedback on all 1392 fragments. If multiple window sizes are supported, the Rule ID may 1393 be used to signal the window size in use for a specific IPv6 packet 1394 transmission. 1396 9.8. Aborting fragmented IPv6 datagram transmissions 1398 For several reasons, a fragment sender or a fragment receiver may 1399 want to abort the on-going transmission of one or several fragmented 1400 IPv6 datagrams. The entity (either the fragment sender or the 1401 fragment receiver) that triggers abortion transmits to the other 1402 endpoint a format that only comprises a Rule ID (of size R bits), 1403 which signals abortion of all on-going fragmented IPv6 packet 1404 transmissions. The specific value to be used for the Rule ID of this 1405 abortion signal is not defined in this document, and is expected to 1406 be defined in future documents. 1408 Upon transmission or reception of the abortion signal, both entities 1409 MUST release any resources allocated for the fragmented IPv6 datagram 1410 transmissions being aborted. 1412 9.9. Downlink fragment transmission 1414 In some LPWAN technologies, as part of energy-saving techniques, 1415 downlink transmission is only possible immediately after an uplink 1416 transmission. In order to avoid potentially high delay for 1417 fragmented IPv6 datagram transmission in the downlink, the fragment 1418 receiver MAY perform an uplink transmission as soon as possible after 1419 reception of a fragment that is not the last one. Such uplink 1420 transmission may be triggered by the L2 (e.g. an L2 ACK sent in 1421 response to a fragment encapsulated in a L2 frame that requires an L2 1422 ACK) or it may be triggered from an upper layer. 1424 10. Security considerations 1426 10.1. Security considerations for header compression 1428 A malicious header compression could cause the reconstruction of a 1429 wrong packet that does not match with the original one, such 1430 corruption may be detected with end-to-end authentication and 1431 integrity mechanisms. Denial of Service may be produced but its 1432 arise other security problems that may be solved with or without 1433 header compression. 1435 10.2. Security considerations for fragmentation 1437 This subsection describes potential attacks to LPWAN fragmentation 1438 and suggests possible countermeasures. 1440 A node can perform a buffer reservation attack by sending a first 1441 fragment to a target. Then, the receiver will reserve buffer space 1442 for the IPv6 packet. Other incoming fragmented packets will be 1443 dropped while the reassembly buffer is occupied during the reassembly 1444 timeout. Once that timeout expires, the attacker can repeat the same 1445 procedure, and iterate, thus creating a denial of service attack. 1446 The (low) cost to mount this attack is linear with the number of 1447 buffers at the target node. However, the cost for an attacker can be 1448 increased if individual fragments of multiple packets can be stored 1449 in the reassembly buffer. To further increase the attack cost, the 1450 reassembly buffer can be split into fragment-sized buffer slots. 1451 Once a packet is complete, it is processed normally. If buffer 1452 overload occurs, a receiver can discard packets based on the sender 1453 behavior, which may help identify which fragments have been sent by 1454 an attacker. 1456 In another type of attack, the malicious node is required to have 1457 overhearing capabilities. If an attacker can overhear a fragment, it 1458 can send a spoofed duplicate (e.g. with random payload) to the 1459 destination. A receiver cannot distinguish legitimate from spoofed 1460 fragments. Therefore, the original IPv6 packet will be considered 1461 corrupt and will be dropped. To protect resource-constrained nodes 1462 from this attack, it has been proposed to establish a binding among 1463 the fragments to be transmitted by a node, by applying content- 1464 chaining to the different fragments, based on cryptographic hash 1465 functionality. The aim of this technique is to allow a receiver to 1466 identify illegitimate fragments. 1468 Further attacks may involve sending overlapped fragments (i.e. 1469 comprising some overlapping parts of the original IPv6 datagram). 1470 Implementers should make sure that correct operation is not affected 1471 by such event. 1473 11. Acknowledgements 1475 Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier, 1476 Arunprabhu Kandasamy, Antony Markovski, Alexander Pelov, Pascal 1477 Thubert, Juan Carlos Zuniga and Diego Dujovne for useful design 1478 consideration and comments. 1480 12. References 1482 12.1. Normative References 1484 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 1485 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, 1486 December 1998, . 1488 [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, 1489 "Transmission of IPv6 Packets over IEEE 802.15.4 1490 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, 1491 . 1493 [RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust 1494 Header Compression (ROHC) Framework", RFC 5795, 1495 DOI 10.17487/RFC5795, March 2010, 1496 . 1498 [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 1499 Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, 1500 February 2014, . 1502 12.2. Informative References 1504 [I-D.ietf-lpwan-overview] 1505 Farrell, S., "LPWAN Overview", draft-ietf-lpwan- 1506 overview-04 (work in progress), June 2017. 1508 Appendix A. Fragmentation examples 1510 This section provides examples of different fragment delivery 1511 reliability options possible on the basis of this specification. 1513 Figure 16 illustrates the transmission of an IPv6 packet that needs 1514 11 fragments in the No ACK option. 1516 Sender Receiver 1517 |-------CFN=0-------->| 1518 |-------CFN=0-------->| 1519 |-------CFN=0-------->| 1520 |-------CFN=0-------->| 1521 |-------CFN=0-------->| 1522 |-------CFN=0-------->| 1523 |-------CFN=0-------->| 1524 |-------CFN=0-------->| 1525 |-------CFN=0-------->| 1526 |-------CFN=0-------->| 1527 |-------CFN=1-------->|MIC checked => 1529 Figure 16: Transmission of an IPv6 packet carried by 11 fragments in 1530 the No ACK option 1532 Figure 17 illustrates the transmission of an IPv6 packet that needs 1533 11 fragments in Window mode - ACK on error, for N=3, without losses. 1535 Sender Receiver 1536 |-----W=1, CFN=6----->| 1537 |-----W=1, CFN=5----->| 1538 |-----W=1, CFN=4----->| 1539 |-----W=1, CFN=3----->| 1540 |-----W=1, CFN=2----->| 1541 |-----W=1, CFN=1----->| 1542 |-----W=1, CFN=0----->| 1543 (no ACK) 1544 |-----W=0, CFN=6----->| 1545 |-----W=0, CFN=5----->| 1546 |-----W=0, CFN=4----->| 1547 |-----W=0, CFN=7----->|MIC checked => 1548 (no ACK) 1550 Figure 17: Transmission of an IPv6 packet carried by 11 fragments in 1551 Window mode - ACK on error, for N=3, without losses. 1553 Figure 18 illustrates the transmission of an IPv6 packet that needs 1554 11 fragments in Window mode - ACK on error, for N=3, with three 1555 losses. 1557 Sender Receiver 1558 |-----W=1, CFN=6----->| 1559 |-----W=1, CFN=5----->| 1560 |-----W=1, CFN=4--X-->| 1561 |-----W=1, CFN=3----->| 1562 |-----W=1, CFN=2--X-->| 1563 |-----W=1, CFN=1----->| 1564 |-----W=1, CFN=0----->| 1565 |<-----ACK, W=1-------|Bitmap:11010111 1566 |-----W=1, CFN=4----->| 1567 |-----W=1, CFN=2----->| 1568 (no ACK) 1569 |-----W=0, CFN=6----->| 1570 |-----W=0, CFN=5----->| 1571 |-----W=0, CFN=4--X-->| 1572 |-----W=0, CFN=7----->|MIC checked 1573 |<-----ACK, W=0-------|Bitmap:11000001 1574 |-----W=0, CFN=4----->|MIC checked => 1575 (no ACK) 1577 Figure 18: Transmission of an IPv6 packet carried by 11 fragments in 1578 Window mode - ACK on error, for N=3, three losses. 1580 Figure 19 illustrates the transmission of an IPv6 packet that needs 1581 11 fragments in Window mode - ACK "always", for N=3, without losses. 1582 Note: in Window mode, an additional bit will be needed to number 1583 windows. 1585 Sender Receiver 1586 |-----W=1, CFN=6----->| 1587 |-----W=1, CFN=5----->| 1588 |-----W=1, CFN=4----->| 1589 |-----W=1, CFN=3----->| 1590 |-----W=1, CFN=2----->| 1591 |-----W=1, CFN=1----->| 1592 |-----W=1, CFN=0----->| 1593 |<-----ACK, W=1-------|no bitmap 1594 |-----W=0, CFN=6----->| 1595 |-----W=0, CFN=5----->| 1596 |-----W=0, CFN=4----->| 1597 |-----W=0, CFN=7----->|MIC checked => 1598 |<-----ACK, W=0-------|no bitmap 1599 (End) 1601 Figure 19: Transmission of an IPv6 packet carried by 11 fragments in 1602 Window mode - ACK "always", for N=3, no losses. 1604 Figure 20 illustrates the transmission of an IPv6 packet that needs 1605 11 fragments in Window mode - ACK "always", for N=3, with three 1606 losses. 1608 Sender Receiver 1609 |-----W=1, CFN=6----->| 1610 |-----W=1, CFN=5----->| 1611 |-----W=1, CFN=4--X-->| 1612 |-----W=1, CFN=3----->| 1613 |-----W=1, CFN=2--X-->| 1614 |-----W=1, CFN=1----->| 1615 |-----W=1, CFN=0----->| 1616 |<-----ACK, W=1-------|bitmap:11010111 1617 |-----W=1, CFN=4----->| 1618 |-----W=1, CFN=2----->| 1619 |<-----ACK, W=1-------|no bitmap 1620 |-----W=0, CFN=6----->| 1621 |-----W=0, CFN=5----->| 1622 |-----W=0, CFN=4--X-->| 1623 |-----W=0, CFN=7----->|MIC checked 1624 |<-----ACK, W=0-------|bitmap:11000001 1625 |-----W=0, CFN=4----->|MIC checked => 1626 |<-----ACK, W=0-------|no bitmap 1627 (End) 1629 Figure 20: Transmission of an IPv6 packet carried by 11 fragments in 1630 Window mode - ACK "Always", for N=3, with three losses. 1632 Appendix B. Rule IDs for fragmentation 1634 Different Rule IDs may be used for different aspects of fragmentation 1635 functionality as per this document. A summary of such Rule IDs 1636 follows: 1638 o A fragment, and the reliability option in use for the IPv6 1639 datagram being carried: i) No ACK, ii) Window mode - ACK on error, 1640 iii) Window mode - ACK "always". In Window mode, a specific Rule 1641 ID may be used for each supported window size. 1643 o An ACK message. 1645 o A message to abort all on-going transmissions. 1647 Appendix C. Note 1649 Carles Gomez has been funded in part by the Spanish Government 1650 (Ministerio de Educacion, Cultura y Deporte) through the Jose 1651 Castillejo grant CAS15/00336, and by the ERDF and the Spanish 1652 Government through project TEC2016-79988-P. Part of his contribution 1653 to this work has been carried out during his stay as a visiting 1654 scholar at the Computer Laboratory of the University of Cambridge. 1656 Authors' Addresses 1658 Ana Minaburo 1659 Acklio 1660 2bis rue de la Chataigneraie 1661 35510 Cesson-Sevigne Cedex 1662 France 1664 Email: ana@ackl.io 1666 Laurent Toutain 1667 IMT-Atlantique 1668 2 rue de la Chataigneraie 1669 CS 17607 1670 35576 Cesson-Sevigne Cedex 1671 France 1673 Email: Laurent.Toutain@imt-atlantique.fr 1675 Carles Gomez 1676 Universitat Politecnica de Catalunya 1677 C/Esteve Terradas, 7 1678 08860 Castelldefels 1679 Spain 1681 Email: carlesgo@entel.upc.edu