| < draft-ietf-lpwan-ipv6-static-context-hc-00.txt | draft-ietf-lpwan-ipv6-static-context-hc-01.txt > | |||
|---|---|---|---|---|
| lpwan Working Group A. Minaburo | lpwan Working Group A. Minaburo | |||
| Internet-Draft Acklio | Internet-Draft Acklio | |||
| Intended status: Informational L. Toutain | Intended status: Informational L. Toutain | |||
| Expires: June 8, 2017 Institut MINES TELECOM ; TELECOM Bretagne | Expires: September 3, 2017 IMT-Atlantique | |||
| December 5, 2016 | C. Gomez | |||
| Universitat Politecnica de Catalunya | ||||
| March 02, 2017 | ||||
| LPWAN Static Context Header Compression (SCHC) for IPv6 and UDP | LPWAN Static Context Header Compression (SCHC) and fragmentation for | |||
| draft-ietf-lpwan-ipv6-static-context-hc-00 | IPv6 and UDP | |||
| draft-ietf-lpwan-ipv6-static-context-hc-01 | ||||
| Abstract | Abstract | |||
| This document describes a header compression scheme for IPv6, IPv6/ | This document describes a header compression scheme and fragmentation | |||
| UDP based on static contexts. This technique is especially tailored | functionality for IPv6/UDP protocols. These techniques are | |||
| for LPWA networks and could be extended to other protocol stacks. | especially tailored for LPWAN (Low Power Wide Area Network) networks | |||
| and could be extended to other protocol stacks. | ||||
| During the IETF history several compression mechanisms have been | ||||
| proposed. First mechanisms, such as RoHC, are using a context to | ||||
| store header field values and send smaller incremental differences on | ||||
| the link. Values in the context evolve dynamically with information | ||||
| contained in the compressed header. The challenge is to maintain | ||||
| sender's and receiver's contexts synchronized even with packet | ||||
| losses. Based on the fact that IPv6 contains only static fields, | ||||
| 6LoWPAN developed an efficient context-free compression mechanisms, | ||||
| allowing better flexibility and performance. | ||||
| The Static Context Header Compression (SCHC) combines the advantages | The Static Context Header Compression (SCHC) offers a great level of | |||
| of RoHC context which offers a great level of flexibility in the | flexibility when processing the header fields. Static context means | |||
| processing of fields, and 6LoWPAN behavior to elide fields that are | that information stored in the context which, describes field values, | |||
| known from the other side. Static context means that values in the | does not change during the packet transmission, avoiding complex | |||
| context field do not change during the transmission, avoiding complex | resynchronization mechanisms, incompatible with LPWAN | |||
| resynchronization mechanisms, incompatible with LPWA characteristics. | characteristics. In most of the cases, IPv6/UDP headers are reduced | |||
| In most of the cases, IPv6/UDP headers are reduced to a small | to a small identifier. | |||
| identifier. | ||||
| This document focuses on IPv6/UDP headers compression, but the | This document describes the generic compression/decompression process | |||
| mechanism can be applied to other protocols such as CoAP. It will be | and applies it to IPv6/UDP headers. Similar mechanisms for other | |||
| described in a separate document. | protocols such as CoAP will be described in a separate document. | |||
| Moreover, this document specifies fragmentation and reassembly | ||||
| mechanims for SCHC compressed packets exceeding the L2 pdu size and | ||||
| for the case where the SCHC compression is not possible then the | ||||
| IPv6/UDP packet is sent. | ||||
| Status of This Memo | Status of This Memo | |||
| This Internet-Draft is submitted in full conformance with the | This Internet-Draft is submitted in full conformance with the | |||
| provisions of BCP 78 and BCP 79. | provisions of BCP 78 and BCP 79. | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at http://datatracker.ietf.org/drafts/current/. | Drafts is at http://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on June 8, 2017. | This Internet-Draft will expire on September 3, 2017. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2016 IETF Trust and the persons identified as the | Copyright (c) 2017 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents | Provisions Relating to IETF Documents | |||
| (http://trustee.ietf.org/license-info) in effect on the date of | (http://trustee.ietf.org/license-info) in effect on the date of | |||
| publication of this document. Please review these documents | publication of this document. Please review these documents | |||
| carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
| to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
| include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
| the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| 1. Introduction | 1. Introduction | |||
| Headers compression is mandatory to bring the internet protocols to | Header compression is mandatory to efficiently bring Internet | |||
| the node within a LPWA network [I-D.minaburo-lp-wan-gap-analysis]. | connectivity to the node within a LPWAN network | |||
| [I-D.minaburo-lp-wan-gap-analysis]. | ||||
| Nevertheless, LPWA networks offer good properties for an efficient | Some LPWAN networks properties can be exploited for an efficient | |||
| header compression: | header compression: | |||
| o Topology is star oriented, therefore all the packets follows the | o Topology is star oriented, therefore all the packets follow the | |||
| same path. For the needs of this draft, the architecture can be | same path. For the needs of this draft, the architecture can be | |||
| summarized to End-Systems (ES) exchanging information with LPWAN | summarized to Things or End-Systems (ES) exchanging information | |||
| Application Server (LA). The exchange goes trhough a single LPWA | with LPWAN Application Server (LA) through a Network Gateway (NG). | |||
| Compressor (LC). In most of the cases, End Systems and LC form a | ||||
| star topology. ESs and LC maintain a static context for | ||||
| compression. Static context means that context information is not | ||||
| learned during the exchange. | ||||
| o Traffic flows are mostly deterministic, since End-Systems embed | o Traffic flows are mostly known in advanced, since End-Systems | |||
| built-in applications. Contrary to computers or smartphones, new | embed built-in applications. Contrary to computers or | |||
| applications cannot be easily installed. | smartphones, new applications cannot be easily installed. | |||
| First mechanisms such as RoHC use a context to store header field | The Static Context Header Compression (SCHC) is defined for this | |||
| values and send smaller incremental differences on the link. The | environment. SCHC uses a context where header information is kept in | |||
| first version of RoHC targeted IP/UDP/RTP stack. RoHCv2 extends the | order, this context is static the values on the header fields do not | |||
| principle to any protocol and introduces a formal notation [RFC4997] | change during time, avoiding complex resynchronization mechanisms, | |||
| describing the header and associating compression functions to each | incompatible with LPWAN characteristics. In most of the cases, IPv6/ | |||
| field. To be efficient the sender and the receiver must check that | UDP headers are reduced to a small context identifier. | |||
| the context remains synchronized (i.e. contains the same values). | ||||
| Context synchronization imposes to periodically send a full header or | ||||
| at least dynamic fields. If fully compressed, the header can be | ||||
| compatible with LPWA constraints. However, the first exchanges or | ||||
| context resynchronisations impose to send uncompressed headers, which | ||||
| may be bigger than the original one. This will force the use of | ||||
| inefficient fragmentation mechanisms. For some LPWA technologies, | ||||
| duty cycle limits can also delay the resynchronization. Figure 1 | ||||
| illustrates this behavior. | ||||
| sync | The SCHC header compression is indedependent of the specific LPWAN | |||
| ^ +-+ sync sync ^ | technology over which it will be used. | |||
| | IPv6 | | +-+ +-+ | IPv6 | ||||
| v | | | | | | v | ||||
| +------------+ | +-+-+ | | | | +------------+ | ||||
| | +--+ | | | | | | | | | | +--+ | | ||||
| | | c| | | | | +-+-+-+ +-+-+-+-+ | | | c| | | ||||
| | | t| | | | | | | | | | | | | | | | | t| | | ||||
| | | x| | +-+-+-+-+-+-+-+-+-+-+-+-+ | | x| | | ||||
| | | t| | <----------------------------> | | t| | | ||||
| | +--+ | header size of sent packets | +--+ | | ||||
| +------------+ +------------+ | ||||
| Figure 1: RoHC Compressed Header size evolution. | On the other hand, LPWAN technologies are 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 IPv6 when header compression is not possible (and, | ||||
| in particular, its MTU requirement of 1280 bytes [RFC2460]) is the | ||||
| use of fragmentation mechanism at the adaptation layer below IPv6. | ||||
| This specification defines fragmentation functionality to support the | ||||
| IPv6 MTU requirements over LPWAN technologies. | ||||
| On the other hand, 6LoWPAN [RFC4944] is context-free based on the | 2. Vocabulary | |||
| fact that IPv6, its extensions or UDP headers do not contain | ||||
| incremental fields. The compression mechanism described in [RFC6282] | ||||
| is based on sending a 2-byte bitmap, which describes how the header | ||||
| should be decompressed, either using some standard values or sending | ||||
| information after this bitmap. [RFC6282] also allows for UDP | ||||
| compression. | ||||
| In the best case, when Hop limit is a standard value, flow label, | This section defines the terminology and aconyms used in this | |||
| DiffServ fields are set to 0 and Link Local addresses are used over a | document. | |||
| single hop network, the 6LoWPAN compressed header is reduced to 4 | ||||
| bytes. This compression ratio is possible because the IID are | ||||
| derived from the MAC addresses and the link local prefix is known | ||||
| from both sides. In that case, the IPv6 compression is 4 bytes and | ||||
| UDP compression is 2 bytes, which fills half of the payload of a | ||||
| SIGFOX frame, or more than 10% of a LoRaWAN payload (with spreading | ||||
| factor 12). | ||||
| The Static Context Header Compression (SCHC) combines the advantages | o CDF: Compression/Decompression Function. A function that is used | |||
| of RoHC context, which offers a great level of flexibility in the | for both functionnalities to compress a header field or to recover | |||
| processing of fields, and 6LoWPAN behavior to elide fields that are | its original value in the decompression phase. | |||
| known from the other side. Static context means that values in the | ||||
| context field do not change during the transmission, avoiding complex | ||||
| resynchronization mechanisms, incompatible with LPWA characteristics. | ||||
| In most of the cases, IPv6/UDP headers are reduced to a small context | ||||
| identifier. | ||||
| 2. Static Context Header Compression | o Context: A set of rules used to compress/decompress headers | |||
| o ES: End System. Node connected to the LPWAN. An ES may implement | ||||
| SCHC. | ||||
| o LA: LPWAN Application. An application sending/consuming IPv6 | ||||
| packets to/from the End System. | ||||
| o LC: LPWAN Compressor/Decompressor. A process in the network to | ||||
| achieve compression/decompressing headers. LC uses SCHC rules to | ||||
| perform compression and decompression. | ||||
| o MO: Matching Operator. An operator used to compare a value | ||||
| contained in a header field with a value contained in a rule. | ||||
| o Rule: A set of header field values. | ||||
| o Rule ID: An identifier for a rule, LC and ES share the same rule | ||||
| ID for a specific flow. Rule ID is sent on the LPWAN. | ||||
| o TV: Target value. A value contained in the rule that will be | ||||
| matched with the value of a header field. | ||||
| 3. Static Context Header Compression | ||||
| Static Context Header Compression (SCHC) avoids context | Static Context Header Compression (SCHC) avoids context | |||
| synchronization, which is the most bandwidth-consuming operation in | synchronization, which is the most bandwidth-consuming operation in | |||
| RoHC. Based on the fact that the nature of data flows is highly | other header compression mechanisms such as RoHC. Based on the fact | |||
| predictable in LPWA networks, a static context may be stored on the | that the nature of data flows is highly predictable in LPWAN | |||
| End-System (ES). The other end, the LPWA Compressor (LC) can learn | networks, a static context may be stored on the End-System (ES). The | |||
| the context through a provisioning protocol during the identification | context must be stored in both ends. It can also be learned by using | |||
| phase (for instance, as it learns the encryption key). | a provisionning protocol that is out of the scope of this draft. | |||
| The context contains a list of rules (cf. Figure 2). Each rule | End-System Appl Servers | |||
| contains itself a list of field descriptions composed of a target | +-----------------+ +---------------+ | |||
| value (TV), a matching operator (MO) and a Compression/Decompression | | APP1 APP2 APP3 | |APP1 APP2 APP3| | |||
| Function (CDF). | | | | | | |||
| | UDP | | UDP | | ||||
| | IPv6 | | IPv6 | | ||||
| | | | | | ||||
| | LC (contxt)| | | | ||||
| +--------+--------+ +-------+-------+ | ||||
| | +--+ +--+ +-----------+ . | ||||
| +~~ |RG| === |NG| === |LC (contxt)| ... Internet ... | ||||
| +--+ +--+ +-----+-----+ | ||||
| +------------------------------------------------------------------+ | Figure 1: Architecture | |||
| | Rule N | | ||||
| +-----------------------------------------------------------------+ | | ||||
| | Rule i | | | ||||
| +----------------------------------------------------------------+ | | | ||||
| | Rule 1 | | | | ||||
| | +--------------+-------------------+-----------------+ | | | | ||||
| | Field 1 | Target Value | Matching Operator | Comp/Decomp Fct | | | | | ||||
| | +--------------+-------------------+-----------------+ | | | | ||||
| | Field 2 | Target Value | Matching Operator | Comp/Decomp Fct | | | | | ||||
| | +--------------+-------------------+-----------------+ | | | | ||||
| | ... | ... | ... | ... | | | | | ||||
| | +--------------+-------------------+-----------------+ | |-+ | ||||
| | Field N | Target Value | Matching Operator | Comp/Decomp Fct | | | | ||||
| | +--------------+-------------------+-----------------+ |-+ | ||||
| | | | ||||
| +----------------------------------------------------------------+ | ||||
| Figure 2: Compression Decompression Context | Figure 1 based on [I-D.ietf-lpwan-overview] terminology represents | |||
| the architecture for compression/decompression. The Thing or End- | ||||
| System is running applications which produce IPv6 or IPv6/UDP flows. | ||||
| These flows are compressed by a LPWAN Compressor (LC) to reduce the | ||||
| headers 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. The Network Gateway sends | ||||
| the data to a LC for decompression which shares the same rules with | ||||
| the ES. The LC can be located on the Network Gateway or in another | ||||
| places if a tunnel is established between the NG and the LC. This | ||||
| architecture forms a star topology. After decompression, the packet | ||||
| can be sent on the Internet to one or several LPWAN Application | ||||
| Servers (LA). | ||||
| The rule does not describe the compressed/decompressed packet format | The principle is exactly the same in the other direction. | |||
| which must be known from the compressor/decompressor. The rule just | ||||
| describes the compression/decompression behavior for a field. | ||||
| The main idea of the compression scheme is to send the rule number | The context contains a list of rules (cf. Figure 2). Each rule | |||
| (or rule id) to the other end instead of known field values. | contains itself a list of fields descriptions composed of a field | |||
| identifier (FID), a target value (TV), a matching operator (MO) and a | ||||
| Compression/Decompression Function (CDF). | ||||
| Matching a field with a value and header compression are related | +-----------------------------------------------------------------+ | |||
| operations; If a field matches a rule containing the value, it is not | | Rule N | | |||
| necessary to send it on the link. Since contexts are synchronized, | +----------------------------------------------------------------+ | | |||
| reading the rule's value is enough to reconstruct the field's value | | Rule i | | | |||
| at the other end. | +---------------------------------------------------------------+ | | | |||
| | Rule 1 | | | | ||||
| |+--------+--------------+-------------------+-----------------+| | | | ||||
| ||Field 1 | Target Value | Matching Operator | Comp/Decomp Fct || | | | ||||
| |+--------+--------------+-------------------+-----------------+| | | | ||||
| ||Field 2 | Target Value | Matching Operator | Comp/Decomp Fct || | | | ||||
| |+--------+--------------+-------------------+-----------------+| | | | ||||
| ||... | ... | ... | ... || | | | ||||
| |+--------+--------------+-------------------+-----------------+| |-+ | ||||
| ||Field N | Target Value | Matching Operator | Comp/Decomp Fct || | | ||||
| |+--------+--------------+-------------------+-----------------+|-+ | ||||
| | | | ||||
| +---------------------------------------------------------------+ | ||||
| On some other cases, the value need to be sent on the link to inform | Figure 2: Compression Decompression Context | |||
| the other end. The field value may vary from one packet to another, | ||||
| therefore the field cannot be used to select the rule id. | ||||
| 2.1. Simple Example | The rule 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, it is recommended to describe the header field in the same | ||||
| order they appear in the packet. | ||||
| A simple header is composed of 3 fields (F1, F2, F3). The compressor | The main idea of the compression scheme is to send the rule id to the | |||
| receives a packet containing respectively [F1:0x00, F2:0x1230, | other end instead of known field values. When a value is known by | |||
| F3:0xABC0] in those fields. The Matching Operators (as defined in | both ends, it is not necessary to send it on the LPWAN network. | |||
| Section 3) allow to select Rule 5 as represented in Figure 3; F1 | ||||
| value is ignored and F2 and F3 packet field values are matched with | ||||
| those stored in the rule Target Values. | ||||
| Rule 5 | The field description is composed of different entries: | |||
| Target Value Matching Operator Comp/Decomp Fct | ||||
| +--------------+-------------------+-----------------+ | ||||
| F1 | 0x00 | Ignore | not-sent | | ||||
| +--------------+-------------------+-----------------+ | ||||
| F2 | 0x1230 | Equal | not-sent | | ||||
| +--------------+-------------------+-----------------+ | ||||
| F3 | 0xABC0 | Equal | not-sent | | ||||
| +--------------+-------------------+-----------------+ | ||||
| Figure 3: Matching Rule | o A Field ID (FID) is a unique value to define the field. | |||
| The Compression/Decompression Function (as defined in Section 4 | o A Target Value (TV) is the value used to make the comparison with | |||
| describes how the fields are compressed. In this example, all the | the packet header field. The Target Value can be of any type | |||
| fields are elided and only the rule number has to be sent to the | (integer, strings,...). It can be a single value or a more | |||
| other end. | complex structure (array, list,...). It can be considered as a | |||
| CBOR structure. | ||||
| The decompressor receives the rule number and reconstructs the header | o A Matching Operator (MO) is the operator used to make the | |||
| using the values stored in the Target Value column. | comparison between the field value and the Target Value. The | |||
| Matching Operator may require some parameters, which can be | ||||
| considered as a CBOR structure. MO is only used during the | ||||
| compression phase. | ||||
| Note that F1 value will be set to 0x00 by the decompressor, even if | o A Compression Decompression Function (CDF) is used to describe the | |||
| the original header field was carrying a different value. | compression and the decompression process. The CDF may require | |||
| some parameters, which can be considered as a CBOR structure. | ||||
| To allow a range of values for field F2 and F3, the MSB() Matching | 3.1. Rule ID | |||
| Operator and LSB() Compression/Decompression Function can be used (as | ||||
| defined in Section 3 and Section 4). In that case the rule will be | ||||
| rewritten as defined in Figure 4. | ||||
| Rule 5 | Rule IDs are sent between both compression/decompression elements. | |||
| Target Value Matching Operator Comp/Decomp Fct | The size of the rule ID is not specified in this document and can | |||
| +--------------+-------------------+-----------------+ | vary regarding the LPWAN technology, the number of flows,... | |||
| F1 | 0x00 | Ignore | not-sent | | ||||
| +--------------+-------------------+-----------------+ | ||||
| F2 | 0x1230 | MSB(12) | LSB(4) | | ||||
| +--------------+-------------------+-----------------+ | ||||
| F3 | 0xABC0 | MSB(12) | LSB(4) | | ||||
| +--------------+-------------------+-----------------+ | ||||
| Figure 4: Matching Rule | Some values in the rule ID space may be reserved for goals other than | |||
| header compression, for example fragmentation. | ||||
| In that case, if a packet with the following header fields [F1:0x00, | Rule IDs are specific to an ES. Two ESs may use the same rule ID for | |||
| F2:0x1234, F3:0xABCD] arrives to the compressor, the new rule 5 will | different header compression. The LC needs to combine the rule ID | |||
| be selected and sent to the other end. The compressed header will be | with the ES L2 address to find the appropriate rule. | |||
| composed of the single byte [0x4D]. The decompressor receives the | ||||
| compressed header and follows the rule to reconstruct [0x00, 0x1234, | ||||
| 0xABCD] applying a OR operator between the target value stored in the | ||||
| rule and the compressed field value sent. | ||||
| 2.2. Packet processing | 3.2. Packet processing | |||
| The compression/decompression process follows several steps: | The compression/decompression process follows several steps: | |||
| o compression rule selection: the goal is to identify which rule | o compression rule selection: the goal is to identify which rule(s) | |||
| will be used to compress the headers. To each field is associated | will be used to compress the headers. Each field is associated to | |||
| a matching rule for compression. Each header field's value is | a matching operator for compression. Each header field's value is | |||
| compared to the corresponding target value stored in the rule for | compared to the corresponding target value stored in the rule for | |||
| that field using the matching operator. If all the fields | that field using the matching operator. If all the fields in the | |||
| satisfied the matching operator, the packet is processed using | packet's header satisfied all the matching operators of a rule, | |||
| this Compression Decompression Function functions. Otherwise the | the packet is processed using Compression Decompression Function | |||
| next rule is tested. If no eligible rule is found, then the | associated with the fields. Otherwise the next rule is tested. | |||
| packet is dropped. | If no eligible rule is found, then the packet is sent without | |||
| compression, which may require using the fragmentation procedure. | ||||
| o sending: The rule number is sent to the other end followed by data | o sending: The rule ID is sent to the other end followed by | |||
| resulting from the field compression. The way the rule number is | information resulting from the compression of header fields. This | |||
| sent depends of the layer two technology and will be specified in | information is sent in the order expressed in the rule for the | |||
| a specific document. For exemple, it can either be included in a | matching fields. The way the rule ID is sent depends on the layer | |||
| Layer 2 header or sent in the first byte of the L2 payload. | two technology and will be specified in a specific document. For | |||
| example, it can either be included in a Layer 2 header or sent in | ||||
| the first byte of the L2 payload. | ||||
| o decompression: The receiver identifies the sender through its | o decompression: The receiver identifies the sender through its | |||
| device-id (e.g. MAC address) and select the appropriate rule | device-id (e.g. MAC address) and selects the appropriate rule | |||
| through the rule number. It applies the compression decompression | through the rule ID. This rule gives the compressed header format | |||
| function to reconstruct the original header fields. | and associates these values to header fields. It applies the CDF | |||
| function to reconstruct the original header fields. CDF of | ||||
| 3. Matching operators | Compute-* must be applied after the other CDFs. | |||
| It may exist some intermediary cases, where part of the value may be | 4. Matching operators | |||
| used to select a field and a variable part has to be sent on the | ||||
| link. This is true for Least Significant Bits (LSB) where the most | ||||
| significant bit can be used to select a rule id and the least | ||||
| significant bits have to be sent on the link. | ||||
| Several matching operators are defined: | This document describes basic matching operators (MO)s which must be | |||
| known by both LC, endpoints involved in the header compression/ | ||||
| decompression. They are not typed and can be applied indifferently | ||||
| to integer, string or any other type. The MOs and their definition | ||||
| are provided next: | ||||
| o equal: a field value in a packet matches with a field value in a | o equal: a field value in a packet matches with a field value in a | |||
| rule if they are equal. | rule if they are equal. | |||
| o ignore: no check is done between a field value in a packet and a | o ignore: no check is done between a field value in a packet and a | |||
| field value in the rule. The result is always true. | field value in the rule. The result of the matching is always | |||
| true. | ||||
| o MSB(length): a field value of length T in a packet matches with a | o MSB(length): a field value of a size equal to "length" bits in a | |||
| field value in a rule if the most significant "length" bits are | packet matches with a field value in a rule if the most | |||
| equal. | significant "length" bits are equal. | |||
| 4. Compression Decompression Functions (CDF) | 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 of pairs. Each pair is composed of a value and a short ID. | ||||
| This operator matches if a field value is equal to one of the | ||||
| pairs' values. | ||||
| The Compression Decompression Functions (CDF) describe the action | Matching Operators may need a list of parameters to proceed to the | |||
| taken during the compression and inversely the action taken by the | matching. For instance MSB requires an integer indicating the number | |||
| decompressor to restore the original value. | of bits to test. | |||
| /--------------------+-------------+--------------------------\ | 5. Compression Decompression Functions (CDF) | |||
| | Function | Compression | Decompression | | ||||
| | | | | | ||||
| +--------------------+-------------+--------------------------+ | ||||
| |not-sent |elided |use value stored in ctxt | | ||||
| |value-sent |send |build from received value | | ||||
| |LSB(length) |send LSB |ctxt value OR rcvd value | | ||||
| |compute-IPv6-length |elided |compute IPv6 length | | ||||
| |compute-UDP-length |elided |compute UDP length | | ||||
| |compute-UDP-checksum|elided |compute UDP checksum | | ||||
| |ESiid-DID |elided |build IID from L2 ES addr | | ||||
| |LAiid-DID |elided |build IID from L2 LA addr | | ||||
| \--------------------+-------------+--------------------------/ | ||||
| Figure 5: Compression and Decompression Functions | The Compression Decompression Functions (CDF) describes the action | |||
| taken during the compression of headers fields, and inversely, the | ||||
| action taken by the decompressor to restore the original value. | ||||
| Figure 5 lists all the functions defined to compress and decompress a | /--------------------+-------------+---------------------------\ | |||
| | Function | Compression | Decompression | | ||||
| | | | | | ||||
| +--------------------+-------------+---------------------------+ | ||||
| |not-sent |elided |use value stored in ctxt | | ||||
| |value-sent |send |build from received value | | ||||
| |LSB(length) |send LSB |ctxt value OR rcvd value | | ||||
| |compute-length |elided |compute length | | ||||
| |compute-UDP-checksum|elided |compute UDP checksum | | ||||
| |ESiid-DID |elided |build IID from L2 ES addr | | ||||
| |LAiid-DID |elided |build IID from L2 LA addr | | ||||
| |mapping-sent |send index |value from index on a table| | ||||
| \--------------------+-------------+---------------------------/ | ||||
| Figure 3: Compression and Decompression Functions | ||||
| Figure 3 sumarizes the functions defined to compress and decompress a | ||||
| field. The first column gives the function's name. The second and | field. The first column gives the function's name. The second and | |||
| third columns outlines the compression/decompression process. | third columns outlines the compression/decompression behavior. | |||
| As with 6LoWPAN, the compression process may produce some data, where | Compression is done in the rule order and compressed values are sent | |||
| fields that were not compressed (or were partially compressed) will | in that order in the compressed message. The receiver must be able | |||
| be sent in the order of the original packet. Information added by | to find the size of each compressed field which can be given by the | |||
| the compression phase must be aligned on byte boundaries, but each | rule or may be sent with the compressed header. | |||
| individual compression function may generate any size. | ||||
| /--------------+-------------------+-----------------------------------\ | 5.1. not-sent CDF | |||
| | Field |Comp Decomp Fct | Behavior | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |IPv6 version |not-sent |The value is not sent, but each | | ||||
| |IPv6 DiffServ | |end agrees on a value, which can | | ||||
| |IPv6 FL | |be different from 0. | | ||||
| |IPv6 NH |value-sent |Depending on the matching operator,| | ||||
| | | |the entire field value is sent or | | ||||
| | | |an adjustment to the context value | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |IPv6 Length |compute-IPv6-length|Dedicated fct to reconstruct value | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |IPv6 Hop Limit|not-sent+MO=ignore |The receiver takes the value stored| | ||||
| | | |in the context. It may be different| | ||||
| | | |from one originally sent, but in a | | ||||
| | | |star topology, there is no risk of | | ||||
| | | |loops | | ||||
| | |not-sent+matching |Receiver and sender agree on a | | ||||
| | | |specific value. | | ||||
| | |value-sent |Explicitly sent | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |IPv6 ESPrefix |not-sent |The 64 bit prefix is stored on | | ||||
| |IPv6 LAPrefix | |the context | | ||||
| | |value-sent |Explicitly send 64 bits on the link| | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |IPv6 ESiid |not-sent |IID is not sent, but stored in the | | ||||
| |IPv6 LAiid | |context | | ||||
| | |ESiid-DID|LAiid-DID|IID is built from the ES/LA Dev. ID| | ||||
| | |value-sent |IID is explicitly sent on the link.| | ||||
| | | |Size depends of the L2 technology | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |UDP ESport |not-sent |In the context | | ||||
| |UDP LAport |value-sent |Send the 2 bytes of the port number| | ||||
| | |LSB(length) |or least significant bits if MSB | | ||||
| | | |matching is specified in the | | ||||
| | | |matching operator. | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |UDP length |compute-UDP-length |Dedicated fct to reconstruct value | | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| |UDP Checksum |compute-UDP-checksum|Dedicated fct to reconstruct value| | ||||
| +--------------+-------------------+-----------------------------------+ | ||||
| Figure 6: SCHC functions' example assignment for IPv6 and UDP | 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 function 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. | ||||
| Figure 6 gives an example of function assignment to IPv6/UDP fields. | The compressor does not send any value on the compressed header for | |||
| that field on which compression is applied. | ||||
| 4.1. Compression Decompression Functions (CDF) | The decompressor restores the field value with the target value | |||
| stored in the matched rule. | ||||
| 4.1.1. not-sent | 5.2. value-sent CDF | |||
| The compressor do not sent the field value on the link. The | The value-sent function is generally used when the field value is not | |||
| decompressor restore the field value with the one stored in the | known by both Compressor and Decompressor. The value is sent in the | |||
| matched rule. | compressed message header. Both Compressor and Decompressor must | |||
| know the size of the field, either implicitely (the size is known by | ||||
| both sides) or explicitely in the compressed header field by | ||||
| indicating the length. This function is generally used with the | ||||
| "ignore" MO. | ||||
| 4.1.2. value-sent | 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 LPWAN | ||||
| The compressor send the field value on the link, if the matching | 5.3. LSB CDF | |||
| operator is "=". Otherwise the matching operator indicates the | ||||
| information that will be sent on the link. For a LSB operator only | ||||
| the Least Significant Bits are sent. | ||||
| 4.1.3. LSB(length) | LSB function is used to send a fixed part of the packet field header | |||
| to the other end. This function is used together with the "MSB" MO | ||||
| The compressor sends the "length" Least Significant Bits. The | The compressor sends the "length" Least Significant Bits. The | |||
| decompressor combines with a OR operator the value received with the | decompressor combines with an OR operator the value received with the | |||
| Target Value. | Target Value. | |||
| 4.1.4. ESiid-DID, LAiid-DID | 5.4. ESiid-DID, LAiid-DID CDF | |||
| These functions are used to process respectively the End System and | These functions are used to process respectively the End System and | |||
| the LA Device Identifier (DID). The IID value is computed from | the LA Device Identifier (DID). | |||
| device ID present in the Layer 2 header. The computation depends on | ||||
| the technology and the device ID size. | ||||
| 4.1.5. Compute-* | The IID value is computed from the device ID present in the Layer 2 | |||
| header. The computation depends on the technology and the device ID | ||||
| size. | ||||
| These functions compute the field value based on received | 5.5. mapping-sent | |||
| information. They are elided during the compression and | ||||
| reconstructed during the decompression. | ||||
| o compute-ipv6-length: compute the IPv6 length field as described in | mapping-sent is used to send a smaller index associated to the field | |||
| [RFC2460]. | value in the Target Value. This function is used together with the | |||
| "match-mapping" MO. | ||||
| o compute-udp-length: compute the IPv6 length field as described in | The compressor looks in the TV to find the field value and send the | |||
| [RFC0768]. | corresponding index. The decompressor uses this index to restore the | |||
| field value. | ||||
| o compute-udp-checksum: compute the IPv6 length field as described | 5.6. Compute-* | |||
| in [RFC0768]. | ||||
| 5. Examples | These functions are used by the decompressor to compute the | |||
| compressed field value based on received information. Compressed | ||||
| fields are elided during the compression and reconstructed during the | ||||
| decompression. | ||||
| o compute-length: compute the length assigned to this field. For | ||||
| instance, regarding the field ID, this CDF may be used to compute | ||||
| IPv6 length or UDP length. | ||||
| o compute-checksum: compute a checksum from the information already | ||||
| received by the LC. This field may be used to compute UDP | ||||
| checksum. | ||||
| 6. Application to IPv6 and UDP headers | ||||
| This section lists the different IPv6 and UDP header fields and how | ||||
| they can be compressed. | ||||
| 6.1. IPv6 version field | ||||
| This field always holds the same value, therefore the TV is 6, the MO | ||||
| is "equal" and the CDF "not-sent". | ||||
| 6.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 this wellknown | ||||
| value, the MO should be "equal" and the CDF 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 one there is | ||||
| without compression and the original value is sent, or the sencond | ||||
| where the values can be computed by sending only the LSB bits: | ||||
| o TV is not set, MO is set to "ignore" and CDF is set to "value- | ||||
| sent" | ||||
| o TV contains a stable value, MO is MSB(X) and CDF is set to | ||||
| LSB(8-X) | ||||
| 6.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 CDF 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 | ||||
| possibilities dpending 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 CDF is set to "value- | ||||
| sent" | ||||
| o TV contains a stable value, MO is MSB(X) and CDF is set to | ||||
| LSB(20-X) | ||||
| 6.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 LC recompute | ||||
| the original payload length value. The TV is not set, the MO is set | ||||
| to "ignore" and the CDF is "compute-IPv6-length". | ||||
| If the payload is small, the TV can be set to 0x0000, the MO set to | ||||
| "MSB (16-s)" and the CDF to "LSB (s)". The 's' parameter depends on | ||||
| the maximum packet length. | ||||
| On other cases, the payload length field must be sent and the CDF is | ||||
| replaced by "value-sent". | ||||
| 6.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 CDF 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 CDF is set to "value-sent". | ||||
| 6.6. Hop Limit field | ||||
| The End System is generally a host 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 CDF is set to "not- | ||||
| sent". | ||||
| Otherwise the value is sent on the LPWAN: TV is not set, MO is set to | ||||
| ignore and CDF is set to "value-sent". | ||||
| 6.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 (ES or LA) and not by their | ||||
| position in the frame (source or destination). The LC must be aware | ||||
| of the traffic direction (upstream, downstream) to select the | ||||
| appropriate field. | ||||
| 6.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 CDF is | ||||
| set to "not-sent". | ||||
| In case the rule allows several prefixes, static mapping 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 CDF is set to | ||||
| "mapping-sent". | ||||
| Otherwise the TV contains the prefix, the MO is set to "equal" and | ||||
| the CDF is set to value-sent. | ||||
| 6.7.2. IPv6 source and destination IID | ||||
| If the ES or LA 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 CDF | ||||
| is set to "ESiid-DID" or "LAiid-DID". Note that the LPWAN technology | ||||
| is generally carrying a single device identifier corresponding to the | ||||
| ES. The LC may also not be aware of these values. | ||||
| For privacy reasons or if the ES address is changing over time, it | ||||
| maybe better to use a static value. In that case, the TV contains | ||||
| the value, the MO operator is set to "equal" and the CDF is set to | ||||
| "not-sent". | ||||
| If several IIDs are possible, then the TV contains the list of | ||||
| possible IID, the MO is set to "match-mapping" and the CDF 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 the CDF 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 CDF is set to "value- | ||||
| sent". | ||||
| 6.8. IPv6 extensions | ||||
| No extension rules are currently defined. They can be based on the | ||||
| MOs and CDFs described above. | ||||
| 6.9. UDP source and destination port | ||||
| To allow a single rule, the UDP port values are identified by their | ||||
| role (ES or LA) and not by their position in the frame (source or | ||||
| destination). The LC must be aware of the traffic direction | ||||
| (upstream, downstream) to select the appropriate field. The | ||||
| following rules apply for ES and LA port numbers. | ||||
| If both ends knows the port number, it can be elided. The TV | ||||
| contains the port number, the MO is set to "equal" and the CDF is set | ||||
| to "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 CDF 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 CDF 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 CDF is set to "value-sent". | ||||
| 6.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 CDF 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 CDF to "LSB". | ||||
| On other cases, the length must be sent and the CDF is replaced by | ||||
| "value-sent". | ||||
| 6.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 (see XXXX)), | ||||
| the UDP checksum transmission can be avoided. In that case, the TV | ||||
| is not set, the MO is set to "ignore" and the CDF is set to "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. Examples | ||||
| This section gives some scenarios of the compression mechanism for | This section gives some scenarios of the compression mechanism for | |||
| IPv6/UDP. The goal is to illustrate the SCHC behavior. | IPv6/UDP. The goal is to illustrate the SCHC behavior. | |||
| 5.1. IPv6/UDP compression in a star topology | 7.1. IPv6/UDP compression | |||
| The most common case will be a LPWA end-system embeds some | The most common case using the mechanisms defined in this document | |||
| applications running over CoAP. In this example, the first flow is | will be a LPWAN end-system that embeds some applications running over | |||
| for the device management based on CoAP using Link Local addresses | CoAP. In this example, three flows are considered. The first flow | |||
| and UDP ports 123 and 124. The second flow will be a CoAP server for | is for the device management based on CoAP using Link Local IPv6 | |||
| measurements done by the end-system (using ports 5683) and Global | addresses and UDP ports 123 and 124 for ES and LA, respectively. The | |||
| Addresses alpha::IID/64 to beta::1/64. The last flow is for legacy | second flow will be a CoAP server for measurements done by the end- | |||
| applications using different ports numbers, the destination is | system (using ports 5683) and Global IPv6 Address prefixes | |||
| gamma::1/64. | 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. | ||||
| Figure 7 presents the protocol stack for this end-system. IPv6 and | Figure 4 presents the protocol stack for this End-System. IPv6 and | |||
| UDP are represented with dotted lines since these protocols are | UDP are represented with dotted lines since these protocols are | |||
| compressed on the radio link. | compressed on the radio link. | |||
| Managment Data | Managment Data | |||
| +----------+---------+---------+ | +----------+---------+---------+ | |||
| | CoAP | CoAP | legacy | | | CoAP | CoAP | legacy | | |||
| +----||----+---||----+---||----+ | +----||----+---||----+---||----+ | |||
| . UDP . UDP | UDP | | . UDP . UDP | UDP | | |||
| ................................ | ................................ | |||
| . IPv6 . IPv6 . IPv6 . | . IPv6 . IPv6 . IPv6 . | |||
| +------------------------------+ | +------------------------------+ | |||
| | SCHC Header compression | | ||||
| | and fragmentation | | ||||
| +------------------------------+ | ||||
| | 6LPWA L2 technologies | | | 6LPWA L2 technologies | | |||
| +------------------------------+ | +------------------------------+ | |||
| End System or LPWA GW | End System or LPWA GW | |||
| Figure 7: Simplified Protocol Stack for LP-WAN | Figure 4: Simplified Protocol Stack for LP-WAN | |||
| Note that in some LPWA technologies, only End Systems have a device | Note that in some LPWAN technologies, only the End Systems have a | |||
| ID . Therefore it is necessary to define statically an IID for the | device ID. Therefore, when such technologie are used, it is | |||
| Link Local address for the LPWA Compressor. | necessary to define statically an IID for the Link Local address for | |||
| the LPWAN compressor. | ||||
| Rule 0 | Rule 0 | |||
| +----------------+---------+--------+-------------++------+ | +----------------+---------+--------+-------------++------+ | |||
| | Field | Value | Match | Function || Sent | | | Field | Value | Match | Function || Sent | | |||
| +----------------+---------+----------------------++------+ | +----------------+---------+----------------------++------+ | |||
| |IPv6 version |6 | equal | not-sent || | | |IPv6 version |6 | equal | not-sent || | | |||
| |IPv6 DiffServ |0 | equal | not-sent || | | |IPv6 DiffServ |0 | equal | not-sent || | | |||
| |IPv6 Flow Label |0 | equal | not-sent || | | |IPv6 Flow Label |0 | equal | not-sent || | | |||
| |IPv6 Length | | ignore | comp-IPv6-l || | | |IPv6 Length | | ignore | comp-IPv6-l || | | |||
| |IPv6 Next Header|17 | equal | not-sent || | | |IPv6 Next Header|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |255 | ignore | not-sent || | | |IPv6 Hop Limit |255 | ignore | not-sent || | | |||
| |IPv6 ESprefix |FE80::/64| equal | not-sent || | | |IPv6 ESprefix |FE80::/64| equal | not-sent || | | |||
| |IPv6 ESiid | | ignore | ESiid-DID || | | |IPv6 ESiid | | ignore | ESiid-DID || | | |||
| |IPv6 LCprefix |FE80::/64| equal | not-sent || | | |IPv6 LCprefix |FE80::/64| equal | not-sent || | | |||
| |IPv6 LAiid |::1 | equal | not-sent || | | |IPv6 LAiid |::1 | equal | not-sent || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| |UDP ESport |123 | equal | not-sent || | | |UDP ESport |123 | equal | not-sent || | | |||
| |UDP LAport |124 | equal | not-sent || | | |UDP LAport |124 | equal | not-sent || | | |||
| |UDP Length | | ignore | comp-UDP-l || | | |UDP Length | | ignore | comp-length || | | |||
| |UDP checksum | | ignore | comp-UDP-c || | | |UDP checksum | | ignore | comp-chk || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| Rule 1 | Rule 1 | |||
| +----------------+---------+--------+-------------++------+ | +----------------+---------+--------+-------------++------+ | |||
| | Field | Value | Match | Function || Sent | | | Field | Value | Match | Function || Sent | | |||
| +----------------+---------+--------+-------------++------+ | +----------------+---------+--------+-------------++------+ | |||
| |IPv6 version |6 | equal | not-sent || | | |IPv6 version |6 | equal | not-sent || | | |||
| |IPv6 DiffServ |0 | equal | not-sent || | | |IPv6 DiffServ |0 | equal | not-sent || | | |||
| |IPv6 Flow Label |0 | equal | not-sent || | | |IPv6 Flow Label |0 | equal | not-sent || | | |||
| |IPv6 Length | | ignore | comp-IPv6-l || | | |IPv6 Length | | ignore | comp-IPv6-l || | | |||
| |IPv6 Next Header|17 | equal | not-sent || | | |IPv6 Next Header|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |255 | ignore | not-sent || | | |IPv6 Hop Limit |255 | ignore | not-sent || | | |||
| |IPv6 ESprefix |alpha/64 | equal | not-sent || | | |IPv6 ESprefix |alpha/64 | equal | not-sent || | | |||
| |IPv6 ESiid | | ignore | ESiid-DID || | | |IPv6 ESiid | | ignore | ESiid-DID || | | |||
| |IPv6 LAprefix |beta/64 | equal | not-sent || | | |IPv6 LAprefix |beta/64 | equal | not-sent || | | |||
| |IPv6 LAiid |::1000 | equal | not-sent || | | |IPv6 LAiid |::1000 | equal | not-sent || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| |UDP ESport |5683 | equal | not-sent || | | |UDP ESport |5683 | equal | not-sent || | | |||
| |UDP LAport |5683 | equal | not-sent || | | |UDP LAport |5683 | equal | not-sent || | | |||
| |UDP Length | | ignore | comp-UDP-l || | | |UDP Length | | ignore | comp-length || | | |||
| |UDP checksum | | ignore | comp-UDP-c || | | |UDP checksum | | ignore | comp-chk || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| Rule 2 | Rule 2 | |||
| +----------------+---------+--------+-------------++------+ | +----------------+---------+--------+-------------++------+ | |||
| | Field | Value | Match | Function || Sent | | | Field | Value | Match | Function || Sent | | |||
| +----------------+---------+--------+-------------++------+ | +----------------+---------+--------+-------------++------+ | |||
| |IPv6 version |6 | equal | not-sent || | | |IPv6 version |6 | equal | not-sent || | | |||
| |IPv6 DiffServ |0 | equal | not-sent || | | |IPv6 DiffServ |0 | equal | not-sent || | | |||
| |IPv6 Flow Label |0 | equal | not-sent || | | |IPv6 Flow Label |0 | equal | not-sent || | | |||
| |IPv6 Length | | ignore | comp-IPv6-l || | | |IPv6 Length | | ignore | comp-IPv6-l || | | |||
| |IPv6 Next Header|17 | equal | not-sent || | | |IPv6 Next Header|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |255 | ignore | not-sent || | | |IPv6 Hop Limit |255 | ignore | not-sent || | | |||
| |IPv6 ESprefix |alpha/64 | equal | not-sent || | | |IPv6 ESprefix |alpha/64 | equal | not-sent || | | |||
| |IPv6 ESiid | | ignore | ESiid-DID || | | |IPv6 ESiid | | ignore | ESiid-DID || | | |||
| |IPv6 LAprefix |gamma/64 | equal | not-sent || | | |IPv6 LAprefix |gamma/64 | equal | not-sent || | | |||
| |IPv6 LAiid |::1000 | equal | not-sent || | | |IPv6 LAiid |::1000 | equal | not-sent || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| |UDP ESport |8720 | MSB(12)| LSB(4) || lsb | | |UDP ESport |8720 | MSB(12)| LSB(4) || lsb | | |||
| |UDP LAport |8720 | MSB(12)| LSB(4) || lsb | | |UDP LAport |8720 | MSB(12)| LSB(4) || lsb | | |||
| |UDP Length | | ignore | comp-UDP-l || | | |UDP Length | | ignore | comp-length || | | |||
| |UDP checksum | | ignore | comp-UDP-c || | | |UDP checksum | | ignore | comp-chk || | | |||
| +================+=========+========+=============++======+ | +================+=========+========+=============++======+ | |||
| Figure 8: Context rules | Figure 5: Context rules | |||
| All the fields described in the three rules Figure 8 are present in | All the fields described in the three rules Figure 5 are present in | |||
| the IPv6 and UDP headers. The ESDevice-ID value is found in the L2 | the IPv6 and UDP headers. The ESDevice-ID value is found in the L2 | |||
| header. | header. | |||
| The second and third rules use global addresses. The way the ES | The second and third rules use global addresses. The way the ES | |||
| learn the prefix is not in the scope of the document. One possible | learns the prefix is not in the scope of the document. | |||
| way is to use a management protocol to set up in both end rules the | ||||
| prefix used on the LPWA network. | ||||
| The third rule compresses port numbers on 4 bits. This value is | The third rule compresses port numbers to 4 bits. | |||
| selected to maintain alignment on byte boundaries for the compressed | ||||
| header. | ||||
| 6. Acknowledgements | 8. Fragmentation | |||
| Thanks to Dominique Barthel, Arunprabhu Kandasamy, Antony Markovski, | 8.1. Overview | |||
| Alexander Pelov, Juan Carlos Zuniga for useful design consideration. | ||||
| 7. Normative References | Fragmentation in LPWAN is mandatory and it is used if after the SCHC | |||
| header compression the size of the packet is larger than the L2 data | ||||
| unit maximum payload or if the SCHC header compression is not able to | ||||
| compress the packet. 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 | ||||
| mechanims 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. | ||||
| [I-D.minaburo-lp-wan-gap-analysis] | Moreover, LPWAN technologies impose some strict limitations on | |||
| Minaburo, A., Pelov, A., and L. Toutain, "LP-WAN GAP | traffic; therefore it is desirable to enable optional fragment | |||
| Analysis", draft-minaburo-lp-wan-gap-analysis-01 (work in | retransmission, while a single fragment loss should not lead to | |||
| progress), February 2016. | retransmitting the full datagram. To preserve energy, Things (End | |||
| Systems) are sleeping most of the time and may receive data during a | ||||
| short period of time after transmission. | ||||
| [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, | This specification enables two main fragment delivery reliability | |||
| DOI 10.17487/RFC0768, August 1980, | options, namely: Unreliable and Reliable. The same reliability | |||
| <http://www.rfc-editor.org/info/rfc768>. | option MUST be used for all fragments of a packet. Note that the | |||
| fragment delivery reliability option to be used is not necessarily | ||||
| tied to the particular characteristics of the underlying L2 LPWAN | ||||
| technology (e.g. Unreliable may be used on top of an L2 LPWAN | ||||
| technology with symmetric characteristics for uplink and downlink). | ||||
| In Unreliable, the receiver MUST NOT issue acknowledgments and the | ||||
| sender MUST NOT perform fragment transmission retries. | ||||
| In Reliable, there exist two possible suboptions, namely: packet mode | ||||
| and window mode. In packet mode, the receiver may transmit one | ||||
| acknowledgment (ACK) after all fragments carrying an IPv6 packet have | ||||
| been transmitted. The ACK informs the sender about received and | ||||
| missing fragments from the IPv6 packet. In window mode, an ACK may | ||||
| be transmitted by the fragment receiver after a window of fragments | ||||
| have been sent. A window of fragments is a subset of the fragments | ||||
| needed to carry an IPv6 packet. In this mode, the ACK informs the | ||||
| sender about received and missing fragments from the window of | ||||
| fragments. In either mode, upon receipt of an ACK that informs about | ||||
| any lost fragments, the sender may retransmit the lost fragments. | ||||
| The maximum number of ACK and retransmission rounds is TBD. In | ||||
| Reliable, the same reliability suboption MUST be used for all | ||||
| fragments of a packet. | ||||
| Some LPWAN deployments may benefit from conditioning the creation and | ||||
| transmission of an ACK to the detection of at least one fragment loss | ||||
| (per-packet or per-window), thus leading to negative ACK (NACK)- | ||||
| oriented behavior, while not having such condition may be preferred | ||||
| for other scenarios. | ||||
| This document does not make any decision as to whether Unreliable or | ||||
| Reliable are used, or whether in Reliable a fragment receiver | ||||
| generates ACKs per packet or per window, or whether the transmission | ||||
| of such ACKs is conditioned to the detection of fragment losses or | ||||
| not. A complete specification of the receiver and sender behaviors | ||||
| that correspond to each acknowledgment policy is also out of scope. | ||||
| Nevertheless, this document does provide examples of the different | ||||
| reliability options described. | ||||
| 8.2. Fragment format | ||||
| A fragment comprises a fragmentation header and a fragment payload, | ||||
| and conforms to the format shown in Figure 6. 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 6: Fragment format. | ||||
| 8.3. Fragmentation header formats | ||||
| Fragments except the last one SHALL | ||||
| contain the fragmentation header as defined in Figure 7. The total | ||||
| size of this fragmentation header is R bits. | ||||
| <----------- R -----------> | ||||
| <-- N --> | ||||
| +----- ... -----+-- ... --+ | ||||
| | Rule ID | CFN | | ||||
| +----- ... -----+-- ... --+ | ||||
| Figure 7: Fragmentation Header for Fragments except the Last One | ||||
| The last fragment SHALL contain a fragmentation header that conforms | ||||
| to the format shown in Figure 8. The total size of this | ||||
| fragmentation header is R+M bits. | ||||
| <----------- R ----------> | ||||
| <-- N --> <---- M -----> | ||||
| +----- ... -----+-- ... --+---- ... ----+ | ||||
| | Rule ID | 11..1 | MIC | | ||||
| +----- ... -----+-- ... --+---- ... ----+ | ||||
| Figure 8: Fragmentation Header for the Last Fragment | ||||
| Rule ID: this field has a size of R - N bits in all fragments. Rule | ||||
| ID may be used to signal whether Unreliable or Reliable are in use, | ||||
| and within the latter, whether window mode or packet mode are used. | ||||
| CFN: CFN stands for Compressed Fragment Number. The size of the CFN | ||||
| field is N bits. In Unreliable, N=1. For Reliable, 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 from 2^N - 2 for the first fragment, and MUST | ||||
| wrap from 0 back to 2^N - 2 (e.g. for N=3, the first fragment has | ||||
| CFN=6, subsequent CFNs are set sequentially and in decreasing order, | ||||
| and CFN will wrap from 0 back to 6). 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. | ||||
| MIC: MIC stands for Message Integrity Check. This field has a size | ||||
| of M bits. It is computed by the sender over the complete IPv6 | ||||
| packet before fragmentation by using the TBD algorithm. The MIC | ||||
| allows to check for errors in the reassembled IPv6 packet, while it | ||||
| also enables compressing the UDP checksum by use of SCHC. | ||||
| 8.4. ACK format | ||||
| The format of an ACK is shown in Figure 9: | ||||
| <----- R ----> | ||||
| +-+-+-+-+-+-+-+-+----- ... ---+ | ||||
| | Rule ID | bitmap | | ||||
| +-+-+-+-+-+-+-+-+----- ... ---+ | ||||
| Figure 9: Format of an ACK | ||||
| Rule ID: In all ACKs, Rule ID has a size of R bits and SHALL be set | ||||
| to TBD_ACK to signal that the message is an ACK. | ||||
| bitmap: 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 a window (in window mode) or the | ||||
| number of fragments that carry the IPv6 packet (in packet mode). The | ||||
| bitmap is a sequence of bits, where the n-th bit signals whether the | ||||
| n-th fragment transmitted 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 (carrying the MIC) has been | ||||
| correctly received, and 0 otherwise. Absence of the bitmap in an ACK | ||||
| confirms correct reception of all fragments to be acknowledged by | ||||
| means of the ACK. | ||||
| Figure 10 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 in has a size of two | ||||
| bytes. | ||||
| 1 | ||||
| <----- R ----> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | Rule ID |1|0|1|1|1|1|1|1|0|1|1|0|0|0|0|1| | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Figure 10: Example of the Bitmap in an ACK | ||||
| Figure 11 shows an example of an ACK in window mode (N=3), where the | ||||
| bitmap indicates that the second and the fifth fragments have not | ||||
| been correctly received. | ||||
| <----- R ----> 0 1 2 3 4 5 6 7 | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| | Rule ID |1|0|1|1|0|1|1|1| | ||||
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||||
| Figure 11: Example of the bitmap in an ACK (in window mode, for N=3) | ||||
| Figure 12 illustrates an ACK without bitmap. | ||||
| <----- R ----> | ||||
| +-+-+-+-+-+-+-+-+ | ||||
| | Rule ID | | ||||
| +-+-+-+-+-+-+-+-+ | ||||
| Figure 12: Example of an ACK without bitmap | ||||
| 8.5. 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), | ||||
| and (3) Rule ID to identify all the fragments that belong to a given | ||||
| datagram. The fragment receiver SHALL 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. Note | ||||
| that the size of the original, unfragmented IPv6 packet cannot be | ||||
| determined from fragmentation headers. | ||||
| In Reliable, when a fragment with all CFN bits set to 0 is received, | ||||
| the recipient MAY transmit an ACK for the last window of fragments | ||||
| sent. Note that the first fragment of the window is the one sent | ||||
| with CFN=2^N-2. In window mode, the fragment with CFN=0 is | ||||
| considered the last fragment of its window, except for the last | ||||
| fragment (with all CFN bits set to 1). The last fragment of a packet | ||||
| is also the last fragment of the last window. | ||||
| Once the recipient has received the last fragment, it checks for the | ||||
| integrity of the reassembled IPv6 datagram, based on the MIC | ||||
| received. In Unreliable, 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. In Reliable, upon receipt of the last fragment (i.e. with | ||||
| all CFN bits set to 1), the recipient MAY transmit an ACK for the | ||||
| last window of fragments sent (window mode) or for the whole set of | ||||
| fragments sent that carry a complete IPv6 packet (packet mode). In | ||||
| Reliable, the sender retransmits any lost fragments reported in the | ||||
| ACK. 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. A complete specification of the | ||||
| mechanisms needed to enable the above described fragment delivery | ||||
| reliability options is out of the scope of this document. | ||||
| 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 reassembly timeout MUST be set to a maximum of TBD | ||||
| seconds). | ||||
| 8.6. Examples | ||||
| This section provides examples of different fragment delivery | ||||
| reliability options possible on the basis of this specification. | ||||
| Figure 13 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Unreliable. | ||||
| 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 => | ||||
| Figure 13: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Unreliable | ||||
| Figure 14 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, for N=3, NACK-oriented packet mode, 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 NACK) | ||||
| Figure 14: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, NACK-oriented packet mode; no losses. | ||||
| Figure 15 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, for N=3, NACK-oriented packet mode, with | ||||
| three losses. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2---X---->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| |<-------NACK---------|Bitmap:1101011110100000 | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=2-------->| | ||||
| |-------CFN=4-------->|MIC checked => | ||||
| (no NACK) | ||||
| Figure 15: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, NACK-oriented packet mode; three losses. | ||||
| Figure 16 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, window mode, for N=3, without losses. | ||||
| Receiver feedback is NACK-oriented. Note: in window mode, an | ||||
| additional bit will be needed to number windows. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2-------->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| (no NACK) | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| (no NACK) | ||||
| Figure 16: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, NACK-oriented window mode; without losses. | ||||
| Figure 17 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, window mode, for N=3, with three losses. | ||||
| Receiver feedback is NACK-oriented. Note: in window mode, an | ||||
| additional bit will be needed to number windows. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2---X---->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| |<-------NACK---------|Bitmap:11010110 | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=2-------->| | ||||
| (no NACK) | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| |<-------NACK---------|Bitmap:11010000 | ||||
| |-------CFN=4-------->|MIC checked => | ||||
| (no NACK) | ||||
| Figure 17: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, NACK-oriented window mode; three losses. | ||||
| Figure 18 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, packet mode, for N=3, without losses. | ||||
| Receiver feedback is positive-ACK-oriented. | ||||
| 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 18: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, packet mode, positive-ACK-oriented; no losses. | ||||
| Figure 19 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, packet mode, for N=3, with three losses. | ||||
| Receiver feedback is positive-ACK-oriented. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2---X---->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| |<-------ACK----------|bitmap:1101011110100000 | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=2-------->| | ||||
| |-------CFN=4-------->|MIC checked => | ||||
| |<-------ACK----------|no bitmap | ||||
| (End) | ||||
| Figure 19: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, packet mode, positive-ACK-oriented; with three | ||||
| losses. | ||||
| 8.6.1. Reliable, window mode, ACK-oriented | ||||
| Figure 20 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, window mode, for N=3, without losses. | ||||
| Receiver feedback is positive-ACK-oriented. Note: in window mode, an | ||||
| additional bit will be needed to number windows. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2-------->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| |<-------ACK----------|no bitmap | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| |<-------ACK----------|no bitmap | ||||
| (End) | ||||
| Figure 20: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, window mode, positive-ACK-oriented; no losses. | ||||
| Figure 21 illustrates the transmission of an IPv6 packet that needs | ||||
| 11 fragments in Reliable, window mode, for N=3, with three losses. | ||||
| Receiver feedback is positive-ACK-oriented. Note: in window mode, an | ||||
| additional bit will be needed to number windows. | ||||
| Sender Receiver | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=3-------->| | ||||
| |-------CFN=2---X---->| | ||||
| |-------CFN=1-------->| | ||||
| |-------CFN=0-------->| | ||||
| |<-------ACK----------|bitmap:11010110 | ||||
| |-------CFN=4-------->| | ||||
| |-------CFN=2-------->| | ||||
| |<-------ACK----------|no bitmap | ||||
| |-------CFN=6-------->| | ||||
| |-------CFN=5-------->| | ||||
| |-------CFN=4---X---->| | ||||
| |-------CFN=7-------->|MIC checked => | ||||
| |<-------ACK----------|bitmap:11010000 | ||||
| |-------CFN=4-------->|MIC checked => | ||||
| |<-------ACK----------|no bitmap | ||||
| (End) | ||||
| Figure 21: Transmission of an IPv6 packet carried by 11 fragments in | ||||
| Reliable, for N=3, window mode, positive-ACK-oriented; with three | ||||
| losses. | ||||
| 9. Security considerations | ||||
| 9.1. Security considerations for header compression | ||||
| TBD | ||||
| 9.2. Security considerations for fragmentation | ||||
| This subsection describes potential attacks to LPWAN fragmentation | ||||
| and proposes countermeasures, based on existing analysis of attacks | ||||
| to 6LoWPAN fragmentation {HHWH}. | ||||
| A node can perform a buffer reservation attack by sending a first | ||||
| fragment to a target. Then, the receiver will reserve buffer space | ||||
| for the whole packet on the basis of the datagram size announced in | ||||
| that first fragment. 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. Acknowledgements | ||||
| Thanks to Dominique Barthel, Carsten Bormann, Arunprabhu Kandasamy, | ||||
| Antony Markovski, Alexander Pelov, Pascal Thubert, Juan Carlos Zuniga | ||||
| for useful design consideration. | ||||
| In the fragmentation section, the authors have reused parts of text | ||||
| available in section 5.3 of RFC 4944, and would like to thank the | ||||
| authors of RFC 4944. | ||||
| 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. | ||||
| 11. References | ||||
| 11.1. Normative References | ||||
| [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | |||
| (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, | (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, | |||
| December 1998, <http://www.rfc-editor.org/info/rfc2460>. | December 1998, <http://www.rfc-editor.org/info/rfc2460>. | |||
| [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, | [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, | |||
| "Transmission of IPv6 Packets over IEEE 802.15.4 | "Transmission of IPv6 Packets over IEEE 802.15.4 | |||
| Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, | Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, | |||
| <http://www.rfc-editor.org/info/rfc4944>. | <http://www.rfc-editor.org/info/rfc4944>. | |||
| [RFC4997] Finking, R. and G. Pelletier, "Formal Notation for RObust | 11.2. Informative References | |||
| Header Compression (ROHC-FN)", RFC 4997, | ||||
| DOI 10.17487/RFC4997, July 2007, | ||||
| <http://www.rfc-editor.org/info/rfc4997>. | ||||
| [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 | [I-D.ietf-lpwan-overview] | |||
| Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, | Farrell, S., "LPWAN Overview", draft-ietf-lpwan- | |||
| DOI 10.17487/RFC6282, September 2011, | overview-01 (work in progress), February 2017. | |||
| <http://www.rfc-editor.org/info/rfc6282>. | ||||
| [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. | ||||
| Authors' Addresses | Authors' Addresses | |||
| Ana Minaburo | Ana Minaburo | |||
| Acklio | Acklio | |||
| 2bis rue de la Chataigneraie | 2bis rue de la Chataigneraie | |||
| 35510 Cesson-Sevigne Cedex | 35510 Cesson-Sevigne Cedex | |||
| France | France | |||
| Email: ana@ackl.io | Email: ana@ackl.io | |||
| Laurent Toutain | Laurent Toutain | |||
| Institut MINES TELECOM ; TELECOM Bretagne | IMT-Atlantique | |||
| 2 rue de la Chataigneraie | 2 rue de la Chataigneraie | |||
| CS 17607 | CS 17607 | |||
| 35576 Cesson-Sevigne Cedex | 35576 Cesson-Sevigne Cedex | |||
| France | France | |||
| Email: Laurent.Toutain@telecom-bretagne.eu | Email: Laurent.Toutain@imt-atlantique.fr | |||
| Carles Gomez | ||||
| Universitat Politecnica de Catalunya | ||||
| C/Esteve Terradas, 7 | ||||
| 08860 Castelldefels | ||||
| Spain | ||||
| Email: carlesgo@entel.upc.edu | ||||
| End of changes. 94 change blocks. | ||||
| 354 lines changed or deleted | 1050 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||