lpwan Working Group A. Minaburo Internet-Draft Acklio Intended status: Informational L. Toutain Expires:November 6,December 18, 2017 IMT-Atlantique C. Gomez Universitat Politecnica de CatalunyaMay 05,June 16, 2017 LPWAN Static Context Header Compression (SCHC) and fragmentation for IPv6 and UDPdraft-ietf-lpwan-ipv6-static-context-hc-03draft-ietf-lpwan-ipv6-static-context-hc-04 Abstract This document describes a header compression scheme and fragmentation functionality forIPv6/UDP protocols.very low bandwidth networks. These techniques are especially tailored for LPWAN (Low Power Wide Area Network)networks and could be extended to other protocol stacks.networks. The Static Context Header Compression (SCHC) offers a great level of flexibility when processing the headerfields.fields and must be used for this kind of networks. A common context stored in a LPWAN device and in the network is used. This context stores information that will not be transmitted in the constrained network. Static context means that information stored in the contextwhich,which describes field values, does not change duringthepacket transmission, avoiding complex resynchronization mechanisms, incompatible with LPWAN characteristics. In most of the cases, IPv6/UDP headers are reduced to a smallidentifier.identifier called Rule ID. But sometimes the SCHC header compression will not be enough to send the packet in one L2 PDU, so this document also describes a Fragmentation protocol that must be used when needed. This document describes the generic compression/decompressionprocessmechanism and applies it to IPv6/UDP headers. Similar mechanisms for other protocols such as CoAP will be described inaseparatedocument.documents. Moreover, this document specifies fragmentation and reassembly mechanims for SCHC compressed packets exceeding the L2pduPDU size and for the case where the SCHC compression is not possible then the IPv6/UDP packet issent.sent using the fragmentation protocol. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at http://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire onNovember 6,December 18, 2017. Copyright Notice Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2.VocabularyLPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4 3. Terminology . . . .4 3.. . . . . . . . . . . . . . . . . . . . . 5 4. Static Context Header Compression . . . . . . . . . . . . . .5 3.1.6 4.1. SCHC Rules . . . . . . . . . . . . . . . . . . . . . . . 7 4.2. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . .7 3.2.9 4.3. Packet processing . . . . . . . . . . . . . . . . . . . .7 4.9 5. Matching operators . . . . . . . . . . . . . . . . . . . . .8 5.10 6. Compression Decompression Actions (CDA) . . . . . . . . . . .9 5.1.11 6.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . . .10 5.2.12 6.2. value-sent CDA . . . . . . . . . . . . . . . . . . . . .10 5.3.12 6.3. mapping-sent . . . . . . . . . . . . . . . . . . . . . .10 5.4.12 6.4. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . . .10 5.5. DEViid-DID, APPiid-DID13 6.5. DEViid, APPiid CDA . . . . . . . . . . . . . . .11 5.6.. . . . 13 6.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . . .11 6.13 7. Application to IPv6 and UDP headers . . . . . . . . . . . . .11 6.1.14 7.1. IPv6 version field . . . . . . . . . . . . . . . . . . .11 6.2.14 7.2. IPv6 Traffic class field . . . . . . . . . . . . . . . .12 6.3.14 7.3. Flow label field . . . . . . . . . . . . . . . . . . . .12 6.4.14 7.4. Payload Length field . . . . . . . . . . . . . . . . . .12 6.5.15 7.5. Next Header field . . . . . . . . . . . . . . . . . . . .13 6.6.15 7.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . .13 6.7.15 7.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . .13 6.7.1.16 7.7.1. IPv6 source and destination prefixes . . . . . . . .13 6.7.2.16 7.7.2. IPv6 source and destination IID . . . . . . . . . . .14 6.8.16 7.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . .14 6.9.17 7.9. UDP source and destination port . . . . . . . . . . . . .15 6.10.17 7.10. UDP length field . . . . . . . . . . . . . . . . . . . .15 6.11.17 7.11. UDP Checksum field . . . . . . . . . . . . . . . . . . .15 7.18 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . .16 7.1.18 8.1. IPv6/UDP compression . . . . . . . . . . . . . . . . . .16 8.18 9. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . .18 8.1.21 9.1. Overview . . . . . . . . . . . . . . . . . . . . . . . .18 8.2.21 9.2. Reliability options: definition . . . . . . . . . . . . .19 8.3.22 9.3. Reliability options: discussion . . . . . . . . . . . . .20 8.4. Fragment format23 9.4. Tools . . . . . . . . . . . . . . . . . . . . .21 8.5. Fragmentation header formats. . . . . 23 9.5. Formats . . . . . . . . .22 8.6. ACK. . . . . . . . . . . . . . . . 24 9.5.1. Fragment format . . . . . . . . . . . . . . . . . . . 24 9.5.2. Fragmentation header formats . . . . . . . . . . . . 248.7.9.5.3. ACK format . . . . . . . . . . . . . . . . . . . . . 26 9.6. Baseline mechanism . . . . . . . . . . . . . . . . . . .25 8.8.28 9.7. Supporting multiple window sizes . . . . . . . . . . . . 29 9.8. Abortingafragmented IPv6 datagramtransmissiontransmissions . . . .28 8.9.. 30 9.9. Downlink fragment transmission . . . . . . . . . . . . .28 9.30 10. Security considerations . . . . . . . . . . . . . . . . . . .29 9.1.30 10.1. Security considerations for header compression . . . . .29 9.2.30 10.2. Security considerations for fragmentation . . . . . . .. 29 10.31 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . .30 11.31 12. References . . . . . . . . . . . . . . . . . . . . . . . . .30 11.1.32 12.1. Normative References . . . . . . . . . . . . . . . . . .30 11.2.32 12.2. Informative References . . . . . . . . . . . . . . . . .3032 Appendix A. Fragmentation examples . . . . . . . . . . . . . . .3032 Appendix B. Rule IDs for fragmentation . . . . . . . . . . . . . 35 Appendix C. Note . . . . . . . . . . . . . . . . . . . . . . . .3536 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . .3536 1. Introduction Header compression is mandatory to efficiently bring Internet connectivity to the node within a LPWANnetwork [I-D.minaburo-lp-wan-gap-analysis].network. Some LPWAN networks properties can be exploited for an efficient header compression: o Topology isstar oriented,star-oriented, therefore all the packets follow the same path. For the needs of this draft, the architecture can be summarized to Devices(DEV)(Dev) exchanging information with LPWAN Application Server(APP)(App) through a Network Gateway (NGW). o Traffic flows are mostly known in advance, since devices embed built-in applications. Contrary to computers or smartphones, new applications cannot be easily installed. The Static Context Header Compression (SCHC) is defined for this environment. SCHC uses a context where header information is kept in the header format order. This context is static (the values on the header fields do not changeduringover time) avoiding complex resynchronization mechanisms, incompatible with LPWAN characteristics. In most of the cases, IPv6/UDP headers are reduced to a small context identifier. The SCHC header compression mechanism isindedependentindependent of the specific LPWAN technology over which it will be used.On the other hand,LPWAN technologies are also characterized, among others, by a very reduced data unit and/or payload size [I-D.ietf-lpwan-overview]. However, some of these technologies do not support layer two fragmentation, therefore the only option for these to support the IPv6 MTU requirement of 1280 bytes [RFC2460] is the use of a fragmentationmechanismprotocol at the adaptation layer below IPv6. Thisspecificationdraft defines also a fragmentation functionality to support the IPv6 MTU requirements over LPWAN technologies. Such functionality has been designed under the assumption that data unit reordering will not happen between the entity performing fragmentation and the entity performing reassembly. 2.VocabularyLPWAN Architecture LPWAN technologies have similar architectures but different terminology. We can identify different types of entities in a typical LPWAN network, see Figure 1: o Devices (Dev) are the end-devices or hosts (e.g. sensors, actuators, etc.). There can be a high density of devices per radio gateway. o The Radio Gateway (RG), which is the end point of the constrained link. o The Network Gateway (NGW) is the interconnection node between the Radio Gateway and the Internet. o LPWAN-AAA Server, which controls the user authentication, the applications. We use the term LPWAN-AAA server because we are not assuming that this entity speaks RADIUS or Diameter as many/most AAA servers do, but equally we don't want to rule that out, as the functionality will be similar. o Application Server (App) +------+ () () () | |LPWAN-| () () () () / \ +---------+ | AAA | () () () () () () / \=======| ^ |====|Server| +-----------+ () () () | | <--|--> | +------+ |APPLICATION| () () () () / \============| v |==============| (App) | () () () / \ +---------+ +-----------+ Dev Radio Gateways NGW Figure 1: LPWAN Architecture 3. Terminology This section defines the terminology and acronyms used in this document. o CDA: Compression/Decompression Action. An action that is perfomed for both functionnalities to compress a header field or to recover its original value in the decompression phase. o Context: A set of rules used to compress/decompress headers oDEV:Dev: Device. Node connected to the LPWAN. ADEVDev may implement SCHC. oAPP:App: LPWAN Application. An applicationsending/consumingsending/receiving IPv6 packets to/from the Device. o SCHC C/D: LPWAN Compressor/Decompressor. A process in the network to achieve compression/decompressing headers. SCHC C/D uses SCHC rules to perform compression and decompression. o MO: Matching Operator. An operator used tocomparematch a value contained in a header field with a value contained in arule.Rule. o Rule: A set of header field values. o Rule ID: An identifier for a rule, SCHC C/D andDEVDev share the sameruleRule ID for a specific flow.Rule ID is sent on the LPWAN.o TV: Target value. A value contained in theruleRule that will be matched with the value of a header field.3.o FID: Field Indentifier is an index to describe the header fields in the Rule o FP: Field Position is a list of possible correct values that a field may use o DI: Direction Indicator is a differentiator for matching in order to be able to have different values for both sides. o IID: Interface Identifier. See the IPv6 addressing architecture [RFC7136] o Dev-IID: Device Interface Identifier. Second part of the IPv6 address to identify the device interface o APP-IID: Application Interface Identifier. Second part of the IPv6 address to identify the application interface o Dw: Down Link direction for compression, from SCHC C/D to Dev o Up: Up Link direction for compression, from Dev to SCHC C/D o Bi: Bidirectional, it can be used in both senses 4. Static Context Header Compression Static Context Header Compression (SCHC) avoids context synchronization, which is the most bandwidth-consuming operation in other header compression mechanisms such asRoHC.RoHC [RFC5795]. Based on the fact that the nature of data flows is highly predictable in LPWAN networks, a static context may be stored on the Device(DEV).(Dev). The context must be stored in bothends. Itends, and it canalsoeither be learned byusingaprovisionningprovisioning protocolthator by out of band means or it can be pre- provosioned, etc. The way the context is learned on both sides is out of the scope of thisdraft. DEVICE Appl Serversdocument. Dev App +---------------+ +---------------+ | APP1 APP2 APP3| |APP1 APP2 APP3| | | | | | UDP | | UDP | | IPv6 | | IPv6 | | | | | | SCHC C/D | | | | (context) | | | +--------+------+ +-------+-------+ | +--+ +----+ +---------+ . +~~ |RG| === |NGW | === |SCHC C/D |... Internet ... +--+ +----+ |(context)| +---------+ Figure1:2: Architecture Figure12 based on [I-D.ietf-lpwan-overview] terminology represents the architecture for compression/decompression. The Device isrunningsending applicationswhich produceflows using IPv6 or IPv6/UDPflows.protocols. These flows are compressed by an Static Context Header Compression Compressor/Decompressor (SCHC C/D) to reducetheheaders size. Resulting information is sent on a layer two (L2) frame to the LPWAN Radio Network to a Radio Gateway (RG) which forwards the frame to a Network Gateway (NGW). The NGW sends the data to a SCHC C/D for decompression which shares the same rules with theDEV.Dev. The SCHC C/D can be located on the Network Gateway (NGW) or in anotherplaces ifplace as long as a tunnel is established between the NGW and the SCHC C/D.This architecture forms a star topology.SCHC C/D in both sides must share the same set of Rules. After decompression, the packet can be sent on the Internet to one or several LPWAN Application Servers(APP).(App). TheprincipleSCHC C/D process isexactlybidirectional, so the same principles can be applied in the other direction. 4.1. SCHC Rules The main idea of the SCHC compression scheme is to send the Rule id to the other end that match as much as possible the original packet values instead of sending known field values. When a value is known by both ends, it is not necessary sent through the LPWAN network. The context contains a list of rules (cf. Figure2).3). EachruleRule contains itself a list of fields descriptions composed of a field identifier (FID), a field position (FP), a direction indicator (DI), a target value (TV), a matching operator (MO) and a Compression/ Decompression Action (CDA)./----------------------------------------------------------------\/--------------------------------------------------------------\ | Rule N |/----------------------------------------------------------------\|/--------------------------------------------------------------\| | Rule i ||/----------------------------------------------------------------\||/--------------------------------------------------------------\|| | (FID) Rule 1 ||||+-------+---+---+------------+-----------------+---------------+||||+-------+--+--+------------+-----------------+---------------+||| ||Field1|Pos|Dir|Target1|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||||+-------+---+---+------------+-----------------+---------------+||||+-------+--+--+------------+-----------------+---------------+||| ||Field2|Pos|Dir|Target2|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||||+-------+---+---+------------+-----------------+---------------+||||+-------+--+--+------------+-----------------+---------------+||| ||...|...|...||..|..| ... | ... | ... |||||+-------+---+---+------------+-----------------+---------------+||/|+-------+--+--+------------+-----------------+---------------+||/ ||FieldN|Pos|Dir|TargetN|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||+-------+---+---+------------+-----------------+---------------+|/|+-------+--+--+------------+-----------------+---------------+|/ | |\----------------------------------------------------------------/\--------------------------------------------------------------/ Figure2: Compression Decompression3: Compression/Decompression Context TheruleRule does not describe the original packet format which must be known from the compressor/decompressor. The rule just describes the compression/decompression behavior for the header fields. In the rule, the description of the header field must bedoneperformed in thesame order they appear in the packet. On the other hand, the ruleformat packet order. The Rule describes also the compressed header fields which are transmitted regarding their position in the rule which is used for data serialization on the compressor side and data deserialization on the decompressor side. Themain idea of the compression scheme is to send the rule id toContext describes theother end instead of known field values. When a value is known by both ends, it is not necessary to send it onheader fields and its values with theLPWAN network. The field description is composed of differentfollowing entries: o A Field ID (FID) is a unique value to define the header field. o A Field Position (FP) indicating if several instances of the field exist in the headers which one is targeted. The default position is 1 o A direction indicator (DI) indicating the packet direction. Three values are possible: *upstreamUP LINK (Up) when the field or the value is only present in packets sent by theDEVDev to theAPP,App, *downstreamDOWN LINK (Dw) when the field or the value is only present in packet sent from theAPPApp to theDEVDev and *bi-directionalBIDIRECTIONAL (Bi) when the field or the value is present either upstream or downstream. o A Target Value (TV) is the value used to make the comparison with the packet header field. The Target Value can be of any type (integer, strings,...).ItFor instance, it can be a single value or a more complex structure (array,list,...). It can be consideredlist,...), such as a JSON or a CBOR structure. o A Matching Operator (MO) is the operator used to make the comparison between thefield valueField Value and the Target Value. The Matching Operator may require someparameters, which can be considered as a CBOR structure.parameters. MO is only used during the compression phase. o A Compression Decompression Action (CDA) is used to describe the compression and the decompression process. The CDA may require some parameters,which can be considered as a CBOR structure. 3.1.CDA are used in both compression and decompression phases. 4.2. Rule ID Rule IDs are sent between both compression/decompression elements. The size of theruleRule ID is not specified in thisdocumentdocument, it is implementation-specific and can vary regarding the LPWAN technology, the number offlows,...flows, among others. Some values in theruleRule ID space may be reserved for goals other than headercompression, for examplecompression as fragmentation. (See Section 9). Rule IDs are specific to aDEV.Dev. TwoDEVsDevs may use the sameruleRule ID for different header compression.TheTo identify the correct Rule ID, the SCHC C/D needs to combine theruleRule ID with theDEVDev L2addressidentifier to find the appropriaterule. 3.2.Rule. 4.3. Packet processing The compression/decompression process follows several steps: o compressionruleRule selection:theThe goal is to identify whichrule(s)Rule(s) will be used to compress the packet's headers.EachWhen doing compression from Dw to Up the SCHC C/D needs to find the correct Rule to use by identifying its Dev-ID and the Rule-ID. In the Up situation only the Rule-ID is used. The next step is to choose the fields by their direction, using the direction indicator (DI), so the fields that does not correspond to the appropiated DI will be excluded. Next, then fields are identified according to their field identifier (FID) and field position (FP). If the field position does not correspond then the Rule isassociatednot use and the SCHC take next Rule. Once the DI and the FP correspond toa matching operator for compression. Eachthe header information, each field's value is then compared to the corresponding target value (TV) stored in theruleRule for that specific field using the matchingoperator. This comparison includes the direction indicator and the field position in the header.operator (MO). If all the fields in the packet's header satisfy all the matching operators(excluding unappropriate direction or position)(MOs) of arule,Rule (i.e. all results are True), thepacket isfields of the header are then processedusing Compression Decompression Function associated withaccording to thefields.Compression/ Decompession Actions (CDAs) and a compressed header is obtained. Otherwise the next rule is tested. If no eligible rule is found, then thepacket isheader must be sent without compression, in whichmay require usingcase the fragmentationprocedure. In the downstrean direction, the rule is also used to find the device ID.process must be required. o sending: TheruleRule ID is sent to the other end followed by information resulting from the compression of header fields. This information is sent in the order expressed in theruleRule for the matching fields. The way theruleRule ID is sent depends on the specific LPWAN layer two technology and will be specified in a specific document, and is out of the scope of this document. For example, it caneitherbe either included in a Layer 2 header or sent in the first byte of the L2 payload. (cf. Figure3)4). o decompression: In both directions, The receiver identifies the sender through its device-id (e.g. MAC address) and selects the appropriateruleRule through theruleRule ID. ThisruleRule gives the compressed header format and associates these values to header fields. It applies the CDA action to reconstruct the original header fields. The CDA application order can be different of the order given by therule.Rule. For instance Compute-* may be applied at end, after the other CDAs. +--- ... ---+-------------- ... --------------+ | Rule ID |Compressed Hdr Fields information| +--- ... ---+-------------- ... --------------+ Figure3:4: LPWAN Compressed Format Packet4.5. Matching operatorsThis document describes basic matching operators (MO)s which must be knownMatching Operators (MOs) are functions used by both SCHCC/D,C/D endpoints involved in the headercompression/ decompression.compression/decompression. They are not typed and can be applied indifferently to integer, string or any other data type. The result of the operation can either be True or False. MOsand their definitionsareprovided next:defined as follows: o equal:aA field value in a packet matches with afield valueTV in aruleRule if they are equal. o ignore:noNo check is done between a field value in a packet and afield valueTV in therule.Rule. The result of the matching is always true. o MSB(length):aA matching is obtained if the most significant bits of the length field value bits ofa sizethe header are equal to"length" bits in a packet matches with a field valuethe TV in the rule. The MSB Matching Operator needs arule ifparameter, indicating themost significant "length" bits are equal.number of bits, to proceed to the matching. o match-mapping: The goal of mapping-sent is to reduce the size of a field by allocating a shorter value. The Target Value contains a list ofpairs.values. Eachpair is composed of avalueandis idenfied by a short ID (or index). This operator matches if a field value is equal to one ofthe pairs'those target values.Matching Operators and match-mapping needs a parameter to proceed to the matching. Match-mapping requires a list of values associated to an index and MSB requires an integer indicating the number of bits to test. 5.6. Compression Decompression Actions (CDA) The Compression Decompression Actions (CDA) describes the action taken during the compression of headers fields, and inversely, the action taken by the decompressor to restore the original value. /--------------------+-------------+----------------------------\ | Action | Compression | Decompression | | | | | +--------------------+-------------+----------------------------+ |not-sent |elided |use value stored in ctxt | |value-sent |send |build from received value | |mapping-sent |send index |value from index on a table | |LSB(length) |send LSB|ctxt value|TV ORrcvdreceived value | |compute-length |elided |compute length | |compute-checksum |elided |compute UDP checksum ||DEViid-DID|Deviid |elided |build IID from L2DEVDev addr ||APPiid-DID|Appiid |elided |build IID from L2APPApp addr | \--------------------+-------------+----------------------------/ Figure4:5: Compression and Decompression Functions Figure45 sumarizes the basics functions defined to compress and decompress a field. The first column gives the action's name. The second and third columns outlines the compression/decompression behavior. Compression is done in the rule order and compressed values are sent in that order in the compressed message. The receiver must be able to find the size of each compressed field which can be given by the rule or may be sent with the compressed header.5.1.If the field is identified as variable, then its size must be sent first using the following coding: o If the size is between 0 and 14 bytes it is sent using 4 bits. o For values between 15 and 255, the first 4 bit sent are set to 1 and the size is sent using 8 bits. o For higher value, the first 12 bytes are set to 1 and the size is sent on 2 bytes. 6.1. not-sent CDA Not-sent function is generally used when the field value is specified in the rule and therefore known by the both Compressor and Decompressor. This action is generally used with the "equal" MO. If MO is "ignore", there is a risk to have a decompressed field value different from the compressed field. The compressor does not send any value on the compressed header forthatthe field on which compression is applied. The decompressor restores the field value with the target value stored in the matched rule.5.2.6.2. value-sent CDA The value-sent action is generally used when the field value is not known by both Compressor and Decompressor. The value is sent in the compressed message header. Both Compressor and Decompressor must know the size of the field, either implicitly (the size is known by both sides) or explicitly in the compressed header field by indicating the length. This function is generally used with the "ignore" MO. The compressor sends the Target Value stored on the rule in the compressed header message. The decompressor restores the field value with the one received from the LPWAN5.3.6.3. mapping-sent mapping-sent is used to send a smaller index associated to thefield valuelist of values in the Target Value. This function is used together with the "match-mapping" MO. The compressor looks in the TV to find the field value and send the corresponding index. The decompressor uses this index to restore the field value. The number ofbitbits sent is the minimalnumbersize to code all the possible indexes.5.4.6.4. LSB CDA LSB action is used tosend a fixedavoid sendind the known part of the packet field header to the other end. This action is used together with the "MSB" MO. A length can be specified in the rule to indicate how many bits have to be sent. If not length is specified, the number ofbitbits sent are the field length minus thebitbits length specified in the MSB MO. The compressor sends the "length" Least Significant Bits. The decompressor combineswith an OR operatorthe value received with the Target Value.5.5. DEViid-DID, APPiid-DIDIf this action is made on a variable length field, the remaning size in byte has to be sent before. 6.5. DEViid, APPiid CDA These functions are used to process respectively theDeviceDev and theApplication Device Identifier (DID). APPiid-DIDApp Interface Identifiers (Deviid and Appiid) of the IPv6 addresses. Appiid CDA is less common, since current LPWAN technologies frames contain a single address. The IID valueiscan be computed from the Device ID present in the Layer 2 header. The computationdepends on theis specific for each LPWAN technology and depends on the Device ID size. In the downstream direction, these CDA are used to determine the L2 addresses used by the LPWAN.5.6.6.6. Compute-*TheseThes classes of functions are used by the decompressor to compute the compressed field value based on received information. Compressed fields are elided duringthecompression and reconstructed duringthedecompression. o compute-length: compute the length assigned to this field. For instance, regarding the field ID, this CDA may be used to compute IPv6 length or UDP length. o compute-checksum: compute a checksum from the information already received by the SCHC C/D. This field may be used to compute UDP checksum.6.7. Application to IPv6 and UDP headers This section lists the different IPv6 and UDP header fields and how they can be compressed.6.1.7.1. IPv6 version field This field always holds the same value, therefore the TV is 6, the MO is "equal" and theCDA "not-sent". 6.2."CDA "not-sent"". 7.2. IPv6 Traffic class field If the DiffServ field identified by the rest of the rule do not vary and is known by both sides, the TV should contain thiswellknownwell-known value, the MO should be "equal" and the CDA must be "not-sent. If the DiffServ field identified by the rest of the rule varies over time or is not known by both sides, then there are two possibilities depending on the variability of the value, the first onethereiswithout compressionto do not compressed the field and sends the originalvalue is sent,value, or thesencondsecond where the values can be computed by sending only the LSB bits: o TV is notset,set to any value, MO is set to "ignore" and CDA is set to"value- sent""value-sent" o TV contains a stable value, MO is MSB(X) and CDA is set toLSB(8-X) 6.3.LSB 7.3. Flow label field If the Flow Label field identified by the rest of the rule does not vary and is known by both sides, the TV should contain this well- known value, the MO should be "equal" and the CDA should be "not- sent". If the Flow Label field identified by the rest of the rule varies during time or is not known by both sides, there are two possibilitiesdpendingdepending on the variability of the value, the first one is without compression and then the value is sent and the second where only part of the value is sent and the decompressor needs to compute the original value: o TV is not set, MO is set to "ignore" and CDA is set to "value- sent" o TV contains a stable value, MO is MSB(X) and CDA is set toLSB(20-X) 6.4.LSB 7.4. Payload Length field If the LPWAN technology does not add padding, this field can be elided for the transmission on the LPWAN network. The SCHC C/Drecomputerecomputes the original payload length value. The TV is not set, the MO is set to "ignore" and the CDA is "compute-IPv6-length". If the payloadis small,length needs to be sent and does not need to be coded in 16 bits, the TV can be set to 0x0000, the MO set to "MSB (16-s)" and the CDA to"LSB (s)"."LSB". The 's' parameter depends on the expected maximum packet length. On other cases, the payload length field must be sent and the CDA is replaced by "value-sent".6.5.7.5. Next Header field If the Next Header field identified by the rest of the rule does not vary and is known by both sides, the TV should contain this Next Header value, the MO should be "equal" and the CDA should be "not- sent". If the Next header field identified by the rest of the rule varies during time or is not known by both sides, then TV is not set, MO is set to "ignore" and CDA is set to "value-sent". A matching-list may also be used.6.6.7.6. Hop Limit field The End System is generally ahostdevice and does not forward packets, therefore the Hop Limit value is constant. So the TV is set with a default value, the MO is set to "equal" and the CDA is set to "not- sent". Otherwise the value is sent on the LPWAN: TV is not set, MO is set to ignore and CDA is set to "value-sent". Note that the field behavior differs in upstream and downstream. In upstream, since there is no IP forwarding between theDEVDev and the SCHC C/D, the value is relatively constant. On the other hand, the downstream value depends of Internet routing and may change more frequently. One solution could be to use the Direction Indicator (DI) to distinguish both directions to elide the field in the upstream direction and send the value in the downstream direction.6.7.7.7. IPv6 addresses fields As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit long fields; one for the prefix and one for the Interface Identifier (IID). These fields should be compressed. To allow a single rule, these values are identified by their role (DEV or APP) and not by their position in the frame (source or destination). The SCHC C/D must be aware of the traffic direction (upstream, downstream) to select the appropriate field.6.7.1.7.7.1. IPv6 source and destination prefixes Both ends must be synchronized with the appropriate prefixes. For a specific flow, the source and destination prefix can be unique and stored in the context. It can be either a link-local prefix or a global prefix. In that case, the TV for the source and destination prefixes contains the values, the MO is set to "equal" and the CDA is set to "not-sent". In case the rule allows several prefixes, mapping-list must be used. The different prefixes are listed in the TV associated with a short ID. The MO is set to "match-mapping" and the CDA is set to "mapping- sent". Otherwise the TV contains the prefix, the MO is set to "equal" and the CDA is set to value-sent.6.7.2.7.7.2. IPv6 source and destination IID If the DEV or APP IID are based on an LPWAN address, then the IID can be reconstructed with information coming from the LPWAN header. In that case, the TV is not set, the MO is set to "ignore" and the CDA is set to"DEViid-DID""DEViid" or"APPiid-DID"."APPiid". Note that the LPWAN technology is generally carrying a single device identifier corresponding to the DEV. The SCHC C/D may also not be aware of these values.For privacy reasons or ifIf the DEV addressis changing over time, it maybe better to usehas a staticvalue. Invalue thatcase,is not derivated from the EUI-64, then TV contains the value, the MO operator is set to "equal" and the CDA is set to "not-sent". If several IIDs are possible, then the TV contains the list of possibleIID,IIDs, the MO is set to "match-mapping" and the CDA is set to "mapping-sent". Otherwise the value variation of the IID may be reduced to few bytes. In that case, the TV is set to the stable part of the IID, the MO is set to MSB and theCDFCDA is set to LSB. Finally, the IID can be sent on the LPWAN. In that case, the TV is not set, the MO is set to "ignore" and the CDA is set to "value- sent".6.8.7.8. IPv6 extensions No extension rules are currently defined. They can be based on the MOs and CDAs described above.6.9.7.9. UDP source and destination port To allow a single rule, the UDP port values are identified by their role (DEV or APP) and not by their position in the frame (source or destination). The SCHC C/D must be aware of the traffic direction (upstream, downstream) to select the appropriate field. The following rules apply for DEV and APP port numbers. If both endsknowsknow the port number, it can be elided. The TV contains the port number, the MO is set to "equal" and the CDA is set to"not-sent"."not- sent". If the port variation is on few bits, the TV contains the stable part of the port number, the MO is set to "MSB" and the CDA is set to "LSB". If some well-known values are used, the TV can contain the list of this values, the MO is set to "match-mapping" and the CDA is set to "mapping-sent". Otherwise the port numbers are sent on the LPWAN. The TV is not set, the MO is set to "ignore" and the CDA is set to "value-sent".6.10.7.10. UDP length field If the LPWAN technology does not introduce padding, the UDP length can be computed from the received data. In that case the TV is not set, the MO is set to "ignore" and the CDA is set to "compute-UDP- length". If the payload is small, the TV can be set to 0x0000, the MO set to "MSB" and the CDA to "LSB". On other cases, the length must be sent and the CDA is replaced by "value-sent".6.11.7.11. UDP Checksum field IPv6 mandates a checksum in the protocol above IP. Nevertheless, if a more efficient mechanism such as L2 CRC or MIC is carried by or over the L2 (such as in the LPWAN fragmentation process (seeXXXX)),section Section 9)), the UDP checksum transmission can be avoided. In that case, the TV is not set, the MO is set to "ignore" and the CDA is set to"compute- UDP-checksum"."compute-UDP-checksum". In other cases the checksum must be explicitly sent. The TV is not set, the MO is set to "ignore" and the CDF is set to "value-sent".7.8. Examples This section gives some scenarios of the compression mechanism for IPv6/UDP. The goal is to illustrate the SCHC behavior.7.1.8.1. IPv6/UDP compression The most common case using the mechanisms defined in this document will be a LPWANDEVDev that embeds some applications running over CoAP. In this example, three flows are considered. The first flow is for the device management based on CoAP using Link Local IPv6 addresses and UDP ports 123 and 124 forDEVDev andAPP,App, respectively. The second flow will be a CoAP server for measurements done by the Device (using ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to beta::1/64. The last flow is for legacy applications using different ports numbers, the destination IPv6 address prefix is gamma::1/64. Figure56 presents the protocol stack for this Device. IPv6 and UDP are represented with dotted lines since these protocols are compressed on the radio link. Managment Data +----------+---------+---------+ | CoAP | CoAP | legacy | +----||----+---||----+---||----+ . UDP . UDP | UDP | ................................ . IPv6 . IPv6 . IPv6 . +------------------------------+ | SCHC Header compression | | and fragmentation | +------------------------------+ | LPWAN L2 technologies | +------------------------------+ DEV or NGW Figure5:6: Simplified Protocol Stack for LP-WAN Note that in some LPWAN technologies, only theDEVsDevs have a device ID. Therefore, when suchtechnologietechnologies are used, it is necessary to define statically an IID for the Link Local address for the SCHC C/D. Rule 0+----------------+---------+--------+-------------++------++----------------+--+--+---------+--------+-------------++------+ | Field||FP|DI| Value | Match |FunctionComp Decomp || Sent |+----------------+---------+----------------------++------+| | | | | Opera. | Action ||[bits]| +----------------+--+--+---------+----------------------++------+ |IPv6 version|6|1 |Bi|6 | equal | not-sent || | |IPv6 DiffServ|0|1 |Bi|0 | equal | not-sent || | |IPv6 Flow Label|0|1 |Bi|0 | equal | not-sent || | |IPv6 Length||1 |Bi| | ignore | comp-length || | |IPv6 NextHeader|17Header|1 |Bi|17 | equal | not-sent || | |IPv6 Hop Limit|255|1 |Bi|255 | ignore | not-sent || | |IPv6 DEVprefix|FE80::/64||1 |Bi|FE80::/64| equal | not-sent || | |IPv6 DEViid||1 |Bi| | ignore |DEViid-DIDDEViid || | |IPv6 APPprefix|FE80::/64||1 |Bi|FE80::/64| equal | not-sent || | |IPv6 APPiid|::1|1 |Bi|::1 | equal | not-sent || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ |UDP DEVport|123|1 |Bi|123 | equal | not-sent || | |UDP APPport|124|1 |Bi|124 | equal | not-sent || | |UDP Length||1 |Bi| | ignore | comp-length || | |UDP checksum||1 |Bi| | ignore | comp-chk || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ Rule 1+----------------+---------+--------+-------------++------++----------------+--+--+---------+--------+-------------++------+ | Field||FP|DI| Value | Match |FunctionAction || Sent |+----------------+---------+--------+-------------++------+| | | | | Opera. | Action ||[bits]| +----------------+--+--+---------+--------+-------------++------+ |IPv6 version|6|1 |Bi|6 | equal | not-sent || | |IPv6 DiffServ|0|1 |Bi|0 | equal | not-sent || | |IPv6 Flow Label|0|1 |Bi|0 | equal | not-sent || | |IPv6 Length||1 |Bi| | ignore | comp-length || | |IPv6 NextHeader|17Header|1 |Bi|17 | equal | not-sent || | |IPv6 Hop Limit|255|1 |Bi|255 | ignore | not-sent || | |IPv6 DEVprefix|alpha/64|1 |Bi|[alpha/64, match- |equalmapping-sent|| [1] |not-sent| |1 |Bi|fe80::/64] mapping| || | |IPv6 DEViid||1 |Bi| | ignore |DEViid-DIDDEViid || | |IPv6 APPprefix|beta/64|1 |Bi|[beta/64,| match- |equalmapping-sent|| [2] | | | | |alpha/64,| mapping| || | | | | |fe80::64]| |not-sent|| | |IPv6 APPiid|::1000|1 |Bi|::1000 | equal | not-sent || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ |UDP DEVport|5683|1 |Bi|5683 | equal | not-sent || | |UDP APPport|5683|1 |Bi|5683 | equal | not-sent || | |UDP Length||1 |Bi| | ignore | comp-length || | |UDP checksum||1 |Bi| | ignore | comp-chk || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ Rule 2+----------------+---------+--------+-------------++------++----------------+--+--+---------+--------+-------------++------+ | Field||FP|DI| Value | Match |FunctionAction || Sent |+----------------+---------+--------+-------------++------+| | | | | Opera. | Action ||[bits]| +----------------+--+--+---------+--------+-------------++------+ |IPv6 version|6|1 |Bi|6 | equal | not-sent || | |IPv6 DiffServ|0|1 |Bi|0 | equal | not-sent || | |IPv6 Flow Label|0|1 |Bi|0 | equal | not-sent || | |IPv6 Length||1 |Bi| | ignore | comp-length || | |IPv6 NextHeader|17Header|1 |Bi|17 | equal | not-sent || | |IPv6 Hop Limit|255|1 |Up|255 | ignore | not-sent || | |IPv6 Hop Limit |1 |Dw| | ignore | value-sent || [8] | |IPv6 DEVprefix|alpha/64|1 |Bi|alpha/64 | equal | not-sent || | |IPv6 DEViid||1 |Bi| | ignore |DEViid-DIDDEViid || | |IPv6 APPprefix|gamma/64|1 |Bi|gamma/64 | equal | not-sent || | |IPv6 APPiid|::1000|1 |Bi|::1000 | equal | not-sent || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ |UDP DEVport|8720|1 |Bi|8720 | MSB(12)| LSB(4) ||lsb[4] | |UDP APPport|8720|1 |Bi|8720 | MSB(12)| LSB(4) ||lsb[4] | |UDP Length||1 |Bi| | ignore | comp-length || | |UDP checksum||1 |Bi| | ignore | comp-chk || |+================+=========+========+=============++======++================+==+==+=========+========+=============++======+ Figure6:7: Context rules All the fields described in the three rules depicted on Figure67 are present in the IPv6 and UDP headers. The DEViid-DID value is found in the L2 header. The second and third rules use global addresses. The way theDEVDev learns the prefix is not in the scope of the document. The third rule compresses port numbers to 4 bits.8.9. Fragmentation8.1.9.1. Overview Fragmentation support in LPWAN is mandatory when the underlying LPWAN technology is not capable of fulfilling the IPv6 MTU requirement. Fragmentation is used if, after SCHC header compression, the size of the resulting IPv6 packet is larger than the L2 data unit maximum payload. Fragmentation is also used if SCHC header compression has not been able to compress an IPv6 packet that is larger than the L2 data unit maximum payload. In LPWAN technologies, the L2 data unit size typically varies from tens to hundreds of bytes. If the entire IPv6 datagram fits within a single L2 data unit, the fragmentation mechanism is not used and the packet is sent unfragmented. If the datagram does not fit within a single L2 data unit, it SHALL be broken into fragments. Moreover, LPWAN technologies impose some strict limitations on traffic; therefore it is desirable to enable optional fragment retransmission, while a single fragment loss should not lead to retransmitting the full IPv6 datagram. On the other hand, in order to preserve energy,Things (End Systems)Devices are sleeping most of the time and may receive data during a short period of time after transmission. In order to adapt to the capabilities of various LPWAN technologies, this specification allows for a gradation of fragment delivery reliability. This document does not make any decision with regard to which fragment delivery reliability option is used over a specific LPWAN technology. An important consideration is that LPWAN networks typically follow the star topology, and therefore data unit reordering is not expected in such networks. This specification assumes that reordering will not happen between the entity performing fragmentation and the entity performing reassembly. This assumption allows to reduce complexity and overhead of the fragmentation mechanism.8.2.9.2. Reliability options: definition This specification defines the followingfivethree fragment delivery reliability options: o No ACK oPacket mode - ACK "always" o Packet mode - ACK on error oWindow mode - ACK "always" o Window mode - ACK on error The same reliability option MUST be used for all fragments of a packet. It is up to implementers and/or representatives of the underlying LPWAN technology to decide which reliability option to use and whether the same reliability option applies to all IPv6packets.packets or not. Note that the reliability option to be used is not necessarily tied to the particular characteristics of the underlying L2 LPWAN technology (e.g.athe No ACK reliability optionwithout receiver feedbackmay be used on top of an L2 LPWAN technology with symmetric characteristics for uplink and downlink). In the No ACK option, the receiver MUST NOT issue acknowledgments (ACK). InPacket mode - ACK "always", the receiver transmits one ACK after all fragments carrying an IPv6 packet have been transmitted. The ACK informs the sender about received and/or missing fragments from the IPv6 packet. In Packet mode - ACK on error, the receiver transmits one ACK after all fragments carrying an IPv6 packet have been transmitted, only if at least one of those fragments has been lost. The ACK informs the sender about received and/or missing fragments from the IPv6 packet. InWindow mode - ACK "always", an ACK is transmitted by the fragment receiver after a window of fragments have been sent. A window of fragments is a subset of the full set of fragments needed to carry an IPv6 packet. In this mode, the ACK informs the sender about received and/or missing fragments from the window of fragments. In Window mode - ACK on error, an ACK is transmitted by the fragment receiver after a window of fragments have been sent, only if at least one of the fragments in the window has been lost. In this mode, the ACK informs the sender about received and/or missing fragments from the window of fragments. InPacket orWindow mode, upon receipt of an ACK that informs about any lost fragments, the sender retransmits the lostfragments, up to afragments. The maximum number ofACKACKs to be sent by the receiver for a specific window, denoted MAX_ACKS_PER_WINDOW, is not stated in this document, andretransmission rounds thatit isTBD.expected to be defined in other documents (e.g. technology- specific profiles). This document does not make any decision as to which fragment delivery reliability option(s) need to be supported over a specific LPWAN technology. Examples of the different reliability options described are provided in Appendix A.8.3.9.3. Reliability options: discussion This section discusses the properties of each fragment delivery reliability option defined in the previous section.Figure Figure 7 summarizes advantages and disadvantages of the reliability options that provide receiver feedback.No ACK is the most simple fragment delivery reliability option. With this option, the receiver does not generate overhead in the form of ACKs. However, this option does not enhance delivery reliability beyond that offered by the underlying LPWAN technology. The Window mode - ACK on erroroptions areoption is based on the optimistic expectation that the underlying links will offer relatively low L2 data unit loss probability.ACK on errorThis option reduces the number of ACKs transmitted by the fragment receiver compared to the Window mode - ACK "always"options.option. This may be especially beneficial in asymmetric scenarios, e.g. where fragmented data are sent uplink and the underlying LPWAN technology downlink capacity or message rate is lower than the uplink one.The Packet mode - ACK on error option provides reliability with low ACK overhead.However, if an ACK is lost, the sender assumes that all fragmentscarryingcovered by theIPv6 datagramACK have been successfully delivered. In contrast, thePacketWindow mode - ACK "always" option does not suffer that issue, at the expense ofa moderate ACK overhead. An issue with any of the Packet modes is that detection of a long burst of lost frames is only possible after relatively long time (i.e. at the end of the transmission of all fragments carryinganIPv6 datagram). In contrast with Packet modes, theACK overhead increase. The Window mode - ACK "always" option provides flow control. In addition, it is able tobetterhandle long bursts of lost fragments, since detection of such events can be doneearlier than with anybefore end of thePacket modes. However,IPv6 packet transmission, as long as thebenefits of Window mode - ACK "always" comewindow size is short enough. However, such benefit comes at the expense of higher ACK overhead.With regard9.4. Tools This subsection describes the different tools that are used to enable theWindow mode - ACK on error option, theredescribed fragmentation functionality and the different reliability options supported. Each tool has a corresponding header field format that isno knowndefined in the next subsection. The list of tools follows: o Rule ID. The Rule ID is used in fragments and in ACKs. The Rule ID in a fragment is set to a value that indicates that the data unit being carried is a fragment. This also allows to interleave non- fragmented IPv6 datagrams with fragments that carry a larger IPv6 datagram. Rule ID may also be used to signal which reliability option is in usecaseforit atthetimeIPv6 packet being carried. In an ACK, the Rule ID signals that the message this Rule ID is prepended to is an ACK. o Compressed Fragment Number (CFN). The CFN is included in all fragments. This field can be understood as a truncated, efficient representation of a larger-sized fragment number, and does not necessarily carry an absolute fragment number. A special CFN value signals thewriting. +-----------------------+------------------------+ | Packet mode |last fragment that carries a fragmented IPv6 packet. In Windowmode | +-----------------+-----------------------+------------------------+ | | + Low ACK overhead | | |mode, the CFN is augmented with the W bit, which has the purpose of avoiding possible ambiguity for the receiver that might arise under certain conditions o Datagram Tag (DTag). The DTag field, if present, is set to the same value for all fragments carrying the same IPv6 datagram, allows to interleave fragments that correspond to different IPv6 datagrams. o Message Integrity Check (MIC). It is computed by the sender over the complete IPv6 packet before fragmentation by using the TBD algorithm. The MIC allows the receiver to check for errors in the reassembled IPv6 packet, while it also enables compressing the UDP checksum by use of SCHC. o Bitmap. The bitmap is a sequence of bits included in the ACK for a given window, that provides feedback onerror | - Long loss burst | (Use case unknown) | | | - No flow control | | +-----------------+-----------------------+------------------------+ | | + Moderate ACK overh. | + Flow control | | ACK "always" | - Long loss burst | + Long loss burst | | | - No flow control | - Higher ACK overhead | +-----------------+-----------------------+------------------------+ Figure 7: Summarywhether each fragment of the current window has been received or not. 9.5. Formats This section defines the fragmentdelivery options that provide receiver feedback, and their main advantages (+)format, the fragmentation header formats, anddisadvantages (-). 8.4.the ACK format. 9.5.1. Fragment format A fragment comprises a fragmentation header and a fragment payload, and conforms to the format shown in Figure 8. The fragment payload carries a subset of either the IPv6 packet after header compression or an IPv6 packet which could not be compressed. A fragment is the payload in the L2 protocol data unit (PDU). +---------------+-----------------------+ | Fragm. Header | Fragment payload | +---------------+-----------------------+ Figure 8: Fragment format.8.5.9.5.2. Fragmentation header formats Inany oftheWindow modes,No ACK option, fragments except the last one SHALL contain the fragmentation header as defined in Figure 9. The total size of this fragmentation header is R bits. <------------ R ----------> <--T-->1<--N--> +-- ... --+- ...-+-+--+- ... -+ | Rule ID | DTag|W|| CFN | +-- ... --+- ...-+-+--+- ... -+ Figure 9: Fragmentation Header for Fragments except the Last One,Window modeNo ACK option In any of thePacket modes,Window mode options, fragments(exceptexcept the lastone) that are transmitted for the first timeone SHALL contain the fragmentation headershownas defined in Figure 10. The total size of this fragmentation header is R bits.<-------------<------------ R------------> <- T -> <- N -> +--------------> <--T--> 1 <--N--> +-- ...---+---+- ...-+--+-+- ... -+ | Rule ID | DTag||W| CFN |+----+-- ...---+---+- ...-+--+-+- ... -+ Figure 10: Fragmentation Header for Fragments except the Last One,in a Packet mode; first transmission attempt In any of the Packet modes, fragments (except the last one) that are retransmitted SHALL contain the fragmentation header as defined in Figure 11. <------------- R ------------> <- T -> <----- A ----> +---- ... ---+- ... -+----- ... ----+ | Rule ID | DTag | AFN | +---- ... ---+- ... -+----- ... ----+ Figure 11: Fragmentation Header for Retransmitted Fragments (Except the Last One) in a PacketWindow mode The last fragment of an IPv6datagram, regardless of whether a Packet mode or Window mode is in use,datagram SHALL contain a fragmentation header that conforms to the format shown in Figure12.11. The total size of this fragmentation header is R+M bits. <------------- R ------------> <- T -> <- N -> <---- M -----> +---- ... ---+- ... -+- ... -+---- ... ----+ | Rule ID | DTag | 11..1 | MIC | +---- ... ---+- ... -+- ... -+---- ... ----+ Figure12:11: Fragmentation Header for the Last Fragment o Rule ID:thisThis field has a size of R - T - N - 1 bits in all fragments that are not the last one, when Window mode is used. In all other fragments, the Rule ID field has a size of R - T - N bits.The Rule ID in a fragment is set to a value that indicates that the data unit being carried is a fragment. This also allows to interleave non-fragmented IPv6 datagrams with fragments that carry a larger IPv6 datagram. Rule ID may be used to signal which reliability option is in use. In any of the Packet modes, Rule ID is also used to indicate whether the fragment is a first transmission or a retransmission.o DTag:DTag stands for Datagram Tag.The size of the DTag field is T bits, which may be set to a value greater than or equal to 0 bits. The DTag field in all fragments that carry the same IPv6 datagram MUST be set to the same value.The DTag field allows to interleave fragments that correspond to different IPv6 datagrams.DTag MUST be set sequentially increasing from 0 to 2^T - 1, and MUST wrap back from 2^T - 1 to 0. o CFN:CFN stands for Compressed Fragment Number. TheThis field is an unsigned integer, with a size of N bits, that carries the CFNfield is N bits.of the fragment. In the No ACK option, N=1. For the rest of options, N equal to or greater than 3 is recommended.This field is an unsigned integer that carries a non-absolute fragment number.The CFN MUST be set sequentially decreasing from2^N - 2the highest CFN in the window (which will be used for the firstfragment,fragment), and MUST wrap from 0 back to2^N - 2 (e.g.the highest CFN in the window. The highest CFN in the window MUST be a value equal to or smaller than 2^N-2. (Example 1: forN=3,N=5, thefirst fragment has CFN=6,highest CFN value may be configured to be 30, then subsequent CFNs are set sequentially and in decreasing order, and CFN will wrap from 0 back to 30. Example 2: for N=5, the highest CFN value may be set to 23, then subsequent CFNs are set sequentially and in decreasing order, and the CFN will wrap from 0 back to6).23). The CFN for the last fragment has all bits set to 1. Note that, by this definition, the CFN value of 2^N - 1 is only used to identify a fragment as the last fragment carrying a subset of the IPv6 packet being transported, and thus the CFN does not strictly correspond to the N least significant bits of the actual absolute fragment number. It is also important to note that, for N=1, the last fragment of the packet will carry a CFN equal to 1, while all previous fragments will carry a CFN of 0. o W: W is a 1-bitflag that is used in Window mode. Its purpose is avoiding possible ambiguity for the receiver that might arise under certain conditions.field. Thisflagfield carries the same value for all fragments of a window, and it isset to the other valuecomplemented for the next window. The initial value for thisflag is 1. o AFN: AFN stands for Absolute Fragment Number. Thisfieldhas a size of A bits. 'A' may be greater than N. The AFNisan unsigned integer that carries the absolute fragment number that corresponds to a fragment from an IPv6 packet. The AFN MUST be set sequentially and in increasing order, starting from 0.1. o MIC:MIC stands for Message Integrity Check.Thisfieldfield, which has a size of Mbits. It is computed by the sender over the complete IPv6 packet before fragmentation by usingbits, carries theTBD algorithm. TheMICallows to checkforerrors inthereassembledIPv6packet, while it also enables compressing the UDP checksum by use of SCHC.packet. The values for R, N,AT and M are not specified in this document, and have to be determinedby the underlying LPWAN technology. 8.6.in other documents (e.g. technology-specific profile documents). 9.5.3. ACK format The format of an ACK is shown in Figure13: <-------12: <-------- R------>-------> <- T -> 1 +---- ... --+-...-+------+-+----- ... ---+ | Rule ID | DTag||W| bitmap | +---- ... --+-...-+------+-+----- ... ---+ Figure13:12: Format of an ACK Rule ID: In all ACKs, Rule ID has a size of Rbits and SHALL be set to TBD_ACK to signal that the message is an ACK.- T - 1 bits. DTag: DTag has a size of T bits. DTag carries the same value as the DTag field in the fragments carrying the IPv6 datagram for which this ACK is intended.bitmap:W: This field has a size of 1 bit. In all ACKs, the W bit carries the same value as the W bit carried by the fragments whose reception is being positively or negatively acknowledged by the ACK. bitmap: This field carries the bitmap sent by the receiver to inform the sender about whether fragments in the current window have been received or not. Size of the bitmap field of an ACK can be equal to 0 or Ceiling(Number_of_Fragments/8) octets, where Number_of_Fragments denotes the number of fragments of awindow (in Window mode) or the number of fragments that carry the IPv6 packet (in Packet mode).window. The bitmap is a sequence of bits, where the n-th bit signals whether the n-th fragment transmitted in the current window has been correctly received (n-th bit set to 1) or not (n-th bit set to 0). Remaining bits with bit order greater than the number of fragments sent (as determined by the receiver) are set to 0, except for the last bit in the bitmap, which is set to 1 if the last fragment(carryingof theMIC)window has been correctly received, and 0 otherwise. Feedback on reception of the fragment with CFN = 2^N - 1 (last fragment carrying an IPv6 packet) is only given by the last bit of the corresponding window. Absence of the bitmap in an ACK confirms correct reception of all fragments to be acknowledged by means of the ACK. Figure14 shows an example of an ACK in Packet mode, where the bitmap indicates that the second and the ninth fragments have not been correctly received. In this example, the IPv6 packet is carried by eleven fragments in total, therefore the bitmap has a size of two bytes. <------ R ------> 1 <- T -> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rule ID | DTag |1|0|1|1|1|1|1|1|0|1|1|0|0|0|0|1| +---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 14: Example of the Bitmap in an ACK Figure 1513 shows an example of an ACKin Window mode(N=3), where the bitmap indicates that the second and the fifth fragments have not been correctly received.<------<------- R------>-------> <- T -> 0 1 2 3 4 5 6 7 +---- ... --+-...-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rule ID | DTag|1|0|1|1|0|1|1|1||W|1|0|1|1|0|1|1|1| +---- ... --+-...-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure15:13: Example of the bitmap in an ACK (in Window mode, for N=3) Figure1614 illustrates an ACK without a bitmap.<------<------- R------>-------> <- T -> +---- ... --+-...-+-+-+ | Rule ID | DTag||W| +---- ... --+-...-+-+-+ Figure16:14: Example of an ACK without a bitmap Note that, in order to exploit the available L2 payload space to the fullest, a bitmap8.7.may have a size smaller than 2^N bits. In that case, the window in use will have a size lower than 2^N-1 fragments. For example, if the maximum available space for a bitmap is 56 bits, N can be set to 6, and the window size can be set to a maximum of 56 fragments. 9.6. Baseline mechanism The receiver of link fragments SHALL use (1) the sender's L2 source address (if present), (2) the destination's L2 address (if present), (3) Rule ID and (4) DTag to identify all the fragments that belong to aGivengiven IPv6 datagram. The fragment receiver may determine the fragment delivery reliability option in use for the fragment based on the Rule ID field in that fragment. Upon receipt of a link fragment, the receiver starts constructing the original unfragmented packet. It uses the CFN and the order of arrival of each fragment to determine the location of the individual fragments within the original unfragmented packet. For example, it may place the data payload of the fragments within a payload datagram reassembly buffer at the location determined from the CFN and order of arrival of the fragments, and the fragment payload sizes. In Window mode, the fragment receiver also uses the Wflagbit in the received fragments. Note that the size of the original, unfragmented IPv6 packet cannot be determined from fragmentation headers. When Window mode - ACK on error isused (for either Packet mode or Window mode),used, the fragment receiver starts a timer (denoted "ACK on Error Timer") upon reception of the first fragment for an IPv6 datagram. The initial value for this timer is not provided by this specification, and is expected to be defined in additional documents. This timer is reset every time that a new fragment carrying data from the same IPv6 datagram is received. InPacket mode - ACK on error, upon timer expiration, if the last fragment of the IPv6 datagram (i.e. carrying all CFN bits set to 1) has not been received, an ACK MUST be transmitted by the fragment receiver to indicate received and not received fragments for that IPv6 datagram. InWindow mode - ACK on error, upon timer expiration, if neither the last fragment of the IPv6 datagram nor the last fragment of the current window(with(i.e. with CFN=0) have been received, an ACK MUST be transmitted by the fragment receiver to indicate received and not received fragments for the current window. Note that, in Window mode, the first fragment of the window is the one sent with CFN=2^N-2. Also note that, in Window mode, the fragment with CFN=0 is considered the last fragment of its window, except for the last fragment of the whole packet (with all CFN bits set to 1), which is also the last fragment of the last window. Upon receipt of the last fragment of a window, if Window mode - ACK "Always" is used, the fragment receiver MUST send an ACK to the fragment sender. The ACK provides feedback on the fragments received and lost that correspond to the last window. If the recipient receives the last fragment of an IPv6 datagram, it checks for the integrity of the reassembled IPv6 datagram, based on the MIC received. In No ACK mode, if the integrity check indicates that the reassembled IPv6 datagram does not match the original IPv6 datagram (prior to fragmentation), the reassembled IPv6 datagram MUST be discarded. If Window mode - ACK "Always" is used, the recipient MUST transmit an ACK to the fragment sender. The ACK provides feedback on thewhole set of fragments sent that carry the complete IPv6 packet (Packet mode) or on thefragments that correspond to the lastwindow (Window mode).window. If Window mode - ACK on error is used, the recipient MUST NOT transmit an ACK to the sender if no losses have been detected for thewhole IPv6 packet (Packet mode) or in thelastwindow (Window mode).window. If losses have been detected, the recipient MUST then transmit an ACK to the sender to provide feedback on thewhole IPv6 packet (Packet mode) or in thelastwindow (Window mode).window. When Window mode - ACK "Always" isused (in either Packet mode or Window mode),used, the fragment sender starts a timer (denoted "ACK Always Timer") after transmitting the last fragment of a fragmented IPv6 datagram. The fragment sender also starts the ACK Always Timer after transmitting the last fragment of a window. The initial value for this timer is not provided by this specification, and is expected to be defined in additional documents. Upon expiration of the timer, if no ACK has been received forthis IPv6 datagram, the sender retransmits the last fragment, and it reinitializes and restarts the timer. In Window mode - ACK "Always",thefragment sender also starts the ACK Always Timer after transmitting the last fragment of a window. Upon expiration of the timer, if no ACK has been received for thiscurrent window, the sender retransmits the last fragment, and it reinitializes and restarts the timer. Note that retransmitting the last fragment of apacket or awindow as described serves as an ACK request. The maximum number ofACKrequests for a specific ACK, denoted MAX_ACK_REQUESTS, is not stated inPacket mode or in Window modethis document, and it isTBD.expected to be defined in other documents (e.g. technology-specific profiles). In allreliabilityWindow mode options,except for the No ACK option,the fragment sender retransmits any lost fragments reported in an ACK.In Packet modes, in order to minimize the probability of ambiguity with the CFN of different retransmitted fragments, the fragment sender renumbers the CFNs of the fragments to be retransmitted by following the same approach as for a sequence of new fragments: the CFN for retransmitted fragments is set sequentially decreasing from 2^N - 2 for the first fragment, and MUST wrap from 0 back to 2^N - 2. However, the last fragment of the set of retransmitted fragments only carries a CFN with all bits set to 1 if it is actually a retransmission of the last fragment of the packet (i.e. the last fragment had been lost in the first place). Examples of fragment renumbering for retransmitted fragments in Packet modes can be found in Appendix A. A maximum of TBD iterations of ACK and fragment retransmission rounds are allowed per-window or per-IPv6-packet in Window mode or in Packet mode, respectively.If a fragment recipient disassociates from its L2 network, the recipient MUST discard all link fragments of all partially reassembled payload datagrams, and fragment senders MUST discard all not yet transmitted link fragments of all partially transmitted payload (e.g., IPv6) datagrams. Similarly, when a node first receives a fragment of a packet, it starts a reassembly timer. When this time expires, if the entire packet has not been reassembled, the existing fragments MUST be discarded and the reassembly state MUST be flushed. The value for this timer is not provided by this specification, and is expected to be defined in technology-specific profile documents.8.8. Aborting9.7. Supporting multiple window sizes For Window mode operation, implementers may opt to support a single window size or multiple window sizes. The latter, when feasible, may provide performance optimizations. For example, a large window size may be used for IPv6 packets that need to be carried by a large number of fragments. However, when the number of fragments required to carry an IPv6 packet is low, a smaller window size, and thus a shorter bitmap, may be sufficient to provide feedback on all fragments. If multiple window sizes are supported, the Rule ID may be used to signal the window size in use for a specific IPv6 packet transmission. 9.8. Aborting fragmented IPv6 datagramtransmissiontransmissions For several reasons, a fragment sender or a fragment receiver may want to abort the on-going transmission ofaone or several fragmented IPv6datagram. Ifdatagrams. The entity (either the fragment sendertriggers abortion, it transmits to the receiver a format equivalent to a fragmentation header (withor theformat for afragment receiver) thatis not the last one), with the Rule ID field (of size R - T - N bits) set to TBD_ABORT_TX and all CFN bits set to 1. No data is carried along with this fragmentation header. If the fragment receivertriggersabortion, itabortion transmits to thefragment senderother endpoint a format that only comprises a Rule ID (of size Rbits) set to TBD_ABORT_RX. The entity that triggersbits), which signals abortion(either a fragment sender or a fragment receiver) MUST release any resources allocated for theof all on-going fragmented IPv6datagram transmission being aborted. When a fragment receiver receives an L2 frame containing a Rule ID set to TBD ABORT_TX and a CFN field with all bits setpacket transmissions. The specific value to1, the receiver MUST release any resources allocatedbe used for thefragmented IPv6 datagram transmission being aborted. When a fragment sender receives an L2 frame containing aRule IDsetof this abortion signal is not defined in this document, and is expected toTBD_ABORT_RX, the fragment sender MUST abortbe defined in future documents. Upon transmission or reception of thefragmented IPv6 datagram being transmitted, andabortion signal, both entities MUST release any resources allocated for the fragmented IPv6 datagramtransmissiontransmissions being aborted.A further Rule ID value may be used by an entity to signal abortion of all on- going, possibly interleaved, fragmented IPv6 datagram transmissions. 8.9.9.9. Downlink fragment transmission In some LPWAN technologies, as part of energy-saving techniques, downlink transmission is only possible immediately after an uplink transmission. In order to avoid potentially high delay for fragmented IPv6 datagram transmission in the downlink, the fragment receiver MAY perform an uplink transmission as soon as possible after reception of a fragment that is not the last one. Such uplink transmission may be triggered by the L2 (e.g. an L2 ACK sent in response to a fragment encapsulated in a L2 frame that requires an L2 ACK) or it may be triggered from an upper layer.9.10. Security considerations9.1.10.1. Security considerations for header compressionTBD 9.2.A malicious header compression could cause the reconstruction of a wrong packet that does not match with the original one, such corruption may be detected with end-to-end authentication and integrity mechanisms. Denial of Service may be produced but its arise other security problems that may be solved with or without header compression. 10.2. Security considerations for fragmentation This subsection describes potential attacks to LPWAN fragmentation andproposes countermeasures, based on existing analysis of attacks to 6LoWPAN fragmentation {HHWH}.suggests possible countermeasures. A node can perform a buffer reservation attack by sending a first fragment to a target. Then, the receiver will reserve buffer space for thewhole packet on the basis of the datagram size announced in that first fragment.IPv6 packet. Other incoming fragmented packets will be dropped while the reassembly buffer is occupied during the reassembly timeout. Once that timeout expires, the attacker can repeat the same procedure, and iterate, thus creating a denial of service attack. The (low) cost to mount this attack is linear with the number of buffers at the target node. However, the cost for an attacker can be increased if individual fragments of multiple packets can be stored in the reassembly buffer. To further increase the attack cost, the reassembly buffer can be split into fragment-sized buffer slots. Once a packet is complete, it is processed normally. If buffer overload occurs, a receiver can discard packets based on the sender behavior, which may help identify which fragments have been sent by an attacker. In another type of attack, the malicious node is required to have overhearing capabilities. If an attacker can overhear a fragment, it can send a spoofed duplicate (e.g. with random payload) to the destination. A receiver cannot distinguish legitimate from spoofed fragments. Therefore, the original IPv6 packet will be considered corrupt and will be dropped. To protect resource-constrained nodes from this attack, it has been proposed to establish a binding among the fragments to be transmitted by a node, by applying content- chaining to the different fragments, based on cryptographic hash functionality. The aim of this technique is to allow a receiver to identify illegitimate fragments. Further attacks may involve sending overlapped fragments (i.e. comprising some overlapping parts of the original IPv6 datagram). Implementers should make sure that correct operation is not affected by such event.10.11. Acknowledgements Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier, Arunprabhu Kandasamy, Antony Markovski, Alexander Pelov, Pascal Thubert, Juan Carlos Zuniga and Diego Dujovne for useful designconsideration. 11.consideration and comments. 12. References11.1.12.1. Normative References [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, December 1998, <http://www.rfc-editor.org/info/rfc2460>. [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, "Transmission of IPv6 Packets over IEEE 802.15.4 Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, <http://www.rfc-editor.org/info/rfc4944>.11.2.[RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust Header Compression (ROHC) Framework", RFC 5795, DOI 10.17487/RFC5795, March 2010, <http://www.rfc-editor.org/info/rfc5795>. [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, February 2014, <http://www.rfc-editor.org/info/rfc7136>. 12.2. Informative References [I-D.ietf-lpwan-overview] Farrell, S., "LPWAN Overview", draft-ietf-lpwan-overview-01overview-04 (work in progress),FebruaryJune 2017.[I-D.minaburo-lp-wan-gap-analysis] Minaburo, A., Pelov, A., and L. Toutain, "LP-WAN GAP Analysis", draft-minaburo-lp-wan-gap-analysis-01 (work in progress), February 2016.Appendix A. Fragmentation examples This section provides examples of different fragment delivery reliability options possible on the basis of this specification. Figure1715 illustrates the transmission of an IPv6 packet that needs 11 fragments in the No ACK option. Sender Receiver |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=0-------->| |-------CFN=1-------->|MIC checked => Figure17:15: Transmission of an IPv6 packet carried by 11 fragments in the No ACK option Figure18 illustrates the transmission of an IPv6 packet that needs 11 fragments in Packet mode - ACK on error, for N=3, without losses. Sender Receiver |-------CFN=6-------->| |-------CFN=5-------->| |-------CFN=4-------->| |-------CFN=3-------->| |-------CFN=2-------->| |-------CFN=1-------->| |-------CFN=0-------->| |-------CFN=6-------->| |-------CFN=5-------->| |-------CFN=4-------->| |-------CFN=7-------->|MIC checked => (no ACK) Figure 18: Transmission of an IPv6 packet carried by 11 fragments in Packet mode - ACK on error, for N=3, no losses. Figure 19 illustrates the transmission of an IPv6 packet that needs 11 fragments in Packet mode - ACK on error, for N=3, with three losses. Sender Receiver (AFN=0) |-------CFN=6-------->| (AFN=1) |-------CFN=5-------->| (AFN=2) |-------CFN=4---X---->| (AFN=3) |-------CFN=3-------->| (AFN=4) |-------CFN=2---X---->| (AFN=5) |-------CFN=1-------->| (AFN=6) |-------CFN=0-------->| (AFN=7) |-------CFN=6-------->| (AFN=8) |-------CFN=5-------->| (AFN=9) |-------CFN=4---X---->| |-------CFN=7-------->|MIC checked |<-------ACK----------|Bitmap:1101011110100001 |-------AFN=2-------->| |-------AFN=4-------->| |-------AFN=9-------->|MIC checked => (no ACK) Figure 19: Transmission of an IPv6 packet carried by 11 fragments in Packet mode - ACK on error, for N=3, three losses. In the figure, (AFN=x) indicates the AFN value computed by the sender for each fragment. Figure 2016 illustrates the transmission of an IPv6 packet that needs 11 fragments in Window mode - ACK on error, for N=3, without losses. Sender Receiver |-----W=1, CFN=6----->| |-----W=1, CFN=5----->| |-----W=1, CFN=4----->| |-----W=1, CFN=3----->| |-----W=1, CFN=2----->| |-----W=1, CFN=1----->| |-----W=1, CFN=0----->| (no ACK) |-----W=0, CFN=6----->| |-----W=0, CFN=5----->| |-----W=0, CFN=4----->| |-----W=0, CFN=7----->|MIC checked => (no ACK) Figure20:16: Transmission of an IPv6 packet carried by 11 fragments in Window mode - ACK on error, for N=3, without losses. Figure2117 illustrates the transmission of an IPv6 packet that needs 11 fragments in Window mode - ACK on error, for N=3, with three losses. Sender Receiver |-----W=1, CFN=6----->| |-----W=1, CFN=5----->| |-----W=1, CFN=4--X-->| |-----W=1, CFN=3----->| |-----W=1, CFN=2--X-->| |-----W=1, CFN=1----->| |-----W=1, CFN=0----->||<-------ACK----------|Bitmap:11010111|<-----ACK, W=1-------|Bitmap:11010111 |-----W=1, CFN=4----->| |-----W=1, CFN=2----->| (no ACK) |-----W=0, CFN=6----->| |-----W=0, CFN=5----->| |-----W=0, CFN=4--X-->| |-----W=0, CFN=7----->|MIC checked|<-------ACK----------|Bitmap:11010001|<-----ACK, W=0-------|Bitmap:11000001 |-----W=0, CFN=4----->|MIC checked => (no ACK) Figure21:17: Transmission of an IPv6 packet carried by 11 fragments in Window mode - ACK on error, for N=3, three losses. Figure22 illustrates the transmission of an IPv6 packet that needs 11 fragments in Packet mode - ACK "Always", for N=3, without losses. Sender Receiver |-------CFN=6-------->| |-------CFN=5-------->| |-------CFN=4-------->| |-------CFN=3-------->| |-------CFN=2-------->| |-------CFN=1-------->| |-------CFN=0-------->| |-------CFN=6-------->| |-------CFN=5-------->| |-------CFN=4-------->| |-------CFN=7-------->|MIC checked => |<-------ACK----------|no bitmap (End) Figure 22: Transmission of an IPv6 packet carried by 11 fragments in Packet mode - ACK "Always", for N=3, no losses. Figure 23 illustrates the transmission of an IPv6 packet that needs 11 fragments in Packet mode - ACK "Always", for N=3, with three losses. Sender Receiver (AFN=0) |-------CFN=6-------->| (AFN=1) |-------CFN=5-------->| (AFN=2) |-------CFN=4---X---->| (AFN=3) |-------CFN=3-------->| (AFN=4) |-------CFN=2---X---->| (AFN=5) |-------CFN=1-------->| (AFN=6) |-------CFN=0-------->| (AFN=7) |-------CFN=6-------->| (AFN=8) |-------CFN=5-------->| (AFN=9) |-------CFN=4---X---->| |-------CFN=7-------->|MIC checked |<-------ACK----------|bitmap:1101011110100001 |-------AFN=2-------->| |-------AFN=4-------->| |-------AFN=9-------->|MIC checked => |<-------ACK----------|no bitmap (End) Figure 23: Transmission of an IPv6 packet carried by 11 fragments in Packet mode - ACK "Always", for N=3, with three losses. Figure 2418 illustrates the transmission of an IPv6 packet that needs 11 fragments in Window mode - ACK"Always","always", for N=3, without losses. Note: in Window mode, an additional bit will be needed to number windows. Sender Receiver |-----W=1, CFN=6----->| |-----W=1, CFN=5----->| |-----W=1, CFN=4----->| |-----W=1, CFN=3----->| |-----W=1, CFN=2----->| |-----W=1, CFN=1----->| |-----W=1, CFN=0----->||<-------ACK----------|no|<-----ACK, W=1-------|no bitmap |-----W=0, CFN=6----->| |-----W=0, CFN=5----->| |-----W=0, CFN=4----->| |-----W=0, CFN=7----->|MIC checked =>|<-------ACK----------|no|<-----ACK, W=0-------|no bitmap (End) Figure24:18: Transmission of an IPv6 packet carried by 11 fragments in Window mode - ACK"Always","always", for N=3, no losses. Figure2519 illustrates the transmission of an IPv6 packet that needs 11 fragments in Window mode - ACK"Always","always", for N=3, with three losses. Sender Receiver |-----W=1, CFN=6----->| |-----W=1, CFN=5----->| |-----W=1, CFN=4--X-->| |-----W=1, CFN=3----->| |-----W=1, CFN=2--X-->| |-----W=1, CFN=1----->| |-----W=1, CFN=0----->||<-------ACK----------|bitmap:11010111|<-----ACK, W=1-------|bitmap:11010111 |-----W=1, CFN=4----->| |-----W=1, CFN=2----->||<-------ACK----------|no|<-----ACK, W=1-------|no bitmap |-----W=0, CFN=6----->| |-----W=0, CFN=5----->| |-----W=0, CFN=4--X-->| |-----W=0, CFN=7----->|MIC checked|<-------ACK----------|bitmap:11010001|<-----ACK, W=0-------|bitmap:11000001 |-----W=0, CFN=4----->|MIC checked =>|<-------ACK----------|no|<-----ACK, W=0-------|no bitmap (End) Figure25:19: Transmission of an IPv6 packet carried by 11 fragments in Window mode - ACK "Always", for N=3, with three losses. Appendix B. Rule IDs for fragmentation Different Rule IDs may be used for different aspects of fragmentation functionality as per this document. A summary of such Rule IDs follows: o A fragment, and the reliability option in use for the IPv6 datagram being carried: i) No ACK, ii) Window mode - ACK on error, iii) Window mode - ACK "always". In Window mode, a specific Rule ID may be used for each supported window size. o An ACK message. o A message to abort all on-going transmissions. Appendix C. Note Carles Gomez has been funded in part by the Spanish Government (Ministerio de Educacion, Cultura y Deporte) through the Jose Castillejo grant CAS15/00336, and by the ERDF and the Spanish Government through project TEC2016-79988-P. Part of his contribution to this work has been carried out during his stay as a visiting scholar at the Computer Laboratory of the University of Cambridge. Authors' Addresses Ana Minaburo Acklio 2bis rue de la Chataigneraie 35510 Cesson-Sevigne Cedex France Email: ana@ackl.io Laurent Toutain IMT-Atlantique 2 rue de la Chataigneraie CS 17607 35576 Cesson-Sevigne Cedex France Email: Laurent.Toutain@imt-atlantique.fr Carles Gomez Universitat Politecnica de Catalunya C/Esteve Terradas, 7 08860 Castelldefels Spain Email: carlesgo@entel.upc.edu