| < draft-ietf-lpwan-ipv6-static-context-hc-17.txt | draft-ietf-lpwan-ipv6-static-context-hc-18.txt > | |||
|---|---|---|---|---|
| lpwan Working Group A. Minaburo | lpwan Working Group A. Minaburo | |||
| Internet-Draft Acklio | Internet-Draft Acklio | |||
| Intended status: Standards Track L. Toutain | Intended status: Standards Track L. Toutain | |||
| Expires: April 25, 2019 IMT-Atlantique | Expires: June 17, 2019 IMT-Atlantique | |||
| C. Gomez | C. Gomez | |||
| Universitat Politecnica de Catalunya | Universitat Politecnica de Catalunya | |||
| D. Barthel | D. Barthel | |||
| Orange Labs | Orange Labs | |||
| JC. Zuniga | JC. Zuniga | |||
| SIGFOX | SIGFOX | |||
| October 22, 2018 | December 14, 2018 | |||
| LPWAN Static Context Header Compression (SCHC) and fragmentation for | LPWAN Static Context Header Compression (SCHC) and fragmentation for | |||
| IPv6 and UDP | IPv6 and UDP | |||
| draft-ietf-lpwan-ipv6-static-context-hc-17 | draft-ietf-lpwan-ipv6-static-context-hc-18 | |||
| Abstract | Abstract | |||
| This document defines the Static Context Header Compression (SCHC) | This document defines the Static Context Header Compression (SCHC) | |||
| framework, which provides both header compression and fragmentation | framework, which provides both header compression and fragmentation | |||
| functionalities. SCHC has been designed for Low Power Wide Area | functionalities. SCHC has been designed for Low Power Wide Area | |||
| Networks (LPWAN). | Networks (LPWAN). | |||
| SCHC compression is based on a common static context stored in both | SCHC compression is based on a common static context stored in both | |||
| the LPWAN device and the network side. This document defines a | the LPWAN device and the network side. This document defines a | |||
| skipping to change at page 1, line 41 ¶ | skipping to change at page 1, line 41 ¶ | |||
| This document also specifies a fragmentation and reassembly mechanism | This document also specifies a fragmentation and reassembly mechanism | |||
| that is used to support the IPv6 MTU requirement over the LPWAN | that is used to support the IPv6 MTU requirement over the LPWAN | |||
| technologies. Fragmentation is needed for IPv6 datagrams that, after | technologies. Fragmentation is needed for IPv6 datagrams that, after | |||
| SCHC compression or when such compression was not possible, still | SCHC compression or when such compression was not possible, still | |||
| exceed the layer-2 maximum payload size. | exceed the layer-2 maximum payload size. | |||
| The SCHC header compression and fragmentation mechanisms are | The SCHC header compression and fragmentation mechanisms are | |||
| independent of the specific LPWAN technology over which they are | independent of the specific LPWAN technology over which they are | |||
| used. This document defines generic functionalities and offers | used. This document defines generic functionalities and offers | |||
| flexibility with regard to parameter settings and mechanism choices. | flexibility with regard to parameter settings and mechanism choices. | |||
| Technology-specific and product-specific settings and choices are | This document standardizes the exchange over the LPWAN between two | |||
| expected to be grouped into Profiles specified in other documents. | SCHC entities. Settings and choices specific to a technology or a | |||
| product are expected to be grouped into profiles, which are specified | ||||
| in other documents. Data models for the context and profiles are out | ||||
| of scope. | ||||
| 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 https://datatracker.ietf.org/drafts/current/. | Drafts is at https://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 April 25, 2019. | This Internet-Draft will expire on June 17, 2019. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2018 IETF Trust and the persons identified as the | Copyright (c) 2018 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 | |||
| (https://trustee.ietf.org/license-info) in effect on the date of | (https://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 | |||
| skipping to change at page 2, line 40 ¶ | skipping to change at page 2, line 45 ¶ | |||
| described in the Simplified BSD License. | described in the Simplified BSD License. | |||
| Table of Contents | Table of Contents | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2. Requirements Notation . . . . . . . . . . . . . . . . . . . . 5 | 2. Requirements Notation . . . . . . . . . . . . . . . . . . . . 5 | |||
| 3. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 5 | 3. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 4. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 5. SCHC overview . . . . . . . . . . . . . . . . . . . . . . . . 8 | 5. SCHC overview . . . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 5.1. SCHC Packet format . . . . . . . . . . . . . . . . . . . 10 | 5.1. SCHC Packet format . . . . . . . . . . . . . . . . . . . 10 | |||
| 5.2. Functional mapping . . . . . . . . . . . . . . . . . . . 11 | 5.2. Functional mapping . . . . . . . . . . . . . . . . . . . 10 | |||
| 6. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 6. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 7. Compression/Decompression . . . . . . . . . . . . . . . . . . 12 | 7. Compression/Decompression . . . . . . . . . . . . . . . . . . 12 | |||
| 7.1. SCHC C/D Rules . . . . . . . . . . . . . . . . . . . . . 12 | 7.1. SCHC C/D Rules . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 7.2. Rule ID for SCHC C/D . . . . . . . . . . . . . . . . . . 14 | 7.2. Rule ID for SCHC C/D . . . . . . . . . . . . . . . . . . 14 | |||
| 7.3. Packet processing . . . . . . . . . . . . . . . . . . . . 15 | 7.3. Packet processing . . . . . . . . . . . . . . . . . . . . 15 | |||
| 7.4. Matching operators . . . . . . . . . . . . . . . . . . . 16 | 7.4. Matching operators . . . . . . . . . . . . . . . . . . . 16 | |||
| 7.5. Compression Decompression Actions (CDA) . . . . . . . . . 17 | 7.5. Compression Decompression Actions (CDA) . . . . . . . . . 17 | |||
| 7.5.1. processing variable-length fields . . . . . . . . . . 17 | 7.5.1. processing fixed-length fields . . . . . . . . . . . 17 | |||
| 7.5.2. not-sent CDA . . . . . . . . . . . . . . . . . . . . 18 | 7.5.2. processing variable-length fields . . . . . . . . . . 18 | |||
| 7.5.3. value-sent CDA . . . . . . . . . . . . . . . . . . . 18 | 7.5.3. not-sent CDA . . . . . . . . . . . . . . . . . . . . 18 | |||
| 7.5.4. mapping-sent CDA . . . . . . . . . . . . . . . . . . 18 | 7.5.4. value-sent CDA . . . . . . . . . . . . . . . . . . . 19 | |||
| 7.5.5. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . 19 | 7.5.5. mapping-sent CDA . . . . . . . . . . . . . . . . . . 19 | |||
| 7.5.6. DevIID, AppIID CDA . . . . . . . . . . . . . . . . . 19 | 7.5.6. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
| 7.5.7. Compute-* . . . . . . . . . . . . . . . . . . . . . . 19 | 7.5.7. DevIID, AppIID CDA . . . . . . . . . . . . . . . . . 20 | |||
| 7.5.8. Compute-* . . . . . . . . . . . . . . . . . . . . . . 20 | ||||
| 8. Fragmentation/Reassembly . . . . . . . . . . . . . . . . . . 20 | 8. Fragmentation/Reassembly . . . . . . . . . . . . . . . . . . 20 | |||
| 8.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 20 | 8.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 20 | |||
| 8.2. SCHC F/R Tools . . . . . . . . . . . . . . . . . . . . . 20 | 8.2. SCHC F/R Protocol Elements . . . . . . . . . . . . . . . 21 | |||
| 8.2.1. Messages . . . . . . . . . . . . . . . . . . . . . . 20 | 8.2.1. Messages . . . . . . . . . . . . . . . . . . . . . . 21 | |||
| 8.2.2. Tiles, Windows, Bitmaps, Timers, Counters . . . . . . 21 | 8.2.2. Tiles, Windows, Bitmaps, Timers, Counters . . . . . . 21 | |||
| 8.2.3. Integrity Checking . . . . . . . . . . . . . . . . . 23 | 8.2.3. Integrity Checking . . . . . . . . . . . . . . . . . 24 | |||
| 8.2.4. Header Fields . . . . . . . . . . . . . . . . . . . . 24 | 8.2.4. Header Fields . . . . . . . . . . . . . . . . . . . . 24 | |||
| 8.3. SCHC F/R Message Formats . . . . . . . . . . . . . . . . 26 | 8.3. SCHC F/R Message Formats . . . . . . . . . . . . . . . . 27 | |||
| 8.3.1. SCHC Fragment format . . . . . . . . . . . . . . . . 26 | 8.3.1. SCHC Fragment format . . . . . . . . . . . . . . . . 27 | |||
| 8.3.2. SCHC ACK format . . . . . . . . . . . . . . . . . . . 27 | 8.3.2. SCHC ACK format . . . . . . . . . . . . . . . . . . . 28 | |||
| 8.3.3. SCHC ACK REQ format . . . . . . . . . . . . . . . . . 30 | 8.3.3. SCHC ACK REQ format . . . . . . . . . . . . . . . . . 31 | |||
| 8.3.4. SCHC Abort formats . . . . . . . . . . . . . . . . . 31 | 8.3.4. SCHC Sender-Abort format . . . . . . . . . . . . . . 31 | |||
| 8.4. SCHC F/R modes . . . . . . . . . . . . . . . . . . . . . 33 | 8.3.5. SCHC Receiver-Abort format . . . . . . . . . . . . . 31 | |||
| 8.4. SCHC F/R modes . . . . . . . . . . . . . . . . . . . . . 32 | ||||
| 8.4.1. No-ACK mode . . . . . . . . . . . . . . . . . . . . . 33 | 8.4.1. No-ACK mode . . . . . . . . . . . . . . . . . . . . . 33 | |||
| 8.4.2. ACK-Always . . . . . . . . . . . . . . . . . . . . . 36 | 8.4.2. ACK-Always mode . . . . . . . . . . . . . . . . . . . 35 | |||
| 8.4.3. ACK-on-Error . . . . . . . . . . . . . . . . . . . . 42 | 8.4.3. ACK-on-Error mode . . . . . . . . . . . . . . . . . . 41 | |||
| 9. Padding management . . . . . . . . . . . . . . . . . . . . . 49 | 9. Padding management . . . . . . . . . . . . . . . . . . . . . 47 | |||
| 10. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 50 | 10. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 48 | |||
| 10.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 50 | 10.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 48 | |||
| 10.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 51 | 10.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 48 | |||
| 10.3. Flow label field . . . . . . . . . . . . . . . . . . . . 51 | 10.3. Flow label field . . . . . . . . . . . . . . . . . . . . 49 | |||
| 10.4. Payload Length field . . . . . . . . . . . . . . . . . . 51 | 10.4. Payload Length field . . . . . . . . . . . . . . . . . . 49 | |||
| 10.5. Next Header field . . . . . . . . . . . . . . . . . . . 52 | 10.5. Next Header field . . . . . . . . . . . . . . . . . . . 49 | |||
| 10.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . 52 | 10.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . 50 | |||
| 10.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . 52 | 10.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . 50 | |||
| 10.7.1. IPv6 source and destination prefixes . . . . . . . . 52 | 10.7.1. IPv6 source and destination prefixes . . . . . . . . 50 | |||
| 10.7.2. IPv6 source and destination IID . . . . . . . . . . 53 | 10.7.2. IPv6 source and destination IID . . . . . . . . . . 51 | |||
| 10.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . 53 | 10.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . 51 | |||
| 10.9. UDP source and destination port . . . . . . . . . . . . 53 | 10.9. UDP source and destination port . . . . . . . . . . . . 51 | |||
| 10.10. UDP length field . . . . . . . . . . . . . . . . . . . . 54 | 10.10. UDP length field . . . . . . . . . . . . . . . . . . . . 52 | |||
| 10.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 54 | 10.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 52 | |||
| 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 55 | 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 53 | |||
| 12. Security considerations . . . . . . . . . . . . . . . . . . . 55 | 12. Security considerations . . . . . . . . . . . . . . . . . . . 53 | |||
| 12.1. Security considerations for SCHC | 12.1. Security considerations for SCHC | |||
| Compression/Decompression . . . . . . . . . . . . . . . 55 | Compression/Decompression . . . . . . . . . . . . . . . 53 | |||
| 12.2. Security considerations for SCHC | 12.2. Security considerations for SCHC | |||
| Fragmentation/Reassembly . . . . . . . . . . . . . . . . 55 | Fragmentation/Reassembly . . . . . . . . . . . . . . . . 53 | |||
| 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 56 | 13. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 54 | |||
| 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 57 | 14. References . . . . . . . . . . . . . . . . . . . . . . . . . 55 | |||
| 14.1. Normative References . . . . . . . . . . . . . . . . . . 57 | 14.1. Normative References . . . . . . . . . . . . . . . . . . 55 | |||
| 14.2. Informative References . . . . . . . . . . . . . . . . . 57 | 14.2. Informative References . . . . . . . . . . . . . . . . . 55 | |||
| Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 58 | Appendix A. Compression Examples . . . . . . . . . . . . . . . . 56 | |||
| Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 61 | Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 59 | |||
| Appendix C. Fragmentation State Machines . . . . . . . . . . . . 68 | Appendix C. Fragmentation State Machines . . . . . . . . . . . . 66 | |||
| Appendix D. SCHC Parameters . . . . . . . . . . . . . . . . . . 75 | Appendix D. SCHC Parameters . . . . . . . . . . . . . . . . . . 72 | |||
| Appendix E. Supporting multiple window sizes for fragmentation . 77 | Appendix E. Supporting multiple window sizes for fragmentation . 74 | |||
| Appendix F. Downlink SCHC Fragment transmission . . . . . . . . 77 | Appendix F. Downlink SCHC Fragment transmission . . . . . . . . 74 | |||
| Appendix G. Note . . . . . . . . . . . . . . . . . . . . . . . . 78 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 75 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 78 | ||||
| 1. Introduction | 1. Introduction | |||
| This document defines the Static Context Header Compression (SCHC) | This document defines the Static Context Header Compression (SCHC) | |||
| framework, which provides both header compression and fragmentation | framework, which provides both header compression and fragmentation | |||
| functionalities. SCHC has been designed for Low Power Wide Area | functionalities. SCHC has been designed for Low Power Wide Area | |||
| Networks (LPWAN). | Networks (LPWAN). | |||
| Header compression is needed for efficient Internet connectivity to | Header compression is needed for efficient Internet connectivity to | |||
| the node within an LPWAN network. Some LPWAN networks properties can | the node within an LPWAN network. Some LPWAN networks properties can | |||
| skipping to change at page 4, line 30 ¶ | skipping to change at page 4, line 36 ¶ | |||
| packets between the same source-destination pair follow the same | packets between the same source-destination pair follow the same | |||
| path. For the needs of this document, the architecture can simply | path. For the needs of this document, the architecture can simply | |||
| be described as Devices (Dev) exchanging information with LPWAN | be described as Devices (Dev) exchanging information with LPWAN | |||
| Application Servers (App) through a Network Gateway (NGW). | Application Servers (App) through a Network Gateway (NGW). | |||
| o Because devices embed built-in applications, the traffic flows to | o Because devices embed built-in applications, the traffic flows to | |||
| be compressed are known in advance. Indeed, new applications are | be compressed are known in advance. Indeed, new applications are | |||
| less frequently installed in an LPWAN device, as they are in a | less frequently installed in an LPWAN device, as they are in a | |||
| computer or smartphone. | computer or smartphone. | |||
| SCHC compression uses a context in which information about header | SCHC compression uses a Context (a set of Rules) in which information | |||
| fields is stored. This context is static: the values of the header | about header fields is stored. This Context is static: the values of | |||
| fields do not change over time. This avoids complex | the header fields and the actions to do compression/decompression do | |||
| resynchronization mechanisms. Indeed, downlink is often more | not change over time. This avoids complex resynchronization | |||
| restricted/expensive, perhaps completely unavailable [RFC8376]. A | mechanisms. Indeed, downlink is often more restricted/expensive, | |||
| compression protocol that relies on feedback is not compatible with | perhaps completely unavailable [RFC8376]. A compression protocol | |||
| the characteristics of such LPWANs. | that relies on feedback is not compatible with the characteristics of | |||
| such LPWANs. | ||||
| In most cases, a small context identifier is enough to represent the | In most cases, a small Rule identifier is enough to represent the | |||
| full IPv6/UDP headers. The SCHC header compression mechanism is | full IPv6/UDP headers. The SCHC header compression mechanism is | |||
| independent of the specific LPWAN technology over which it is used. | independent of the specific LPWAN technology over which it is used. | |||
| LPWAN technologies impose some strict limitations on traffic. For | LPWAN technologies impose some strict limitations on traffic. For | |||
| instance, devices are sleeping most of the time and may receive data | instance, devices are sleeping most of the time and may receive data | |||
| during short periods of time after transmission to preserve battery. | during short periods of time after transmission to preserve battery. | |||
| LPWAN technologies are also characterized by a greatly reduced data | LPWAN technologies are also characterized by a greatly reduced data | |||
| unit and/or payload size (see [RFC8376]). However, some LPWAN | unit and/or payload size (see [RFC8376]). However, some LPWAN | |||
| technologies do not provide fragmentation functionality; to support | technologies do not provide fragmentation functionality; to support | |||
| the IPv6 MTU requirement of 1280 bytes [RFC8200], they require a | the IPv6 MTU requirement of 1280 bytes [RFC8200], they require a | |||
| fragmentation protocol at the adaptation layer below IPv6. | fragmentation protocol at the adaptation layer below IPv6. | |||
| Accordingly, this document defines an fragmentation/reassembly | Accordingly, this document defines an optional fragmentation/ | |||
| mechanism for LPWAN technologies to supports the IPv6 MTU. Its | reassembly mechanism for LPWAN technologies to support the IPv6 MTU | |||
| implementation is optional. If not interested, the reader can safely | requirement. | |||
| skip its description. | ||||
| This document defines generic functionality and offers flexibility | This document defines generic functionality and offers flexibility | |||
| with regard to parameters settings and mechanism choices. | with regard to parameters settings and mechanism choices. | |||
| Technology-specific settings and product-specific and choices are | Technology-specific settings and product-specific choices are | |||
| expected to be grouped into Profiles specified in other documents. | expected to be grouped into Profiles specified in other documents. | |||
| 2. Requirements Notation | 2. Requirements Notation | |||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
| "OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in BCP | |||
| 14 [RFC2119] [RFC8174] when, and only when, they appear in all | 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
| capitals, as shown here. | capitals, as shown here. | |||
| skipping to change at page 5, line 37 ¶ | skipping to change at page 5, line 44 ¶ | |||
| o Devices (Dev) are the end-devices or hosts (e.g. sensors, | o Devices (Dev) are the end-devices or hosts (e.g. sensors, | |||
| actuators, etc.). There can be a very high density of devices per | actuators, etc.). There can be a very high density of devices per | |||
| radio gateway. | radio gateway. | |||
| o The Radio Gateway (RGW), which is the end point of the constrained | o The Radio Gateway (RGW), which is the end point of the constrained | |||
| link. | link. | |||
| o The Network Gateway (NGW) is the interconnection node between the | o The Network Gateway (NGW) is the interconnection node between the | |||
| Radio Gateway and the Internet. | Radio Gateway and the Internet. | |||
| o LPWAN-AAA Server, which controls the user authentication and the | ||||
| applications. | ||||
| o Application Server (App) | o Application Server (App) | |||
| +------+ | +------+ | |||
| () () () | |LPWAN-| | () () () | |LPWAN-| | |||
| () () () () / \ +---------+ | AAA | | () () () () / \ +---------+ | AAA | | |||
| () () () () () () / \======| ^ |===|Server| +-----------+ | () () () () () () / \======| ^ |===|Server| +-----------+ | |||
| () () () | | <--|--> | +------+ |APPLICATION| | () () () | | <--|--> | +------+ |Application| | |||
| () () () () / \==========| v |=============| (App) | | () () () () / \==========| v |=============| (App) | | |||
| () () () / \ +---------+ +-----------+ | () () () / \ +---------+ +-----------+ | |||
| Dev Radio Gateways NGW | Dev Radio Gateways NGW | |||
| Figure 1: LPWAN Architecture | Figure 1: LPWAN Architecture as shown in RFC8376 | |||
| 4. Terminology | 4. Terminology | |||
| This section defines the terminology and acronyms used in this | This section defines the terminology and acronyms used in this | |||
| document. | document. It extends the terminology of [RFC8376]. | |||
| Note that the SCHC acronym is pronounced like "sheek" in English (or | The SCHC acronym is pronounced like "sheek" in English (or "chic" in | |||
| "chic" in French). Therefore, this document writes "a SCHC Packet" | French). Therefore, this document writes "a SCHC Packet" instead of | |||
| instead of "an SCHC Packet". | "an SCHC Packet". | |||
| o App: LPWAN Application. An application sending/receiving IPv6 | o App: LPWAN Application, as defined by [RFC8376]. An application | |||
| packets to/from the Device. | sending/receiving packets to/from the Dev. | |||
| o AppIID: Application Interface Identifier. The IID that identifies | o AppIID: Application Interface Identifier. The IID that identifies | |||
| the application server interface. | the application server interface. | |||
| o Bi: Bidirectional. Characterises a Field Descriptor that applies | o Bi: Bidirectional. Characterizes a Field Descriptor that applies | |||
| to headers of packets travelling in either direction (Up and Dw, | to headers of packets traveling in either direction (Up and Dw, | |||
| see this glossary). | see this glossary). | |||
| o CDA: Compression/Decompression Action. Describes the reciprocal | o CDA: Compression/Decompression Action. Describes the pair of | |||
| pair of actions that are performed at the compressor to compress a | inverse actions that are performed at the compressor to compress a | |||
| header field and at the decompressor to recover the original | header field and at the decompressor to recover the original | |||
| header field value. | header field value. | |||
| o Compression Residue. The bits that need to be sent (beyond the | o Compression Residue. The bits that remain to be sent (beyond the | |||
| Rule ID itself) after applying the SCHC compression over each | Rule ID itself) after applying the SCHC compression. | |||
| header field. | ||||
| o Context: A set of Rules used to compress/decompress headers. | o Context: A set of Rules used to compress/decompress headers. | |||
| o Dev: Device. A node connected to an LPWAN. A Dev SHOULD | o Dev: Device, as defined by [RFC8376]. | |||
| implement SCHC. | ||||
| o DevIID: Device Interface Identifier. The IID that identifies the | o DevIID: Device Interface Identifier. The IID that identifies the | |||
| Dev interface. | Dev interface. | |||
| o DI: Direction Indicator. This field tells which direction of | o DI: Direction Indicator. This field tells which direction of | |||
| packet travel (Up, Dw or Bi) a Rule applies to. This allows for | packet travel (Up, Dw or Bi) a Field Description applies to. This | |||
| assymmetric processing. | allows for asymmetric processing, using the same Rule. | |||
| o Dw: Downlink direction for compression/decompression in both | o Dw: Downlink direction for compression/decompression, from SCHC C/ | |||
| sides, from SCHC C/D in the network to SCHC C/D in the Dev. | D in the network to SCHC C/D in the Dev. | |||
| o Field Description. A line in the Rule table. | o Field Description. A tuple containing identifier, value, matching | |||
| operator and actions to be applied to a field. | ||||
| o FID: Field Identifier. This is an index to describe the header | o FID: Field Identifier. This identifies the protocol and field a | |||
| fields in a Rule. | Field Description applies to. | |||
| o FL: Field Length is the length of the packet header field. It is | o FL: Field Length is the length of the packet header field. It is | |||
| expressed in bits for header fields of fixed lengths or as a type | expressed in bits for header fields of fixed lengths or as a type | |||
| (e.g. variable, token length, ...) for field lengths that are | (e.g. variable, token length, ...) for field lengths that are | |||
| unknown at the time of Rule creation. The length of a header | unknown at the time of Rule creation. The length of a header | |||
| field is defined in the corresponding protocol specification (such | field is defined in the corresponding protocol specification (such | |||
| as IPv6 or UDP). | as IPv6 or UDP). | |||
| o FP: Field Position is a value that is used to identify the | o FP: Field Position is a value that is used to identify the | |||
| position where each instance of a field appears in the header. | position where each instance of a field appears in the header. | |||
| skipping to change at page 7, line 51 ¶ | skipping to change at page 7, line 52 ¶ | |||
| contained in a header field with a value contained in a Rule. | contained in a header field with a value contained in a Rule. | |||
| o Padding (P). Extra bits that may be appended by SCHC to a data | o Padding (P). Extra bits that may be appended by SCHC to a data | |||
| unit that it passes to the underlying Layer 2 for transmission. | unit that it passes to the underlying Layer 2 for transmission. | |||
| SCHC itself operates on bits, not bytes, and does not have any | SCHC itself operates on bits, not bytes, and does not have any | |||
| alignment prerequisite. See Section 9. | alignment prerequisite. See Section 9. | |||
| o Profile: SCHC offers variations in the way it is operated, with a | o Profile: SCHC offers variations in the way it is operated, with a | |||
| number of parameters listed in Appendix D. A Profile indicates a | number of parameters listed in Appendix D. A Profile indicates a | |||
| particular setting of all these parameters. Both ends of a SCHC | particular setting of all these parameters. Both ends of a SCHC | |||
| session must be provisioned with the same Profile information and | communication must be provisioned with the same Profile | |||
| with the same set of Rules before the session starts, so that | information and with the same set of Rules before the | |||
| there is no ambiguity in how they expect to communicate. | communication starts, so that there is no ambiguity in how they | |||
| expect to communicate. | ||||
| o Rule: A set of header field values. | o Rule: A set of Field Descriptions. | |||
| o Rule ID: An identifier for a Rule. SCHC C/D on both sides share | o Rule ID (Rule Identifier): An identifier for a Rule. SCHC C/D on | |||
| the same Rule ID for a given packet. A set of Rule IDs are used | both sides share the same Rule ID for a given packet. A set of | |||
| to support SCHC F/R functionality. | Rule IDs are used to support SCHC F/R functionality. | |||
| o SCHC C/D: Static Context Header Compression Compressor/ | o SCHC C/D: Static Context Header Compression Compressor/ | |||
| Decompressor. A mechanism used on both sides, at the Dev and at | Decompressor. A mechanism used on both sides, at the Dev and at | |||
| the network, to achieve Compression/Decompression of headers. | the network, to achieve Compression/Decompression of headers. | |||
| SCHC C/D uses Rules to perform compression and decompression. | ||||
| o SCHC F/R: SCHC Fragmentation / Reassembly. A mechanism used on | ||||
| both sides, at the Dev and at the network, to achieve | ||||
| Fragmentation / Reassembly of SCHC Packets. | ||||
| o SCHC Packet: A packet (e.g. an IPv6 packet) whose header has been | o SCHC Packet: A packet (e.g. an IPv6 packet) whose header has been | |||
| compressed as per the header compression mechanism defined in this | compressed as per the header compression mechanism defined in this | |||
| document. If the header compression process is unable to actually | document. If the header compression process is unable to actually | |||
| compress the packet header, the packet with the uncompressed | compress the packet header, the packet with the uncompressed | |||
| header is still called a SCHC Packet (in this case, a Rule ID is | header is still called a SCHC Packet (in this case, a Rule ID is | |||
| used to indicate that the packet header has not been compressed). | used to indicate that the packet header has not been compressed). | |||
| See Section 7 for more details. | See Section 7 for more details. | |||
| o TV: Target value. A value contained in a Rule that will be | o TV: Target value. A value contained in a Rule that will be | |||
| matched with the value of a header field. | matched with the value of a header field. | |||
| o Up: Uplink direction for compression/decompression in both sides, | o Up: Uplink direction for compression/decompression, from the Dev | |||
| from the Dev SCHC C/D to the network SCHC C/D. | SCHC C/D to the network SCHC C/D. | |||
| Additional terminology for the optional SCHC Fragmentation / | Additional terminology for the optional SCHC Fragmentation / | |||
| Reassembly mechanism (SCHC F/R) is found in Section 8.2. | Reassembly mechanism (SCHC F/R) is found in Section 8.2. | |||
| 5. SCHC overview | 5. SCHC overview | |||
| SCHC can be characterized as an adaptation layer between IPv6 and the | SCHC can be characterized as an adaptation layer between IPv6 and the | |||
| underlying LPWAN technology. SCHC comprises two sublayers (i.e. the | underlying LPWAN technology. SCHC comprises two sublayers (i.e. the | |||
| Compression sublayer and the Fragmentation sublayer), as shown in | Compression sublayer and the Fragmentation sublayer), as shown in | |||
| Figure 2. | Figure 2. | |||
| skipping to change at page 9, line 18 ¶ | skipping to change at page 9, line 18 ¶ | |||
| | | Compression | | | | Compression | | |||
| SCHC < +----------------+ | SCHC < +----------------+ | |||
| | | Fragmentation | | | | Fragmentation | | |||
| +- +----------------+ | +- +----------------+ | |||
| |LPWAN technology| | |LPWAN technology| | |||
| +----------------+ | +----------------+ | |||
| Figure 2: Protocol stack comprising IPv6, SCHC and an LPWAN | Figure 2: Protocol stack comprising IPv6, SCHC and an LPWAN | |||
| technology | technology | |||
| As per this document, when a packet (e.g. an IPv6 packet) needs to be | Before a packet (e.g. an IPv6 packet) is transmitted, header | |||
| transmitted, header compression is first applied to the packet. The | compression is first applied. The resulting packet is called a SCHC | |||
| resulting packet after header compression (whose header may or may | Packet, whether or not any compression is performed. If the SCHC | |||
| not actually be smaller than that of the original packet) is called a | Packet is to be fragmented, the optional SCHC Fragmentation MAY be | |||
| SCHC Packet. If the SCHC Packet needs to be fragmented by the | applied to the SCHC Packet. The inverse operations take place at the | |||
| optional SCHC Fragmentation, fragmentation is then applied to the | receiver. This process is illustrated in Figure 3. | |||
| SCHC Packet. The SCHC Packet or the SCHC Fragments are then | ||||
| transmitted over the LPWAN. The reciprocal operations take place at | ||||
| the receiver. This process is illustrated in Figure 3. | ||||
| A packet (e.g. an IPv6 packet) | A packet (e.g. an IPv6 packet) | |||
| | ^ | | ^ | |||
| v | | v | | |||
| +------------------+ +--------------------+ | +------------------+ +--------------------+ | |||
| | SCHC Compression | | SCHC Decompression | | | SCHC Compression | | SCHC Decompression | | |||
| +------------------+ +--------------------+ | +------------------+ +--------------------+ | |||
| | ^ | | ^ | |||
| | If no fragmentation (*) | | | If no fragmentation (*) | | |||
| +-------------- SCHC Packet -------------->| | +-------------- SCHC Packet -------------->| | |||
| skipping to change at page 10, line 36 ¶ | skipping to change at page 10, line 10 ¶ | |||
| *: the decision to use Fragmentation or not is left to each Profile. | *: the decision to use Fragmentation or not is left to each Profile. | |||
| Figure 3: SCHC operations at the SENDER and the RECEIVER | Figure 3: SCHC operations at the SENDER and the RECEIVER | |||
| 5.1. SCHC Packet format | 5.1. SCHC Packet format | |||
| The SCHC Packet is composed of the Compressed Header followed by the | The SCHC Packet is composed of the Compressed Header followed by the | |||
| payload from the original packet (see Figure 4). The Compressed | payload from the original packet (see Figure 4). The Compressed | |||
| Header itself is composed of the Rule ID and a Compression Residue, | Header itself is composed of the Rule ID and a Compression Residue, | |||
| which is the output of the compression actions of the Rule that was | which is the output of compressing the packet header with that Rule | |||
| applied (see Section 7). The Compression Residue may be empty. Both | (see Section 7). The Compression Residue may be empty. Both the | |||
| the Rule ID and the Compression Residue potentially have a variable | Rule ID and the Compression Residue potentially have a variable size, | |||
| size, and generally are not a mutiple of bytes in size. | and are not necessarily a multiple of bytes in size. | |||
| | Rule ID + Compression Residue | | |------- Compressed Header -------| | |||
| +---------------------------------+--------------------+ | +---------------------------------+--------------------+ | |||
| | Compressed Header | Payload | | | Rule ID | Compression Residue | Payload | | |||
| +---------------------------------+--------------------+ | +---------------------------------+--------------------+ | |||
| Figure 4: SCHC Packet | Figure 4: SCHC Packet | |||
| 5.2. Functional mapping | 5.2. Functional mapping | |||
| Figure 5 below maps the functional elements of Figure 3 onto the | Figure 5 below maps the functional elements of Figure 3 onto the | |||
| LPWAN architecture elements of Figure 1. | LPWAN architecture elements of Figure 1. | |||
| Dev App | Dev App | |||
| +----------------+ +--------------+ | +----------------+ +----+ +----+ +----+ | |||
| | APP1 APP2 APP3 | |APP1 APP2 APP3| | | App1 App2 App3 | |App1| |App2| |App3| | |||
| | | | | | | | | | | | | | | |||
| | UDP | | UDP | | | UDP | |UDP | |UDP | |UDP | | |||
| | IPv6 | | IPv6 | | | IPv6 | |IPv6| |IPv6| |IPv6| | |||
| | | | | | | | | | | | | | | |||
| |SCHC C/D and F/R| | | | |SCHC C/D and F/R| | | | | | | | |||
| +--------+-------+ +-------+------+ | +--------+-------+ +----+ +----+ +----+ | |||
| | +--+ +----+ +-----------+ . | | +--+ +----+ +----+ +----+ . . . | |||
| +~~ |RG| === |NGW | === | SCHC |... Internet .. | +~ |RG| === |NGW | == |SCHC| == |SCHC|...... Internet .... | |||
| +--+ +----+ |F/R and C/D| | +--+ +----+ |F/R | |C/D | | |||
| +-----------+ | +----+ +----+ | |||
| Figure 5: Architecture | Figure 5: Architecture | |||
| SCHC C/D and SCHC F/R are located on both sides of the LPWAN | SCHC C/D and SCHC F/R are located on both sides of the LPWAN | |||
| transmission, i.e. on the Dev side and on the Network side. | transmission, i.e. on the Dev side and on the Network side. | |||
| The operation in the Uplink direction is as follows. The Device | The operation in the Uplink direction is as follows. The Device | |||
| application uses IPv6 or IPv6/UDP protocols. Before sending the | application uses IPv6 or IPv6/UDP protocols. Before sending the | |||
| packets, the Dev compresses their headers using SCHC C/D and, if the | packets, the Dev compresses their headers using SCHC C/D and, if the | |||
| SCHC Packet resulting from the compression needs to be fragmented by | SCHC Packet resulting from the compression needs to be fragmented by | |||
| SCHC, SCHC F/R is performed (see Section 8). The resulting SCHC | SCHC, SCHC F/R is performed (see Section 8). The resulting SCHC | |||
| Fragments are sent to an LPWAN Radio Gateway (RG) which forwards them | Fragments are sent to an LPWAN Radio Gateway (RG) which forwards them | |||
| to a Network Gateway (NGW). The NGW sends the data to a SCHC F/R for | to a Network Gateway (NGW). The NGW sends the data to a SCHC F/R for | |||
| re-assembly (if needed) and then to the SCHC C/D for decompression. | re-assembly (if needed) and then to the SCHC C/D for decompression. | |||
| After decompression, the packet can be sent over the Internet to one | After decompression, the packet can be sent over the Internet to one | |||
| or several LPWAN Application Servers (App). | or several LPWAN Application Servers (App). | |||
| The SCHC F/R and C/D on the Network side can be located in the NGW, | The SCHC F/R and C/D on the Network side can be located in the NGW, | |||
| or somewhere else as long as a tunnel is established between them and | or somewhere else as long as a tunnel is established between them and | |||
| the NGW. Note that, for some LPWAN technologies, it MAY be suitable | the NGW. For some LPWAN technologies, it MAY be suitable to locate | |||
| to locate the SCHC F/R functionality nearer the NGW, in order to | the SCHC F/R functionality nearer the NGW, in order to better deal | |||
| better deal with time constraints of such technologies. | with time constraints of such technologies. | |||
| The SCHC C/D and F/R on both sides MUST share the same set of Rules. | The SCHC C/Ds on both sides MUST share the same set of Rules. So do | |||
| the SCHC F/Rs on both sides. | ||||
| The SCHC C/D and F/R process is symmetrical, therefore the | The SCHC C/D and F/R process is symmetrical, therefore the | |||
| description of the Downlink direction is symmetrical to the one | description of the Downlink direction is symmetrical to the one | |||
| above. | above. | |||
| 6. Rule ID | 6. Rule ID | |||
| Rule IDs are identifiers used to select the correct context either | Rule IDs are identifiers used for Compression/Decompression or for | |||
| for Compression/Decompression or for Fragmentation/Reassembly. | Fragmentation/Reassembly. | |||
| The size of the Rule IDs is not specified in this document, as it is | The size of the Rule IDs is not specified in this document, as it is | |||
| implementation-specific and can vary according to the LPWAN | implementation-specific and can vary according to the LPWAN | |||
| technology and the number of Rules, among others. It is defined in | technology and the number of Rules, among others. It is defined in | |||
| Profiles. | Profiles. | |||
| The Rule IDs are used: | The Rule IDs are used: | |||
| o In the SCHC C/D context, to identify the Rule (i.e., the set of | o For SCHC C/D, to identify the Rule (i.e., the set of Field | |||
| Field Descriptions) that is used to compress a packet header. | Descriptions) that is used to compress a packet header. | |||
| o At least one Rule ID MAY be allocated to tagging packets for which | * At least one Rule ID MAY be allocated to tagging packets for | |||
| SCHC compression was not possible (no matching Rule was found). | which SCHC compression was not possible (no matching Rule was | |||
| found). | ||||
| o In SCHC F/R, to identify the specific modes and settings of SCHC | o In SCHC F/R, to identify the specific mode and settings of F/R for | |||
| Fragments being transmitted, and to identify the SCHC ACKs, | one direction of traffic (Up or Dw). | |||
| including their modes and settings. Note that when F/R is used | ||||
| for both communication directions, at least two Rule ID values are | * When F/R is used for both communication directions, at least | |||
| therefore needed for F/R. | two Rule ID values are needed for F/R, one per direction of | |||
| traffic. | ||||
| 7. Compression/Decompression | 7. Compression/Decompression | |||
| Compression with SCHC is based on using context, i.e. a set of Rules | Compression with SCHC is based on using a set of Rules, called the | |||
| to compress or decompress headers. SCHC avoids context | Context, to compress or decompress headers. SCHC avoids Context | |||
| synchronization, which consumes considerable bandwidth in other | synchronization, which consumes considerable bandwidth in other | |||
| header compression mechanisms such as RoHC [RFC5795]. Since the | header compression mechanisms such as RoHC [RFC5795]. Since the | |||
| content of packets is highly predictable in LPWAN networks, static | content of packets is highly predictable in LPWAN networks, static | |||
| contexts MAY be stored beforehand to omit transmitting some | Contexts MAY be stored beforehand to omit transmitting some | |||
| information over the air. The contexts MUST be stored at both ends, | information over the air. The Contexts MUST be stored at both ends, | |||
| and they can be learned by a provisioning protocol or by out of band | and they can be learned by a provisioning protocol or by out of band | |||
| means, or they can be pre-provisioned. The way the contexts are | means, or they can be pre-provisioned. The way the Contexts are | |||
| provisioned is out of the scope of this document. | provisioned is out of the scope of this document. | |||
| 7.1. SCHC C/D Rules | 7.1. SCHC C/D Rules | |||
| The main idea of the SCHC compression scheme is to transmit the Rule | The main idea of the SCHC compression scheme is to transmit the Rule | |||
| ID to the other end instead of sending known field values. This Rule | ID to the other end instead of sending known field values. This Rule | |||
| ID identifies a Rule that provides the closest match to the original | ID identifies a Rule that matches the original packet values. Hence, | |||
| packet values. Hence, when a value is known by both ends, it is only | when a value is known by both ends, it is only necessary to send the | |||
| necessary to send the corresponding Rule ID over the LPWAN network. | corresponding Rule ID over the LPWAN network. The manner by which | |||
| The manner by which Rules are generated is out of the scope of this | Rules are generated is out of the scope of this document. The Rules | |||
| document. The Rules MAY be changed at run-time but the mechanism is | MAY be changed at run-time but the mechanism is out of scope of this | |||
| out of scope of this document. | document. | |||
| The context contains a list of Rules (see Figure 6). Each Rule | The Context is a set of Rules. See Figure 6 for a high level, | |||
| itself contains a list of Field Descriptions composed of a Field | abstract representation of the Context. The formal specification of | |||
| Identifier (FID), a Field Length (FL), a Field Position (FP), a | the representation of the Rules is outside the scope of this | |||
| document. | ||||
| Each Rule itself contains a list of Field Descriptions composed of a | ||||
| Field Identifier (FID), a Field Length (FL), a Field Position (FP), a | ||||
| Direction Indicator (DI), a Target Value (TV), a Matching Operator | Direction Indicator (DI), a Target Value (TV), a Matching Operator | |||
| (MO) and a Compression/Decompression Action (CDA). | (MO) and a Compression/Decompression Action (CDA). | |||
| /-----------------------------------------------------------------\ | /-----------------------------------------------------------------\ | |||
| | Rule N | | | Rule N | | |||
| /-----------------------------------------------------------------\| | /-----------------------------------------------------------------\| | |||
| | Rule i || | | Rule i || | |||
| /-----------------------------------------------------------------\|| | /-----------------------------------------------------------------\|| | |||
| | (FID) Rule 1 ||| | | (FID) Rule 1 ||| | |||
| |+-------+--+--+--+------------+-----------------+---------------+||| | |+-------+--+--+--+------------+-----------------+---------------+||| | |||
| skipping to change at page 13, line 31 ¶ | skipping to change at page 13, line 25 ¶ | |||
| |+-------+--+--+--+------------+-----------------+---------------+||| | |+-------+--+--+--+------------+-----------------+---------------+||| | |||
| ||... |..|..|..| ... | ... | ... |||| | ||... |..|..|..| ... | ... | ... |||| | |||
| |+-------+--+--+--+------------+-----------------+---------------+||/ | |+-------+--+--+--+------------+-----------------+---------------+||/ | |||
| ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| | ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| | |||
| |+-------+--+--+--+------------+-----------------+---------------+|/ | |+-------+--+--+--+------------+-----------------+---------------+|/ | |||
| | | | | | | |||
| \-----------------------------------------------------------------/ | \-----------------------------------------------------------------/ | |||
| Figure 6: A Compression/Decompression Context | Figure 6: A Compression/Decompression Context | |||
| A Rule does not describe how to parse a packet header to find each | A Rule does not describe how the compressor parses a packet header to | |||
| field. This MUST be known from the compressor/decompressor. Rules | find and identify each field (e.g. the IPv6 Source Address, the UDP | |||
| only describe the compression/decompression behavior for each header | Destination Port or a CoAP URI path option). This MUST be known from | |||
| field. In a Rule, the Field Descriptions are listed in the order in | the compressor/decompressor. Rules only describe the compression/ | |||
| which the fields appear in the packet header. | decompression behavior for each header field. The header fields must | |||
| have been identified by the compressor prior to testing for a Rule | ||||
| A Rule also describes what is sent in the Compression Residue. The | match. | |||
| Compression Residue is assembled by concatenating the residues for | ||||
| each field, in the order the Field Descriptions appear in the Rule. | ||||
| The Context describes the header fields and its values with the | In a Rule, the Field Descriptions are listed in the order in which | |||
| following entries: | the fields appear in the packet header. The Field Descriptions | |||
| describe the header fields with the following entries: | ||||
| o Field ID (FID) is a unique value to define the header field. | o Field ID (FID) designates a protocol and field (e.g. UDP | |||
| Destination Port), unambiguously among all protocols that a SCHC | ||||
| compressor processes. | ||||
| o Field Length (FL) represents the length of the field. It can be | o Field Length (FL) represents the length of the field. It can be | |||
| either a fixed value (in bits) if the length is known when the | either a fixed value (in bits) if the length is known when the | |||
| Rule is created or a type if the length is variable. The length | Rule is created or a type if the length is variable. The length | |||
| of a header field is defined in the corresponding protocol | of a header field is defined by its own protocol specification | |||
| specification. The type defines the process to compute the | (e.g. IPv6 or UDP). If the length is variable, the type defines | |||
| length, its unit (bits, bytes,...) and the value to be sent before | the process to compute the length and its unit (bits, bytes...). | |||
| the Compression Residue. | ||||
| o Field Position (FP): most often, a field only occurs once in a | o Field Position (FP): most often, a field only occurs once in a | |||
| packet header. Some fields may occur multiple times in a header. | packet header. Some fields may occur multiple times in a header. | |||
| FP indicates which occurrence this Field Description applies to. | FP indicates which occurrence this Field Description applies to. | |||
| The default value is 1 (first occurence). | The default value is 1 (first occurrence). | |||
| o A Direction Indicator (DI) indicates the packet direction(s) this | o A Direction Indicator (DI) indicates the packet direction(s) this | |||
| Field Description applies to. Three values are possible: | Field Description applies to. Three values are possible: | |||
| * UPLINK (Up): this Field Description is only applicable to | * UPLINK (Up): this Field Description is only applicable to | |||
| packets sent by the Dev to the App, | packets sent by the Dev to the App, | |||
| * DOWNLINK (Dw): this Field Description is only applicable to | * DOWNLINK (Dw): this Field Description is only applicable to | |||
| packets sent from the App to the Dev, | packets sent from the App to the Dev, | |||
| * BIDIRECTIONAL (Bi): this Field Description is applicable to | * BIDIRECTIONAL (Bi): this Field Description is applicable to | |||
| packets travelling both Up and Dw. | packets traveling both Up and Dw. | |||
| o Target Value (TV) is the value used to match against the packet | o Target Value (TV) is the value used to match against the packet | |||
| header field. The Target Value can be of any type (integer, | header field. The Target Value can be a scalar value of any type | |||
| strings, etc.). It can be a single value or a more complex | (integer, strings, etc.) or a more complex structure (array, list, | |||
| structure (array, list, etc.), such as a JSON or a CBOR structure. | etc.). The types and representations are out of scope for this | |||
| document. | ||||
| o Matching Operator (MO) is the operator used to match the Field | o Matching Operator (MO) is the operator used to match the Field | |||
| Value and the Target Value. The Matching Operator may require | Value and the Target Value. The Matching Operator may require | |||
| some parameters. MO is only used during the compression phase. | some parameters. MO is only used during the compression phase. | |||
| The set of MOs defined in this document can be found in | The set of MOs defined in this document can be found in | |||
| Section 7.4. | Section 7.4. | |||
| o Compression Decompression Action (CDA) describes the compression | o Compression Decompression Action (CDA) describes the compression | |||
| and decompression processes to be performed after the MO is | and decompression processes to be performed after the MO is | |||
| applied. Some CDAs MAY require parameter values for their | applied. Some CDAs might use parameter values for their | |||
| operation. CDAs are used in both the compression and the | operation. CDAs are used in both the compression and the | |||
| decompression functions. The set of CDAs defined in this document | decompression functions. The set of CDAs defined in this document | |||
| can be found in Section 7.5. | can be found in Section 7.5. | |||
| 7.2. Rule ID for SCHC C/D | 7.2. Rule ID for SCHC C/D | |||
| Rule IDs are sent by the compression function in one side and are | Rule IDs are sent by the compression function in one side and are | |||
| received for the decompression function in the other side. In SCHC | received for the decompression function in the other side. In SCHC | |||
| C/D, the Rule IDs are specific to a Dev. Hence, multiple Dev | C/D, the Rule IDs are specific to the Context related to one Dev. | |||
| instances MAY use the same Rule ID to define different header | Hence, multiple Dev instances, which refer to different header | |||
| compression contexts. To identify the correct Rule ID, the SCHC C/D | compression Contexts, MAY reuse the same Rule ID for different Rules. | |||
| needs to associate the Rule ID with the Dev identifier to find the | On the network side, in order to identify the correct Rule to be | |||
| appropriate Rule to be applied. | applied, the SCHC Decompressor needs to associate the Rule ID with | |||
| the Dev identifier. Similarly, the SCHC Compressor on the network | ||||
| side first identifies the destination Dev before looking for the | ||||
| appropriate compression Rule (and associated Rule ID) in the Context | ||||
| of that Dev. | ||||
| 7.3. Packet processing | 7.3. 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(s) | o Compression Rule selection: the set of Rules is browsed to | |||
| will be used to compress the packet's headers. When performing | identify which Rule will be used to compress the packet header. | |||
| decompression, on the network side the SCHC C/D needs to find the | The Rule is selected by matching the Fields Descriptions to the | |||
| correct Rule based on the L2 address; in this way, it can use the | packet header. The detailed steps are the following: | |||
| DevIID and the Rule ID. On the Dev side, only the Rule ID is | ||||
| needed to identify the correct Rule since the Dev typically only | ||||
| holds Rules that apply to itself. The Rule will be selected by | ||||
| matching the Fields Descriptions to the packet header as described | ||||
| below. When the selection of a Rule is done, this Rule is used to | ||||
| compress the header. The detailed steps for compression Rule | ||||
| selection are the following: | ||||
| * The first step is to choose the Field Descriptions by their | * The first step is to check the Field Identifiers (FID). If any | |||
| direction, using the Direction Indicator (DI). A Field | header field of the packet being examined cannot be matched | |||
| Description that does not correspond to the appropriate DI will | with a Field Description with the correct FID, the Rule MUST be | |||
| be ignored. If all the fields of the packet do not have a | disregarded. If any Field Description in the Rule has a FID | |||
| Field Description with the correct DI, the Rule is discarded | that cannot be matched to one of the header fields of the | |||
| and SCHC C/D proceeds to consider the next Rule. | packet being examined, the Rule MUST be disregarded. | |||
| * When the DI has matched, then the next step is to identify the | * The next step is to match the Field Descriptions by their | |||
| fields according to Field Position (FP). If FP does not | direction, using the Direction Indicator (DI). If any field of | |||
| correspond, the Rule is not used and the SCHC C/D proceeds to | the packet header cannot be matched with a Field Description | |||
| consider the next Rule. | with the correct FID and DI, the Rule MUST be disregarded. | |||
| * Once the DI and the FP correspond to the header information, | * Then the Field Descriptions are further selected according to | |||
| each packet field's value is then compared to the corresponding | Field Position (FP). If any field of the packet header cannot | |||
| Target Value (TV) stored in the Rule for that specific field | be matched with a Field Description with the correct FID, DI | |||
| using the matching operator (MO). | and FP, the Rule MUST be disregarded. | |||
| If all the fields in the packet's header satisfy all the | * Once each header field has been associated with a Field | |||
| matching operators (MO) of a Rule (i.e. all MO results are | Description with matching FID, DI and FP, each packet field's | |||
| True), the fields of the header are then compressed according | value is then compared to the corresponding Target Value (TV) | |||
| to the Compression/Decompression Actions (CDAs) and a | stored in the Rule for that specific field, using the matching | |||
| compressed header (with possibly a Compression Residue) SHOULD | operator (MO). If every field in the packet header satisfies | |||
| be obtained. Otherwise, the next Rule is tested. | the corresponding matching operators (MO) of a Rule (i.e. all | |||
| MO results are True), that Rule is used for compressing the | ||||
| header. Otherwise, the Rule MUST be disregarded. | ||||
| * If no eligible compression Rule is found, then the header MUST | * If no eligible compression Rule is found, then the header MUST | |||
| be sent without compression, using a Rule ID dedicated to this | be sent in its entirety using a Rule ID dedicated to this | |||
| purpose. Sending the header uncompressed but may require the | purpose. Sending an uncompressed header may require SCHC F/R. | |||
| use of the SCHC F/R process. | ||||
| o Compression: each field of the header is compressed according to | ||||
| the Compression/Decompression Actions (CDAs). The fields are | ||||
| compressed in the order that the Field Descriptions appear in the | ||||
| Rule. The compression of each field results in a residue, which | ||||
| may be empty. The Compression Residue for the packet header is | ||||
| the concatenation of the non-empty residues for each field of the | ||||
| header, in the order the Field Descriptions appear in the Rule. | ||||
| |------------------- Compression Residue -------------------| | ||||
| +-----------------+-----------------+-----+-----------------+ | ||||
| | field 1 residue | field 2 residue | ... | field N residue | | ||||
| +-----------------+-----------------+-----+-----------------+ | ||||
| Figure 7: Compression Residue structure | ||||
| o Sending: The Rule ID is sent to the other end followed by the | o Sending: The Rule ID is sent to the other end followed by the | |||
| Compression Residue (which could be empty) or the uncompressed | Compression Residue (which could be empty) or the uncompressed | |||
| header, and directly followed by the payload. The Compression | header, and directly followed by the payload (see Figure 4). The | |||
| Residue is the concatenation of the Compression Residues for each | way the Rule ID is sent will be specified in the Profile and is | |||
| field according to the CDAs for that Rule. The way the Rule ID is | out of the scope of the present document. For example, it could | |||
| sent depends on the Profile. For example, it can be either | be included in an L2 header or sent as part of the L2 payload. | |||
| included in an L2 header or sent in the first byte of the L2 | ||||
| payload. (see Figure 4). This process will be specified in the | ||||
| Profile and is out of the scope of the present document. On LPWAN | ||||
| technologies that are byte-oriented, the compressed header | ||||
| concatenated with the original packet payload is padded to a | ||||
| multiple of 8 bits, if needed. See Section 9 for details. | ||||
| o Decompression: When doing decompression, on the network side the | o Decompression: when decompressing, on the network side the SCHC C/ | |||
| SCHC C/D needs to find the correct Rule based on the L2 address | D needs to find the correct Rule based on the L2 address; in this | |||
| and in this way, it can use the DevIID and the Rule ID. On the | way, it can use the DevIID and the Rule ID. On the Dev side, only | |||
| Dev side, only the Rule ID is needed to identify the correct Rule | the Rule ID is needed to identify the correct Rule since the Dev | |||
| since the Dev only holds Rules that apply to itself. | typically only holds Rules that apply to itself. | |||
| The receiver identifies the sender through its device-id or source | The receiver identifies the sender through its device-id or source | |||
| identifier (e.g. MAC address, if it exists) and selects the Rule | identifier (e.g. MAC address, if it exists) and selects the Rule | |||
| using the Rule ID. This Rule describes the compressed header | using the Rule ID. This Rule describes the compressed header | |||
| format and associates the received Compression Residue to each of | format and associates the received residues to each of the header | |||
| the header fields. For each field in the header, the receiver | fields. For each field in the header, the receiver applies the | |||
| applies the CDA action associated to that field in order to | CDA action associated to that field in order to reconstruct the | |||
| reconstruct the original header field value. The CDA application | original header field value. The CDA application order can be | |||
| order can be different from the order in which the fields are | different from the order in which the fields are listed in the | |||
| listed in the Rule. In particular, Compute-* MUST be applied | Rule. In particular, Compute-* MUST be applied after the | |||
| after the application of the CDAs of all the fields it computes | application of the CDAs of all the fields it computes on. | |||
| on. | ||||
| 7.4. Matching operators | 7.4. Matching operators | |||
| Matching Operators (MOs) are functions used by both SCHC C/D | Matching Operators (MOs) are functions used by both SCHC C/D | |||
| endpoints involved in the header compression/decompression. They are | endpoints. They are not typed and can be applied to integer, string | |||
| not typed and can be applied to integer, string or any other data | or any other data type. The result of the operation can either be | |||
| type. The result of the operation can either be True or False. MOs | True or False. MOs are defined as follows: | |||
| are defined as follows: | ||||
| o equal: The match result is True if the field value in the packet | o equal: The match result is True if the field value in the packet | |||
| matches the TV. | matches the TV. | |||
| o ignore: No check is done between the field value in the packet and | o ignore: No matching is attempted between the field value in the | |||
| the TV in the Rule. The result of the matching is always true. | packet and the TV in the Rule. The result is always true. | |||
| o MSB(x): A match is obtained if the most significant x bits of the | o MSB(x): A match is obtained if the most significant x bits of the | |||
| packet header field value are equal to the TV in the Rule. The x | packet header field value are equal to the TV in the Rule. The x | |||
| parameter of the MSB MO indicates how many bits are involved in | parameter of the MSB MO indicates how many bits are involved in | |||
| the comparison. If the FL is described as variable, the length | the comparison. If the FL is described as variable, the length | |||
| must be a multiple of the unit. For example, x must be multiple | must be a multiple of the unit. For example, x must be multiple | |||
| of 8 if the unit of the variable length is in bytes. | of 8 if the unit of the variable length is in bytes. | |||
| o match-mapping: With match-mapping, the Target Value is a list of | o match-mapping: With match-mapping, the Target Value is a list of | |||
| values. Each value of the list is identified by a short ID (or | values. Each value of the list is identified by a short ID (or | |||
| index). Compression is achieved by sending the index instead of | index). Compression is achieved by sending the index instead of | |||
| the original header field value. This operator matches if the | the original header field value. This operator matches if the | |||
| header field value is equal to one of the values in the target | header field value is equal to one of the values in the target | |||
| list. | list. | |||
| 7.5. Compression Decompression Actions (CDA) | 7.5. Compression Decompression Actions (CDA) | |||
| The Compression Decompression Action (CDA) describes the actions | The Compression Decompression Action (CDA) describes the actions | |||
| taken during the compression of headers fields, and inversely, the | taken during the compression of headers fields and the inverse action | |||
| action taken by the decompressor to restore the original value. | taken by the decompressor to restore the original value. | |||
| /--------------------+-------------+----------------------------\ | /--------------------+-------------+----------------------------\ | |||
| | Action | Compression | Decompression | | | Action | Compression | Decompression | | |||
| | | | | | | | | | | |||
| +--------------------+-------------+----------------------------+ | +--------------------+-------------+----------------------------+ | |||
| |not-sent |elided |use value stored in context | | |not-sent |elided |use value stored in Context | | |||
| |value-sent |send |build from received value | | |value-sent |send |build from received value | | |||
| |mapping-sent |send index |value from index on a table | | |mapping-sent |send index |value from index on a table | | |||
| |LSB |send LSB |TV, received value | | |LSB |send LSB |TV, received value | | |||
| |compute-length |elided |compute length | | |compute-length |elided |compute length | | |||
| |compute-checksum |elided |compute UDP checksum | | |compute-checksum |elided |compute UDP checksum | | |||
| |DevIID |elided |build IID from L2 Dev addr | | |DevIID |elided |build IID from L2 Dev addr | | |||
| |AppIID |elided |build IID from L2 App addr | | |AppIID |elided |build IID from L2 App addr | | |||
| \--------------------+-------------+----------------------------/ | \--------------------+-------------+----------------------------/ | |||
| Figure 7: Compression and Decompression Actions | Figure 8: Compression and Decompression Actions | |||
| Figure 7 summarizes the basic actions that can be used to compress | Figure 8 summarizes the basic actions that can be used to compress | |||
| and decompress a field. The first column shows the action's name. | and decompress a field. The first column shows the action's name. | |||
| The second and third columns show the reciprocal compression/ | The second and third columns show the compression and decompression | |||
| decompression behavior for each action. | behaviors for each action. | |||
| Compression is done in the order that the Field Descriptions appear | 7.5.1. processing fixed-length fields | |||
| in a Rule. The result of each Compression/Decompression Action is | ||||
| appended to the accumulated Compression Residue in that same order. | ||||
| The receiver knows the size of each compressed field, which can be | ||||
| given by the Rule or MAY be sent with the compressed header. | ||||
| 7.5.1. processing variable-length fields | If the field is identified in the Field Description as being of fixed | |||
| length, then aplying the CDA to compress this field results in a | ||||
| fixed amount of bits. The residue for that field is simply the bits | ||||
| resulting from applying the CDA to the field. This value may be | ||||
| empty (e.g. not-sent CDA), in which case the field residue is absent | ||||
| from the Compression Residue. | ||||
| |- field residue -| | ||||
| +-----------------+ | ||||
| | value | | ||||
| +-----------------+ | ||||
| Figure 9: fixed sized field residue structure | ||||
| 7.5.2. processing variable-length fields | ||||
| If the field is identified in the Field Description as being of | If the field is identified in the Field Description as being of | |||
| variable size, then the size of the Compression Residue value (using | variable length, then aplying the CDA to compress this field may | |||
| the unit defined in the FL) MUST first be sent as follows: | result in a value of fixed size (e.g. not-sent or mapping-sent) or of | |||
| variable size (e.g. value-sent or LSB). In the latter case, the | ||||
| residue for that field is the bits that result from applying the CDA | ||||
| to the field, preceded with the size of the value. | ||||
| |--- field residue ---| | ||||
| +-------+-------------+ | ||||
| | size | value | | ||||
| +-------+-------------+ | ||||
| Figure 10: variable sized field residue structure | ||||
| The size (using the unit defined in the FL) is encoded as follows: | ||||
| o If the size is between 0 and 14, it is sent as a 4-bits unsigned | o If the size is between 0 and 14, it is sent as a 4-bits unsigned | |||
| integer. | integer. | |||
| o For values between 15 and 254, 0b1111 is transmitted and then the | o For values between 15 and 254, 0b1111 is transmitted and then the | |||
| size is sent as an 8 bits unsigned integer. | size is sent as an 8 bits unsigned integer. | |||
| o For larger values of the size, 0xfff is transmitted and then the | o For larger values of the size, 0xfff is transmitted and then the | |||
| next two bytes contain the size value as a 16 bits unsigned | next two bytes contain the size value as a 16 bits unsigned | |||
| integer. | integer. | |||
| If a field is not present in the packet but exists in the Rule and | If the field is identified in the Field Description as being of | |||
| its FL is specified as being variable, size 0 MUST be sent to denote | variable length and this field is not present in the packet header | |||
| its absence. | being compressed, size 0 MUST be sent to denote its absence. | |||
| 7.5.2. not-sent CDA | 7.5.3. not-sent CDA | |||
| The not-sent action is generally used when the field value is | The not-sent action can be used when the field value is specified in | |||
| specified in a Rule and therefore known by both the Compressor and | a Rule and therefore known by both the Compressor and the | |||
| the Decompressor. This action SHOULD be used with the "equal" MO. | Decompressor. This action SHOULD be used with the "equal" MO. If MO | |||
| If MO is "ignore", there is a risk to have a decompressed field value | is "ignore", there is a risk to have a decompressed field value | |||
| different from the original field that was compressed. | different from the original field that was compressed. | |||
| The compressor does not send any Compression Residue for a field on | The compressor does not send any residue for a field on which not- | |||
| which not-sent compression is applied. | sent compression is applied. | |||
| The decompressor restores the field value with the Target Value | The decompressor restores the field value with the Target Value | |||
| stored in the matched Rule identified by the received Rule ID. | stored in the matched Rule identified by the received Rule ID. | |||
| 7.5.3. value-sent CDA | 7.5.4. value-sent CDA | |||
| The value-sent action is generally used when the field value is not | The value-sent action can be used when the field value is not known | |||
| known by both the Compressor and the Decompressor. The value is sent | by both the Compressor and the Decompressor. The value is sent in | |||
| as a residue in the compressed message header. Both Compressor and | its entirety. | |||
| Decompressor MUST know the size of the field, either implicitly (the | ||||
| size is known by both sides) or by explicitly indicating the length | ||||
| in the Compression Residue, as defined in Section 7.5.1. This action | ||||
| is generally used with the "ignore" MO. | ||||
| 7.5.4. mapping-sent CDA | If this action is performed on a variable length field, the size of | |||
| the residue value (using the units defined in FL) MUST be sent as | ||||
| described in Section 7.5.2. | ||||
| This action is generally used with the "ignore" MO. | ||||
| 7.5.5. mapping-sent CDA | ||||
| The mapping-sent action is used to send an index (the index into the | The mapping-sent action is used to send an index (the index into the | |||
| Target Value list of values) instead of the original value. This | Target Value list of values) instead of the original value. This | |||
| action is used together with the "match-mapping" MO. | action is used together with the "match-mapping" MO. | |||
| On the compressor side, the match-mapping Matching Operator searches | On the compressor side, the match-mapping Matching Operator searches | |||
| the TV for a match with the header field value and the mapping-sent | the TV for a match with the header field value and the mapping-sent | |||
| CDA appends the corresponding index to the Compression Residue to be | CDA sends the corresponding index as the field residue. On the | |||
| sent. On the decompressor side, the CDA uses the received index to | decompressor side, the CDA uses the received index to restore the | |||
| restore the field value by looking up the list in the TV. | field value by looking up the list in the TV. | |||
| The number of bits sent is the minimal size for coding all the | The number of bits sent is the minimal size for coding all the | |||
| possible indices. | possible indices. | |||
| 7.5.5. LSB CDA | 7.5.6. LSB CDA | |||
| The LSB action is used together with the "MSB(x)" MO to avoid sending | The LSB action is used together with the "MSB(x)" MO to avoid sending | |||
| the most significant part of the packet field if that part is already | the most significant part of the packet field if that part is already | |||
| known by the receiving end. The number of bits sent is the original | known by the receiving end. | |||
| header field length minus the length specified in the MSB(x) MO. | ||||
| The compressor sends the Least Significant Bits (e.g. LSB of the | The compressor sends the Least Significant Bits as the field residue | |||
| length field). The decompressor concatenates the x most significant | value. The number of bits sent is the original header field length | |||
| bits of Target Value and the received residue. | minus the length specified in the MSB(x) MO. | |||
| If this action needs to be done on a variable length field, the size | The decompressor concatenates the x most significant bits of Target | |||
| of the Compression Residue in bytes MUST be sent as described in | Value and the received residue value. | |||
| Section 7.5.1. | ||||
| 7.5.6. DevIID, AppIID CDA | If this action is performed on a variable length field, the size of | |||
| the residue value (using the units defined in FL) MUST be sent as | ||||
| described in Section 7.5.2. | ||||
| 7.5.7. DevIID, AppIID CDA | ||||
| These actions are used to process respectively the Dev and the App | These actions are used to process respectively the Dev and the App | |||
| Interface Identifiers (DevIID and AppIID) of the IPv6 addresses. | Interface Identifiers (DevIID and AppIID) of the IPv6 addresses. | |||
| AppIID CDA is less common since most current LPWAN technologies | AppIID CDA is less common since most current LPWAN technologies | |||
| frames contain a single L2 address, which is the Dev's address. | frames contain a single L2 address, which is the Dev's address. | |||
| The IID value MAY be computed from the Device ID present in the L2 | The IID value MAY be computed from the Device ID present in the L2 | |||
| header, or from some other stable identifier. The computation is | header, or from some other stable identifier. The computation is | |||
| specific to each Profile and MAY depend on the Device ID size. | specific to each Profile and MAY depend on the Device ID size. | |||
| In the downlink direction (Dw), at the compressor, the DevIID CDA may | In the downlink direction (Dw), at the compressor, the DevIID CDA may | |||
| be used to generate the L2 addresses on the LPWAN, based on the | be used to generate the L2 addresses on the LPWAN, based on the | |||
| packet's Destination Address. | packet's Destination Address. | |||
| 7.5.7. Compute-* | 7.5.8. Compute-* | |||
| Some fields may be elided during compression and reconstructed during | Some fields may be elided during compression and reconstructed during | |||
| decompression. This is the case for length and checksum, so: | decompression. This is the case for length and checksum, so: | |||
| o compute-length: computes the length assigned to this field. This | o compute-length: computes the length assigned to this field. This | |||
| CDA MAY be used to compute IPv6 length or UDP length. | CDA MAY be used to compute IPv6 length or UDP length. | |||
| o compute-checksum: computes a checksum from the information already | o compute-checksum: computes a checksum from the information already | |||
| received by the SCHC C/D. This field MAY be used to compute UDP | received by the SCHC C/D. This field MAY be used to compute UDP | |||
| checksum. | checksum. | |||
| 8. Fragmentation/Reassembly | 8. Fragmentation/Reassembly | |||
| 8.1. Overview | 8.1. Overview | |||
| In LPWAN technologies, the L2 MTU typically ranges from tens to | In LPWAN technologies, the L2 MTU typically ranges from tens to | |||
| hundreds of bytes. Some of these technologies do not have an | hundreds of bytes. Some of these technologies do not have an | |||
| internal fragmentation/reassembly mechanism. | internal fragmentation/reassembly mechanism. | |||
| The SCHC Fragmentation/Reassembly (SCHC F/R) functionality is offered | The optional SCHC Fragmentation/Reassembly (SCHC F/R) functionality | |||
| as an option for such LPWAN technologies to cope with the IPv6 MTU | enables such LPWAN technologies to comply with the IPv6 MTU | |||
| requirement of 1280 bytes [RFC8200]. It is optional to implement. | requirement of 1280 bytes [RFC8200]. It is optional to implement. | |||
| If it is not needed, its description can be safely ignored. | If it is not needed, its description can be safely ignored. | |||
| This specification includes several SCHC F/R modes, which allow for a | This specification includes several SCHC F/R modes, which allow for a | |||
| range of reliability options such as optional SCHC Fragment | range of reliability options such as optional SCHC Fragment | |||
| retransmission. More modes may be defined in the future. | retransmission. More modes may be defined in the future. | |||
| The same SCHC F/R mode MUST be used for all SCHC Fragments of the | The same SCHC F/R mode MUST be used for all SCHC Fragments of a SCHC | |||
| same fragmented SCHC Packet. This document does not make any | Packet. This document does not specify which mode(s) are to be used | |||
| decision with regard to which mode(s) will be used over a specific | over a specific LPWAN technology. That information will be given in | |||
| LPWAN technology. This will be defined in Profiles. | Profiles. | |||
| SCHC F/R uses the knowledge of the L2 Word size (see Section 4) to | The L2 Word size (see Section 4) determines the encoding of some | |||
| encode some messages. Therefore, SCHC MUST know the L2 Word size. | messages. SCHC F/R usually generates SCHC Fragments and SCHC ACKs | |||
| SCHC F/R usually generates SCHC Fragments and SCHC ACKs that are | that are multiples of L2 Words. | |||
| multiples of L2 Words. The padding overhead is kept to the absolute | ||||
| minimum (see Section 9). | ||||
| 8.2. SCHC F/R Tools | 8.2. SCHC F/R Protocol Elements | |||
| This subsection describes the different tools that are used to enable | This subsection describes the different elements that are used to | |||
| the SCHC F/R functionality defined in this document. These tools | enable the SCHC F/R functionality defined in this document. These | |||
| include the SCHC F/R messages, tiles, windows, counters, timers and | elements include the SCHC F/R messages, tiles, windows, bitmaps, | |||
| header fields. | counters, timers and header fields. | |||
| The tools are described here in a generic manner. Their application | The elements are described here in a generic manner. Their | |||
| to each SCHC F/R mode is found in Section 8.4. | application to each SCHC F/R mode is found in Section 8.4. | |||
| 8.2.1. Messages | 8.2.1. Messages | |||
| The messages that can be used by SCHC F/R are the following: | SCHC F/R defines the following messages: | |||
| o SCHC Fragment: A data unit that carries a piece of a SCHC Packet | o SCHC Fragment: A message that carries part of a SCHC Packet from | |||
| from the sender to the receiver. | the sender to the receiver. | |||
| o SCHC ACK: An acknowledgement for fragmentation, by the receiver to | o SCHC ACK: An acknowledgement for fragmentation, by the receiver to | |||
| the sender. This message is used to report on the successful | the sender. This message is used to indicate whether or not the | |||
| reception of pieces of, or the whole of the fragmented SCHC | reception of pieces of, or the whole of the fragmented SCHC | |||
| Packet. | Packet, was successful. | |||
| o SCHC ACK REQ: An explicit request for a SCHC ACK. By the sender | o SCHC ACK REQ: A request by the sender for a SCHC ACK from the | |||
| to the receiver. | receiver. | |||
| o SCHC Sender-Abort: A message by the sender telling the receiver | o SCHC Sender-Abort: A message by the sender telling the receiver | |||
| that it has aborted the transmission of a fragmented SCHC Packet. | that it has aborted the transmission of a fragmented SCHC Packet. | |||
| o SCHC Receiver-Abort: A message by the receiver to tell the sender | o SCHC Receiver-Abort: A message by the receiver to tell the sender | |||
| to abort the transmission of a fragmented SCHC Packet. | to abort the transmission of a fragmented SCHC Packet. | |||
| 8.2.2. Tiles, Windows, Bitmaps, Timers, Counters | 8.2.2. Tiles, Windows, Bitmaps, Timers, Counters | |||
| 8.2.2.1. Tiles | 8.2.2.1. Tiles | |||
| The SCHC Packet is fragmented into pieces, hereafter called tiles. | The SCHC Packet is fragmented into pieces, hereafter called tiles. | |||
| The tiles MUST be contiguous. | The tiles MUST be non-empty and pairwise disjoint. Their union MUST | |||
| be equal to the SCHC Packet. | ||||
| See Figure 8 for an example. | See Figure 11 for an example. | |||
| SCHC Packet | SCHC Packet | |||
| +----+--+-----+---+----+-+---+---+-----+...-----+----+---+------+ | +----+--+-----+---+----+-+---+---+-----+...-----+----+---+------+ | |||
| Tiles | | | | | | | | | | | | | | | Tiles | | | | | | | | | | | | | | | |||
| +----+--+-----+---+----+-+---+---+-----+...-----+----+---+------+ | +----+--+-----+---+----+-+---+---+-----+...-----+----+---+------+ | |||
| Figure 8: a SCHC Packet fragmented in tiles | Figure 11: a SCHC Packet fragmented in tiles | |||
| Each SCHC Fragment message carries at least one tile in its Payload, | Each SCHC Fragment message carries at least one tile in its Payload, | |||
| if the Payload field is present. | if the Payload field is present. | |||
| 8.2.2.2. Windows | 8.2.2.2. Windows | |||
| Some SCHC F/R modes may handle successive tiles in groups, called | Some SCHC F/R modes may handle successive tiles in groups, called | |||
| windows. | windows. | |||
| If windows are used | If windows are used | |||
| skipping to change at page 22, line 9 ¶ | skipping to change at page 22, line 38 ¶ | |||
| o the windows are numbered. | o the windows are numbered. | |||
| o their numbers MUST increase from 0 upward, from the start of the | o their numbers MUST increase from 0 upward, from the start of the | |||
| SCHC Packet to its end. | SCHC Packet to its end. | |||
| o the last window MUST contain WINDOW_SIZE tiles or less. | o the last window MUST contain WINDOW_SIZE tiles or less. | |||
| o tiles are numbered within each window. | o tiles are numbered within each window. | |||
| o the tile numbers MUST decrement from WINDOW_SIZE - 1 downward, | o the tile indices MUST decrement from WINDOW_SIZE - 1 downward, | |||
| looking from the start of the SCHC Packet toward its end. | looking from the start of the SCHC Packet toward its end. | |||
| o each tile of a SCHC Packet is therefore uniquely identified by a | o each tile of a SCHC Packet is therefore uniquely identified by a | |||
| window number and a tile number within this window. | window number and a tile index within this window. | |||
| See Figure 9 for an example. | See Figure 12 for an example. | |||
| +---------------------------------------------...-------------+ | +---------------------------------------------...-------------+ | |||
| | SCHC Packet | | | SCHC Packet | | |||
| +---------------------------------------------...-------------+ | +---------------------------------------------...-------------+ | |||
| Tile # | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 | 3 | | Tile # | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 | 3 | | |||
| Window # |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|-- 28 -| | Window # |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|-- 28 -| | |||
| Figure 9: a SCHC Packet fragmented in tiles grouped in 28 windows, | Figure 12: a SCHC Packet fragmented in tiles grouped in 28 windows, | |||
| with WINDOW_SIZE = 5 | with WINDOW_SIZE = 5 | |||
| When windows are used | When windows are used | |||
| o information on the correct reception of the tiles belonging to the | o Bitmaps (see Section 8.2.2.3) MAY be sent back by the receiver to | |||
| same window MUST be grouped together. | the sender in a SCHC ACK message. | |||
| o it is RECOMMENDED that this information is kept in Bitmaps. | ||||
| o Bitmaps MAY be sent back to the sender in a SCHC ACK message. | ||||
| o Each window has a Bitmap. | o A Bitmap corresponds to exactly one Window. | |||
| 8.2.2.3. Bitmaps | 8.2.2.3. Bitmaps | |||
| Each bit in the Bitmap for a window corresponds to a tile in the | Each bit in the Bitmap for a window corresponds to a tile in the | |||
| window. Each Bitmap has therefore WINDOW_SIZE bits. The bit at the | window. Each Bitmap has therefore WINDOW_SIZE bits. The bit at the | |||
| left-most position corresponds to the tile numbered WINDOW_SIZE - 1. | left-most position corresponds to the tile numbered WINDOW_SIZE - 1. | |||
| Consecutive bits, going right, correspond to sequentially decreasing | Consecutive bits, going right, correspond to sequentially decreasing | |||
| tile numbers. In Bitmaps for windows that are not the last one of a | tile indices. In Bitmaps for windows that are not the last one of a | |||
| SCHC Packet, the bit at the right-most position corresponds to the | SCHC Packet, the bit at the right-most position corresponds to the | |||
| tile numbered 0. In the Bitmap for the last window, the bit at the | tile numbered 0. In the Bitmap for the last window, the bit at the | |||
| right-most position corresponds either to the tile numbered 0 or to a | right-most position corresponds either to the tile numbered 0 or to a | |||
| tile that is sent/received as "the last one of the SCHC Packet" | tile that is sent/received as "the last one of the SCHC Packet" | |||
| without explicitely stating its number (see Section 8.3.1.2). | without explicitly stating its number (see Section 8.3.1.2). | |||
| At the receiver | At the receiver | |||
| o a bit set to 1 in the Bitmap indicates that a tile associated with | o a bit set to 1 in the Bitmap indicates that a tile associated with | |||
| that bit position has been correctly received for that window. | that bit position has been correctly received for that window. | |||
| o a bit set to 0 in the Bitmap indicates that no tile associated | o a bit set to 0 in the Bitmap indicates that no tile associated | |||
| with that bit position has been correctly received for that | with that bit position has been correctly received for that | |||
| window. | window. | |||
| WINDOW_SIZE finely controls the size of the Bitmap sent in the SCHC | ||||
| ACK message, which may be critical to some LPWAN technologies. | ||||
| 8.2.2.4. Timers and counters | 8.2.2.4. Timers and counters | |||
| Some SCHC F/R modes can use the following timers and counters | Some SCHC F/R modes can use the following timers and counters | |||
| o Inactivity Timer: this timer can be used to unlock a SCHC Fragment | o Inactivity Timer: a SCHC Fragment receiver uses this timer to | |||
| receiver that is not receiving a SCHC F/R message while it is | abort waiting for a SCHC F/R message. | |||
| expecting one. | ||||
| o Retransmission Timer: this timer can be used by a SCHC Fragment | o Retransmission Timer: a SCHC Fragment sender uses this timer to | |||
| sender to set a timeout on expecting a SCHC ACK. | abort waiting for an expected SCHC ACK. | |||
| o Attempts: this counter counts the requests for SCHC ACKs. | o Attempts: this counter counts the requests for SCHC ACKs, up to | |||
| MAX_ACK_REQUESTS is the threshold at which an exception is raised. | MAX_ACK_REQUESTS. | |||
| 8.2.3. Integrity Checking | 8.2.3. Integrity Checking | |||
| The reassembled SCHC Packet is checked for integrity at the receive | The reassembled SCHC Packet MUST be checked for integrity at the | |||
| end. Integrity checking is performed by computing a MIC at the | receive end. By default, integrity checking is performed by | |||
| sender side and transmitting it to the receiver for comparison with | computing a MIC at the sender side and transmitting it to the | |||
| the locally computed MIC. | receiver for comparison with the locally computed MIC. | |||
| The MIC supports UDP checksum elision by SCHC C/D (see | The MIC supports UDP checksum elision by SCHC C/D (see | |||
| Section 10.11). | Section 10.11). | |||
| The CRC32 polynomial 0xEDB88320 (i.e. the reverse representation of | The CRC32 polynomial 0xEDB88320 (i.e. the reverse representation of | |||
| the polynomial used e.g. in the Ethernet standard [RFC3385]) is | the polynomial used e.g. in the Ethernet standard [RFC3385]) is | |||
| RECOMMENDED as the default algorithm for computing the MIC. | RECOMMENDED as the default algorithm for computing the MIC. | |||
| Nevertheless, other MIC lengths or other algorithms MAY be required | Nevertheless, other MIC lengths or other algorithms MAY be required | |||
| by the Profile. | by the Profile. | |||
| The MIC MUST be computed on the full SCHC Packet concatenated with | ||||
| the padding bits, if any, of the SCHC Fragment carrying the last | ||||
| tile. The rationale is that the SCHC reassembler has no way of | ||||
| knowing the boundary between the last tile and the padding bits. | ||||
| Indeed, this requires decompressing the SCHC Packet, which is out of | ||||
| the scope of the SCHC reassembler. | ||||
| Note that the concatenation of the complete SCHC Packet and the | Note that the concatenation of the complete SCHC Packet and the | |||
| potential padding bits of the last SCHC Fragment does not generally | potential padding bits of the last SCHC Fragment does not generally | |||
| constitute an integer number of bytes. For implementers to be able | constitute an integer number of bytes. For implementers to be able | |||
| to use byte-oriented CRC libraries, it is RECOMMENDED that the | to use byte-oriented CRC libraries, it is RECOMMENDED that the | |||
| concatenation of the complete SCHC Packet and the last fragment | concatenation of the complete SCHC Packet and the last fragment | |||
| potential padding bits be zero-extended to the next byte boundary and | potential padding bits be zero-extended to the next byte boundary and | |||
| that the MIC be computed on that byte array. A Profile MAY specify | that the MIC be computed on that byte array. A Profile MAY specify | |||
| another behaviour. | another behavior. | |||
| 8.2.4. Header Fields | 8.2.4. Header Fields | |||
| The SCHC F/R messages use the following fields (see the related | The SCHC F/R messages contain the following fields (see the formats | |||
| formats in Section 8.3): | in Section 8.3): | |||
| o Rule ID: this field is present in all the SCHC F/R messages. It | o Rule ID: this field is present in all the SCHC F/R messages. It | |||
| is used to identify | is used to identify | |||
| * that a SCHC F/R message is being carried, as opposed to an | * that a SCHC F/R message is being carried, as opposed to an | |||
| unfragmented SCHC Packet, | unfragmented SCHC Packet, | |||
| * which SCHC F/R mode is used | * which SCHC F/R mode is used | |||
| * and among this mode | * and for this mode | |||
| + if windows are used and what the value of WINDOW_SIZE is, | + if windows are used and what the value of WINDOW_SIZE is, | |||
| + what other optional fields are present and what the field | + what other optional fields are present and what the field | |||
| sizes are. | sizes are. | |||
| Therefore, the Rule ID allows SCHC F/R interleaving non-fragmented | The Rule ID allows SCHC F/R interleaving non-fragmented SCHC | |||
| SCHC Packets and SCHC Fragments that carry other SCHC Packets, or | Packets and SCHC Fragments that carry other SCHC Packets, or | |||
| interleaving SCHC Fragments that use different SCHC F/R modes or | interleaving SCHC Fragments that use different SCHC F/R modes or | |||
| different parameters. | different parameters. | |||
| o Datagram Tag (DTag). The DTag field is optional. Its presence | o Datagram Tag (DTag). Its size (called T, in bits) is defined by | |||
| and size (called T, in bits) is defined by each Profile for each | each Profile for each Rule ID. When T is 0, the DTag field does | |||
| Rule ID. | not appear in the SCHC F/R messages and the DTag value is defined | |||
| as 0. | ||||
| When there is no DTag, there can be only one fragmented SCHC | When T is 0, there can be only one fragmented SCHC Packet in | |||
| Packet in transit for a given Rule ID. | transit for a given Rule ID. | |||
| If present, DTag | If T is not 0, DTag | |||
| * MUST be set to the same value for all the SCHC F/R messages | * MUST be set to the same value for all the SCHC F/R messages | |||
| related to the same fragmented SCHC Packet, | related to the same fragmented SCHC Packet, | |||
| * MUST be set to different values for SCHC F/R messages related | * MUST be set to different values for SCHC F/R messages related | |||
| to different SCHC Packets that are being fragmented under the | to different SCHC Packets that are being fragmented under the | |||
| same Rule ID and that may overlap during the fragmented | same Rule ID and the transmission of which may overlap. | |||
| transmission. | ||||
| A sequence counter that is incremented for each new fragmented | A sequence counter that is incremented for each new fragmented | |||
| SCHC Packet, counting from 0 to up to (2^T)-1 and wrapping back to | SCHC Packet, counting from 0 to up to (2^T)-1 and wrapping back to | |||
| 0 is RECOMMENDED for maximum traceability and replay avoidance. | 0 is RECOMMENDED for maximum traceability and avoidance of | |||
| ambiguity. | ||||
| A flow of SCHC F/R messages with a given Rule ID and DTag value | ||||
| pair MUST NOT interfere with the operation of a SCHC F/R instance | ||||
| that uses another Rule ID and DTag value pair. | ||||
| o W: The W field is optional. It is only present if windows are | o W: The W field is optional. It is only present if windows are | |||
| used. Its presence and size (called M, in bits) is defined by | used. Its presence and size (called M, in bits) is defined by | |||
| each SCHC F/R mode and each Profile for each Rule ID. | each SCHC F/R mode and each Profile for each Rule ID. | |||
| This field carries information pertaining to the window a SCHC F/R | This field carries information pertaining to the window a SCHC F/R | |||
| message relates to. If present, W MUST carry the same value for | message relates to. If present, W MUST carry the same value for | |||
| all the SCHC F/R messages related to the same window. Depending | all the SCHC F/R messages related to the same window. Depending | |||
| on the mode and Profile, W may carry the full window number, or | on the mode and Profile, W may carry the full window number, or | |||
| just the least significant bit or any other partial representation | just the least significant bit or any other partial representation | |||
| of the window number. | of the window number. | |||
| o Fragment Compressed Number (FCN). The FCN field is present in the | o Fragment Compressed Number (FCN). The FCN field is present in the | |||
| SCHC Fragment Header. Its size (called N, in bits) is defined by | SCHC Fragment Header. Its size (called N, in bits) is defined by | |||
| each Profile for each Rule ID. | each Profile for each Rule ID. | |||
| This field conveys information about the progress in the sequence | This field conveys information about the progress in the sequence | |||
| of tiles being transmitted by SCHC Fragment messages. For | of tiles being transmitted by SCHC Fragment messages. For | |||
| example, it can contain a partial, efficient representation of a | example, it can contain a partial, efficient representation of a | |||
| larger-sized tile number. The description of the exact use of the | larger-sized tile index. The description of the exact use of the | |||
| FCN field is left to each SCHC F/R mode. However, two values are | FCN field is left to each SCHC F/R mode. However, two values are | |||
| reserved for special purposes. They help control the SCHC F/R | reserved for special purposes. They help control the SCHC F/R | |||
| process: | process: | |||
| * The FCN value with all the bits equal to 1 (called All-1) | * The FCN value with all the bits equal to 1 (called All-1) | |||
| signals the very last tile of a SCHC Packet. By extension, if | signals the very last tile of a SCHC Packet. By extension, if | |||
| windows are used, the last window of a packet is called the | windows are used, the last window of a packet is called the | |||
| All-1 window. | All-1 window. | |||
| * If windows are used, the FCN value with all the bits equal to 0 | * If windows are used, the FCN value with all the bits equal to 0 | |||
| (called All-0) signals the last tile of a window that is not | (called All-0) signals the last tile of a window that is not | |||
| the last one of the SCHC packet. By extension, such a window | the last one of the SCHC packet. By extension, such a window | |||
| is called an All-0 window. | is called an All-0 window. | |||
| The highest value of FCN (an unsigned integer) is called | ||||
| MAX_WIND_FCN. Since All-1 is reserved, MAX_WIND_FCN MUST be | ||||
| stricly less that (2^N)-1. | ||||
| o Message Integrity Check (MIC). This field only appears in the | o Message Integrity Check (MIC). This field only appears in the | |||
| All-1 SCHC Fragments. Its size (called T, in bits) is defined by | All-1 SCHC Fragments. Its size (called U, in bits) is defined by | |||
| each Profile for each Rule ID. | each Profile for each Rule ID. | |||
| See Section 8.2.3 for the MIC default size, default polynomials | See Section 8.2.3 for the MIC default size, default polynomial and | |||
| and details on its computation. | details on MIC computation. | |||
| o C (integrity Check): C is a 1-bit field. This field is used in | o C (integrity Check): C is a 1-bit field. This field is used in | |||
| the SCHC ACK message to report on the reassembled SCHC Packet | the SCHC ACK message to report on the reassembled SCHC Packet | |||
| integrity check (see Section 8.2.3). | integrity check (see Section 8.2.3). | |||
| A value of 1 tells that the integrity check was performed and is | A value of 1 tells that the integrity check was performed and is | |||
| successful. A value of 0 tells that the integrity check was not | successful. A value of 0 tells that the integrity check was not | |||
| performed, or that is was a failure. | performed, or that is was a failure. | |||
| o Compressed Bitmap. The Compressed Bitmap is used together with | o Compressed Bitmap. The Compressed Bitmap is used together with | |||
| skipping to change at page 26, line 23 ¶ | skipping to change at page 27, line 12 ¶ | |||
| This field appears in the SCHC ACK message to report on the | This field appears in the SCHC ACK message to report on the | |||
| receiver Bitmap (see Section 8.3.2.1). | receiver Bitmap (see Section 8.3.2.1). | |||
| 8.3. SCHC F/R Message Formats | 8.3. SCHC F/R Message Formats | |||
| This section defines the SCHC Fragment formats, the SCHC ACK format, | This section defines the SCHC Fragment formats, the SCHC ACK format, | |||
| the SCHC ACK REQ format and the SCHC Abort formats. | the SCHC ACK REQ format and the SCHC Abort formats. | |||
| 8.3.1. SCHC Fragment format | 8.3.1. SCHC Fragment format | |||
| A SCHC Fragment conforms to the general format shown in Figure 10. | A SCHC Fragment conforms to the general format shown in Figure 13. | |||
| It comprises a SCHC Fragment Header and a SCHC Fragment Payload. The | It comprises a SCHC Fragment Header and a SCHC Fragment Payload. The | |||
| SCHC Fragment Payload carries one or several tile(s). | SCHC Fragment Payload carries one or several tile(s). | |||
| +-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~ | +-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~ | |||
| | Fragment Header | Fragment Payload | padding (as needed) | | Fragment Header | Fragment Payload | padding (as needed) | |||
| +-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~ | +-----------------+-----------------------+~~~~~~~~~~~~~~~~~~~~~ | |||
| Figure 10: SCHC Fragment general format. Presence of a padding field | Figure 13: SCHC Fragment general format | |||
| is optional | ||||
| 8.3.1.1. Regular SCHC Fragment | 8.3.1.1. Regular SCHC Fragment | |||
| The Regular SCHC Fragment format is shown in Figure 11. Regular SCHC | The Regular SCHC Fragment format is shown in Figure 14. Regular SCHC | |||
| Fragments are generally used to carry tiles that are not the last one | Fragments are generally used to carry tiles that are not the last one | |||
| of a SCHC Packet. The DTag field and the W field are optional. | of a SCHC Packet. The DTag field and the W field are optional. | |||
| |--- SCHC Fragment Header ----| | |--- SCHC Fragment Header ----| | |||
| |-- T --|-M-|-- N --| | |-- T --|-M-|-- N --| | |||
| +-- ... --+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W | FCN | Fragment Payload | padding (as needed) | | Rule ID | DTag | W | FCN | Fragment Payload | padding (as needed) | |||
| +-- ... --+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+--------...-------+~~~~~~~~~~~~~~~~~~~~~ | |||
| Figure 11: Detailed Header Format for Regular SCHC Fragments | Figure 14: Detailed Header Format for Regular SCHC Fragments | |||
| The FCN field MUST NOT contain all bits set to 1. | The FCN field MUST NOT contain all bits set to 1. | |||
| If the size of the SCHC Fragment Payload does not nicely complement | The Fragment Payload of a SCHC Fragment with FCN equal to 0 (called | |||
| the SCHC Header size in a way that would make the SCHC Fragment a | an All-0 SCHC Fragment) MUST be distinguishable by size from a SCHC | |||
| multiple of the L2 Word, then padding bits MUST be added. | ACK REQ message (see Section 8.3.3) that has the same T, M and N | |||
| values, even in the presence of padding. This condition is met if | ||||
| The Fragment Payload of a SCHC Fragment with FCN == 0 (called an | the Payload is at least the size of an L2 Word. This condition is | |||
| All-0 SCHC Fragment) MUST be at least the size of an L2 Word. The | also met if the SCHC Fragment Header is a multiple of L2 Words. | |||
| rationale is that, even in the presence of padding, an All-0 SCHC | ||||
| Fragment needs to be distinguishable from the SCHC ACK REQ message, | ||||
| which has the same header but has no payload (see Section 8.3.3). | ||||
| 8.3.1.2. All-1 SCHC Fragment | 8.3.1.2. All-1 SCHC Fragment | |||
| The All-1 SCHC Fragment format is shown in Figure 12. The All-1 SCHC | The All-1 SCHC Fragment format is shown in Figure 15. The sender | |||
| Fragment is generally used to carry the very last tile of a SCHC | generally uses the All-1 SCHC Fragment format for the message that | |||
| Packet and a MIC, or a MIC only. The DTag field, the W field and the | completes the emission of a fragmented SCHC Packet. The DTag field, | |||
| Payload are optional. | the W field, the MIC field and the Payload are optional. At least | |||
| one of MIC field or Payload MUST be present. The FCN field is all | ||||
| ones. | ||||
| |-------- SCHC Fragment Header -------| | |-------- SCHC Fragment Header -------| | |||
| |-- T --|-M-|-- N --| | |-- T --|-M-|-- N --|-- U --| | |||
| +-- ... --+- ... -+---+- ... -+- ... -+------...-----+~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+- ... -+------...-----+~~~~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W | 11..1 | MIC | Frag Payload | pad. (as needed) | | Rule ID | DTag | W | 11..1 | MIC | Frag Payload | pad. (as needed) | |||
| +-- ... --+- ... -+---+- ... -+- ... -+------...-----+~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+- ... -+------...-----+~~~~~~~~~~~~~~~~~~ | |||
| (FCN) | (FCN) | |||
| Figure 12: Detailed format for the All-1 SCHC Fragment | Figure 15: Detailed Header Format for the All-1 SCHC Fragment | |||
| If the size of the SCHC Fragment Payload does not nicely complement | ||||
| the SCHC Header size in a way that would make the SCHC Fragment a | ||||
| multiple of the L2 Word, then padding bits MUST be added. | ||||
| The All-1 SCHC Fragment message MUST be distinguishable by size from | The All-1 SCHC Fragment message MUST be distinguishable by size from | |||
| a SCHC Sender-Abort message (see Section 8.3.4.1) that has the same | a SCHC Sender-Abort message (see Section 8.3.4) that has the same T, | |||
| T, M and N values. This is trivially achieved by having the MIC | M and N values, even in the presence of padding. This condition is | |||
| larger than an L2 Word, or by having the Payload larger than an L2 | met if the MIC is present and is at least the size of an L2 Word, or | |||
| Word. This is also naturally achieved if the SCHC Sender-Abort | if the Payload is present and at least the size an L2 Word. This | |||
| Header is a multiple of L2 Words. | condition is also met if the SCHC Sender-Abort Header is a multiple | |||
| of L2 Words. | ||||
| 8.3.2. SCHC ACK format | 8.3.2. SCHC ACK format | |||
| The SCHC ACK message MUST obey the format shown in Figure 13. The | The SCHC ACK message is shown in Figure 16. The DTag field, the W | |||
| DTag field, the W field and the Compressed Bitmap field are optional. | field and the Compressed Bitmap field are optional. The Compressed | |||
| The Compressed Bitmap field can only be present in SCHC F/R modes | Bitmap field can only be present in SCHC F/R modes that use windows. | |||
| that use windows. | ||||
| |---- SCHC ACK Header ----| | |---- SCHC ACK Header ----| | |||
| |-- T --|-M-|1| | |-- T --|-M-| 1 | | |||
| +---- ... --+- ... -+---+-+~~~~~~~~~~~~~~~~~~ | +--- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W |1| padding as needed (success) | | Rule ID | DTag | W |C=1| padding as needed (success) | |||
| +---- ... --+- ... -+---+-+~~~~~~~~~~~~~~~~~~ | +--- ... -+- ... -+---+---+~~~~~~~~~~~~~~~~~~ | |||
| +---- ... --+- ... -+---+-+------ ... ------+~~~~~~~~~~~~~~~ | +--- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W |0|Compressed Bitmap| pad. as needed (failure) | | Rule ID | DTag | W |C=0|Compressed Bitmap| pad. as needed (failure) | |||
| +---- ... --+- ... -+---+-+------ ... ------+~~~~~~~~~~~~~~~ | +--- ... -+- ... -+---+---+------ ... ------+~~~~~~~~~~~~~~~ | |||
| C | ||||
| Figure 13: Format of the SCHC ACK message | Figure 16: Format of the SCHC ACK message | |||
| The SCHC ACK Header contains a C bit (see Section 8.2.4). | The SCHC ACK Header contains a C bit (see Section 8.2.4). | |||
| If the C bit is set to 1 (integrity check successful), no Bitmap is | If the C bit is set to 1 (integrity check successful), no Bitmap is | |||
| carried and padding bits MUST be appended as needed to fill up the | carried. | |||
| last L2 Word. | ||||
| If the C bit is set to 0 (integrity check not performed or failed) | If the C bit is set to 0 (integrity check not performed or failed) | |||
| and if windows are used, | and if windows are used, a Compressed Bitmap for the window referred | |||
| to by the W field is transmitted as specified in Section 8.3.2.1. | ||||
| o a representation of the Bitmap for the window referred to by the W | ||||
| field MUST follow the C bit | ||||
| o padding bits MUST be appended as needed to fill up the last L2 | ||||
| Word | ||||
| If the C bit is 1 or windows are not used, the C bit MUST be followed | ||||
| by padding bits as needed to fill up the last L2 Word. | ||||
| See Section 8.2.2.3 for a description of the Bitmap. | ||||
| The representation of the Bitmap that is transmitted MUST be the | ||||
| compressed version specified in Section 8.3.2.1, in order to reduce | ||||
| the SCHC ACK message size. | ||||
| 8.3.2.1. Bitmap Compression | 8.3.2.1. Bitmap Compression | |||
| For transmission, the Compressed Bitmap in the SCHC ACK message is | For transmission, the Compressed Bitmap in the SCHC ACK message is | |||
| defined by the following algorithm (see Figure 14 for a follow-along | defined by the following algorithm (see Figure 17 for a follow-along | |||
| example): | example): | |||
| o Build a temporary SCHC ACK message that contains the Header | o Build a temporary SCHC ACK message that contains the Header | |||
| followed by the original Bitmap. | followed by the original Bitmap (see Section 8.2.2.3 for a | |||
| description of Bitmaps). | ||||
| o Positioning scissors at the end of the Bitmap, after its last bit. | o Position scissors at the end of the Bitmap, after its last bit. | |||
| o While the bit on the left of the scissors is 1 and belongs to the | o While the bit on the left of the scissors is 1 and belongs to the | |||
| Bitmap, keep moving left, then stop. When this is done, | Bitmap, keep moving left, then stop. When this is done, | |||
| o While the scissors are not on an L2 Word boundary of the SCHC ACK | o While the scissors are not on an L2 Word boundary of the SCHC ACK | |||
| message and there is a Bitmap bit on the right of the scissors, | message and there is a Bitmap bit on the right of the scissors, | |||
| keep moving right, then stop. | keep moving right, then stop. | |||
| o At this point, cut and drop off any bits to the right of the | o At this point, cut and drop off any bits to the right of the | |||
| scissors | scissors | |||
| When one or more bits have effectively been dropped off as a result | When one or more bits have effectively been dropped off as a result | |||
| of the above algorithm, the SCHC ACK message is a multiple of L2 | of the above algorithm, the SCHC ACK message is a multiple of L2 | |||
| Words, no padding bits will be appended. | Words, no padding bits will be appended. | |||
| Because the SCHC Fragment sender knows the size of the original | Because the SCHC Fragment sender knows the size of the original | |||
| Bitmap, it can reconstruct the original Bitmap from the Compressed | Bitmap, it can reconstruct the original Bitmap from the Compressed | |||
| Bitmap received in the SCH ACK message. | Bitmap received in the SCH ACK message. | |||
| Figure 14 shows an example where L2 Words are actually bytes and | Figure 17 shows an example where L2 Words are actually bytes and | |||
| where the original Bitmap contains 17 bits, the last 15 of which are | where the original Bitmap contains 17 bits, the last 15 of which are | |||
| all set to 1. | all set to 1. | |||
| |---- SCHC ACK Header ----|-------- Bitmap --------| | |---- SCHC ACK Header ----|-------- Bitmap --------| | |||
| |-- T --|-M-|1| | |-- T --|-M-| 1 | | |||
| +---- ... --+- ... -+---+-+---------------------------------+ | +--- ... -+- ... -+---+---+---------------------------------+ | |||
| | Rule ID | DTag | W |0|1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1| | | Rule ID | DTag | W |C=0|1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1| | |||
| +---- ... --+- ... -+---+-+---------------------------------+ | +--- ... -+- ... -+---+---+---------------------------------+ | |||
| C | | ||||
| next L2 Word boundary ->| | next L2 Word boundary ->| | |||
| Figure 14: Tentative SCHC ACK message with Bitmap before compression | Figure 17: SCHC ACK Header plus uncompressed Bitmap | |||
| Figure 15 shows that the last 14 bits are not sent. | Figure 18 shows that the last 14 bits are not sent. | |||
| |---- SCHC ACK Header ----|CpBmp| | |---- SCHC ACK Header ----|CpBmp| | |||
| |-- T --|-M-|1| | |-- T --|-M-| 1 | | |||
| +---- ... --+- ... -+---+-+-----+ | +--- ... -+- ... -+---+---+-----+ | |||
| | Rule ID | DTag | W |0|1 0 1| | | Rule ID | DTag | W |C=0|1 0 1| | |||
| +---- ... --+- ... -+---+-+-----+ | +--- ... -+- ... -+---+---+-----+ | |||
| C | | ||||
| next L2 Word boundary ->| | next L2 Word boundary ->| | |||
| Figure 15: Actual SCHC ACK message with Compressed Bitmap, no padding | Figure 18: Resulting SCHC ACK message with Compressed Bitmap | |||
| Figure 16 shows an example of a SCHC ACK with tile numbers ranging | Figure 19 shows an example of a SCHC ACK with tile indices ranging | |||
| from 6 down to 0, where the Bitmap indicates that the second and the | from 6 down to 0, where the Bitmap indicates that the second and the | |||
| fourth tile of the window have not been correctly received. | fourth tile of the window have not been correctly received. | |||
| |---- SCHC ACK Header ----|--- Bitmap --| | |---- SCHC ACK Header ----|--- Bitmap --| | |||
| |-- T --|-M-|1|6 5 4 3 2 1 0| (tile #) | |-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #) | |||
| +-----------+-------+---+-+-------------+ | +---------+-------+---+---+-------------+ | |||
| | Rule ID | DTag | W |0|1 0 1 0 1 1 1| with Original Bitmap | | Rule ID | DTag | W |C=0|1 0 1 0 1 1 1| uncompressed Bitmap | |||
| +-----------+-------+---+-+-------------+ | +---------+-------+---+---+-------------+ | |||
| C | ||||
| next L2 Word boundary ->|<-- L2 Word -->| | next L2 Word boundary ->|<-- L2 Word -->| | |||
| +-----------+-------+---+-+-------------+~~~+ | +---------+-------+---+---+-------------+~~~+ | |||
| | Rule ID | DTag | W |0|1 0 1 0 1 1 1|Pad| transmitted SCHC ACK | | Rule ID | DTag | W |C=0|1 0 1 0 1 1 1|Pad| transmitted SCHC ACK | |||
| +-----------+-------+---+-+-------------+~~~+ | +---------+-------+---+---+-------------+~~~+ | |||
| C | ||||
| next L2 Word boundary ->|<-- L2 Word -->| | next L2 Word boundary ->|<-- L2 Word -->| | |||
| Figure 16: Example of a SCHC ACK message, missing tiles, with padding | Figure 19: Example of a SCHC ACK message, missing tiles | |||
| Figure 17 shows an example of a SCHC ACK with FCN ranging from 6 down | Figure 20 shows an example of a SCHC ACK with FCN ranging from 6 down | |||
| to 0, where integrity check has not been performed or has failed and | to 0, where integrity check has not been performed or has failed and | |||
| the Bitmap indicates that there is no missing tile in that window. | the Bitmap indicates that there is no missing tile in that window. | |||
| |---- SCHC ACK Header ----|--- Bitmap --| | |---- SCHC ACK Header ----|--- Bitmap --| | |||
| |-- T --|-M-|1|6 5 4 3 2 1 0| (tile #) | |-- T --|-M-| 1 |6 5 4 3 2 1 0| (tile #) | |||
| +-----------+-------+---+-+-------------+ | +---------+-------+---+---+-------------+ | |||
| | Rule ID | DTag | W |0|1 1 1 1 1 1 1| with Original Bitmap | | Rule ID | DTag | W |C=0|1 1 1 1 1 1 1| with uncompressed Bitmap | |||
| +-----------+-------+---+-+-------------+ | +---------+-------+---+---+-------------+ | |||
| C | ||||
| next L2 Word boundary ->| | next L2 Word boundary ->| | |||
| +---- ... --+- ... -+---+-+-+ | +--- ... -+- ... -+---+---+-+ | |||
| | Rule ID | DTag | W |0|1| transmitted SCHC ACK | | Rule ID | DTag | W |C=0|1| transmitted SCHC ACK | |||
| +---- ... --+- ... -+---+-+-+ | +--- ... -+- ... -+---+---+-+ | |||
| C | ||||
| next L2 Word boundary ->| | next L2 Word boundary ->| | |||
| Figure 17: Example of a SCHC ACK message, no missing tile, no padding | Figure 20: Example of a SCHC ACK message, no missing tile | |||
| 8.3.3. SCHC ACK REQ format | 8.3.3. SCHC ACK REQ format | |||
| The SCHC ACK REQ is used by a sender to explicitely request a SCHC | The SCHC ACK REQ is used by a sender to request a SCHC ACK from the | |||
| ACK from the receiver. Its format is described in Figure 18. The | receiver. Its format is shown in Figure 21. The DTag field and the | |||
| DTag field and the W field are optional. | W field are optional. The FCN field is all zero. | |||
| |---- SCHC ACK REQ Header ----| | |---- SCHC ACK REQ Header ----| | |||
| |-- T --|-M-|-- N --| | |-- T --|-M-|-- N --| | |||
| +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W | 0..0 | padding (as needed) (no payload) | | Rule ID | DTag | W | 0..0 | padding (as needed) (no payload) | |||
| +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | |||
| Figure 18: SCHC ACK REQ detailed format | Figure 21: SCHC ACK REQ format | |||
| The size of the SCHC ACK REQ header is generally not a multiple of | ||||
| the L2 Word size. Therefore, a SCHC ACK REQ generally needs padding | ||||
| bits. | ||||
| Note that the SCHC ACK REQ has the same header as an All-0 SCHC | ||||
| Fragment (see Section 8.3.1.1) but it doesn't have a payload. A | ||||
| receiver can distinguish the former form the latter by the message | ||||
| length, even in the presence of padding. This is possible because | ||||
| o the padding bits are always stricly less than an L2 Word. | ||||
| o the size of an All-0 SCHC Fragment Payload is at least the size of | ||||
| an L2 Word, | ||||
| 8.3.4. SCHC Abort formats | ||||
| 8.3.4.1. SCHC Sender-Abort | 8.3.4. SCHC Sender-Abort format | |||
| When a SCHC Fragment sender needs to abort an on-going fragmented | When a SCHC Fragment sender needs to abort an on-going fragmented | |||
| SCHC Packet transmission, it sends a SCHC Sender-Abort message to the | SCHC Packet transmission, it sends a SCHC Sender-Abort message to the | |||
| SCHC Fragment receiver. | SCHC Fragment receiver. | |||
| The SCHC Sender-Abort format is described in Figure 19. The DTag | The SCHC Sender-Abort format is shown in Figure 22. The DTag field | |||
| field and the W field are optional. | and the W field are optional. The FCN field is all ones. | |||
| |---- Sender-Abort Header ----| | |---- Sender-Abort Header ----| | |||
| |-- T --|-M-|-- N --| | |-- T --|-M-|-- N --| | |||
| +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | |||
| | Rule ID | DTag | W | 11..1 | padding (as needed) | | Rule ID | DTag | W | 11..1 | padding (as needed) | |||
| +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | +-- ... --+- ... -+---+- ... -+~~~~~~~~~~~~~~~~~~~~~ | |||
| Figure 19: SCHC Sender-Abort format | Figure 22: SCHC Sender-Abort format | |||
| If the W field is present, | If the W field is present, | |||
| o the fragment sender MUST set it to all 1's. Other values are | o the fragment sender MUST set it to all ones. Other values are | |||
| RESERVED. | RESERVED. | |||
| o the fragment receiver MUST check its value. If the value is | o the fragment receiver MUST check its value. If the value is | |||
| different from all 1's, the message MUST be ignored. | different from all ones, the message MUST be ignored. | |||
| The size of the SCHC Sender-Abort header is generally not a multiple | ||||
| of the L2 Word size. Therefore, a SCHC Sender-Abort generally needs | ||||
| padding bits. | ||||
| Note that the SCHC Sender-Abort has the same header as an All-1 SCHC | ||||
| Fragment (see Section 8.3.1.2), but that it does not include a MIC | ||||
| nor a payload. The receiver distinguishes the former from the latter | ||||
| by the message length, even in the presence of padding. This is | ||||
| possible through different combinations | ||||
| o the size of the Sender-Abort Header may be made such that it is | ||||
| not padded | ||||
| o or the total size of the MIC and the Payload of an All-1 SCHC | ||||
| Fragment is at least the size of an L2 Word | ||||
| o or through other alignment and size combinations | ||||
| The SCHC Sender-Abort MUST NOT be acknowledged. | The SCHC Sender-Abort MUST NOT be acknowledged. | |||
| 8.3.4.2. SCHC Receiver-Abort | 8.3.5. SCHC Receiver-Abort format | |||
| When a SCHC Fragment receiver needs to abort an on-going fragmented | When a SCHC Fragment receiver needs to abort an on-going fragmented | |||
| SCHC Packet transmission, it transmits a SCHC Receiver-Abort message | SCHC Packet transmission, it transmits a SCHC Receiver-Abort message | |||
| to the SCHC Fragment sender. | to the SCHC Fragment sender. | |||
| The SCHC Receiver-Abort format is described in Figure 20. The DTag | The SCHC Receiver-Abort format is shown in Figure 23. The DTag field | |||
| field and the W field are optional. | and the W field are optional. | |||
| |--- Receiver-Abort Header ---| | |--- Receiver-Abort Header ---| | |||
| |--- T ---|-M-|1| | |--- T ---|-M-| 1 | | |||
| +---- ... ----+-- ... --+---+-+-+-+-+-+-+-+-+-+-+-+-+ | +--- ... ---+-- ... --+---+---+-+-+-+-+-+-+-+-+-+-+-+ | |||
| | Rule ID | DTag | W |1| 1..1| 1..1 | | | Rule ID | DTag | W |C=1| 1..1| 1..1 | | |||
| +---- ... ----+-- ... --+---+-+-+-+-+-+-+-+-+-+-+-+-+ | +--- ... ---+-- ... --+---+---+-+-+-+-+-+-+-+-+-+-+-+ | |||
| C | ||||
| next L2 Word boundary ->|<-- L2 Word -->| | next L2 Word boundary ->|<-- L2 Word -->| | |||
| Figure 20: SCHC Receiver-Abort format | Figure 23: SCHC Receiver-Abort format | |||
| If the W field is present, | If the W field is present, | |||
| o the fragment receiver MUST set it to all 1's. Other values are | o the fragment receiver MUST set it to all ones. Other values are | |||
| RESERVED. | RESERVED. | |||
| o the fragment sender MUST check its value. If the value is | o if the value is different from all ones, the fragment sender MUST | |||
| different from all 1's, the message MUST be ignored. | ignore the message. | |||
| Note that the SCHC Receiver-Abort has the same header as a SCHC ACK | The SCHC Receiver-Abort has the same header as a SCHC ACK message. | |||
| message. The bits that follow the SCHC Receiver-Abort Header MUST be | The bits that follow the SCHC Receiver-Abort Header MUST be as | |||
| as follows | follows | |||
| o if the Header does not end at an L2 Word boundary, append bits set | o if the Header does not end at an L2 Word boundary, append bits set | |||
| to 1 as needed to reach the next L2 Word boundary | to 1 as needed to reach the next L2 Word boundary | |||
| o append exactly one more L2 Word with bits all set to 1's | o append exactly one more L2 Word with bits all set to ones | |||
| Such a bit pattern never occurs in a regular SCHC ACK. This is how | Such a bit pattern never occurs in a regular SCHC ACK. This is how | |||
| the fragment sender recognizes a SCHC Receiver-Abort. | the fragment sender recognizes a SCHC Receiver-Abort. | |||
| A SCHC Receiver-Abort is aligned to L2 Words, by design. Therefore, | ||||
| padding MUST NOT be appended. | ||||
| The SCHC Receiver-Abort MUST NOT be acknowledged. | The SCHC Receiver-Abort MUST NOT be acknowledged. | |||
| 8.4. SCHC F/R modes | 8.4. SCHC F/R modes | |||
| This specification includes several SCHC F/R modes, which allow for | This specification includes several SCHC F/R modes, which | |||
| o a range of reliability options, such as optional SCHC Fragment | o allow for a range of reliability options, such as optional SCHC | |||
| retransmission | Fragment retransmission | |||
| o support of different LPWAN characteristics, such as variable MTU. | o support various LPWAN characteristics, including variable MTU. | |||
| More modes may be defined in the future. | More modes may be defined in the future. | |||
| 8.4.1. No-ACK mode | 8.4.1. No-ACK mode | |||
| The No-ACK mode has been designed under the assumption that data unit | The No-ACK mode has been designed under the assumption that data unit | |||
| out-of-sequence delivery does not occur between the entity performing | out-of-sequence delivery does not occur between the entity performing | |||
| fragmentation and the entity performing reassembly. This mode | fragmentation and the entity performing reassembly. This mode | |||
| supports LPWAN technologies that have a variable MTU. | supports LPWAN technologies that have a variable MTU. | |||
| In No-ACK mode, there is no feedback communication from the fragment | In No-ACK mode, there is no communication from the fragment receiver | |||
| receiver to the fragment sender. The sender just transmits all the | to the fragment sender. The sender transmits all the SCHC Fragments | |||
| SCHC Fragments blindly. | without expecting acknowledgement. | |||
| Padding is kept to a minimum: only the last SCHC Fragment is padded | In No-ACK mode, only the All-1 SCHC Fragment is padded as needed. | |||
| as needed. | The other SCHC Fragments are intrinsically aligned to L2 Words. | |||
| The tile sizes are not required to be uniform. Windows are not used. | The tile sizes are not required to be uniform. Windows are not used. | |||
| The Retransmission Timer is not used. The Attempts counter is not | The Retransmission Timer is not used. The Attempts counter is not | |||
| used. | used. | |||
| Each Profile MUST specify which Rule ID value(s) is (are) allocated | Each Profile MUST specify which Rule ID value(s) correspond to SCHC | |||
| to this mode. For brevity, the rest of Section 8.4.1 only refers to | F/R messages operating in this mode. | |||
| Rule ID values that are allocated to this mode. | ||||
| The W field MUST NOT be present in the SCHC F/R messages. SCHC ACK | The W field MUST NOT be present in the SCHC F/R messages. SCHC ACK | |||
| MUST NOT be sent. SCHC ACK REQ MUST NOT be sent. SCHC Sender-Abort | MUST NOT be sent. SCHC ACK REQ MUST NOT be sent. SCHC Sender-Abort | |||
| MAY be sent. SCHC Receiver-Abort MUST NOT be sent. | MAY be sent. SCHC Receiver-Abort MUST NOT be sent. | |||
| The value of N (size of the FCN field) is RECOMMENDED to be 1. | The value of N (size of the FCN field) is RECOMMENDED to be 1. | |||
| Each Profile, for each Rule ID value, MUST define | Each Profile, for each Rule ID value, MUST define | |||
| o the presence or absence of the DTag field in the SCHC F/R | o the size of the DTag field, | |||
| messages, as well as its size if it is present, | ||||
| o the size and algorithm for the MIC field in the SCHC F/R messages, | o the size and algorithm for the MIC field, | |||
| if different from the default, | ||||
| o the expiration time of the Inactivity Timer | o the expiration time of the Inactivity Timer | |||
| Each Profile, for each Rule ID value, MAY define | Each Profile, for each Rule ID value, MAY define | |||
| o a value of N different from the recommend one, | o a value of N different from the recommended one, | |||
| o what values will be sent in the FCN field, for values different | o the meaning of values sent in the FCN field, for values different | |||
| from the All-1 value. | from the All-1 value. | |||
| The receiver, for each pair of Rule ID and optional DTag values, MUST | For each active pair of Rule ID and DTag values, the receiver MUST | |||
| maintain | maintain an Inactivity Timer. | |||
| o one Inactivity Timer | ||||
| 8.4.1.1. Sender behaviour | 8.4.1.1. Sender behavior | |||
| At the beginning of the fragmentation of a new SCHC Packet, the | At the beginning of the fragmentation of a new SCHC Packet, the | |||
| fragment sender MUST select a Rule ID and optional DTag value pair | fragment sender MUST select a Rule ID and DTag value pair for this | |||
| for this SCHC Packet. For brevity, the rest of Section 8.4.1 only | SCHC Packet. | |||
| refers to SCHC F/R messages bearing the Rule ID and optional DTag | ||||
| values hereby selected. | ||||
| Each SCHC Fragment MUST contain exactly one tile in its Payload. The | Each SCHC Fragment MUST contain exactly one tile in its Payload. The | |||
| tile MUST be at least the size of an L2 Word. The sender MUST | tile MUST be at least the size of an L2 Word. The sender MUST | |||
| transmit the SCHC Fragments messages in the order that the tiles | transmit the SCHC Fragments messages in the order that the tiles | |||
| appear in the SCHC Packet. Except for the last tile of a SCHC | appear in the SCHC Packet. Except for the last tile of a SCHC | |||
| Packet, each tile MUST be of a size that complements the SCHC | Packet, each tile MUST be of a size that complements the SCHC | |||
| Fragment Header so that the SCHC Fragment is a multiple of L2 Words | Fragment Header so that the SCHC Fragment is a multiple of L2 Words | |||
| without the need for padding bits. Except for the last one, the SCHC | without the need for padding bits. Except for the last one, the SCHC | |||
| Fragments MUST use the Regular SCHC Fragment format specified in | Fragments MUST use the Regular SCHC Fragment format specified in | |||
| Section 8.3.1.1. The last SCHC Fragment MUST use the All-1 format | Section 8.3.1.1. The last SCHC Fragment MUST use the All-1 format | |||
| specified in Section 8.3.1.2. | specified in Section 8.3.1.2. | |||
| The MIC MUST be computed on the reassembled SCHC Packet concatenated | ||||
| with the padding bits of the last SCHC Fragment. The rationale is | ||||
| that the SCHC Reassembler has no way of knowing where the payload of | ||||
| the last SCHC Fragment ends. Indeed, this requires decompressing the | ||||
| SCHC Packet, which is out of the scope of the SCHC Reassembler. | ||||
| The sender MAY transmit a SCHC Sender-Abort. | The sender MAY transmit a SCHC Sender-Abort. | |||
| Figure 35 shows an example of a corresponding state machine. | Figure 38 shows an example of a corresponding state machine. | |||
| 8.4.1.2. Receiver behaviour | 8.4.1.2. Receiver behavior | |||
| On receiving Regular SCHC Fragments, | Upon receiving each Regular SCHC Fragment, | |||
| o the receiver MUST reset the Inactivity Timer, | o the receiver MUST reset the Inactivity Timer, | |||
| o the receiver assembles the payloads of the SCHC Fragments | o the receiver assembles the payloads of the SCHC Fragments | |||
| On receiving an All-1 SCHC Fragment, | On receiving an All-1 SCHC Fragment, | |||
| o the receiver MUST append the All-1 SCHC Fragment Payload and the | o the receiver MUST append the All-1 SCHC Fragment Payload and the | |||
| padding bits to the previously received SCHC Fragment Payloads for | padding bits to the previously received SCHC Fragment Payloads for | |||
| this SCHC Packet | this SCHC Packet | |||
| o if an integrity checking is specified in the Profile, | o the receiver MUST perform the integrity check | |||
| * the receiver MUST perform the integrity check | ||||
| * if integrity checking fails, the receiver MUST drop the | o if integrity checking fails, the receiver MUST drop the | |||
| reassembled SCHC Packet and it MUST release all resources | reassembled SCHC Packet | |||
| associated with this Rule ID and optional DTag values. | ||||
| o the reassembly operation concludes. | o the reassembly operation concludes. | |||
| On expiration of the Inactivity Timer, the receiver MUST drop the | On expiration of the Inactivity Timer, the receiver MUST drop the | |||
| SCHC Packet being reassembled and it MUST release all resources | SCHC Packet being reassembled. | |||
| associated with this Rule ID and optional DTag values. | ||||
| On receiving a SCHC Sender-Abort, the receiver MAY release all | ||||
| resources associated with this Rule ID and optional DTag values. | ||||
| The MIC computed at the receiver MUST be computed over the | On receiving a SCHC Sender-Abort, the receiver MAY drop the SCHC | |||
| reassembled SCHC Packet and over the padding bits that were received | Packet being reassembled. | |||
| in the SCHC Fragment carrying the last tile. | ||||
| Figure 36 shows an example of a corresponding state machine. | Figure 39 shows an example of a corresponding state machine. | |||
| 8.4.2. ACK-Always | 8.4.2. ACK-Always mode | |||
| The ACK-Always mode has been designed under the following assumptions | The ACK-Always mode has been designed under the following assumptions | |||
| o Data unit out-of-sequence delivery does not occur between the | o Data unit out-of-sequence delivery does not occur between the | |||
| entity performing fragmentation and the entity performing | entity performing fragmentation and the entity performing | |||
| reassembly | reassembly | |||
| o The L2 MTU value does not change while a fragmented SCHC Packet is | o The L2 MTU value does not change while the fragments of a SCHC | |||
| being transmitted. | Packet are being being transmitted. | |||
| In ACK-Always mode, windows are used. An acknowledgement, positive | In ACK-Always mode, windows are used. An acknowledgement, positive | |||
| or negative, is fed by the fragment receiver back to the fragment | or negative, is transmitted by the fragment receiver to the fragment | |||
| sender at the end of the transmission of each window of SCHC | sender at the end of the transmission of each window of SCHC | |||
| Fragments. | Fragments. | |||
| The tiles are not required to be of uniform size. Padding is kept to | The tiles are not required to be of uniform size. In ACK-Always | |||
| a minimum: only the last SCHC Fragment is padded as needed. | mode, only the All-1 SCHC Fragment is padded as needed. The other | |||
| SCHC Fragments are intrinsically aligned to L2 Words. | ||||
| In a nutshell, the algorithm is the following: after a first blind | Briefly, the algorithm is as follows: after a first blind | |||
| transmission of all the tiles of a window, the fragment sender | transmission of all the tiles of a window, the fragment sender | |||
| iterates retransmitting the tiles that are reported missing until the | iterates retransmitting the tiles that are reported missing until the | |||
| fragment receiver reports that all the tiles belonging to the window | fragment receiver reports that all the tiles belonging to the window | |||
| have been correctly received, or until too many attempts were made. | have been correctly received, or until too many attempts were made. | |||
| The fragment sender only advances to the next window of tiles when it | The fragment sender only advances to the next window of tiles when it | |||
| has ascertained that all the tiles belonging to the current window | has ascertained that all the tiles belonging to the current window | |||
| have been fully and correctly received. This results in a lock-step | have been fully and correctly received. This results in a per-window | |||
| behaviour between the sender and the receiver, at the window | lock-step behavior between the sender and the receiver. | |||
| granularity. | ||||
| Each Profile MUST specify which Rule ID value(s) is (are) allocated | Each Profile MUST specify which Rule ID value(s) correspond to SCHC | |||
| to this mode. For brevity, the rest of Section 8.4.1 only refers to | F/R messages operating in this mode. | |||
| Rule ID values that are allocated to this mode. | ||||
| The W field MUST be present and its size M MUST be 1 bit. | The W field MUST be present and its size M MUST be 1 bit. | |||
| WINDOW_SIZE MUST be equal to MAX_WIND_FCN + 1. | ||||
| Each Profile, for each Rule ID value, MUST define | Each Profile, for each Rule ID value, MUST define | |||
| o the value of N (size of the FCN field), | o the value of N (size of the FCN field), | |||
| o the value of MAX_WIND_FCN | o the value of WINDOW_SIZE, which MUST be strictly less than 2^N, | |||
| o the size and algorithm for the MIC field in the SCHC F/R messages, | o the size and algorithm for the MIC field, | |||
| if different from the default, | ||||
| o the presence or absence of the DTag field in the SCHC F/R | o the size of the DTag field, | |||
| messages, as well as its size if it is present, | ||||
| o the value of MAX_ACK_REQUESTS, | o the value of MAX_ACK_REQUESTS, | |||
| o the expiration time of the Retransmission Timer | o the expiration time of the Retransmission Timer | |||
| o the expiration time of the Inactivity Timer | o the expiration time of the Inactivity Timer | |||
| The sender, for each active pair of Rule ID and optional DTag values, | For each active pair of Rule ID and DTag values, the sender MUST | |||
| MUST maintain | maintain | |||
| o one Attempts counter | o one Attempts counter | |||
| o one Retransmission Timer | o one Retransmission Timer | |||
| The receiver, for each pair of Rule ID and optional DTag values, MUST | For each active pair of Rule ID and DTag values, the receiver MUST | |||
| maintain | maintain an Inactivity Timer. | |||
| o one Inactivity Timer | ||||
| 8.4.2.1. Sender behaviour | 8.4.2.1. Sender behavior | |||
| At the beginning of the fragmentation of a new SCHC Packet, the | At the beginning of the fragmentation of a new SCHC Packet, the | |||
| fragment sender MUST select a Rule ID and DTag value pair for this | fragment sender MUST select a Rule ID and DTag value pair for this | |||
| SCHC Packet. For brevity, the rest of Section 8.4.2 only refers to | SCHC Packet. | |||
| SCHC F/R messages bearing the Rule ID and optional DTag values hereby | ||||
| selected. | ||||
| Each SCHC Fragment MUST contain exactly one tile in its Payload. All | Each SCHC Fragment MUST contain exactly one tile in its Payload. All | |||
| tiles with the number 0 in their window, as well as the last tile, | tiles with the index 0, as well as the last tile, MUST be at least | |||
| MUST be at least the size of an L2 Word. | the size of an L2 Word. | |||
| In all SCHC Fragment messages, the W field MUST be filled with the | In all SCHC Fragment messages, the W field MUST be filled with the | |||
| least significant bit of the window number that the sender is | least significant bit of the window number that the sender is | |||
| currently processing. | currently processing. | |||
| If a SCHC Fragment carries a tile that is not the last one of the | For a SCHC Fragment that carries a tile other than the last one of | |||
| SCHC Packet, | the SCHC Packet, | |||
| o it MUST be of the Regular type specified in Section 8.3.1.1 | o the Fragment MUST be of the Regular type specified in | |||
| Section 8.3.1.1 | ||||
| o the FCN field MUST contain the tile number | o the FCN field MUST contain the tile index | |||
| o each tile MUST be of a size that complements the SCHC Fragment | o each tile MUST be of a size that complements the SCHC Fragment | |||
| Header so that the SCHC Fragment is a multiple of L2 Words without | Header so that the SCHC Fragment is a multiple of L2 Words without | |||
| the need for padding bits. | the need for padding bits. | |||
| The SCHC Fragment that carries the last tile MUST be an All-1 SCHC | The SCHC Fragment that carries the last tile MUST be an All-1 SCHC | |||
| Fragment, described in Section 8.3.1.2. | Fragment, described in Section 8.3.1.2. | |||
| The bits on which the MIC is computed MUST be the SCHC Packet | The fragment sender MUST start by transmitting the window numbered 0. | |||
| concatenated with the potential padding bits that are appended to the | ||||
| Payload of the SCHC Fragment that carries the last tile. | ||||
| The fragment sender MUST start by processing the window numbered 0. | ||||
| In a "blind transmission" phase, it MUST transmit all the tiles | The sender starts by a "blind transmission" phase, in which it MUST | |||
| composing the window, in decreasing tile number. | transmit all the tiles composing the window, in decreasing tile index | |||
| order. | ||||
| Then, it enters an "equalization phase" in which it MUST initialize | Then, it enters a "retransmission phase" in which it MUST initialize | |||
| an Attempts counter to 0, it MUST start a Retransmission Timer and it | an Attempts counter to 0, it MUST start a Retransmission Timer and it | |||
| MUST expect to receive a SCHC ACK. Then, | MUST await a SCHC ACK. Then, | |||
| o on receiving a SCHC ACK, | o upon receiving a SCHC ACK, | |||
| * if the SCHC ACK indicates that some tiles are missing at the | * if the SCHC ACK indicates that some tiles are missing at the | |||
| receiver, then the sender MUST transmit all the tiles that have | receiver, then the sender MUST transmit all the tiles that have | |||
| been reported missing, it MUST increment Attempts, it MUST | been reported missing, it MUST increment Attempts, it MUST | |||
| reset the Retransmission Timer and MUST expect to receive a | reset the Retransmission Timer and MUST await the next SCHC | |||
| SCHC ACK again. | ACK. | |||
| * if the current window is not the last one and the SCHC ACK | * if the current window is not the last one and the SCHC ACK | |||
| indicates that all tiles were correctly received, the sender | indicates that all tiles were correctly received, the sender | |||
| MUST stop the Retransmission Timer, it MUST advance to the next | MUST stop the Retransmission Timer, it MUST advance to the next | |||
| fragmentation window and it MUST start a blind transmission | fragmentation window and it MUST start a blind transmission | |||
| phase as described above. | phase as described above. | |||
| * if the current window is the last one and the SCHC ACK | * if the current window is the last one and the SCHC ACK | |||
| indicates that more tiles were received than the sender | indicates that more tiles were received than the sender sent, | |||
| actually sent, the fragment sender MUST send a SCHC Sender- | the fragment sender MUST send a SCHC Sender-Abort, and it MAY | |||
| Abort, it MUST release all resource associated with this SCHC | exit with an error condition. | |||
| Packet and it MAY exit with an error condition. | ||||
| * if the current window is the last one and the SCHC ACK | * if the current window is the last one and the SCHC ACK | |||
| indicates that all tiles were correctly received yet integrity | indicates that all tiles were correctly received yet integrity | |||
| check was a failure, the fragment sender MUST send a SCHC | check was a failure, the fragment sender MUST send a SCHC | |||
| Sender-Abort, it MUST release all resource associated with this | Sender-Abort, and it MAY exit with an error condition. | |||
| SCHC Packet and it MAY exit with an error condition. | ||||
| * if the current window is the last one and the SCHC ACK | * if the current window is the last one and the SCHC ACK | |||
| indicates that integrity checking was successful, the sender | indicates that integrity checking was successful, the sender | |||
| exits successfully. | exits successfully. | |||
| o on Retransmission Timer expiration, | o on Retransmission Timer expiration, | |||
| * if Attempts is strictly less that MAX_ACK_REQUESTS, the | * if Attempts is strictly less that MAX_ACK_REQUESTS, the | |||
| fragment sender MUST send a SCHC ACK REQ and MUST increment the | fragment sender MUST send a SCHC ACK REQ and MUST increment the | |||
| Attempts counter. | Attempts counter. | |||
| * otherwise the fragment sender MUST send a SCHC Sender-Abort, it | * otherwise the fragment sender MUST send a SCHC Sender-Abort, | |||
| MUST release all resource associated with this SCHC Packet and | and it MAY exit with an error condition. | |||
| it MAY exit with an error condition. | ||||
| At any time, | At any time, | |||
| o on receiving a SCHC Receiver-Abort, the fragment sender MUST | o on receiving a SCHC Receiver-Abort, the fragment sender MAY exit | |||
| release all resource associated with this SCHC Packet and it MAY | with an error condition. | |||
| exit with an error condition. | ||||
| o on receiving a SCHC ACK that bears a W value different from the W | o on receiving a SCHC ACK that bears a W value different from the W | |||
| value that it currently uses, the fragment sender MUST silently | value that it currently uses, the fragment sender MUST silently | |||
| discard and ignore that SCHC ACK. | discard and ignore that SCHC ACK. | |||
| Figure 37 shows an example of a corresponding state machine. | Figure 40 shows an example of a corresponding state machine. | |||
| 8.4.2.2. Receiver behaviour | 8.4.2.2. Receiver behavior | |||
| On receiving a SCHC Fragment with a Rule ID and optional DTag pair | On receiving a SCHC Fragment with a Rule ID and DTag pair not being | |||
| not being processed at that time | processed at that time | |||
| o the receiver MAY check if the optional DTag value has not recently | o the receiver SHOULD check if the DTag value has not recently been | |||
| been used for that Rule ID value, thereby ensuring that the | used for that Rule ID value, thereby ensuring that the received | |||
| received SCHC Fragment is not a remnant of a prior fragmented SCHC | SCHC Fragment is not a remnant of a prior fragmented SCHC Packet | |||
| Packet transmission. If the SCHC Fragment is determined to be | transmission. If the SCHC Fragment is determined to be such a | |||
| such a remant, the receiver MAY silently ignore it and discard it. | remnant, the receiver MAY silently ignore it and discard it. | |||
| o the receiver MUST start a process to assemble a new SCHC Packet | o the receiver MUST start a process to assemble a new SCHC Packet | |||
| with that Rule ID and DTag value pair. That process MUST only | with that Rule ID and DTag value pair. | |||
| examine received SCHC F/R messages with that Rule ID and DTag | ||||
| value pair and MUST only transmit SCHC F/R messages with that Rule | ||||
| ID and DTag value pair. | ||||
| o the receiver MUST start an Inactivity Timer. It MUST initialise | o the receiver MUST start an Inactivity Timer. It MUST initialize | |||
| an Attempts counter to 0. It MUST initialise a window counter to | an Attempts counter to 0. It MUST initialize a window counter to | |||
| 0. | 0. | |||
| In the rest of this section, "local W bit" means the least | In the rest of this section, "local W bit" means the least | |||
| significant bit of the window counter of the receiver. | significant bit of the window counter of the receiver. | |||
| On reception of any SCHC F/R message, the receiver MUST reset the | On reception of any SCHC F/R message, the receiver MUST reset the | |||
| Inactivity Timer. | Inactivity Timer. | |||
| Entering an "acceptance phase", the receiver MUST first initialise an | Entering an "acceptance phase", the receiver MUST first initialize an | |||
| empty Bitmap for this window, then | empty Bitmap for this window, then | |||
| o on receiving a SCHC Fragment or SCHC ACK REQ with the W bit | o on receiving a SCHC Fragment or SCHC ACK REQ with the W bit | |||
| different from the local W bit, the receiver MUST silently ignore | different from the local W bit, the receiver MUST silently ignore | |||
| and discard that message. | and discard that message. | |||
| o on receiving a SCHC Fragment with the W bit equal to the local W | o on receiving a SCHC Fragment with the W bit equal to the local W | |||
| bit, the receiver MUST assemble the received tile based on the | bit, the receiver MUST assemble the received tile based on the | |||
| window counter and on the FCN field in the SCHC Fragment and it | window counter and on the FCN field in the SCHC Fragment and it | |||
| MUST update the Bitmap. | MUST update the Bitmap. | |||
| skipping to change at page 40, line 27 ¶ | skipping to change at page 39, line 8 ¶ | |||
| * if the SCHC Fragment received is an All-0 SCHC Fragment, the | * if the SCHC Fragment received is an All-0 SCHC Fragment, the | |||
| current window is determined to be a not-last window, and the | current window is determined to be a not-last window, and the | |||
| receiver MUST send a SCHC ACK for this window. Then, | receiver MUST send a SCHC ACK for this window. Then, | |||
| + If the Bitmap indicates that all the tiles of the current | + If the Bitmap indicates that all the tiles of the current | |||
| window have been correctly received, the receiver MUST | window have been correctly received, the receiver MUST | |||
| increment its window counter and it enters the "acceptance | increment its window counter and it enters the "acceptance | |||
| phase" for that new window. | phase" for that new window. | |||
| + If the Bitmap indicates that at least one tile is missing in | + If the Bitmap indicates that at least one tile is missing in | |||
| the current window, the receiver enters the "equalization | the current window, the receiver enters the "retransmission | |||
| phase" for this window. | phase" for this window. | |||
| * if the SCHC Fragment received is an All-1 SCHC Fragment, the | * if the SCHC Fragment received is an All-1 SCHC Fragment, the | |||
| padding bits of the All-1 SCHC Fragment MUST be assembled after | padding bits of the All-1 SCHC Fragment MUST be assembled after | |||
| the received tile, the current window is determined to be the | the received tile, the current window is determined to be the | |||
| last window, the receiver MUST perform the integrity check and | last window, the receiver MUST perform the integrity check and | |||
| it MUST send a SCHC ACK for this window. Then, | it MUST send a SCHC ACK for this window. Then, | |||
| + If the integrity check indicates that the full SCHC Packet | + If the integrity check indicates that the full SCHC Packet | |||
| has been correctly reassembled, the receiver MUST enter the | has been correctly reassembled, the receiver MUST enter the | |||
| "clean-up phase". | "clean-up phase". | |||
| + If the integrity check indicates that the full SCHC Packet | + If the integrity check indicates that the full SCHC Packet | |||
| has not been correctly reassembled, the receiver enters the | has not been correctly reassembled, the receiver enters the | |||
| "equalization phase" for this window. | "retransmission phase" for this window. | |||
| o on receiving a SCHC ACK REQ with the W bit equal to the local W | o on receiving a SCHC ACK REQ with the W bit equal to the local W | |||
| bit, the receiver has not yet determined if the current window is | bit, the receiver has not yet determined if the current window is | |||
| a not-last one or the last one, the receiver MUST send a SCHC ACK | a not-last one or the last one, the receiver MUST send a SCHC ACK | |||
| for this window, and it keeps accepting incoming messages. | for this window, and it keeps accepting incoming messages. | |||
| In the "equalization phase": | In the "retransmission phase": | |||
| o if the window is a not-last window | o if the window is a not-last window | |||
| * on receiving a SCHC Fragment or SCHC ACK REQ with a W bit | * on receiving a SCHC Fragment or SCHC ACK REQ with a W bit | |||
| different from the local W bit the receiver MUST silently | different from the local W bit the receiver MUST silently | |||
| ignore and discard that message. | ignore and discard that message. | |||
| * on receiving a SCHC ACK REQ with a W bit equal to the local W | * on receiving a SCHC ACK REQ with a W bit equal to the local W | |||
| bit, the receiver MUST send a SCHC ACK for this window. | bit, the receiver MUST send a SCHC ACK for this window. | |||
| * on receiving a SCHC Fragment with a W bit equal to the local W | * on receiving a SCHC Fragment with a W bit equal to the local W | |||
| bit, | bit, | |||
| skipping to change at page 42, line 4 ¶ | skipping to change at page 40, line 34 ¶ | |||
| is an All-1 SCHC Fragment, the receiver MUST assemble the | is an All-1 SCHC Fragment, the receiver MUST assemble the | |||
| padding bits of the All-1 SCHC Fragment after the received | padding bits of the All-1 SCHC Fragment after the received | |||
| tile. It MUST perform the integrity check. Then | tile. It MUST perform the integrity check. Then | |||
| - if the integrity check indicates that the full SCHC | - if the integrity check indicates that the full SCHC | |||
| Packet has been correctly reassembled, the receiver MUST | Packet has been correctly reassembled, the receiver MUST | |||
| send a SCHC ACK and it enters the "clean-up phase". | send a SCHC ACK and it enters the "clean-up phase". | |||
| - if the integrity check indicates that the full SCHC | - if the integrity check indicates that the full SCHC | |||
| Packet has not been correctly reassembled, | Packet has not been correctly reassembled, | |||
| o if the SCHC Fragment received was an All-1 SCHC | o if the SCHC Fragment received was an All-1 SCHC | |||
| Fragment, the receiver MUST send a SCHC ACK for this | Fragment, the receiver MUST send a SCHC ACK for this | |||
| window | window | |||
| o it keeps accepting incoming messages. | o it keeps accepting incoming messages. | |||
| In the "clean-up phase": | In the "clean-up phase": | |||
| o Any received SCHC F/R message with a W bit different from the | o Any received SCHC F/R message with a W bit different from the | |||
| local W bit MUST be silently ignored and discarded. | local W bit MUST be silently ignored and discarded. | |||
| o Any received SCHC F/R message different from an All-1 SCHC | o Any received SCHC F/R message different from an All-1 SCHC | |||
| Fragment or a SCHC ACK REQ MUST be silently ignored and discarded. | Fragment or a SCHC ACK REQ MUST be silently ignored and discarded. | |||
| o On receiving an All-1 SCHC Fragment or a SCHC ACK REQ, the | o On receiving an All-1 SCHC Fragment or a SCHC ACK REQ, the | |||
| receiver MUST send a SCHC ACK. | receiver MUST send a SCHC ACK. | |||
| o On expiration of the Inactivity Timer, the receive process for | ||||
| that SCHC Packet MAY exit | ||||
| At any time, on expiration of the Inactivity Timer, on receiving a | At any time, on expiration of the Inactivity Timer, on receiving a | |||
| SCHC Sender-Abort or when Attempts reaches MAX_ACK_REQUESTS, the | SCHC Sender-Abort or when Attempts reaches MAX_ACK_REQUESTS, the | |||
| receiver MUST send a SCHC Receiver-Abort, it MUST release all | receiver MUST send a SCHC Receiver-Abort and it MAY exit the receive | |||
| resource associated with this SCHC Packet and it MAY exit the receive | ||||
| process for that SCHC Packet. | process for that SCHC Packet. | |||
| The MIC computed at the receiver MUST be computed over the | Figure 41 shows an example of a corresponding state machine. | |||
| reassembled SCHC Packet and over the padding bits that were received | ||||
| in the SCHC Fragment carrying the last tile. | ||||
| Figure 38 shows an example of a corresponding state machine. | ||||
| 8.4.3. ACK-on-Error | 8.4.3. ACK-on-Error mode | |||
| The ACK-on-Error mode supports LPWAN technologies that have variable | The ACK-on-Error mode supports LPWAN technologies that have variable | |||
| MTU and out-of-order delivery. | MTU and out-of-order delivery. | |||
| In ACK-on-Error mode, windows are used. All tiles MUST be of equal | In ACK-on-Error mode, windows are used. All tiles MUST be of equal | |||
| size, except for the last one, which MUST be of the same size or | size, except for the last one, which MUST be of the same size or | |||
| smaller than the preceding ones. WINDOW_SIZE MUST be equal to | smaller than the regular ones. If allowed in a Profile, the | |||
| MAX_WIND_FCN + 1. | penultimate tile MAY be exactly one L2 Word smaller than the regular | |||
| tile size. | ||||
| A SCHC Fragment message carries one or more tiles, which may span | A SCHC Fragment message carries one or more tiles, which may span | |||
| multiple windows. A SCHC ACK reports on the reception of exactly one | multiple windows. A SCHC ACK reports on the reception of exactly one | |||
| window of tiles. | window of tiles. | |||
| See Figure 21 for an example. | See Figure 24 for an example. | |||
| +---------------------------------------------...-----------+ | +---------------------------------------------...-----------+ | |||
| | SCHC Packet | | | SCHC Packet | | |||
| +---------------------------------------------...-----------+ | +---------------------------------------------...-----------+ | |||
| Tile # | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 |3| | Tile # | 4 | 3 | 2 | 1 | 0 | 4 | 3 | 2 | 1 | 0 | 4 | | 0 | 4 |3| | |||
| Window # |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|- 28-| | Window # |-------- 0 --------|-------- 1 --------|- 2 ... 27 -|- 28-| | |||
| SCHC Fragment msg |-----------| | SCHC Fragment msg |-----------| | |||
| Figure 21: a SCHC Packet fragmented in tiles, Ack-on-Error mode | Figure 24: a SCHC Packet fragmented in tiles, Ack-on-Error mode | |||
| The W field is wide enough that it unambiguously represents an | The W field is wide enough that it unambiguously represents an | |||
| absolute window number. The fragment receiver feeds SCHC ACKs back | absolute window number. The fragment receiver sends SCHC ACKs to the | |||
| to the fragment sender about windows that it misses tiles of. No | fragment sender about windows for which tiles are missing. No SCHC | |||
| SCHC ACK is fed back by the fragment receiver for windows that it | ACK is sent by the fragment receiver for windows that it knows have | |||
| knows have been fully received. | been fully received. | |||
| The fragment sender retransmits SCHC Fragments for tiles that are | The fragment sender retransmits SCHC Fragments for tiles that are | |||
| reported missing. It can advance to next windows even before it has | reported missing. It can advance to next windows even before it has | |||
| ascertained that all tiles belonging to previous windows have been | ascertained that all tiles belonging to previous windows have been | |||
| correctly received, and can still later retransmit SCHC Fragments | correctly received, and can still later retransmit SCHC Fragments | |||
| with tiles belonging to previous windows. Therefore, the sender and | with tiles belonging to previous windows. Therefore, the sender and | |||
| the receiver may operate in a fully decoupled fashion. The | the receiver may operate in a decoupled fashion. The fragmented SCHC | |||
| fragmented SCHC Packet transmission concludes when | Packet transmission concludes when | |||
| o integrity checking shows that the fragmented SCHC Packet has been | o integrity checking shows that the fragmented SCHC Packet has been | |||
| correctly reassembled at the receive end, and this information has | correctly reassembled at the receive end, and this information has | |||
| been conveyed back to the sender, | been conveyed back to the sender, | |||
| o or too many retransmission attempts were made, | o or too many retransmission attempts were made, | |||
| o or the receiver determines that the transmission of this | o or the receiver determines that the transmission of this | |||
| fragmented SCHC Packet has been inactive for too long. | fragmented SCHC Packet has been inactive for too long. | |||
| Each Profile MUST specify which Rule ID value(s) is (are) allocated | Each Profile MUST specify which Rule ID value(s) correspond to SCHC | |||
| to this ACK-on-Error mode. For brevity, the rest of Section 8.4.3 | F/R messages operating in this mode. | |||
| only refers to SCHC F/R messages with Rule ID values that are | ||||
| allocated to this mode. | ||||
| The W field MUST be present in the SCHC F/R messages. | The W field MUST be present in the SCHC F/R messages. | |||
| Each Profile, for each Rule ID value, MUST define | Each Profile, for each Rule ID value, MUST define | |||
| o the tile size (a tile does not need to be multiple of an L2 Word, | o the tile size (a tile does not need to be multiple of an L2 Word, | |||
| but it MUST be at least the size of an L2 Word) | but it MUST be at least the size of an L2 Word) | |||
| o the value of M (size of the W field), | o the value of M (size of the W field), | |||
| o the value of N (size of the FCN field), | o the value of N (size of the FCN field), | |||
| o the value of MAX_WIND_FCN | o the value of WINDOW_SIZE, which MUST be strictly less than 2^N, | |||
| o the size and algorithm for the MIC field in the SCHC F/R messages, | o the size and algorithm for the MIC field, | |||
| if different from the default, | ||||
| o the presence or absence of the DTag field in the SCHC F/R | o the size of the DTag field, | |||
| messages, as well as its size if it is present, | ||||
| o the value of MAX_ACK_REQUESTS, | o the value of MAX_ACK_REQUESTS, | |||
| o the expiration time of the Retransmission Timer | o the expiration time of the Retransmission Timer | |||
| o the expiration time of the Inactivity Timer | o the expiration time of the Inactivity Timer | |||
| The sender, for each active pair of Rule ID and optional DTag values, | o if the last tile is carried in a Regular SCHC Fragment or an All-1 | |||
| MUST maintain | SCHC Fragment (see Section 8.4.3.1) | |||
| o if the penultimate tile MAY be one L2 Word smaller than the | ||||
| regular tile size. In this case, the regular tile size MUST be at | ||||
| least twice the L2 Word size. | ||||
| For each active pair of Rule ID and DTag values, the sender MUST | ||||
| maintain | ||||
| o one Attempts counter | o one Attempts counter | |||
| o one Retransmission Timer | o one Retransmission Timer | |||
| The receiver, for each pair of Rule ID and optional DTag values, MUST | For each active pair of Rule ID and DTag values, the receiver MUST | |||
| maintain | maintain an Inactivity Timer. | |||
| o one Inactivity Timer | ||||
| 8.4.3.1. Sender behaviour | 8.4.3.1. Sender behavior | |||
| At the beginning of the fragmentation of a new SCHC Packet, | At the beginning of the fragmentation of a new SCHC Packet, | |||
| o the fragment sender MUST select a Rule ID and DTag value pair for | o the fragment sender MUST select a Rule ID and DTag value pair for | |||
| this SCHC Packet. A Rule MUST NOT be selected if the values of M | this SCHC Packet. A Rule MUST NOT be selected if the values of M | |||
| and MAX_WIND_FCN for that Rule are such that the SCHC Packet | and WINDOW_SIZE for that Rule are such that the SCHC Packet cannot | |||
| cannot be fragmented in (2ˆM) * (MAX_WIND_FCN+1) tiles or | be fragmented in (2^M) * WINDOW_SIZE tiles or less. | |||
| less. | ||||
| o the fragment sender MUST initialize the Attempts counter to 0 for | o the fragment sender MUST initialize the Attempts counter to 0 for | |||
| that Rule ID and DTag value pair. | that Rule ID and DTag value pair. | |||
| For brevity, the rest of Section 8.4.3 only refers to SCHC F/R | ||||
| messages bearing the Rule ID and optional DTag values hereby | ||||
| selected. | ||||
| A SCHC Fragment message carries in its payload one or more tiles. If | A SCHC Fragment message carries in its payload one or more tiles. If | |||
| more than one tile is carried in one SCHC Fragment | more than one tile is carried in one SCHC Fragment | |||
| o the selected tiles MUST be consecutive in the original SCHC Packet | o the selected tiles MUST be consecutive in the original SCHC Packet | |||
| o they MUST be placed in the SCHC Fragment Payload adjacent to one | o they MUST be placed in the SCHC Fragment Payload adjacent to one | |||
| another, in the order they appear in the SCHC Packet, from the | another, in the order they appear in the SCHC Packet, from the | |||
| start of the SCHC Packet toward its end. | start of the SCHC Packet toward its end. | |||
| In a SCHC Fragment message, the sender MUST fill the W field with the | Tiles that are not the last one MUST be sent in Regular SCHC | |||
| window number of the first tile sent in that SCHC Fragment. | Fragments specified in Section 8.3.1.1. The FCN field MUST contain | |||
| the tile index of the first tile sent in that SCHC Fragment. | ||||
| If a SCHC Fragment carries more than one tile, or carries one tile | ||||
| that is not the last one of the SCHC Packet, | ||||
| o it MUST be of the Regular type specified in Section 8.3.1.1 | In a Regular SCHC Fragment message, the sender MUST fill the W field | |||
| with the window number of the first tile sent in that SCHC Fragment. | ||||
| o the FCN field MUST contain the tile number of the first tile sent | Depending on the Profile, the last tile of a SCHC Packet MUST be sent | |||
| in that SCHC Fragment | either | |||
| o padding bits are appended to the tiles as needed to fit the | o in a Regular SCHC Fragment, alone or as part of a multi-tiles | |||
| Payload size constraint of Regular SCHC Fragments | Payload | |||
| The bits on which the MIC is computed MUST be the SCHC Packet | o alone in an All-1 SCHC Fragment | |||
| concatenated with the padding bits that are appended to the Payload | ||||
| of the SCHC Fragment that carries the last tile. | ||||
| The fragment sender MAY send the last tile as the Payload of an All-1 | In an All-1 SCHC Fragment message, the sender MUST fill the W field | |||
| SCHC Fragment. | with the window number of the last tile of the SCHC Packet. | |||
| The fragment sender MUST send SCHC Fragments such that, all together, | The fragment sender MUST send SCHC Fragments such that, all together, | |||
| they contain all the tiles of the fragmented SCHC Packet. | they contain all the tiles of the fragmented SCHC Packet. | |||
| The fragment sender MUST send at least one All-1 SCHC Fragment. | The fragment sender MUST send at least one All-1 SCHC Fragment. | |||
| Note that the last tile of a SCHC Packet can be sent in different | ||||
| ways, depending on Profiles and implementations | ||||
| o in a Regular SCHC Fragment, either alone or as part of multiple | ||||
| tiles Payload | ||||
| o in an All-1 SCHC Fragment | ||||
| However, the last tile MUST NOT have ever been sent both in a Regular | ||||
| SCHC Fragment and in a All-1 SCHC Fragment. | ||||
| The fragment sender MUST listen for SCHC ACK messages after having | The fragment sender MUST listen for SCHC ACK messages after having | |||
| sent | sent | |||
| o an All-1 SCHC Fragment | o an All-1 SCHC Fragment | |||
| o or a SCHC ACK REQ with the W field corresponding to the last | o or a SCHC ACK REQ with the W field corresponding to the last | |||
| window. | window. | |||
| A Profile MAY specify other times at which the fragment sender MUST | A Profile MAY specify other times at which the fragment sender MUST | |||
| listen for SCHC ACK messages. | listen for SCHC ACK messages. For example, this could be after | |||
| sending a complete window of tiles. | ||||
| Each time a fragment sender sends an All-1 SCHC Fragment or a SCHC | Each time a fragment sender sends an All-1 SCHC Fragment or a SCHC | |||
| ACK REQ, | ACK REQ, | |||
| o it MUST increment the Attempts counter | o it MUST increment the Attempts counter | |||
| o it MUST reset the Retransmission Timer | o it MUST reset the Retransmission Timer | |||
| On Retransmission Timer expiration | On Retransmission Timer expiration | |||
| o if Attempts is strictly less than MAX_ACK_REQUESTS, the fragment | o if Attempts is strictly less than MAX_ACK_REQUESTS, the fragment | |||
| sender MUST send a SCHC ACK REQ with the W field corresponding to | sender MUST send a SCHC ACK REQ with the W field corresponding to | |||
| the last window and it MUST increment the Attempts counter | the last window and it MUST increment the Attempts counter | |||
| o otherwise the fragment sender MUST send a SCHC Sender-Abort and it | o otherwise the fragment sender MUST send a SCHC Sender-Abort and it | |||
| MUST release all resource associated with this SCHC Packet. | MAY exit with an error condition. | |||
| On receiving a SCHC ACK, | On receiving a SCHC ACK, | |||
| o if the W field in the SCHC ACK corresponds to the last window of | o if the W field in the SCHC ACK corresponds to the last window of | |||
| the SCHC Packet, | the SCHC Packet, | |||
| * if the C bit is set, the sender MAY release all resource | * if the C bit is set, the sender MAY exit successfully | |||
| associated with this SCHC Packet and MAY exit successfully | ||||
| * otherwise, | * otherwise, | |||
| + if the SCHC ACK shows no missing tile at the receiver, the | + if the SCHC ACK shows no missing tile at the receiver, the | |||
| sender | sender | |||
| - MUST send a SCHC Sender-Abort | - MUST send a SCHC Sender-Abort | |||
| - MUST release all resource associated with this SCHC | ||||
| Packet | ||||
| - MAY exit with an error condition | - MAY exit with an error condition | |||
| + otherwise | + otherwise | |||
| - the fragment sender MUST send SCHC Fragment messages | - the fragment sender MUST send SCHC Fragment messages | |||
| containing all the tiles that are reported missing in the | containing all the tiles that are reported missing in the | |||
| SCHC ACK. | SCHC ACK. | |||
| - if the last message in this sequence of SCHC Fragment | - if the last message in this sequence of SCHC Fragment | |||
| messages is not an All-1 SCHC Fragment, then the fragment | messages is not an All-1 SCHC Fragment, then the fragment | |||
| sender MUST send a SCHC ACK REQ with the W field | sender MUST send a SCHC ACK REQ with the W field | |||
| corresponding to the last window after the sequence. | corresponding to the last window after the sequence. | |||
| o otherwise, the fragment sender | o otherwise, the fragment sender | |||
| * MUST send SCHC Fragment messages containing the tiles that are | * MUST send SCHC Fragment messages containing the tiles that are | |||
| reported missing in the SCHC ACK | reported missing in the SCHC ACK | |||
| * then it MAY send a SCHC ACK REQ with the W field corresponding | * then it MAY send a SCHC ACK REQ with the W field corresponding | |||
| to the last window | to the last window | |||
| See Figure 39 for one among several possible examples of a Finite | See Figure 42 for one among several possible examples of a Finite | |||
| State Machine implementing a sender behaviour obeying this | State Machine implementing a sender behavior obeying this | |||
| specification. | specification. | |||
| 8.4.3.2. Receiver behaviour | 8.4.3.2. Receiver behavior | |||
| On receiving a SCHC Fragment with a Rule ID and optional DTag pair | On receiving a SCHC Fragment with a Rule ID and DTag pair not being | |||
| not being processed at that time | processed at that time | |||
| o the receiver MAY check if the optional DTag value has not recently | o the receiver SHOULD check if the DTag value has not recently been | |||
| been used for that Rule ID value, thereby ensuring that the | used for that Rule ID value, thereby ensuring that the received | |||
| received SCHC Fragment is not a remnant of a prior fragmented SCHC | SCHC Fragment is not a remnant of a prior fragmented SCHC Packet | |||
| Packet transmission. If the SCHC Fragment is determined to be | transmission. If the SCHC Fragment is determined to be such a | |||
| such a remant, the receiver MAY silently ignore it and discard it. | remnant, the receiver MAY silently ignore it and discard it. | |||
| o the receiver MUST start a process to assemble a new SCHC Packet | o the receiver MUST start a process to assemble a new SCHC Packet | |||
| with that Rule ID and DTag value pair. That process MUST only | with that Rule ID and DTag value pair. | |||
| examine received SCHC F/R messages with that Rule ID and DTag | ||||
| value pair and MUST only transmit SCHC F/R messages with that Rule | ||||
| ID and DTag value pair. | ||||
| o the receiver MUST start an Inactivity Timer. It MUST initialise | o the receiver MUST start an Inactivity Timer. It MUST initialize | |||
| an Attempts counter to 0. | an Attempts counter to 0. | |||
| On reception of any SCHC F/R message, the receiver MUST reset the | On receiving any SCHC F/R message, the receiver MUST reset the | |||
| Inactivity Timer. | Inactivity Timer. | |||
| On reception of a SCHC Fragment message, the receiver MUST assemble | On receiving a SCHC Fragment message, the receiver determines what | |||
| the received tiles based on the W and FCN fields of the SCHC | tiles were received, based on the payload length and on the W and FCN | |||
| Fragment. | fields of the SCHC Fragment. | |||
| o if the FCN is All-1, if a Payload is present, the full SCHC | o if the FCN is All-1, if a Payload is present, the full SCHC | |||
| Fragment Payload MUST be assembled including the padding bits. | Fragment Payload MUST be assembled including the padding bits. | |||
| This is because the size of the last tile is not known by the | This is because the size of the last tile is not known by the | |||
| receiver, therefore padding bits are indistinguishable from the | receiver, therefore padding bits are indistinguishable from the | |||
| tile data bits, at this stage. They will be removed by the SCHC | tile data bits, at this stage. They will be removed by the SCHC | |||
| C/D sublayer. If the size of the SCHC Fragment Payload exceeds or | C/D sublayer. If the size of the SCHC Fragment Payload exceeds or | |||
| equals the size of one regular tile plus the size of an L2 Word, | equals the size of one regular tile plus the size of an L2 Word, | |||
| this SHOULD raise an error flag. | this SHOULD raise an error flag. | |||
| o otherwise, tiles MUST be assembled based on the a priori known | o otherwise, tiles MUST be assembled based on the a priori known | |||
| size and padding bits MUST be discarded. The latter is possible | tile size. | |||
| because | ||||
| * the size of the tiles is known a priori, | * If allowed by the Profile, the end of the payload MAY contain | |||
| the last tile, which may be shorter. Padding bits are | ||||
| indistinguishable from the tile data bits, at this stage. | ||||
| * tiles are larger than an L2 Word | * the payload may contain the penultimate tile that, if allowed | |||
| by the Profile, MAY be exactly one L2 Word shorter than the | ||||
| regular tile size. | ||||
| * padding bits are always strictly less than an L2 Word | * Otherwise, padding bits MUST be discarded. The latter is | |||
| possible because | ||||
| On reception of a SCHC ACK REQ or of an All-1 SCHC Fragment, | + the size of the tiles is known a priori, | |||
| + tiles are larger than an L2 Word | ||||
| + padding bits are always strictly less than an L2 Word | ||||
| On receiving a SCHC ACK REQ or an All-1 SCHC Fragment, | ||||
| o if the receiver has at least one window that it knows has tiles | o if the receiver has at least one window that it knows has tiles | |||
| missing, it MUST return a SCHC ACK for the lowest-numbered such | missing, it MUST return a SCHC ACK for the lowest-numbered such | |||
| window, | window, | |||
| o otherwise, | o otherwise, | |||
| * if it has received at least one tile, it MUST return a SCHC ACK | * if it has received at least one tile, it MUST return a SCHC ACK | |||
| for the highest-numbered window it currently has tiles for | for the highest-numbered window it currently has tiles for | |||
| * otherwise it MUST return a SCHC ACK for window numbered 0 | * otherwise it MUST return a SCHC ACK for window numbered 0 | |||
| A Profile MAY specify other times and circumstances at which a | A Profile MAY specify other times and circumstances at which a | |||
| receiver sends a SCHC ACK, and which window the SCHC ACK reports | receiver sends a SCHC ACK, and which window the SCHC ACK reports | |||
| about in these circumstances. | about in these circumstances. | |||
| On sending a SCHC ACK, the receiver MUST increase the Attempts | Upon sending a SCHC ACK, the receiver MUST increase the Attempts | |||
| counter. | counter. | |||
| From reception of an All-1 SCHC Fragment onward, a receiver MUST | After receiving an All-1 SCHC Fragment, a receiver MUST check the | |||
| check the integrity of the reassembled SCHC Packet at least every | integrity of the reassembled SCHC Packet at least every time it | |||
| time it prepares for sending a SCHC ACK for the last window. | prepares for sending a SCHC ACK for the last window. | |||
| On reception of a SCHC Sender-Abort, the receiver MUST release all | Upon receiving a SCHC Sender-Abort, the receiver MAY exit with an | |||
| resource associated with this SCHC Packet. | error condition. | |||
| On expiration of the Inactivity Timer, the receiver MUST send a SCHC | Upon expiration of the Inactivity Timer, the receiver MUST send a | |||
| Receiver-Abort and it MUST release all resource associated with this | SCHC Receiver-Abort and it MAY exit with an error condition. | |||
| SCHC Packet. | ||||
| On the Attempts counter exceeding MAX_ACK_REQUESTS, the receiver MUST | On the Attempts counter exceeding MAX_ACK_REQUESTS, the receiver MUST | |||
| send a SCHC Receiver-Abort and it MUST release all resource | send a SCHC Receiver-Abort and it MAY exit with an error condition. | |||
| associated with this SCHC Packet. | ||||
| Reassembly of the SCHC Packet concludes when | Reassembly of the SCHC Packet concludes when | |||
| o a Sender-Abort has been received | o a Sender-Abort has been received | |||
| o or the Inactivity Timer has expired | o or the Inactivity Timer has expired | |||
| o or the Attempts counter has exceeded MAX_ACK_REQUESTS | o or the Attempts counter has exceeded MAX_ACK_REQUESTS | |||
| o or when at least an All-1 SCHC Fragment has been received and | o or when at least an All-1 SCHC Fragment has been received and | |||
| integrity checking of the reassembled SCHC Packet is successful. | integrity checking of the reassembled SCHC Packet is successful. | |||
| The MIC computed at the receiver MUST be computed over the | See Figure 43 for one among several possible examples of a Finite | |||
| reassembled SCHC Packet and over the padding bits that were received | State Machine implementing a receiver behavior obeying this | |||
| in the SCHC Fragment carrying the last tile. | ||||
| See Figure 40 for one among several possible examples of a Finite | ||||
| State Machine implementing a receiver behaviour obeying this | ||||
| specification, and that is meant to match the sender Finite State | specification, and that is meant to match the sender Finite State | |||
| Machine of Figure 39. | Machine of Figure 42. | |||
| 9. Padding management | 9. Padding management | |||
| SCHC C/D and SCHC F/R operate on bits, not bytes. SCHC itself does | SCHC C/D and SCHC F/R operate on bits, not bytes. SCHC itself does | |||
| not have any alignment prerequisite. The size of SCHC Packets can be | not have any alignment prerequisite. The size of SCHC Packets can be | |||
| any number of bits. If the layer below SCHC constrains the payload | any number of bits. | |||
| to align to some boundary, called L2 Words (for example, bytes), SCHC | ||||
| will meet that constraint and produce messages with the correct | ||||
| alignement. This may entail adding extra bits, called padding bits. | ||||
| When padding occurs, the number of appended bits MUST be strictly | If the layer below SCHC constrains the payload to align to some | |||
| less than the L2 Word size. | boundary, called L2 Words (for example, bytes), the SCHC messages | |||
| MUST be padded. When padding occurs, the number of appended bits | ||||
| MUST be strictly less than the L2 Word size. | ||||
| Padding happens at most once for each Packet during SCHC Compression | If a SCHC Packet is sent unfragmented (see Figure 25), it is padded | |||
| and optional SCHC Fragmentation (see Figure 2). If a SCHC Packet is | as needed for transmission. | |||
| sent unfragmented (see Figure 22), it is padded as needed for | ||||
| transmission. If a SCHC Packet is fragmented, it is not padded in | If a SCHC Packet needs to be fragmented for transmission, it is not | |||
| itself, only the SCHC Fragments are padded as needed for | padded in itself. Only the SCHC F/R messages are padded as needed | |||
| transmission. Some SCHC F/R modes only pad the very last SCHC | for transmission. Some SCHC F/R messages are intrinsically aligned | |||
| Fragment. | to L2 Words. | |||
| A packet (e.g. an IPv6 packet) | A packet (e.g. an IPv6 packet) | |||
| | ^ (padding bits | | ^ (padding bits | |||
| v | dropped) | v | dropped) | |||
| +------------------+ +--------------------+ | +------------------+ +--------------------+ | |||
| | SCHC Compression | | SCHC Decompression | | | SCHC Compression | | SCHC Decompression | | |||
| +------------------+ +--------------------+ | +------------------+ +--------------------+ | |||
| | ^ | | ^ | |||
| | If no fragmentation | | | If no fragmentation | | |||
| +---- SCHC Packet + padding as needed ----->| | +---- SCHC Packet + padding as needed ----->| | |||
| | | (MIC checked | | | (integrity | |||
| v | and removed) | v | checked) | |||
| +--------------------+ +-----------------+ | +--------------------+ +-----------------+ | |||
| | SCHC Fragmentation | | SCHC Reassembly | | | SCHC Fragmentation | | SCHC Reassembly | | |||
| +--------------------+ +-----------------+ | +--------------------+ +-----------------+ | |||
| | ^ | ^ | | ^ | ^ | |||
| | | | | | | | | | | |||
| | +------------- SCHC ACK ------------+ | | | +------------- SCHC ACK ------------+ | | |||
| | | | | | | |||
| +------- SCHC Fragments + padding as needed---------+ | +------- SCHC Fragments + padding as needed---------+ | |||
| SENDER RECEIVER | SENDER RECEIVER | |||
| Figure 22: SCHC operations, including padding as needed | Figure 25: SCHC operations, including padding as needed | |||
| Each Profile MUST specify the size of the L2 Word. The L2 Word might | Each Profile MUST specify the size of the L2 Word. The L2 Word might | |||
| actually be a single bit, in which case at most zero bits of padding | actually be a single bit, in which case no padding will take place at | |||
| will be appended to any message, i.e. no padding will take place at | ||||
| all. | all. | |||
| A Profile MAY define the value of the padding bits. The RECOMMENDED | A Profile MAY define the value of the padding bits. The RECOMMENDED | |||
| value is 0. | value is 0. | |||
| 10. SCHC Compression for IPv6 and UDP headers | 10. SCHC Compression for IPv6 and UDP headers | |||
| This section lists the different IPv6 and UDP header fields and how | This section lists the IPv6 and UDP header fields and describes how | |||
| they can be compressed. | they can be compressed. | |||
| 10.1. IPv6 version field | 10.1. IPv6 version field | |||
| This field always holds the same value. Therefore, in the Rule, TV | This field always holds the same value. In the Rule, TV is set to 6, | |||
| is set to 6, MO to "equal" and CDA to "not-sent". | MO to "equal" and CDA to "not-sent". | |||
| 10.2. IPv6 Traffic class field | 10.2. IPv6 Traffic class field | |||
| If the DiffServ field does not vary and is known by both sides, the | If the DiffServ field does not vary and is known by both sides, the | |||
| Field Descriptor in the Rule SHOULD contain a TV with this well-known | Field Descriptor in the Rule SHOULD contain a TV with this well-known | |||
| value, an "equal" MO and a "not-sent" CDA. | value, an "equal" MO and a "not-sent" CDA. | |||
| Otherwise (e.g. ECN bits are to be transmitted), two possibilities | Otherwise (e.g. ECN bits are to be transmitted), two possibilities | |||
| can be considered depending on the variability of the value: | can be considered depending on the variability of the value: | |||
| skipping to change at page 52, line 18 ¶ | skipping to change at page 50, line 11 ¶ | |||
| the Field Descriptor in the Rule SHOULD contain a TV with this Next | the Field Descriptor in the Rule SHOULD contain a TV with this Next | |||
| Header value, the MO SHOULD be "equal" and the CDA SHOULD be "not- | Header value, the MO SHOULD be "equal" and the CDA SHOULD be "not- | |||
| sent". | sent". | |||
| Otherwise, TV is not set in the Field Descriptor, MO is set to | Otherwise, TV is not set in the Field Descriptor, MO is set to | |||
| "ignore" and CDA is set to "value-sent". Alternatively, a matching- | "ignore" and CDA is set to "value-sent". Alternatively, a matching- | |||
| list MAY also be used. | list MAY also be used. | |||
| 10.6. Hop Limit field | 10.6. Hop Limit field | |||
| The field behavior for this field is different for Uplink and | The field behavior for this field is different for uplink (Up) and | |||
| Downlink. In Uplink, since there is no IP forwarding between the Dev | downlink (Dw). In Up, since there is no IP forwarding between the | |||
| and the SCHC C/D, the value is relatively constant. On the other | Dev and the SCHC C/D, the value is relatively constant. On the other | |||
| hand, the Downlink value depends of Internet routing and MAY change | hand, the Dw value depends on Internet routing and can change more | |||
| more frequently. One neat way of processing this field is to use the | frequently. The Direction Indicator (DI) can be used to distinguish | |||
| Direction Indicator (DI) to distinguish both directions: | both directions: | |||
| o in the Uplink, elide the field: the TV in the Field Descriptor is | o in the Up, elide the field: the TV in the Field Descriptor is set | |||
| set to the known constant value, the MO is set to "equal" and the | to the known constant value, the MO is set to "equal" and the CDA | |||
| CDA is set to "not-sent". | is set to "not-sent". | |||
| o in the Downlink, send the value: TV is not set, MO is set to | o in the Dw, send the value: TV is not set, MO is set to "ignore" | |||
| "ignore" and CDA is set to "value-sent". | and CDA is set to "value-sent". | |||
| 10.7. IPv6 addresses fields | 10.7. IPv6 addresses fields | |||
| As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit | As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit | |||
| long fields; one for the prefix and one for the Interface Identifier | long fields; one for the prefix and one for the Interface Identifier | |||
| (IID). These fields SHOULD be compressed. To allow for a single | (IID). These fields SHOULD be compressed. To allow for a single | |||
| Rule being used for both directions, these values are identified by | Rule being used for both directions, these values are identified by | |||
| their role (DEV or APP) and not by their position in the header | their role (Dev or App) and not by their position in the header | |||
| (source or destination). | (source or destination). | |||
| 10.7.1. IPv6 source and destination prefixes | 10.7.1. IPv6 source and destination prefixes | |||
| Both ends MUST be synchronized with the appropriate prefixes. For a | Both ends MUST be configured with the appropriate prefixes. For a | |||
| specific flow, the source and destination prefixes can be unique and | specific flow, the source and destination prefixes can be unique and | |||
| stored in the context. It can be either a link-local prefix or a | 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 | global prefix. In that case, the TV for the source and destination | |||
| prefixes contain the values, the MO is set to "equal" and the CDA is | prefixes contain the values, the MO is set to "equal" and the CDA is | |||
| set to "not-sent". | set to "not-sent". | |||
| If the Rule is intended to compress packets with different prefix | If the Rule is intended to compress packets with different prefix | |||
| values, match-mapping SHOULD be used. The different prefixes are | values, match-mapping SHOULD be used. The different prefixes are | |||
| listed in the TV, the MO is set to "match-mapping" and the CDA is set | listed in the TV, the MO is set to "match-mapping" and the CDA is set | |||
| to "mapping-sent". See Figure 24 | to "mapping-sent". See Figure 27 | |||
| Otherwise, the TV contains the prefix, the MO is set to "equal" and | Otherwise, the TV contains the prefix, the MO is set to "equal" and | |||
| the CDA is set to "value-sent". | the CDA is set to "value-sent". | |||
| 10.7.2. IPv6 source and destination IID | 10.7.2. IPv6 source and destination IID | |||
| If the DEV or APP IID are based on an LPWAN address, then the IID can | 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 | 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 | that case, the TV is not set, the MO is set to "ignore" and the CDA | |||
| is set to "DevIID" or "AppIID". Note that the LPWAN technology | is set to "DevIID" or "AppIID". The LPWAN technology generally | |||
| generally carries a single identifier corresponding to the DEV. | carries a single identifier corresponding to the Dev. AppIID cannot | |||
| Therefore AppIID cannot be used. | be used. | |||
| For privacy reasons or if the DEV address is changing over time, a | For privacy reasons or if the Dev address is changing over time, a | |||
| static value that is not equal to the DEV address SHOULD be used. In | static value that is not equal to the Dev address SHOULD be used. In | |||
| that case, the TV contains the static value, the MO operator is set | that case, the TV contains the static value, the MO operator is set | |||
| to "equal" and the CDA is set to "not-sent". [RFC7217] provides some | to "equal" and the CDA is set to "not-sent". [RFC7217] provides some | |||
| methods that MAY be used to derive this static identifier. | methods that MAY be used to derive this static identifier. | |||
| If several IIDs are possible, then the TV contains the list of | If several IIDs are possible, then the TV contains the list of | |||
| possible IIDs, the MO is set to "match-mapping" and the CDA is set to | possible IIDs, the MO is set to "match-mapping" and the CDA is set to | |||
| "mapping-sent". | "mapping-sent". | |||
| It MAY also happen that the IID variability only expresses itself on | It MAY also happen that the IID variability only expresses itself on | |||
| a few bytes. In that case, the TV is set to the stable part of the | a few bytes. In that case, the TV is set to the stable part of the | |||
| IID, the MO is set to "MSB" and the CDA is set to "LSB". | IID, the MO is set to "MSB" and the CDA is set to "LSB". | |||
| Finally, the IID can be sent in extenso on the LPWAN. In that case, | Finally, the IID can be sent in its entirety on the LPWAN. In that | |||
| the TV is not set, the MO is set to "ignore" and the CDA is set to | case, the TV is not set, the MO is set to "ignore" and the CDA is set | |||
| "value-sent". | to "value-sent". | |||
| 10.8. IPv6 extensions | 10.8. IPv6 extensions | |||
| No Rule is currently defined that processes IPv6 extensions. If such | No Rule is currently defined that processes IPv6 extensions. | |||
| extensions are needed, their compression/decompression Rules can be | ||||
| based on the MOs and CDAs described above. | ||||
| 10.9. UDP source and destination port | 10.9. UDP source and destination port | |||
| To allow for a single Rule being used for both directions, the UDP | To allow for a single Rule being used for both directions, the UDP | |||
| port values are identified by their role (DEV or APP) and not by | port values are identified by their role (Dev or App) and not by | |||
| their position in the header (source or destination). The SCHC C/D | their position in the header (source or destination). The SCHC C/D | |||
| MUST be aware of the traffic direction (Uplink, Downlink) to select | MUST be aware of the traffic direction (Uplink, Downlink) to select | |||
| the appropriate field. The following Rules apply for DEV and APP | the appropriate field. The following Rules apply for Dev and App | |||
| port numbers. | port numbers. | |||
| If both ends know the port number, it can be elided. The TV contains | If both ends know 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- | the port number, the MO is set to "equal" and the CDA is set to "not- | |||
| sent". | sent". | |||
| If the port variation is on few bits, the TV contains the stable part | 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 | of the port number, the MO is set to "MSB" and the CDA is set to | |||
| "LSB". | "LSB". | |||
| skipping to change at page 54, line 34 ¶ | skipping to change at page 52, line 26 ¶ | |||
| "compute-length". | "compute-length". | |||
| If the payload is small, the TV can be set to 0x0000, the MO set to | If the payload is small, the TV can be set to 0x0000, the MO set to | |||
| "MSB" and the CDA to "LSB". | "MSB" and the CDA to "LSB". | |||
| In other cases, the length SHOULD be sent and the CDA is replaced by | In other cases, the length SHOULD be sent and the CDA is replaced by | |||
| "value-sent". | "value-sent". | |||
| 10.11. UDP Checksum field | 10.11. UDP Checksum field | |||
| The UDP checksum operation is mandatory with IPv6 [RFC8200] for most | The UDP checksum operation is mandatory with IPv6 for most packets | |||
| packets but recognizes that there are exceptions to that default | but there are exceptions [RFC8200]. | |||
| behavior. | ||||
| For instance, protocols that use UDP as a tunnel encapsulation may | For instance, protocols that use UDP as a tunnel encapsulation may | |||
| enable zero-checksum mode for a specific port (or set of ports) for | enable zero-checksum mode for a specific port (or set of ports) for | |||
| sending and/or receiving. [RFC8200] also stipulates that any node | sending and/or receiving. [RFC8200] requires any node implementing | |||
| implementing zero-checksum mode must follow the requirements | zero-checksum mode to follow the requirements specified in | |||
| specified in "Applicability Statement for the Use of IPv6 UDP | "Applicability Statement for the Use of IPv6 UDP Datagrams with Zero | |||
| Datagrams with Zero Checksums" [RFC6936]. | Checksums" [RFC6936]. | |||
| 6LoWPAN Header Compression [RFC6282] also authorizes to send UDP | 6LoWPAN Header Compression [RFC6282] also specifies that a UDP | |||
| datagram that are deprived of the checksum protection when an upper | datagram can be sent without a checksum when an upper layer | |||
| layer guarantees the integrity of the UDP payload and pseudo-header | guarantees the integrity of the UDP payload and pseudo-header. A | |||
| all the way between the compressor that elides the UDP checksum and | specific example of this is when a Message Integrity Check (MIC) | |||
| the decompressor that computes again it. A specific example of this | protects the compressed message between the compressor that elides | |||
| is when a Message Integrity Check (MIC) protects the compressed | the UDP checksum and the decompressor that computes it, with a | |||
| message all along that path with a strength that is identical or | strength that is identical or better to the UDP checksum. | |||
| better to the UDP checksum. | ||||
| In a similar fashion, this specification allows a SCHC compressor to | Similarly, a SCHC compressor MAY elide the UDP checksum when another | |||
| elide the UDP checks when another layer guarantees an identical or | layer guarantees at least equal integrity protection for the UDP | |||
| better integrity protection for the UDP payload and the pseudo- | payload and the pseudo-header. In this case, the TV is not set, the | |||
| header. In this case, the TV is not set, the MO is set to "ignore" | MO is set to "ignore" and the CDA is set to "compute-checksum". | |||
| and the CDA is set to "compute-checksum". | ||||
| In particular, when SCHC fragmentation is used, a fragmentation MIC | In particular, when SCHC fragmentation is used, a fragmentation MIC | |||
| of 2 bytes or more provides equal or better protection than the UDP | of 2 bytes or more provides equal or better protection than the UDP | |||
| checksum; in that case, if the compressor is collocated with the | checksum; in that case, if the compressor is collocated with the | |||
| fragmentation point and the decompressor is collocated with the | fragmentation point and the decompressor is collocated with the | |||
| packet reassembly point, then compressor MAY elide the UDP checksum. | packet reassembly point, and if the SCHC Packet is fragmented even | |||
| Whether and when the UDP Checksum is elided is to be specified in the | when it would fit unfragmented in the L2 MTU, then the compressor MAY | |||
| Profile. | elide the UDP checksum. Whether and when the UDP Checksum is elided | |||
| is to be specified in the Profile. | ||||
| Since the compression happens before the fragmentation, implementors | Since the compression happens before the fragmentation, implementors | |||
| should understand the risks when dealing with unprotected data below | should understand the risks when dealing with unprotected data below | |||
| the transport layer and take special care when manipulating that | the transport layer and take special care when manipulating that | |||
| data. | data. | |||
| In other cases, the checksum SHOULD be explicitly sent. The TV is | In other cases, the checksum SHOULD be explicitly sent. The TV is | |||
| not set, the MO is set to "ignore" and the CDA is set to "value- | not set, the MO is set to "ignore" and the CDA is set to "value- | |||
| sent". | sent". | |||
| skipping to change at page 55, line 41 ¶ | skipping to change at page 53, line 31 ¶ | |||
| 12. Security considerations | 12. Security considerations | |||
| 12.1. Security considerations for SCHC Compression/Decompression | 12.1. Security considerations for SCHC Compression/Decompression | |||
| A malicious header compression could cause the reconstruction of a | A malicious header compression could cause the reconstruction of a | |||
| wrong packet that does not match with the original one. Such a | wrong packet that does not match with the original one. Such a | |||
| corruption MAY be detected with end-to-end authentication and | corruption MAY be detected with end-to-end authentication and | |||
| integrity mechanisms. Header Compression does not add more security | integrity mechanisms. Header Compression does not add more security | |||
| problem than what is already needed in a transmission. For instance, | problem than what is already needed in a transmission. For instance, | |||
| to avoid an attack, never re-construct a packet bigger than some | to avoid an attack, never re-construct a packet bigger than | |||
| configured size (with 1500 bytes as generic default). | MAX_PACKET_SIZE (with 1500 bytes as generic default). | |||
| 12.2. Security considerations for SCHC Fragmentation/Reassembly | 12.2. Security considerations for SCHC Fragmentation/Reassembly | |||
| This subsection describes potential attacks to LPWAN SCHC F/R and | This subsection describes potential attacks to LPWAN SCHC F/R and | |||
| suggests possible countermeasures. | suggests possible countermeasures. | |||
| A node can perform a buffer reservation attack by sending a first | A node can perform a buffer reservation attack by sending a first | |||
| SCHC Fragment to a target. Then, the receiver will reserve buffer | SCHC Fragment to a target. Then, the receiver will reserve buffer | |||
| space for the IPv6 packet. Other incoming fragmented SCHC Packets | space for the IPv6 packet. Other incoming fragmented SCHC Packets | |||
| will be dropped while the reassembly buffer is occupied during the | will be dropped while the reassembly buffer is occupied during the | |||
| skipping to change at page 56, line 22 ¶ | skipping to change at page 54, line 13 ¶ | |||
| processed normally. If buffer overload occurs, a receiver can | processed normally. If buffer overload occurs, a receiver can | |||
| discard packets based on the sender behavior, which MAY help identify | discard packets based on the sender behavior, which MAY help identify | |||
| which SCHC Fragments have been sent by an attacker. | which SCHC Fragments have been sent by an attacker. | |||
| In another type of attack, the malicious node is required to have | In another type of attack, the malicious node is required to have | |||
| overhearing capabilities. If an attacker can overhear a SCHC | overhearing capabilities. If an attacker can overhear a SCHC | |||
| Fragment, it can send a spoofed duplicate (e.g. with random payload) | Fragment, it can send a spoofed duplicate (e.g. with random payload) | |||
| to the destination. If the LPWAN technology does not support | to the destination. If the LPWAN technology does not support | |||
| suitable protection (e.g. source authentication and frame counters to | suitable protection (e.g. source authentication and frame counters to | |||
| prevent replay attacks), a receiver cannot distinguish legitimate | prevent replay attacks), a receiver cannot distinguish legitimate | |||
| from spoofed SCHC Fragments. Therefore, the original IPv6 packet | from spoofed SCHC Fragments. The original IPv6 packet will be | |||
| will be considered corrupt and will be dropped. To protect resource- | considered corrupt and will be dropped. To protect resource- | |||
| constrained nodes from this attack, it has been proposed to establish | constrained nodes from this attack, it has been proposed to establish | |||
| a binding among the SCHC Fragments to be transmitted by a node, by | a binding among the SCHC Fragments to be transmitted by a node, by | |||
| applying content-chaining to the different SCHC Fragments, based on | applying content-chaining to the different SCHC Fragments, based on | |||
| cryptographic hash functionality. The aim of this technique is to | cryptographic hash functionality. The aim of this technique is to | |||
| allow a receiver to identify illegitimate SCHC Fragments. | allow a receiver to identify illegitimate SCHC Fragments. | |||
| Further attacks MAY involve sending overlapped fragments (i.e. | Further attacks can involve sending overlapped fragments (i.e. | |||
| comprising some overlapping parts of the original IPv6 datagram). | comprising some overlapping parts of the original IPv6 datagram). | |||
| Implementers SHOULD make sure that the correct operation is not | Implementers MUST ensure that the correct operation is not affected | |||
| affected by such event. | by such event. | |||
| In ACK-on-Error, a malicious node MAY force a SCHC Fragment sender to | In ACK-on-Error, a malicious node MAY force a SCHC Fragment sender to | |||
| resend a SCHC Fragment a number of times, with the aim to increase | resend a SCHC Fragment a number of times, with the aim to increase | |||
| consumption of the SCHC Fragment sender's resources. To this end, | consumption of the SCHC Fragment sender's resources. To this end, | |||
| the malicious node MAY repeatedly send a fake ACK to the SCHC | the malicious node MAY repeatedly send a fake ACK to the SCHC | |||
| Fragment sender, with a Bitmap that reports that one or more SCHC | Fragment sender, with a Bitmap that reports that one or more SCHC | |||
| Fragments have been lost. In order to mitigate this possible attack, | Fragments have been lost. In order to mitigate this possible attack, | |||
| MAX_ACK_RETRIES MAY be set to a safe value which allows to limit the | MAX_ACK_RETRIES MAY be set to a safe value which allows to limit the | |||
| maximum damage of the attack to an acceptable extent. However, note | maximum damage of the attack to an acceptable extent. However, note | |||
| that a high setting for MAX_ACK_RETRIES benefits SCHC Fragment | that a high setting for MAX_ACK_RETRIES benefits SCHC Fragment | |||
| skipping to change at page 57, line 7 ¶ | skipping to change at page 54, line 46 ¶ | |||
| considered. | considered. | |||
| 13. Acknowledgements | 13. Acknowledgements | |||
| Thanks to Carsten Bormann, Philippe Clavier, Diego Dujovne, Eduardo | Thanks to Carsten Bormann, Philippe Clavier, Diego Dujovne, Eduardo | |||
| Ingles Sanchez, Arunprabhu Kandasamy, Rahul Jadhav, Sergio Lopez | Ingles Sanchez, Arunprabhu Kandasamy, Rahul Jadhav, Sergio Lopez | |||
| Bernal, Antony Markovski, Alexander Pelov, Charles Perkins, Edgar | Bernal, Antony Markovski, Alexander Pelov, Charles Perkins, Edgar | |||
| Ramos, Shoichi Sakane, and Pascal Thubert for useful design | Ramos, Shoichi Sakane, and Pascal Thubert for useful design | |||
| consideration and comments. | consideration and comments. | |||
| 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. | ||||
| 14. References | 14. References | |||
| 14.1. Normative References | 14.1. Normative References | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
| DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
| <https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [RFC7217] Gont, F., "A Method for Generating Semantically Opaque | [RFC6936] Fairhurst, G. and M. Westerlund, "Applicability Statement | |||
| Interface Identifiers with IPv6 Stateless Address | for the Use of IPv6 UDP Datagrams with Zero Checksums", | |||
| Autoconfiguration (SLAAC)", RFC 7217, | RFC 6936, DOI 10.17487/RFC6936, April 2013, | |||
| DOI 10.17487/RFC7217, April 2014, | <https://www.rfc-editor.org/info/rfc6936>. | |||
| <https://www.rfc-editor.org/info/rfc7217>. | ||||
| [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | |||
| 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | |||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
| [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | ||||
| (IPv6) Specification", STD 86, RFC 8200, | ||||
| DOI 10.17487/RFC8200, July 2017, | ||||
| <https://www.rfc-editor.org/info/rfc8200>. | ||||
| 14.2. Informative References | 14.2. Informative References | |||
| [RFC3385] Sheinwald, D., Satran, J., Thaler, P., and V. Cavanna, | [RFC3385] Sheinwald, D., Satran, J., Thaler, P., and V. Cavanna, | |||
| "Internet Protocol Small Computer System Interface (iSCSI) | "Internet Protocol Small Computer System Interface (iSCSI) | |||
| Cyclic Redundancy Check (CRC)/Checksum Considerations", | Cyclic Redundancy Check (CRC)/Checksum Considerations", | |||
| RFC 3385, DOI 10.17487/RFC3385, September 2002, | RFC 3385, DOI 10.17487/RFC3385, September 2002, | |||
| <https://www.rfc-editor.org/info/rfc3385>. | <https://www.rfc-editor.org/info/rfc3385>. | |||
| [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 | |||
| skipping to change at page 58, line 5 ¶ | skipping to change at page 56, line 5 ¶ | |||
| [RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust | [RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust | |||
| Header Compression (ROHC) Framework", RFC 5795, | Header Compression (ROHC) Framework", RFC 5795, | |||
| DOI 10.17487/RFC5795, March 2010, | DOI 10.17487/RFC5795, March 2010, | |||
| <https://www.rfc-editor.org/info/rfc5795>. | <https://www.rfc-editor.org/info/rfc5795>. | |||
| [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 | [RFC6282] Hui, J., Ed. and P. Thubert, "Compression Format for IPv6 | |||
| Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, | Datagrams over IEEE 802.15.4-Based Networks", RFC 6282, | |||
| DOI 10.17487/RFC6282, September 2011, | DOI 10.17487/RFC6282, September 2011, | |||
| <https://www.rfc-editor.org/info/rfc6282>. | <https://www.rfc-editor.org/info/rfc6282>. | |||
| [RFC6936] Fairhurst, G. and M. Westerlund, "Applicability Statement | ||||
| for the Use of IPv6 UDP Datagrams with Zero Checksums", | ||||
| RFC 6936, DOI 10.17487/RFC6936, April 2013, | ||||
| <https://www.rfc-editor.org/info/rfc6936>. | ||||
| [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 | [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 | |||
| Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, | Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, | |||
| February 2014, <https://www.rfc-editor.org/info/rfc7136>. | February 2014, <https://www.rfc-editor.org/info/rfc7136>. | |||
| [RFC8200] Deering, S. and R. Hinden, "Internet Protocol, Version 6 | [RFC7217] Gont, F., "A Method for Generating Semantically Opaque | |||
| (IPv6) Specification", STD 86, RFC 8200, | Interface Identifiers with IPv6 Stateless Address | |||
| DOI 10.17487/RFC8200, July 2017, | Autoconfiguration (SLAAC)", RFC 7217, | |||
| <https://www.rfc-editor.org/info/rfc8200>. | DOI 10.17487/RFC7217, April 2014, | |||
| <https://www.rfc-editor.org/info/rfc7217>. | ||||
| [RFC8376] Farrell, S., Ed., "Low-Power Wide Area Network (LPWAN) | [RFC8376] Farrell, S., Ed., "Low-Power Wide Area Network (LPWAN) | |||
| Overview", RFC 8376, DOI 10.17487/RFC8376, May 2018, | Overview", RFC 8376, DOI 10.17487/RFC8376, May 2018, | |||
| <https://www.rfc-editor.org/info/rfc8376>. | <https://www.rfc-editor.org/info/rfc8376>. | |||
| Appendix A. SCHC Compression Examples | Appendix A. Compression 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 behavior of SCHC. | IPv6/UDP. The goal is to illustrate the behavior of SCHC. | |||
| The most common case using the mechanisms defined in this document | The mechanisms defined in this document can be applied to a Dev that | |||
| will be a LPWAN Dev that embeds some applications running over CoAP. | embeds some applications running over CoAP. In this example, three | |||
| In this example, three flows are considered. The first flow is for | flows are considered. The first flow is for the device management | |||
| the device management based on CoAP using Link Local IPv6 addresses | based on CoAP using Link Local IPv6 addresses and UDP ports 123 and | |||
| and UDP ports 123 and 124 for Dev and App, respectively. The second | 124 for Dev and App, respectively. The second flow will be a CoAP | |||
| flow will be a CoAP server for measurements done by the Device (using | server for measurements done by the Dev (using ports 5683) and Global | |||
| ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to | IPv6 Address prefixes alpha::IID/64 to beta::1/64. The last flow is | |||
| beta::1/64. The last flow is for legacy applications using different | for legacy applications using different ports numbers, the | |||
| ports numbers, the destination IPv6 address prefix is gamma::1/64. | destination IPv6 address prefix is gamma::1/64. | |||
| Figure 23 presents the protocol stack for this Device. IPv6 and UDP | Figure 26 presents the protocol stack. IPv6 and UDP are represented | |||
| are represented with dotted lines since these protocols are | with dotted lines since these protocols are compressed on the radio | |||
| compressed on the radio link. | link. | |||
| Management Data | Management Data | |||
| +----------+---------+---------+ | +----------+---------+---------+ | |||
| | CoAP | CoAP | legacy | | | CoAP | CoAP | legacy | | |||
| +----||----+---||----+---||----+ | +----||----+---||----+---||----+ | |||
| . UDP . UDP | UDP | | . UDP . UDP | UDP | | |||
| ................................ | ................................ | |||
| . IPv6 . IPv6 . IPv6 . | . IPv6 . IPv6 . IPv6 . | |||
| +------------------------------+ | +------------------------------+ | |||
| | SCHC Header compression | | | SCHC Header compression | | |||
| | and fragmentation | | | and fragmentation | | |||
| +------------------------------+ | +------------------------------+ | |||
| | LPWAN L2 technologies | | | LPWAN L2 technologies | | |||
| +------------------------------+ | +------------------------------+ | |||
| DEV or NGW | Dev or NGW | |||
| Figure 23: Simplified Protocol Stack for LP-WAN | Figure 26: Simplified Protocol Stack for LP-WAN | |||
| Note that in some LPWAN technologies, only the Devs have a device ID. | In some LPWAN technologies, only the Devs have a device ID. When | |||
| Therefore, when such technologies are used, it is necessary to | such technologies are used, it is necessary to statically define an | |||
| statically define an IID for the Link Local address for the SCHC C/D. | IID for the Link Local address for the SCHC C/D. | |||
| Rule 0 | Rule 0 | |||
| +----------------+--+--+--+---------+--------+------------++------+ | +----------------+--+--+--+---------+--------+------------++------+ | |||
| | Field |FL|FP|DI| Value | Match | Comp Decomp|| Sent | | | Field |FL|FP|DI| Value | Match | Comp Decomp|| Sent | | |||
| | | | | | | Opera. | Action ||[bits]| | | | | | | | Opera. | Action ||[bits]| | |||
| +----------------+--+--+--+---------+---------------------++------+ | +----------------+--+--+--+---------+---------------------++------+ | |||
| |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |||
| |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || | | |IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || | | |||
| |IPv6 DEVprefix |64|1 |Bi|FE80::/64| equal | not-sent || | | |IPv6 DevPrefix |64|1 |Bi|FE80::/64| equal | not-sent || | | |||
| |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |||
| |IPv6 APPprefix |64|1 |Bi|FE80::/64| equal | not-sent || | | |IPv6 AppPrefix |64|1 |Bi|FE80::/64| equal | not-sent || | | |||
| |IPv6 AppIID |64|1 |Bi|::1 | equal | not-sent || | | |IPv6 AppIID |64|1 |Bi|::1 | equal | not-sent || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| |UDP DEVport |16|1 |Bi|123 | equal | not-sent || | | |UDP DevPort |16|1 |Bi|123 | equal | not-sent || | | |||
| |UDP APPport |16|1 |Bi|124 | equal | not-sent || | | |UDP AppPort |16|1 |Bi|124 | equal | not-sent || | | |||
| |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| Rule 1 | Rule 1 | |||
| +----------------+--+--+--+---------+--------+------------++------+ | +----------------+--+--+--+---------+--------+------------++------+ | |||
| | Field |FL|FP|DI| Value | Match | Action || Sent | | | Field |FL|FP|DI| Value | Match | Action || Sent | | |||
| | | | | | | Opera. | Action ||[bits]| | | | | | | | Opera. | Action ||[bits]| | |||
| +----------------+--+--+--+---------+--------+------------++------+ | +----------------+--+--+--+---------+--------+------------++------+ | |||
| |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |||
| |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || | | |IPv6 Hop Limit |8 |1 |Bi|255 | ignore | not-sent || | | |||
| |IPv6 DEVprefix |64|1 |Bi|[alpha/64, match- |mapping-sent|| 1 | | |IPv6 DevPrefix |64|1 |Bi|[alpha/64, match- |mapping-sent|| 1 | | |||
| | | | | |fe80::/64] mapping| || | | | | | | |fe80::/64] mapping| || | | |||
| |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |||
| |IPv6 APPprefix |64|1 |Bi|[beta/64,| match- |mapping-sent|| 2 | | |IPv6 AppPrefix |64|1 |Bi|[beta/64,| match- |mapping-sent|| 2 | | |||
| | | | | |alpha/64,| mapping| || | | | | | | |alpha/64,| mapping| || | | |||
| | | | | |fe80::64]| | || | | | | | | |fe80::64]| | || | | |||
| |IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || | | |IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| |UDP DEVport |16|1 |Bi|5683 | equal | not-sent || | | |UDP DevPort |16|1 |Bi|5683 | equal | not-sent || | | |||
| |UDP APPport |16|1 |Bi|5683 | equal | not-sent || | | |UDP AppPort |16|1 |Bi|5683 | equal | not-sent || | | |||
| |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| Rule 2 | Rule 2 | |||
| +----------------+--+--+--+---------+--------+------------++------+ | +----------------+--+--+--+---------+--------+------------++------+ | |||
| | Field |FL|FP|DI| Value | Match | Action || Sent | | | Field |FL|FP|DI| Value | Match | Action || Sent | | |||
| | | | | | | Opera. | Action ||[bits]| | | | | | | | Opera. | Action ||[bits]| | |||
| +----------------+--+--+--+---------+--------+------------++------+ | +----------------+--+--+--+---------+--------+------------++------+ | |||
| |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |IPv6 version |4 |1 |Bi|6 | equal | not-sent || | | |||
| |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | | |||
| |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |IPv6 Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | | |||
| |IPv6 Hop Limit |8 |1 |Up|255 | ignore | not-sent || | | |IPv6 Hop Limit |8 |1 |Up|255 | ignore | not-sent || | | |||
| |IPv6 Hop Limit |8 |1 |Dw| | ignore | value-sent || 8 | | |IPv6 Hop Limit |8 |1 |Dw| | ignore | value-sent || 8 | | |||
| |IPv6 DEVprefix |64|1 |Bi|alpha/64 | equal | not-sent || | | |IPv6 DevPrefix |64|1 |Bi|alpha/64 | equal | not-sent || | | |||
| |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |IPv6 DevIID |64|1 |Bi| | ignore | DevIID || | | |||
| |IPv6 APPprefix |64|1 |Bi|gamma/64 | equal | not-sent || | | |IPv6 AppPrefix |64|1 |Bi|gamma/64 | equal | not-sent || | | |||
| |IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || | | |IPv6 AppIID |64|1 |Bi|::1000 | equal | not-sent || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| |UDP DEVport |16|1 |Bi|8720 | MSB(12)| LSB || 4 | | |UDP DevPort |16|1 |Bi|8720 | MSB(12)| LSB || 4 | | |||
| |UDP APPport |16|1 |Bi|8720 | MSB(12)| LSB || 4 | | |UDP AppPort |16|1 |Bi|8720 | MSB(12)| LSB || 4 | | |||
| |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |UDP Length |16|1 |Bi| | ignore | comp-length|| | | |||
| |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |UDP checksum |16|1 |Bi| | ignore | comp-chk || | | |||
| +================+==+==+==+=========+========+============++======+ | +================+==+==+==+=========+========+============++======+ | |||
| Figure 24: Context Rules | Figure 27: Context Rules | |||
| All the fields described in the three Rules depicted on Figure 24 are | All the fields described in the three Rules depicted on Figure 27 are | |||
| present in the IPv6 and UDP headers. The DevIID-DID value is found | present in the IPv6 and UDP headers. The DevIID-DID value is found | |||
| in the L2 header. | in the L2 header. | |||
| The second and third Rules use global addresses. The way the Dev | The second and third Rules use global addresses. The way the Dev | |||
| learns the prefix is not in the scope of the document. | learns the prefix is not in the scope of the document. | |||
| The third Rule compresses port numbers to 4 bits. | The third Rule compresses each port number to 4 bits. | |||
| Appendix B. Fragmentation Examples | Appendix B. Fragmentation Examples | |||
| This section provides examples for the different fragment reliability | This section provides examples for the various fragment reliability | |||
| modes specified in this document. | modes specified in this document. In the drawings, Bitmaps are shown | |||
| in their uncompressed form. | ||||
| Figure 25 illustrates the transmission in No-ACK mode of a SCHC | Figure 28 illustrates the transmission in No-ACK mode of a SCHC | |||
| Packet that needs 11 SCHC Fragments. FCN is 1 bit wide. | Packet that needs 11 SCHC Fragments. FCN is 1 bit wide. | |||
| Sender Receiver | Sender Receiver | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-------FCN=0-------->| | |-------FCN=0-------->| | |||
| |-----FCN=1 + MIC --->| Integrity check: success | |-----FCN=1 + MIC --->| Integrity check: success | |||
| (End) | (End) | |||
| Figure 25: Transmission in No-ACK mode of a SCHC Packet carried by 11 | Figure 28: No-ACK mode, 11 SCHC Fragments | |||
| SCHC Fragments | ||||
| In the following examples, N (the size of the FCN field) is 3 bits. | In the following examples, N (the size of the FCN field) is 3 bits. | |||
| Therefore, the All-1 FCN value is 7. | The All-1 FCN value is 7. | |||
| Figure 26 illustrates the transmission in ACK-on-Error mode of a SCHC | Figure 29 illustrates the transmission in ACK-on-Error mode of a SCHC | |||
| Packet fragmented in 11 tiles, with one tile per SCHC Fragment, | Packet fragmented in 11 tiles, with one tile per SCHC Fragment, | |||
| MAX_WIND_FCN=6 and no lost SCHC Fragment. | WINDOW_SIZE=7 and no lost SCHC Fragment. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4----->| | |-----W=0, FCN=4----->| | |||
| |-----W=0, FCN=3----->| | |-----W=0, FCN=3----->| | |||
| |-----W=0, FCN=2----->| | |-----W=0, FCN=2----->| | |||
| |-----W=0, FCN=1----->| | |-----W=0, FCN=1----->| | |||
| |-----W=0, FCN=0----->| | |-----W=0, FCN=0----->| | |||
| (no ACK) | (no ACK) | |||
| |-----W=1, FCN=6----->| | |-----W=1, FCN=6----->| | |||
| |-----W=1, FCN=5----->| | |-----W=1, FCN=5----->| | |||
| |-----W=1, FCN=4----->| | |-----W=1, FCN=4----->| | |||
| |--W=1, FCN=7 + MIC-->| Integrity check: success | |--W=1, FCN=7 + MIC-->| Integrity check: success | |||
| |<-- ACK, W=1, C=1 ---| C=1 | |<-- ACK, W=1, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 26: Transmission in ACK-on-Error mode of a SCHC Packet | Figure 29: ACK-on-Error mode, 11 tiles, one tile per SCHC Fragment, | |||
| fragmented in 11 tiles, with one tile per SCHC Fragment, | no lost SCHC Fragment. | |||
| MAX_WIND_FCN=6 and no lost SCHC Fragment. | ||||
| Figure 27 illustrates the transmission in ACK-on-Error mode of a SCHC | Figure 30 illustrates the transmission in ACK-on-Error mode of a SCHC | |||
| Packet fragmented in 11 tiles, with one tile per SCHC Fragment, | Packet fragmented in 11 tiles, with one tile per SCHC Fragment, | |||
| MAX_WIND_FCN=6 and three lost SCHC Fragments. | WINDOW_SIZE=7 and three lost SCHC Fragments. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4--X-->| | |-----W=0, FCN=4--X-->| | |||
| |-----W=0, FCN=3----->| | |-----W=0, FCN=3----->| | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| |-----W=0, FCN=1----->| | |-----W=0, FCN=1----->| | |||
| |-----W=0, FCN=0----->| 6543210 | |-----W=0, FCN=0----->| 6543210 | |||
| |<-- ACK, W=0, C=0 ---| Bitmap:1101011 | |<-- ACK, W=0, C=0 ---| Bitmap:1101011 | |||
| skipping to change at page 62, line 50 ¶ | skipping to change at page 60, line 49 ¶ | |||
| (no ACK) | (no ACK) | |||
| |-----W=1, FCN=6----->| | |-----W=1, FCN=6----->| | |||
| |-----W=1, FCN=5----->| | |-----W=1, FCN=5----->| | |||
| |-----W=1, FCN=4--X-->| | |-----W=1, FCN=4--X-->| | |||
| |- W=1, FCN=7 + MIC ->| Integrity check: failure | |- W=1, FCN=7 + MIC ->| Integrity check: failure | |||
| |<-- ACK, W=1, C=0 ---| C=0, Bitmap:1100001 | |<-- ACK, W=1, C=0 ---| C=0, Bitmap:1100001 | |||
| |-----W=1, FCN=4----->| Integrity check: success | |-----W=1, FCN=4----->| Integrity check: success | |||
| |<-- ACK, W=1, C=1 ---| C=1 | |<-- ACK, W=1, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 27: Transmission in ACK-on-Error mode of a SCHC Packet | Figure 30: ACK-on-Error mode, 11 tiles, one tile per SCHC Fragment, | |||
| fragmented in 11 tiles, with one tile per SCHC Fragment, | lost SCHC Fragments. | |||
| MAX_WIND_FCN=6 and three lost SCHC Fragments. | ||||
| Figure 28 shows an example of a transmission in ACK-on-Error mode of | Figure 31 shows an example of a transmission in ACK-on-Error mode of | |||
| a SCHC Packet fragmented in 73 tiles, with N=5, MAX_WIND_FCN=27, M=2 | a SCHC Packet fragmented in 73 tiles, with N=5, WINDOW_SIZE=28, M=2 | |||
| and 3 lost SCHC Fragments. | and 3 lost SCHC Fragments. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=27----->| 4 tiles sent | |-----W=0, FCN=27----->| 4 tiles sent | |||
| |-----W=0, FCN=23----->| 4 tiles sent | |-----W=0, FCN=23----->| 4 tiles sent | |||
| |-----W=0, FCN=19----->| 4 tiles sent | |-----W=0, FCN=19----->| 4 tiles sent | |||
| |-----W=0, FCN=15--X-->| 4 tiles sent (not received) | |-----W=0, FCN=15--X-->| 4 tiles sent (not received) | |||
| |-----W=0, FCN=11----->| 4 tiles sent | |-----W=0, FCN=11----->| 4 tiles sent | |||
| |-----W=0, FCN=7 ----->| 4 tiles sent | |-----W=0, FCN=7 ----->| 4 tiles sent | |||
| |-----W=0, FCN=3 ----->| 4 tiles sent | |-----W=0, FCN=3 ----->| 4 tiles sent | |||
| skipping to change at page 63, line 50 ¶ | skipping to change at page 61, line 50 ¶ | |||
| |<--- ACK, W=1, C=0 ---| C=0, Bitmap:1111111111111111111111110000 | |<--- ACK, W=1, C=0 ---| C=0, Bitmap:1111111111111111111111110000 | |||
| M |-----W=1, FCN=3 ----->| 1 tile sent | M |-----W=1, FCN=3 ----->| 1 tile sent | |||
| T |-----W=1, FCN=2 ----->| 1 tile sent | T |-----W=1, FCN=2 ----->| 1 tile sent | |||
| U |-----W=1, FCN=1 ----->| 1 tile sent | U |-----W=1, FCN=1 ----->| 1 tile sent | |||
| |-----W=1, FCN=0 ----->| 1 tile sent | |-----W=1, FCN=0 ----->| 1 tile sent | |||
| | |<--- ACK, W=2, C=0 ---| C=0, Bitmap:1111111111111101000000000001 | | |<--- ACK, W=2, C=0 ---| C=0, Bitmap:1111111111111101000000000001 | |||
| | |-----W=2, FCN=13----->| Integrity check: success | | |-----W=2, FCN=13----->| Integrity check: success | |||
| V |<--- ACK, W=2, C=1 ---| C=1 | V |<--- ACK, W=2, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 28: ACK-on-Error mode with variable MTU. | Figure 31: ACK-on-Error mode, variable MTU. | |||
| In this example, the L2 MTU becomes reduced just before sending the | In this example, the L2 MTU becomes reduced just before sending the | |||
| "W=2, FCN=19" fragment, leaving space for only 1 tile in each | "W=2, FCN=19" fragment, leaving space for only 1 tile in each | |||
| forthcoming SCHC Fragment. Before retransmissions, the 73 tiles are | forthcoming SCHC Fragment. Before retransmissions, the 73 tiles are | |||
| carried by a total of 25 SCHC Fragments, the last 9 being of smaller | carried by a total of 25 SCHC Fragments, the last 9 being of smaller | |||
| size. | size. | |||
| Note 1: Bitmaps are shown prior to compression for transmission | Note: other sequences of events (e.g. regarding when ACKs are sent by | |||
| the Receiver) are also allowed by this specification. Profiles may | ||||
| Note 2: other sequences of events (e.g. regarding when ACKs are sent | restrict this flexibility. | |||
| by the Receiver) are also allowed by this specification. Profiles | ||||
| may restrict this flexibility. | ||||
| Figure 29 illustrates the transmission in ACK-Always mode of a SCHC | Figure 32 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 11 tiles, with one tile per SCHC Fragment, with | Packet fragmented in 11 tiles, with one tile per SCHC Fragment, with | |||
| N=3, MAX_WIND_FCN=6 and no loss. | N=3, WINDOW_SIZE=7 and no loss. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4----->| | |-----W=0, FCN=4----->| | |||
| |-----W=0, FCN=3----->| | |-----W=0, FCN=3----->| | |||
| |-----W=0, FCN=2----->| | |-----W=0, FCN=2----->| | |||
| |-----W=0, FCN=1----->| | |-----W=0, FCN=1----->| | |||
| |-----W=0, FCN=0----->| | |-----W=0, FCN=0----->| | |||
| |<-- ACK, W=0, C=0 ---| Bitmap:1111111 | |<-- ACK, W=0, C=0 ---| Bitmap:1111111 | |||
| |-----W=1, FCN=6----->| | |-----W=1, FCN=6----->| | |||
| |-----W=1, FCN=5----->| | |-----W=1, FCN=5----->| | |||
| |-----W=1, FCN=4----->| | |-----W=1, FCN=4----->| | |||
| |--W=1, FCN=7 + MIC-->| Integrity check: success | |--W=1, FCN=7 + MIC-->| Integrity check: success | |||
| |<-- ACK, W=1, C=1 ---| C=1 | |<-- ACK, W=1, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 29: Transmission in ACK-Always mode of a SCHC Packet | Figure 32: ACK-Always mode, 11 tiles, one tile per SCHC Fragment, no | |||
| fragmented in 11 tiles, with one tile per SCHC Fragment, with N=3, | loss. | |||
| MAX_WIND_FCN=6 and no loss. | ||||
| Figure 30 illustrates the transmission in ACK-Always mode of a SCHC | Figure 33 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 11 tiles, with one tile per SCHC Fragment, N=3, | Packet fragmented in 11 tiles, with one tile per SCHC Fragment, N=3, | |||
| MAX_WIND_FCN=6 and three lost SCHC Fragments. | WINDOW_SIZE=7 and three lost SCHC Fragments. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4--X-->| | |-----W=0, FCN=4--X-->| | |||
| |-----W=0, FCN=3----->| | |-----W=0, FCN=3----->| | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| |-----W=0, FCN=1----->| | |-----W=0, FCN=1----->| | |||
| |-----W=0, FCN=0----->| 6543210 | |-----W=0, FCN=0----->| 6543210 | |||
| |<-- ACK, W=0, C=0 ---| Bitmap:1101011 | |<-- ACK, W=0, C=0 ---| Bitmap:1101011 | |||
| skipping to change at page 65, line 26 ¶ | skipping to change at page 63, line 26 ¶ | |||
| |<-- ACK, W=0, C=0 ---| Bitmap:1111111 | |<-- ACK, W=0, C=0 ---| Bitmap:1111111 | |||
| |-----W=1, FCN=6----->| | |-----W=1, FCN=6----->| | |||
| |-----W=1, FCN=5----->| | |-----W=1, FCN=5----->| | |||
| |-----W=1, FCN=4--X-->| | |-----W=1, FCN=4--X-->| | |||
| |--W=1, FCN=7 + MIC-->| Integrity check: failure | |--W=1, FCN=7 + MIC-->| Integrity check: failure | |||
| |<-- ACK, W=1, C=0 ---| C=0, Bitmap:11000001 | |<-- ACK, W=1, C=0 ---| C=0, Bitmap:11000001 | |||
| |-----W=1, FCN=4----->| Integrity check: success | |-----W=1, FCN=4----->| Integrity check: success | |||
| |<-- ACK, W=1, C=1 ---| C=1 | |<-- ACK, W=1, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 30: Transmission in ACK-Always mode of a SCHC Packet | Figure 33: ACK-Always mode, 11 tiles, one tile per SCHC Fragment, | |||
| fragmented in 11 tiles, with one tile per SCHC Fragment, N=3, | three lost SCHC Fragments. | |||
| MAX_WIND_FCN=6 and three lost SCHC Fragments. | ||||
| Figure 31 illustrates the transmission in ACK-Always mode of a SCHC | Figure 34 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | Packet fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | |||
| MAX_WIND_FCN=6, three lost SCHC Fragments and only one retry needed | WINDOW_SIZE=7, three lost SCHC Fragments and only one retry needed to | |||
| to recover each lost SCHC Fragment. | recover each lost SCHC Fragment. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4--X-->| | |-----W=0, FCN=4--X-->| | |||
| |-----W=0, FCN=3--X-->| | |-----W=0, FCN=3--X-->| | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| |--W=0, FCN=7 + MIC-->| Integrity check: failure | |--W=0, FCN=7 + MIC-->| Integrity check: failure | |||
| |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |||
| |-----W=0, FCN=4----->| Integrity check: failure | |-----W=0, FCN=4----->| Integrity check: failure | |||
| |-----W=0, FCN=3----->| Integrity check: failure | |-----W=0, FCN=3----->| Integrity check: failure | |||
| |-----W=0, FCN=2----->| Integrity check: success | |-----W=0, FCN=2----->| Integrity check: success | |||
| |<-- ACK, W=0, C=1 ---| C=1 | |<-- ACK, W=0, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 31: Transmission in ACK-Always mode of a SCHC Packet | Figure 34: ACK-Always mode, 6 tiles, one tile per SCHC Fragment, | |||
| fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | three lost SCHC Fragments. | |||
| MAX_WIND_FCN=6, three lost SCHC Fragments. | ||||
| Figure 32 illustrates the transmission in ACK-Always mode of a SCHC | Figure 35 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | Packet fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | |||
| MAX_WIND_FCN=6, three lost SCHC Fragments, and the second SCHC ACK | WINDOW_SIZE=7, three lost SCHC Fragments, and the second SCHC ACK | |||
| lost. | lost. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4--X-->| | |-----W=0, FCN=4--X-->| | |||
| |-----W=0, FCN=3--X-->| | |-----W=0, FCN=3--X-->| | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| |--W=0, FCN=7 + MIC-->| Integrity check: failure | |--W=0, FCN=7 + MIC-->| Integrity check: failure | |||
| |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |||
| |-----W=0, FCN=4----->| Integrity check: failure | |-----W=0, FCN=4----->| Integrity check: failure | |||
| |-----W=0, FCN=3----->| Integrity check: failure | |-----W=0, FCN=3----->| Integrity check: failure | |||
| |-----W=0, FCN=2----->| Integrity check: success | |-----W=0, FCN=2----->| Integrity check: success | |||
| |<-X-ACK, W=0, C=1 ---| C=1 | |<-X-ACK, W=0, C=1 ---| C=1 | |||
| timeout | | | timeout | | | |||
| |--- W=0, ACK REQ --->| ACK REQ | |--- W=0, ACK REQ --->| ACK REQ | |||
| |<-- ACK, W=0, C=1 ---| C=1 | |<-- ACK, W=0, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 32: Transmission in ACK-Always mode of a SCHC Packet | Figure 35: ACK-Always mode, 6 tiles, one tile per SCHC Fragment, SCHC | |||
| fragmented in 6 tiles, with one tile per SCHC Fragment, N=3, | ACK loss. | |||
| MAX_WIND_FCN=6, three lost SCHC Fragments, and the second SCHC ACK | ||||
| lost. | ||||
| Figure 33 illustrates the transmission in ACK-Always mode of a SCHC | Figure 36 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 6 tiles, with N=3, MAX_WIND_FCN=6, with three | Packet fragmented in 6 tiles, with N=3, WINDOW_SIZE=7, with three | |||
| lost SCHC Fragments, and one retransmitted SCHC Fragment lost again. | lost SCHC Fragments, and one retransmitted SCHC Fragment lost again. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=6----->| | |-----W=0, FCN=6----->| | |||
| |-----W=0, FCN=5----->| | |-----W=0, FCN=5----->| | |||
| |-----W=0, FCN=4--X-->| | |-----W=0, FCN=4--X-->| | |||
| |-----W=0, FCN=3--X-->| | |-----W=0, FCN=3--X-->| | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| |--W=0, FCN=7 + MIC-->| Integrity check: failure | |--W=0, FCN=7 + MIC-->| Integrity check: failure | |||
| |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |<-- ACK, W=0, C=0 ---| C=0, Bitmap:1100001 | |||
| |-----W=0, FCN=4----->| Integrity check: failure | |-----W=0, FCN=4----->| Integrity check: failure | |||
| |-----W=0, FCN=3----->| Integrity check: failure | |-----W=0, FCN=3----->| Integrity check: failure | |||
| |-----W=0, FCN=2--X-->| | |-----W=0, FCN=2--X-->| | |||
| timeout| | | timeout| | | |||
| |--- W=0, ACK REQ --->| ACK REQ | |--- W=0, ACK REQ --->| ACK REQ | |||
| |<-- ACK, W=0, C=0 ---| C=0, Bitmap: 1111101 | |<-- ACK, W=0, C=0 ---| C=0, Bitmap: 1111101 | |||
| |-----W=0, FCN=2----->| Integrity check: success | |-----W=0, FCN=2----->| Integrity check: success | |||
| |<-- ACK, W=0, C=1 ---| C=1 | |<-- ACK, W=0, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 33: Transmission in ACK-Always mode of a SCHC Packet | Figure 36: ACK-Always mode, 6 tiles, retransmitted SCHC Fragment lost | |||
| fragmented in 6 tiles, with N=3, MAX_WIND_FCN=6, with three lost SCHC | again. | |||
| Fragments, and one retransmitted SCHC Fragment lost again. | ||||
| Figure 34 illustrates the transmission in ACK-Always mode of a SCHC | Figure 37 illustrates the transmission in ACK-Always mode of a SCHC | |||
| Packet fragmented in 28 tiles, with one tile per SCHC Fragment, N=5, | Packet fragmented in 28 tiles, with one tile per SCHC Fragment, N=5, | |||
| MAX_WIND_FCN=23 and two lost SCHC Fragments. | WINDOW_SIZE=24 and two lost SCHC Fragments. | |||
| Sender Receiver | Sender Receiver | |||
| |-----W=0, FCN=23----->| | |-----W=0, FCN=23----->| | |||
| |-----W=0, FCN=22----->| | |-----W=0, FCN=22----->| | |||
| |-----W=0, FCN=21--X-->| | |-----W=0, FCN=21--X-->| | |||
| |-----W=0, FCN=20----->| | |-----W=0, FCN=20----->| | |||
| |-----W=0, FCN=19----->| | |-----W=0, FCN=19----->| | |||
| |-----W=0, FCN=18----->| | |-----W=0, FCN=18----->| | |||
| |-----W=0, FCN=17----->| | |-----W=0, FCN=17----->| | |||
| |-----W=0, FCN=16----->| | |-----W=0, FCN=16----->| | |||
| skipping to change at page 68, line 42 ¶ | skipping to change at page 65, line 46 ¶ | |||
| |-----W=0, FCN=21----->| | |-----W=0, FCN=21----->| | |||
| |-----W=0, FCN=10----->| | |-----W=0, FCN=10----->| | |||
| |<--- ACK, W=0, C=0 ---| Bitmap:111111111111111111111111 | |<--- ACK, W=0, C=0 ---| Bitmap:111111111111111111111111 | |||
| |-----W=1, FCN=23----->| | |-----W=1, FCN=23----->| | |||
| |-----W=1, FCN=22----->| | |-----W=1, FCN=22----->| | |||
| |-----W=1, FCN=21----->| | |-----W=1, FCN=21----->| | |||
| |--W=1, FCN=31 + MIC-->| Integrity check: success | |--W=1, FCN=31 + MIC-->| Integrity check: success | |||
| |<--- ACK, W=1, C=1 ---| C=1 | |<--- ACK, W=1, C=1 ---| C=1 | |||
| (End) | (End) | |||
| Figure 34: Transmission in ACK-Always mode of a SCHC Packet | Figure 37: ACK-Always mode, 28 tiles, one tile per SCHC Fragment, | |||
| fragmented in 28 tiles, with one tile per SCHC Fragment, N=5, | lost SCHC Fragments. | |||
| MAX_WIND_FCN=23 and two lost SCHC Fragments. | ||||
| Appendix C. Fragmentation State Machines | Appendix C. Fragmentation State Machines | |||
| The fragmentation state machines of the sender and the receiver, one | The fragmentation state machines of the sender and the receiver, one | |||
| for each of the different reliability modes, are described in the | for each of the different reliability modes, are described in the | |||
| following figures: | following figures: | |||
| +===========+ | +===========+ | |||
| +------------+ Init | | +------------+ Init | | |||
| | FCN=0 +===========+ | | FCN=0 +===========+ | |||
| skipping to change at page 69, line 23 ¶ | skipping to change at page 66, line 29 ¶ | |||
| +--------> | Send | send Fragment (FCN=0) | +--------> | Send | send Fragment (FCN=0) | |||
| +===+=======+ | +===+=======+ | |||
| | last fragment | | last fragment | |||
| | ~~~~~~~~~~~~ | | ~~~~~~~~~~~~ | |||
| | FCN = 1 | | FCN = 1 | |||
| v send fragment+MIC | v send fragment+MIC | |||
| +============+ | +============+ | |||
| | END | | | END | | |||
| +============+ | +============+ | |||
| Figure 35: Sender State Machine for the No-ACK Mode | Figure 38: Sender State Machine for the No-ACK Mode | |||
| +------+ Not All-1 | +------+ Not All-1 | |||
| +==========+=+ | ~~~~~~~~~~~~~~~~~~~ | +==========+=+ | ~~~~~~~~~~~~~~~~~~~ | |||
| | + <--+ set Inactivity Timer | | + <--+ set Inactivity Timer | |||
| | RCV Frag +-------+ | | RCV Frag +-------+ | |||
| +=+===+======+ |All-1 & | +=+===+======+ |All-1 & | |||
| All-1 & | | |MIC correct | All-1 & | | |MIC correct | |||
| MIC wrong | |Inactivity | | MIC wrong | |Inactivity | | |||
| | |Timer Exp. | | | |Timer Exp. | | |||
| v | | | v | | | |||
| +==========++ | v | +==========++ | v | |||
| | Error |<-+ +========+==+ | | Error |<-+ +========+==+ | |||
| +===========+ | END | | +===========+ | END | | |||
| +===========+ | +===========+ | |||
| Figure 36: Receiver State Machine for the No-ACK Mode | Figure 39: Receiver State Machine for the No-ACK Mode | |||
| +=======+ | +=======+ | |||
| | INIT | FCN!=0 & more frags | | INIT | FCN!=0 & more frags | |||
| | | ~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~~~~~~~~~~~~~~ | |||
| +======++ +--+ send Window + frag(FCN) | +======++ +--+ send Window + frag(FCN) | |||
| W=0 | | | FCN- | W=0 | | | FCN- | |||
| Clear lcl_bm | | v set lcl_bm | Clear lcl_bm | | v set lcl_bm | |||
| FCN=max value | ++==+========+ | FCN=max value | ++==+========+ | |||
| +> | | | +> | | | |||
| +---------------------> | SEND | | +---------------------> | SEND | | |||
| | +==+===+=====+ | | +==+===+=====+ | |||
| | FCN==0 & more frags | | last frag | | FCN==0 & more frags | | last frag | |||
| | ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~ | |||
| | set lcl_bm | | set lcl_bm | | set lcl_bm | | set lcl_bm | |||
| | send wnd + frag(all-0) | | send wnd+frag(all-1)+MIC | | send wnd + frag(all-0) | | send wnd+frag(all-1)+MIC | |||
| | set Retrans_Timer | | set Retrans_Timer | | set Retrans_Timer | | set Retrans_Timer | |||
| | | | | | | | | |||
| |Recv_wnd == wnd & | | | |Recv_wnd == wnd & | | | |||
| |lcl_bm==recv_bm & | | +-----------------------+ | |lcl_bm==recv_bm & | | +----------------------+ | |||
| |more frag | | | lcl_bm!=rcv-bm | | |more frag | | | lcl_bm!=rcv-bm | | |||
| |~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~ | | |~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~ | | |||
| |Stop Retrans_Timer | | | Attempt++ v | |Stop Retrans_Timer | | | Attempt++ v | |||
| |clear lcl_bm v v | +=====+=+ | |clear lcl_bm v v | +=====+=+ | |||
| |window=next_window +====+===+==+===+ |Resend | | |window=next_window +====+===+==+===+ |Resend | | |||
| +---------------------+ | |Missing| | +---------------------+ | |Missing| | |||
| +----+ Wait | |Frag | | +----+ Wait | |Frag | | |||
| not expected wnd | | Bitmap | +=======+ | not expected wnd | | Bitmap | +=======+ | |||
| ~~~~~~~~~~~~~~~~ +--->+ ++Retrans_Timer Exp | | ~~~~~~~~~~~~~~~~ +--->+ ++Retrans_Timer Exp | | |||
| discard frag +==+=+===+=+==+=+| ~~~~~~~~~~~~~~~~~ | | discard frag +==+=+===+=+==+=+| ~~~~~~~~~~~~~~~~~ | | |||
| | | | ^ ^ |reSend(empty)All-* | | | | | ^ ^ |reSend(empty)All-* | | |||
| | | | | | |Set Retrans_Timer | | | | | | | |Set Retrans_Timer | | |||
| | | | | +--+Attempt++ | | | | | | +--+Attempt++ | | |||
| skipping to change at page 70, line 49 ¶ | skipping to change at page 67, line 49 ¶ | |||
| Stop Retrans_Timer| | | | Stop Retrans_Timer| | | | |||
| +=============+ | | | | +=============+ | | | | |||
| | END +<--------+ | | | | END +<--------+ | | | |||
| +=============+ | | Attempt > MAX_ACK_REQUESTS | +=============+ | | Attempt > MAX_ACK_REQUESTS | |||
| All-1 Window & | | ~~~~~~~~~~~~~~~~~~ | All-1 Window & | | ~~~~~~~~~~~~~~~~~~ | |||
| MIC_bit ==0 & | v Send Abort | MIC_bit ==0 & | v Send Abort | |||
| lcl_bm==recv_bm | +=+===========+ | lcl_bm==recv_bm | +=+===========+ | |||
| ~~~~~~~~~~~~ +>| ERROR | | ~~~~~~~~~~~~ +>| ERROR | | |||
| Send Abort +=============+ | Send Abort +=============+ | |||
| Figure 37: Sender State Machine for the ACK-Always Mode | Figure 40: Sender State Machine for the ACK-Always Mode | |||
| Not All- & w=expected +---+ +---+w = Not expected | Not All- & w=expected +---+ +---+w = Not expected | |||
| ~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~ | |||
| Set lcl_bm(FCN) | v v |discard | Set lcl_bm(FCN) | v v |discard | |||
| ++===+===+===+=+ | ++===+===+===+=+ | |||
| +---------------------+ Rcv +--->* ABORT | +---------------------+ Rcv +--->* ABORT | |||
| | +------------------+ Window | | | +------------------+ Window | | |||
| | | +=====+==+=====+ | | | +=====+==+=====+ | |||
| | | All-0 & w=expect | ^ w =next & not-All | | | All-0 & w=expect | ^ w =next & not-All | |||
| | | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~ | |||
| skipping to change at page 72, line 13 ¶ | skipping to change at page 69, line 13 ¶ | |||
| +==========+<---------------+ | +==========+<---------------+ | |||
| --->* ABORT | --->* ABORT | |||
| ~~~~~~~ | ~~~~~~~ | |||
| Inactivity_Timer = expires | Inactivity_Timer = expires | |||
| When DWL | When DWL | |||
| IF Inactivity_Timer expires | IF Inactivity_Timer expires | |||
| Send DWL Request | Send DWL Request | |||
| Attempt++ | Attempt++ | |||
| Figure 38: Receiver State Machine for the ACK-Always Mode | Figure 41: Receiver State Machine for the ACK-Always Mode | |||
| +=======+ | +=======+ | |||
| | | | | | | |||
| | INIT | | | INIT | | |||
| | | FCN!=0 & more frags | | | FCN!=0 & more frags | |||
| +======++ ~~~~~~~~~~~~~~~~~~~~~~ | +======++ ~~~~~~~~~~~~~~~~~~~~~~ | |||
| Frag RuleID trigger | +--+ Send cur_W + frag(FCN); | Frag RuleID trigger | +--+ Send cur_W + frag(FCN); | |||
| ~~~~~~~~~~~~~~~~~~~ | | | FCN--; | ~~~~~~~~~~~~~~~~~~~ | | | FCN--; | |||
| cur_W=0; FCN=max_value;| | | set [cur_W, cur_Bmp] | cur_W=0; FCN=max_value;| | | set [cur_W, cur_Bmp] | |||
| clear [cur_W, Bmp_n];| | v | clear [cur_W, Bmp_n];| | v | |||
| skipping to change at page 73, line 17 ¶ | skipping to change at page 70, line 17 ¶ | |||
| |(re)send frag(All-1)+MIC | | | | |(re)send frag(All-1)+MIC | | | | |||
| +-------------------------+ | | | +-------------------------+ | | | |||
| cur_W==rcv_W&| | | cur_W==rcv_W&| | | |||
| [cur_W,Bmp_n]==rcv_Bmp&| | Attempts > MAX_ACK_REQUESTS | [cur_W,Bmp_n]==rcv_Bmp&| | Attempts > MAX_ACK_REQUESTS | |||
| No more Frags & MIC flag==OK| | ~~~~~~~~~~ | No more Frags & MIC flag==OK| | ~~~~~~~~~~ | |||
| ~~~~~~~~~~~~~~~~~~| | send Abort | ~~~~~~~~~~~~~~~~~~| | send Abort | |||
| +=========+stop Retrans_Timer| | +===========+ | +=========+stop Retrans_Timer| | +===========+ | |||
| | END +<-----------------+ +->+ ERROR | | | END +<-----------------+ +->+ ERROR | | |||
| +=========+ +===========+ | +=========+ +===========+ | |||
| Figure 39: Sender State Machine for the ACK-on-Error Mode | Figure 42: Sender State Machine for the ACK-on-Error Mode | |||
| This is an example only. The specification in Section 8.4.3.1 is | This is an example only. It is not normative. The specification in | |||
| open to very different sequencing of operations. | Section 8.4.3.1 allows for sequences of operations different from the | |||
| one shown here. | ||||
| +=======+ New frag RuleID received | +=======+ New frag RuleID received | |||
| | | ~~~~~~~~~~~~~ | | | ~~~~~~~~~~~~~ | |||
| | INIT +-------+cur_W=0;clear([cur_W,Bmp_n]); | | INIT +-------+cur_W=0;clear([cur_W,Bmp_n]); | |||
| +=======+ |sync=0 | +=======+ |sync=0 | |||
| | | | | |||
| Not All* & rcv_W==cur_W+---+ | +---+ | Not All* & rcv_W==cur_W+---+ | +---+ | |||
| ~~~~~~~~~~~~~~~~~~~~ | | | | (E) | ~~~~~~~~~~~~~~~~~~~~ | | | | (E) | |||
| set[cur_W,Bmp_n(FCN)]| v v v | | set[cur_W,Bmp_n(FCN)]| v v v | | |||
| ++===+=+=+===+=+ | ++===+=+=+===+=+ | |||
| skipping to change at page 75, line 25 ¶ | skipping to change at page 72, line 25 ¶ | |||
| | sendACK([cur_W,Bmp_n],MIC=1) | | ~~~~~~~~~~~~~~~~~~~ | | sendACK([cur_W,Bmp_n],MIC=1) | | ~~~~~~~~~~~~~~~~~~~ | |||
| | | | sendACK([cur_W,Bmp_n],MIC=0); | | | | sendACK([cur_W,Bmp_n],MIC=0); | |||
| | | | Attempts++ | | | | Attempts++ | |||
| |All-1 & Full([cur_W,Bmp_n]) | | | |All-1 & Full([cur_W,Bmp_n]) | | | |||
| |& MIC==OK & sync==0 | +-->* ABORT | |& MIC==OK & sync==0 | +-->* ABORT | |||
| |~~~~~~~~~~~~~~~~~~~ v | |~~~~~~~~~~~~~~~~~~~ v | |||
| |sendACK([cur_W,Bmp_n],MIC=1) +=+=========+ | |sendACK([cur_W,Bmp_n],MIC=1) +=+=========+ | |||
| +---------------------------->+ END | | +---------------------------->+ END | | |||
| +===========+ | +===========+ | |||
| ABORT -->* Uplink Only & | Figure 43: Receiver State Machine for the ACK-on-Error Mode | |||
| Inact_Timer = expires | ||||
| || Attempts > MAX_ACK_REQUESTS | ||||
| ~~~~~~~~~~~~~~~~~~~~~ | ||||
| send Abort | ||||
| Figure 40: Receiver State Machine for the ACK-on-Error Mode | ||||
| Appendix D. SCHC Parameters | Appendix D. SCHC Parameters | |||
| This section lists the information that need to be provided in the | This section lists the information that need to be provided in the | |||
| LPWAN technology-specific documents. | LPWAN technology-specific documents. | |||
| o Most common uses cases, deployment scenarios | o Most common uses cases, deployment scenarios | |||
| o Mapping of the SCHC architectural elements onto the LPWAN | o Mapping of the SCHC architectural elements onto the LPWAN | |||
| architecture | architecture | |||
| skipping to change at page 76, line 8 ¶ | skipping to change at page 72, line 48 ¶ | |||
| o Various potential channel conditions for the technology and the | o Various potential channel conditions for the technology and the | |||
| corresponding recommended use of SCHC C/D and F/R | corresponding recommended use of SCHC C/D and F/R | |||
| This section lists the parameters that need to be defined in the | This section lists the parameters that need to be defined in the | |||
| Profile. | Profile. | |||
| o Rule ID numbering scheme, fixed-sized or variable-sized Rule IDs, | o Rule ID numbering scheme, fixed-sized or variable-sized Rule IDs, | |||
| number of Rules, the way the Rule ID is transmitted | number of Rules, the way the Rule ID is transmitted | |||
| o define the maximum packet size that should ever be reconstructed | ||||
| by SCHC Decompression (MAX_PACKET_SIZE). See Section 12. | ||||
| o Padding: size of the L2 Word (for most LPWAN technologies, this | o Padding: size of the L2 Word (for most LPWAN technologies, this | |||
| would be a byte; for some technologies, a bit) | would be a byte; for some technologies, a bit) | |||
| o Decision to use SCHC fragmentation mechanism or not. If yes: | o Decision to use SCHC fragmentation mechanism or not. If yes: | |||
| * reliability mode(s) used, in which cases (e.g. based on link | * reliability mode(s) used, in which cases (e.g. based on link | |||
| channel condition) | channel condition) | |||
| * Rule ID values assigned to each mode in use | * Rule ID values assigned to each mode in use | |||
| skipping to change at page 76, line 29 ¶ | skipping to change at page 73, line 26 ¶ | |||
| * support for interleaved packet transmission, to what extent | * support for interleaved packet transmission, to what extent | |||
| * WINDOW_SIZE, for modes that use windows | * WINDOW_SIZE, for modes that use windows | |||
| * number of bits for W (M) for each Rule ID value, for modes that | * number of bits for W (M) for each Rule ID value, for modes that | |||
| use windows | use windows | |||
| * number of bits for FCN (N) for each Rule ID value | * number of bits for FCN (N) for each Rule ID value | |||
| * value of MAX_WIND_FCN and use of FCN values, if applicable to | ||||
| the SCHC F/R mode. | ||||
| * size of MIC and algorithm for its computation, for each Rule | * size of MIC and algorithm for its computation, for each Rule | |||
| ID, if different from the default CRC32. Byte fill-up with | ID, if different from the default CRC32. Byte fill-up with | |||
| zeroes or other mechanism, to be specified. | zeroes or other mechanism, to be specified. | |||
| * Retransmission Timer duration for each Rule ID value, if | * Retransmission Timer duration for each Rule ID value, if | |||
| applicable to the SCHC F/R mode | applicable to the SCHC F/R mode | |||
| * Inactivity Timer duration for each Rule ID value, if applicable | * Inactivity Timer duration for each Rule ID value, if applicable | |||
| to the SCHC F/R mode | to the SCHC F/R mode | |||
| * MAX_ACK_REQUEST value for each Rule ID value, if applicable to | * MAX_ACK_REQUEST value for each Rule ID value, if applicable to | |||
| the SCHC F/R mode | the SCHC F/R mode | |||
| o if L2 Word is wider than a bit and SCHC fragmentation is used, | o if L2 Word is wider than a bit and SCHC fragmentation is used, | |||
| value of the padding bits (0 or 1). This is needed because the | value of the padding bits (0 or 1). This is needed because the | |||
| padding bits of the last fragment are included in the MIC | padding bits of the last fragment are included in the MIC | |||
| computation. | computation. | |||
| A Profile MAY define a delay to be added between each SCHC message | A Profile MAY define a delay to be added after each SCHC message | |||
| transmission to respect local regulations or other constraints | transmission for compliance with local regulations or other | |||
| imposed by the applications. | constraints imposed by the applications. | |||
| o Note on soliciting downlink transmissions: In some LPWAN | o In some LPWAN technologies, as part of energy-saving techniques, | |||
| technologies, as part of energy-saving techniques, downlink | downlink transmission is only possible immediately after an uplink | |||
| transmission is only possible immediately after an uplink | ||||
| transmission. In order to avoid potentially high delay in the | transmission. In order to avoid potentially high delay in the | |||
| downlink transmission of a fragmented SCHC Packet, the SCHC | downlink transmission of a fragmented SCHC Packet, the SCHC | |||
| Fragment receiver may want to perform an uplink transmission as | Fragment receiver may perform an uplink transmission as soon as | |||
| soon as possible after reception of a SCHC Fragment that is not | possible after reception of a SCHC Fragment that is not the last | |||
| the last one. Such uplink transmission may be triggered by the L2 | one. Such uplink transmission may be triggered by the L2 (e.g. an | |||
| (e.g. an L2 ACK sent in response to a SCHC Fragment encapsulated | L2 ACK sent in response to a SCHC Fragment encapsulated in a L2 | |||
| in a L2 PDU that requires an L2 ACK) or it may be triggered from | PDU that requires an L2 ACK) or it may be triggered from an upper | |||
| an upper layer. | layer. | |||
| o the following parameters need to be addressed in documents other | o the following parameters need to be addressed in documents other | |||
| than this one but not forcely in the LPWAN technology-specific | than this one but not necessarily in the LPWAN technology-specific | |||
| documents: | documents: | |||
| * The way the contexts are provisioned | * The way the Contexts are provisioned | |||
| * The way the Rules as generated | * The way the Rules are generated | |||
| Appendix E. Supporting multiple window sizes for fragmentation | Appendix E. Supporting multiple window sizes for fragmentation | |||
| For ACK-Always or ACK-on-Error, implementers MAY opt to support a | For ACK-Always or ACK-on-Error, implementers MAY opt to support a | |||
| single window size or multiple window sizes. The latter, when | single window size or multiple window sizes. The latter, when | |||
| feasible, may provide performance optimizations. For example, a | feasible, may provide performance optimizations. For example, a | |||
| large window size SHOULD be used for packets that need to be carried | large window size SHOULD be used for packets that need to be split | |||
| by a large number of SCHC Fragments. However, when the number of | into a large number of tiles. However, when the number of tiles | |||
| SCHC Fragments required to carry a packet is low, a smaller window | required to carry a packet is low, a smaller window size, and thus a | |||
| size, and thus a shorter Bitmap, MAY be sufficient to provide | shorter Bitmap, MAY be sufficient to provide reception status on all | |||
| feedback on all SCHC Fragments. If multiple window sizes are | tiles. If multiple window sizes are supported, the Rule ID MAY | |||
| supported, the Rule ID MAY be used to signal the window size in use | signal the window size in use for a specific packet transmission. | |||
| for a specific packet transmission. | ||||
| Note that the same window size MUST be used for the transmission of | The same window size MUST be used for the transmission of all tiles | |||
| all SCHC Fragments that belong to the same SCHC Packet. | that belong to the same SCHC Packet. | |||
| Appendix F. Downlink SCHC Fragment transmission | Appendix F. Downlink SCHC Fragment transmission | |||
| For downlink transmission of a fragmented SCHC Packet in ACK-Always | For downlink transmission of a fragmented SCHC Packet in ACK-Always | |||
| mode, the SCHC Fragment receiver MAY support timer-based SCHC ACK | mode, the SCHC Fragment receiver MAY support timer-based SCHC ACK | |||
| retransmission. In this mechanism, the SCHC Fragment receiver | retransmission. In this mechanism, the SCHC Fragment receiver | |||
| initializes and starts a timer (the Inactivity Timer is used) after | initializes and starts a timer (the Inactivity Timer is used) after | |||
| the transmission of a SCHC ACK, except when the SCHC ACK is sent in | the transmission of a SCHC ACK, except when the SCHC ACK is sent in | |||
| response to the last SCHC Fragment of a packet (All-1 fragment). In | response to the last SCHC Fragment of a packet (All-1 fragment). In | |||
| the latter case, the SCHC Fragment receiver does not start a timer | the latter case, the SCHC Fragment receiver does not start a timer | |||
| after transmission of the SCHC ACK. | after transmission of the SCHC ACK. | |||
| If, after transmission of a SCHC ACK that is not an All-1 fragment, | If, after transmission of a SCHC ACK that is not an All-1 fragment, | |||
| and before expiration of the corresponding Inactivity timer, the SCHC | and before expiration of the corresponding Inactivity timer, the SCHC | |||
| Fragment receiver receives a SCHC Fragment that belongs to the | Fragment receiver receives a SCHC Fragment that belongs to the | |||
| current window (e.g. a missing SCHC Fragment from the current window) | current window (e.g. a missing SCHC Fragment from the current window) | |||
| or to the next window, the Inactivity timer for the SCHC ACK is | or to the next window, the Inactivity timer for the SCHC ACK is | |||
| stopped. However, if the Inactivity timer expires, the SCHC ACK is | stopped. However, if the Inactivity timer expires, the SCHC ACK is | |||
| resent and the Inactivity timer is reinitialized and restarted. | resent and the Inactivity timer is reinitialized and restarted. | |||
| The default initial value for the Inactivity timer, as well as the | The default initial value for the Inactivity Timer, as well as the | |||
| maximum number of retries for a specific SCHC ACK, denoted | maximum number of retries for a specific SCHC ACK, denoted | |||
| MAX_ACK_RETRIES, are not defined in this document, and need to be | MAX_ACK_RETRIES, are not defined in this document, and need to be | |||
| defined in a Profile. The initial value of the Inactivity timer is | defined in a Profile. The initial value of the Inactivity timer is | |||
| expected to be greater than that of the Retransmission timer, in | expected to be greater than that of the Retransmission timer, in | |||
| order to make sure that a (buffered) SCHC Fragment to be | order to make sure that a (buffered) SCHC Fragment to be | |||
| retransmitted can find an opportunity for that transmission. | retransmitted can find an opportunity for that transmission. One | |||
| exception to this recommendation is the special case of the All-1 | ||||
| SCHC Fragment transmission. | ||||
| When the SCHC Fragment sender transmits the All-1 fragment, it starts | When the SCHC Fragment sender transmits the All-1 SCHC Fragment, it | |||
| its Retransmission Timer with a large timeout value (e.g. several | starts its Retransmission Timer with a large timeout value (e.g. | |||
| times that of the initial Inactivity timer). If a SCHC ACK is | several times that of the initial Inactivity Timer). If a SCHC ACK | |||
| received before expiration of this timer, the SCHC Fragment sender | is received before expiration of this timer, the SCHC Fragment sender | |||
| retransmits any lost SCHC Fragments reported by the SCHC ACK, or if | retransmits any lost SCHC Fragments reported by the SCHC ACK, or if | |||
| the SCHC ACK confirms successful reception of all SCHC Fragments of | the SCHC ACK confirms successful reception of all SCHC Fragments of | |||
| the last window, the transmission of the fragmented SCHC Packet is | the last window, the transmission of the fragmented SCHC Packet is | |||
| considered complete. If the timer expires, and no SCHC ACK has been | considered complete. If the timer expires, and no SCHC ACK has been | |||
| received since the start of the timer, the SCHC Fragment sender | received since the start of the timer, the SCHC Fragment sender | |||
| assumes that the All-1 fragment has been successfully received (and | assumes that the All-1 SCHC Fragment has been successfully received | |||
| possibly, the last SCHC ACK has been lost: this mechanism assumes | (and possibly, the last SCHC ACK has been lost: this mechanism | |||
| that the retransmission timer for the All-1 fragment is long enough | assumes that the Retransmission Timer for the All-1 SCHC Fragment is | |||
| to allow several SCHC ACK retries if the All-1 fragment has not;been | long enough to allow several SCHC ACK retries if the All-1 SCHC | |||
| received by the SCHC Fragment receiver, and it also assumes that it | Fragment has not been received by the SCHC Fragment receiver, and it | |||
| is unlikely that several ACKs become all lost). | also assumes that it is unlikely that several ACKs become all lost). | |||
| Appendix G. 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 | Authors' Addresses | |||
| Ana Minaburo | Ana Minaburo | |||
| Acklio | Acklio | |||
| 1137A avenue des Champs Blancs | 1137A avenue des Champs Blancs | |||
| 35510 Cesson-Sevigne Cedex | 35510 Cesson-Sevigne Cedex | |||
| France | France | |||
| Email: ana@ackl.io | Email: ana@ackl.io | |||
| Laurent Toutain | Laurent Toutain | |||
| IMT-Atlantique | IMT-Atlantique | |||
| End of changes. 411 change blocks. | ||||
| 1042 lines changed or deleted | 933 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/ | ||||