| < draft-ietf-lpwan-schc-over-lorawan-04.txt | draft-ietf-lpwan-schc-over-lorawan-05.txt > | |||
|---|---|---|---|---|
| lpwan Working Group O. Gimenez, Ed. | lpwan Working Group O. Gimenez, Ed. | |||
| Internet-Draft Semtech | Internet-Draft Semtech | |||
| Intended status: Informational I. Petrov, Ed. | Intended status: Informational I. Petrov, Ed. | |||
| Expires: May 7, 2020 Acklio | Expires: June 22, 2020 Acklio | |||
| November 04, 2019 | December 20, 2019 | |||
| Static Context Header Compression (SCHC) over LoRaWAN | Static Context Header Compression (SCHC) over LoRaWAN | |||
| draft-ietf-lpwan-schc-over-lorawan-04 | draft-ietf-lpwan-schc-over-lorawan-05 | |||
| Abstract | Abstract | |||
| The Static Context Header Compression (SCHC) specification describes | The Static Context Header Compression (SCHC) specification describes | |||
| generic header compression and fragmentation techniques for LPWAN | generic header compression and fragmentation techniques for LPWAN | |||
| (Low Power Wide Area Networks) technologies. SCHC is a generic | (Low Power Wide Area Networks) technologies. SCHC is a generic | |||
| mechanism designed for great flexibility so that it can be adapted | mechanism designed for great flexibility so that it can be adapted | |||
| for any of the LPWAN technologies. | for any of the LPWAN technologies. | |||
| This document provides the adaptation of SCHC for use in LoRaWAN | This document provides the adaptation of SCHC for use in LoRaWAN | |||
| skipping to change at page 1, line 39 ¶ | skipping to change at page 1, line 39 ¶ | |||
| 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 May 7, 2020. | This Internet-Draft will expire on June 22, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 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 25 ¶ | skipping to change at page 2, line 25 ¶ | |||
| 4. LoRaWAN Architecture . . . . . . . . . . . . . . . . . . . . 5 | 4. LoRaWAN Architecture . . . . . . . . . . . . . . . . . . . . 5 | |||
| 4.1. End-Device classes (A, B, C) and interactions . . . . . . 6 | 4.1. End-Device classes (A, B, C) and interactions . . . . . . 6 | |||
| 4.2. End-Device addressing . . . . . . . . . . . . . . . . . . 7 | 4.2. End-Device addressing . . . . . . . . . . . . . . . . . . 7 | |||
| 4.3. General Message Types . . . . . . . . . . . . . . . . . . 7 | 4.3. General Message Types . . . . . . . . . . . . . . . . . . 7 | |||
| 4.4. LoRaWAN MAC Frames . . . . . . . . . . . . . . . . . . . 8 | 4.4. LoRaWAN MAC Frames . . . . . . . . . . . . . . . . . . . 8 | |||
| 4.5. Unicast and multicast technology . . . . . . . . . . . . 8 | 4.5. Unicast and multicast technology . . . . . . . . . . . . 8 | |||
| 5. SCHC-over-LoRaWAN . . . . . . . . . . . . . . . . . . . . . . 8 | 5. SCHC-over-LoRaWAN . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 5.1. LoRaWAN FPort . . . . . . . . . . . . . . . . . . . . . . 8 | 5.1. LoRaWAN FPort . . . . . . . . . . . . . . . . . . . . . . 8 | |||
| 5.2. Rule ID management . . . . . . . . . . . . . . . . . . . 9 | 5.2. Rule ID management . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.3. IID computation . . . . . . . . . . . . . . . . . . . . . 10 | 5.3. IID computation . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 5.4. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 5.4. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 5.5. Compression . . . . . . . . . . . . . . . . . . . . . . . 10 | 5.5. Decompression . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 5.6. Fragmentation . . . . . . . . . . . . . . . . . . . . . . 10 | 5.6. Fragmentation . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 5.6.1. DTag . . . . . . . . . . . . . . . . . . . . . . . . 11 | 5.6.1. DTag . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
| 5.6.2. Uplink fragmentation: From device to SCHC gateway . . 11 | 5.6.2. Uplink fragmentation: From device to SCHC gateway . . 11 | |||
| 5.6.3. Downlink fragmentation: From SCHC gateway to a device 13 | 5.6.3. Downlink fragmentation: From SCHC gateway to a device 14 | |||
| 6. Security considerations . . . . . . . . . . . . . . . . . . . 17 | 6. Security considerations . . . . . . . . . . . . . . . . . . . 17 | |||
| Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 17 | Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 17 | Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
| 9.1. Normative References . . . . . . . . . . . . . . . . . . 18 | 9.1. Normative References . . . . . . . . . . . . . . . . . . 18 | |||
| 9.2. Informative References . . . . . . . . . . . . . . . . . 19 | 9.2. Informative References . . . . . . . . . . . . . . . . . 20 | |||
| Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 19 | Appendix A. Examples . . . . . . . . . . . . . . . . . . . . . . 20 | |||
| A.1. Uplink - Compression example - No fragmentation . . . . . 19 | A.1. Uplink - Compression example - No fragmentation . . . . . 20 | |||
| A.2. Uplink - Compression and fragmentation example . . . . . 20 | A.2. Uplink - Compression and fragmentation example . . . . . 21 | |||
| A.3. Downlink . . . . . . . . . . . . . . . . . . . . . . . . 22 | A.3. Downlink . . . . . . . . . . . . . . . . . . . . . . . . 22 | |||
| Appendix B. Note . . . . . . . . . . . . . . . . . . . . . . . . 23 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 | |||
| Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 23 | ||||
| 1. Introduction | 1. Introduction | |||
| The Static Context Header Compression (SCHC) specification | The Static Context Header Compression (SCHC) specification | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc] describes generic header | [I-D.ietf-lpwan-ipv6-static-context-hc] describes generic header | |||
| compression and fragmentation techniques that can be used on all | compression and fragmentation techniques that can be used on all | |||
| LPWAN (Low Power Wide Area Networks) technologies defined in | LPWAN (Low Power Wide Area Networks) technologies defined in | |||
| [RFC8376]. Even though those technologies share a great number of | [RFC8376]. Even though those technologies share a great number of | |||
| common features like star-oriented topologies, network architecture, | common features like star-oriented topologies, network architecture, | |||
| devices with mostly quite predictable communications, etc; they do | devices with mostly quite predictable communications, etc; they do | |||
| skipping to change at page 3, line 40 ¶ | skipping to change at page 3, line 39 ¶ | |||
| o DevAddr: a 32-bit non-unique identifier assigned to an end-device | o DevAddr: a 32-bit non-unique identifier assigned to an end-device | |||
| statically or dynamically after a Join Procedure (depending on the | statically or dynamically after a Join Procedure (depending on the | |||
| activation mode) | activation mode) | |||
| o RCS: Reassembly Check Sequence. Used to verify the integrity of | o RCS: Reassembly Check Sequence. Used to verify the integrity of | |||
| the fragmentation-reassembly process | the fragmentation-reassembly process | |||
| o TBD: all significant LoRaWAN-related terms. | o TBD: all significant LoRaWAN-related terms. | |||
| o OUI: Organisation Unique Identifier. IEEE assigned prefix for EUI | ||||
| 3. Static Context Header Compression Overview | 3. Static Context Header Compression Overview | |||
| This section contains a short overview of Static Context Header | This section contains a short overview of Static Context Header | |||
| Compression (SCHC). For a detailed description, refer to the full | Compression (SCHC). For a detailed description, refer to the full | |||
| specification [I-D.ietf-lpwan-ipv6-static-context-hc]. | specification [I-D.ietf-lpwan-ipv6-static-context-hc]. | |||
| Static Context Header Compression (SCHC) avoids context | It defines: | |||
| synchronization, based on the fact that the nature of data flows is | ||||
| highly predictable in LPWAN networks, some static contexts may be | 1. Compression mechanisms to avoid transport of known data by both | |||
| stored on the Device (Dev). The context MUST be stored in both ends, | sender and receiver over the air. Known data are part of the | |||
| and it can either be learned by a provisioning protocol or by out-of- | "context" | |||
| band means or it can be pre-provisioned, etc. The way the context is | ||||
| learned on both sides is outside the scope of this document. | 2. Fragmentation mechanisms to allow SCHC Packet transportation on | |||
| small, and potentially variable, MTU | ||||
| Context exchange or pre-provisioning is out of scope of this | ||||
| document. | ||||
| Dev App | Dev App | |||
| +----------------+ +----+ +----+ +----+ | +----------------+ +----+ +----+ +----+ | |||
| | App1 App2 App3 | |App1| |App2| |App3| | | App1 App2 App3 | |App1| |App2| |App3| | |||
| | | | | | | | | | | | | | | | | | | |||
| | UDP | |UDP | |UDP | |UDP | | | UDP | |UDP | |UDP | |UDP | | |||
| | IPv6 | |IPv6| |IPv6| |IPv6| | | IPv6 | |IPv6| |IPv6| |IPv6| | |||
| | | | | | | | | | | | | | | | | | | |||
| |SCHC C/D and F/R| | | | | | | | |SCHC C/D and F/R| | | | | | | | |||
| +--------+-------+ +----+ +----+ +----+ | +--------+-------+ +----+ +----+ +----+ | |||
| skipping to change at page 5, line 42 ¶ | skipping to change at page 5, line 42 ¶ | |||
| radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN | radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN | |||
| End-Device. | End-Device. | |||
| o The Radio Gateway (RGW), which is the endpoint of the constrained | o The Radio Gateway (RGW), which is the endpoint of the constrained | |||
| link. This entity maps to the LoRaWAN Gateway. | link. This entity maps to the LoRaWAN Gateway. | |||
| 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. This entity maps to the LoRaWAN | Radio Gateway and the Internet. This entity maps to the LoRaWAN | |||
| Network Server. | Network Server. | |||
| o LPWAN-AAA Server, which controls the user authentication and the | ||||
| applications. This entity maps to the LoRaWAN Join Server. | ||||
| o Application Server (App). The same terminology is used in LoRaWAN. | o Application Server (App). The same terminology is used in LoRaWAN. | |||
| In that case, the application server will be the SCHC gateway, doing | In that case, the application server will be the SCHC gateway, doing | |||
| C/D and F/R. | C/D and F/R. | |||
| () () () | +------+ | () () () | +------+ | |||
| () () () () / \ +---------+ | Join | | () () () () / \ +---------+ | Join | | |||
| () () () () () / \======| ^ |===|Server| +-----------+ | () () () () () / \======| ^ |===|Server| +-----------+ | |||
| () () () | | <--|--> | +------+ |Application| | () () () | | <--|--> | +------+ |Application| | |||
| () () () () / \==========| v |=============| Server | | () () () () / \==========| v |=============| Server | | |||
| () () () / \ +---------+ +-----------+ | () () () / \ +---------+ +-----------+ | |||
| skipping to change at page 7, line 14 ¶ | skipping to change at page 7, line 14 ¶ | |||
| are not transmitting. Class C end-devices can receive downlinks | are not transmitting. Class C end-devices can receive downlinks | |||
| at any time at the expense of a higher power consumption. | at any time at the expense of a higher power consumption. | |||
| Battery-powered end-devices can only operate in Class C for a | Battery-powered end-devices can only operate in Class C for a | |||
| limited amount of time (for example for a firmware upgrade over- | limited amount of time (for example for a firmware upgrade over- | |||
| the-air). Most of the Class C end-devices are grid powered (for | the-air). Most of the Class C end-devices are grid powered (for | |||
| example Smart Plugs). | example Smart Plugs). | |||
| 4.2. End-Device addressing | 4.2. End-Device addressing | |||
| LoRaWAN end-devices use a 32-bit network address (devAddr) to | LoRaWAN end-devices use a 32-bit network address (devAddr) to | |||
| communicate with the network over-the-air. However, that address | communicate with the network over-the-air, this address might not be | |||
| might be reused several times on the same network at the same time | unique in a LoRaWAN network; end-devices using the same devAddr are | |||
| for different end-devices. End-devices using the same devAddr are | ||||
| distinguished by the Network Server based on the cryptographic | distinguished by the Network Server based on the cryptographic | |||
| signature appended to every single LoRaWAN MAC frame, as all end- | signature appended to every LoRaWAN frame. | |||
| devices use different security keys. To communicate with the SCHC | ||||
| gateway the Network Server MUST identify the end-devices by a unique | To communicate with the SCHC gateway the Network Server MUST identify | |||
| 64-bit device identifier called the devEUI. Unlike devAddr, devEUI | the end-devices by a unique 64-bit device identifier called the | |||
| is guaranteed to be unique for every single end-device across all | devEUI. | |||
| networks. The devEUI is assigned to the end-device during the | ||||
| manufacturing process by the end-device's manufacturer. It is built | The devEUI is assigned to the end-device during the manufacturing | |||
| like an Ethernet MAC address by concatenating the manufacturer's IEEE | process by the end-device's manufacturer. It is built like an | |||
| OUI field with a vendor unique number. e.g.: 24-bit OUI is | Ethernet MAC address by concatenating the manufacturer's IEEE OUI | |||
| concatenated with a 40-bit serial number. The Network Server | field with a vendor unique number. e.g.: 24-bit OUI is concatenated | |||
| translates the devAddr into a devEUI in the uplink direction and | with a 40-bit serial number. The Network Server translates the | |||
| reciprocally on the downlink direction. | devAddr into a devEUI in the uplink direction and reciprocally on the | |||
| downlink direction. | ||||
| +--------+ +----------+ +---------+ +----------+ | +--------+ +----------+ +---------+ +----------+ | |||
| | End- | <=====> | Network | <====> | SCHC | <========> | Internet | | | End- | <=====> | Network | <====> | SCHC | <========> | Internet | | |||
| | Device | devAddr | Server | devEUI | Gateway | IPv6/UDP | | | | Device | devAddr | Server | devEUI | Gateway | IPv6/UDP | | | |||
| +--------+ +----------+ +---------+ +----------+ | +--------+ +----------+ +---------+ +----------+ | |||
| Figure 4: LoRaWAN addresses | Figure 4: LoRaWAN addresses | |||
| 4.3. General Message Types | 4.3. General Message Types | |||
| skipping to change at page 8, line 17 ¶ | skipping to change at page 8, line 17 ¶ | |||
| o JoinRequest: This message is used by an end-device to join a | o JoinRequest: This message is used by an end-device to join a | |||
| network. It contains the end-device's unique identifier devEUI | network. It contains the end-device's unique identifier devEUI | |||
| and a random nonce that will be used for session key derivation. | and a random nonce that will be used for session key derivation. | |||
| o JoinAccept: To on-board an end-device, the Network Server responds | o JoinAccept: To on-board an end-device, the Network Server responds | |||
| to the JoinRequest end-device's message with a JoinAccept message. | to the JoinRequest end-device's message with a JoinAccept message. | |||
| That message is encrypted with the end-device's AppKey and | That message is encrypted with the end-device's AppKey and | |||
| contains (amongst other fields) the major network's settings and a | contains (amongst other fields) the major network's settings and a | |||
| network random nonce used to derive the session keys. | network random nonce used to derive the session keys. | |||
| o Data | o Data: MAC and application data. Application data are protected | |||
| with AES-128 encryption, MAC related data are AES-128 encrypted | ||||
| with another key. | ||||
| 4.5. Unicast and multicast technology | 4.5. Unicast and multicast technology | |||
| LoRaWAN technology supports unicast downlinks, but also multicast: a | LoRaWAN technology supports unicast downlinks, but also multicast: a | |||
| packet send over LoRaWAN radio link can be received by several | packet send over LoRaWAN radio link can be received by several | |||
| devices. It is useful to address many end-devices with same content, | devices. It is useful to address many end-devices with same content, | |||
| either a large binary file (firmware upgrade), or same command (e.g: | either a large binary file (firmware upgrade), or same command (e.g: | |||
| lighting control). As IPv6 is also a multicast technology this | lighting control). As IPv6 is also a multicast technology this | |||
| feature MAY be used to address a group of devices. | feature can be used to address a group of devices. | |||
| _Note 1_: IPv6 multicast addresses must be defined as per [RFC4291]. | _Note 1_: IPv6 multicast addresses must be defined as per [RFC4291]. | |||
| LoRaWAN multicast group definition in a network server and the | LoRaWAN multicast group definition in a network server and the | |||
| relation between those groups and IPv6 groupID are out of scope of | relation between those groups and IPv6 groupID are out of scope of | |||
| this document. | this document. | |||
| _Note 2_: LoRa Alliance defined [lora-alliance-remote-multicast-set] | _Note 2_: LoRa Alliance defined [lora-alliance-remote-multicast-set] | |||
| as RECOMMENDED way to setup multicast groups on devices and create a | as RECOMMENDED way to setup multicast groups on devices and create a | |||
| synchronized reception window. | synchronized reception window. | |||
| 5. SCHC-over-LoRaWAN | 5. SCHC-over-LoRaWAN | |||
| 5.1. LoRaWAN FPort | 5.1. LoRaWAN FPort | |||
| The LoRaWAN MAC layer features a frame port field in all frames. | The LoRaWAN MAC layer features a frame port field in all frames. | |||
| This field (FPort) is 8 bits long and the values from 1 to 223 can be | This field (FPort) is 8 bits long and the values from 1 to 223 can be | |||
| used. It allows LoRaWAN networks and applications to identify data. | used. It allows LoRaWAN networks and applications to identify data. | |||
| The FPort field is part of the SCHC Packet or the SCHC Fragment, as | The FPort field is part of the SCHC Message, as shown in Figure 5. | |||
| shown in Figure 5. The SCHC C/D and the SCHC F/R SHALL concatenate | The SCHC C/D and the SCHC F/R SHALL concatenate the FPort field with | |||
| the FPort field with the LoRaWAN payload to retrieve their payload as | the LoRaWAN payload to retrieve their payload as it is used as a part | |||
| it is used as a part of the ruleId field. | of the RuleID field. | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------------------------ + | + ------------------------ + | |||
| | SCHC payload | | | SCHC payload | | |||
| Figure 5: SCHC payload in LoRaWAN | Figure 5: SCHC Message in LoRaWAN | |||
| A fragmentation session with application payload transferred from | A fragmentation session with application payload transferred from | |||
| device to server, is called uplink fragmentation session. It uses an | device to server, is called uplink fragmentation session. It uses an | |||
| FPort for data uplink and its associated SCHC control downlinks, | FPort for data uplink and its associated SCHC control downlinks, | |||
| named FPortUp in this document. The other way, a fragmentation | named FPortUp in this document. The other way, a fragmentation | |||
| session with application payload transferred from server to device, | session with application payload transferred from server to device, | |||
| is called downlink fragmentation session. It uses another FPort for | is called downlink fragmentation session. It uses another FPort for | |||
| data downlink and its associated SCHC control uplinks, named | data downlink and its associated SCHC control uplinks, named | |||
| FPortDown in this document. | FPortDown in this document. | |||
| FPorts can use arbitrary values inside the allowed FPort range and | All ruleId can use arbitrary values inside the FPort range allowed by | |||
| MUST be shared by the end-device, the Network Server and SCHC gateway | LoRaWAN specification and MUST be shared by the end-device and SCHC | |||
| prior to the communication. The uplink and downlink fragmentation | gateway prior to the communication with the selected rule. The | |||
| FPorts MUST be different. | uplink and downlink fragmentation FPorts MUST be different. | |||
| 5.2. Rule ID management | 5.2. Rule ID management | |||
| RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in | RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in | |||
| Section 5.1. LoRaWAN supports up to 223 application FPorts in the | Section 5.1. LoRaWAN supports up to 223 application FPorts in the | |||
| range [1;223] as defined in section 4.3.2 of [lora-alliance-spec], it | range [1;223] as defined in section 4.3.2 of [lora-alliance-spec], it | |||
| implies that RuleID MSB SHOULD be inside this range. An application | implies that RuleID MSB SHOULD be inside this range. An application | |||
| MAY reserve some FPort values for other needs as long as they don't | can send non SCHC traffic by using FPort values differents from the | |||
| conflict with FPorts used for SCHC C/D and SCHC F/R. | ones used for SCHC. | |||
| In order to improve interoperability RECOMMENDED fragmentation RuleID | In order to improve interoperability RECOMMENDED fragmentation RuleID | |||
| values are: | values are: | |||
| o RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp | o RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp | |||
| o RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown | o RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown | |||
| o RuleID = 22 (8-bit) for which SCHC compression was not possible | o RuleID = 22 (8-bit) for which SCHC compression was not possible | |||
| (no matching rule was found) | (no matching rule was found) | |||
| The remaining RuleIDs are available for compression. RuleIDs are | The remaining RuleIDs are available for compression. RuleIDs are | |||
| shared between uplink and downlink sessions. A RuleID different from | shared between uplink and downlink sessions. A RuleID not in the | |||
| FPortUp or FPortDown means that the fragmentation is not used, thus | set(s) of FPortUp or FPortDown means that the fragmentation is not | |||
| the packet SHOULD be sent to C/D layer. | used, thus, on reception, the SCHC Message MUST be sent to the C/D | |||
| layer. | ||||
| The only uplink messages using the FPortDown port are the | The only uplink messages using the FPortDown port are the | |||
| fragmentation SCHC control messages of a downlink fragmentation | fragmentation SCHC control messages of a downlink fragmentation | |||
| session (ex ACKs). Similarly, the only downlink messages using the | session (for example, SCHC ACKs). Similarly, the only downlink | |||
| FPortUp port are the fragmentation SCHC control messages of an uplink | messages using the FPortUp port are the fragmentation SCHC control | |||
| fragmentation session. | messages of an uplink fragmentation session. | |||
| An application can have multiple fragmentation sessions between a | An application can have multiple fragmentation sessions between a | |||
| device and one or several SCHC gateways. A set of FPort values is | device and one or several SCHC gateways. A set of FPort values is | |||
| REQUIRED for each SCHC gateway instance the device is required to | REQUIRED for each SCHC gateway instance the device is required to | |||
| communicate with. | communicate with. | |||
| The mechanism for sharing those RuleID values is outside the scope of | The mechanism for sharing those RuleID values is outside the scope of | |||
| this document. | this document. | |||
| 5.3. IID computation | 5.3. IID computation | |||
| As LoRaWAN network uses unique EUI-64 per end-device, the Interface | In order to mitigate risks described in [RFC8064] and [RFC8065] IID | |||
| IDentifier is the LoRaWAN DevEUI. It is compliant with [RFC4291] and | MUST be created regarding the following algorithm: | |||
| IID starting with binary 000 must enforce the 64-bit rule. | ||||
| TODO: Derive IID from DevEUI with privacy constraints ? Ask working | 1. key = LoRaWAN AppSKey | |||
| group ? | ||||
| 2. cmac = aes128_cmac(key, devEui) | ||||
| 3. IID = cmac[0..7] | ||||
| aes128_cmac algorithm is described in [RFC4493]. It has been chosen | ||||
| as it is already used by devices for LoRaWAN procotol. | ||||
| As AppSKey is renewed each time a device joins or rejoins a network, | ||||
| the IID will change over time; this mitigates privacy, location | ||||
| tracking and correlation over time risks. Rejoin periodicity is | ||||
| defined at the application level. | ||||
| Address scan risk is mitigated thanks to AES-128, which provides | ||||
| enough entropy bits of the IID. | ||||
| Using this algorithm will also ensure that there is not correlation | ||||
| between the hardware identifier (IEEE-64 devEUI) and the IID, so an | ||||
| attacker can not use manufacturer OUI to target devices. | ||||
| Exemple with: | ||||
| o devEui: 0x1122334455667788 | ||||
| o appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB | ||||
| 1. key: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB | ||||
| 2. cmac: 0x4E822D9775B2649928F82066AF804FEC | ||||
| 3. IID: 0x28F82066AF804FEC | ||||
| 5.4. Padding | 5.4. Padding | |||
| All padding bits MUST be 0. | All padding bits MUST be 0. | |||
| 5.5. Compression | 5.5. Decompression | |||
| SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the | SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the | |||
| SCHC packet as per Section 5.1. | SCHC Packet as per Section 5.1. | |||
| RuleIDs matching FPortUp and FPortDown are reserved for SCHC | RuleIDs matching FPortUp and FPortDown are reserved for SCHC | |||
| Fragmentation. | Fragmentation. | |||
| 5.6. Fragmentation | 5.6. Fragmentation | |||
| The L2 word size used by LoRaWAN is 1 byte (8 bits). The SCHC | The L2 Word Size used by LoRaWAN is 1 byte (8 bits). The SCHC | |||
| fragmentation over LoRaWAN uses the ACK-on-Error for uplink | fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink | |||
| fragmentation and Ack-Always for downlink fragmentation. A LoRaWAN | fragmentation and Ack-Always mode for downlink fragmentation. A | |||
| end-device cannot support simultaneous interleaved fragmentation | LoRaWAN end-device cannot support simultaneous interleaved | |||
| sessions in the same direction (uplink or downlink). This means that | fragmentation sessions in the same direction (uplink or downlink). | |||
| only a single fragmented IPv6 datagram may be transmitted and/or | ||||
| received by the end-device at a given moment. | ||||
| The fragmentation parameters are different for uplink and downlink | The fragmentation parameters are different for uplink and downlink | |||
| fragmentation sessions and are successively described in the next | fragmentation sessions and are successively described in the next | |||
| sections. | sections. | |||
| 5.6.1. DTag | 5.6.1. DTag | |||
| A LoRaWAN device cannot interleave several fragmented SCHC datagrams | A LoRaWAN device cannot interleave several fragmented SCHC datagrams | |||
| on the same FPort. This field is not used and its size is 0. | on the same FPort. This field is not used and its size is 0. | |||
| Note: The device can still have several parallel fragmentation | Note: The device can still have several parallel fragmentation | |||
| sessions with one or more SCHC gateway(s) thanks to distinct sets of | sessions with one or more SCHC gateway(s) thanks to distinct sets of | |||
| FPorts, cf Section 5.2 | FPorts, cf Section 5.2 | |||
| 5.6.2. Uplink fragmentation: From device to SCHC gateway | 5.6.2. Uplink fragmentation: From device to SCHC gateway | |||
| In that case the device is the fragmentation transmitter, and the | In that case the device is the fragmentation transmitter, and the | |||
| SCHC gateway the fragmentation receiver. A single fragmentation rule | SCHC gateway the fragmentation receiver. A single fragmentation rule | |||
| is defined. SCHC F/R MUST concatenate FPort and LoRaWAN payload to | is defined. SCHC F/R MUST concatenate FPort and LoRaWAN payload to | |||
| retrieve the SCHC fragment as per Section 5.1. | retrieve the SCHC Packet, as per Section 5.1. | |||
| o SCHC header size is two bytes (the FPort byte + 1 additional | o SCHC header size is two bytes (the FPort byte + 1 additional | |||
| byte). | byte). | |||
| o RuleID: 8 bits stored in LoRaWAN FPort. | o RuleID: 8 bits stored in LoRaWAN FPort. | |||
| o SCHC fragmentation reliability mode: "ACK-on-Error" | o SCHC fragmentation reliability mode: "ACK-on-Error" | |||
| o DTag: Size is 0 bit, not used | o DTag: Size is 0 bit, not used | |||
| o FCN: The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 | o FCN: The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 | |||
| tiles are allowed in a window | tiles are allowed in a window | |||
| o Window index: encoded on W = 2 bits. So 4 windows are available. | o Window index: encoded on W = 2 bits. So 4 windows are available. | |||
| o RCS calculation algorithm: CRC32 using 0xEDB88320 (i.e. the | o RCS: Use recommended calculation algorithm in | |||
| reverse representation of the polynomial used e.g. in the Ethernet | ||||
| standard [RFC3385]) as suggested in | ||||
| [I-D.ietf-lpwan-ipv6-static-context-hc]. | [I-D.ietf-lpwan-ipv6-static-context-hc]. | |||
| o MAX_ACK_REQUESTS: 8 | o MAX_ACK_REQUESTS: 8 | |||
| o Tile: size is 10 bytes | o Tile: size is 10 bytes | |||
| o Retransmission and inactivity timers: LoRaWAN end-devices do not | o Retransmission timer: LoRaWAN end-devices MUST NOT implement a | |||
| implement a "retransmission timer". At the end of a window or a | "retransmission timer", this changes the specification of | |||
| fragmentation session, corresponding ACK(s) is (are) transmitted | [I-D.ietf-lpwan-ipv6-static-context-hc], see Section 5.6.3.5. It | |||
| by the network gateway (LoRaWAN application server) in the RX1 or | must transmit MAX_ACK_REQUESTS time the SCHC ACK REQ at it own | |||
| RX2 receive slot of end-device. If this ACK is not received by | timing; ie the periodicity between retransmission of SCHC ACK REQs | |||
| the end-device at the end of its RX windows, it sends an all-0 (or | is device specific and can vary depending on other application | |||
| an all-1) fragment with no payload to request an SCHC ACK | uplinks and regulations. | |||
| retransmission. The periodicity between retransmission of the | ||||
| all-0/all-1 fragments is device/application specific and MAY be | ||||
| different for each device (not specified). The SCHC gateway | ||||
| implements an "inactivity timer". The default RECOMMENDED | ||||
| duration of this timer is 12 hours. This value is mainly driven | ||||
| by application requirements and MAY be changed by the application. | ||||
| o Last tile: The last tile can be carried in the All-1 fragment. | o Inactivity timer: The SCHC gateway implements an "inactivity | |||
| timer". The default RECOMMENDED duration of this timer is 12 | ||||
| hours; this value is mainly driven by application requirements and | ||||
| MAY be changed by the application. | ||||
| o Last tile: The last tile MUST NOT be carried in the All-1 | ||||
| fragment. | ||||
| o Penultimate tile MUST be equal to the regular size. | ||||
| With this set of parameters, the SCHC fragment header is 16 bits, | With this set of parameters, the SCHC fragment header is 16 bits, | |||
| including FPort; payload overhead will be 8 bits as FPort is already | including FPort; payload overhead will be 8 bits as FPort is already | |||
| a part of LoRaWAN payload. MTU is: _4 windows * 63 tiles * 10 bytes | a part of LoRaWAN payload. MTU is: _4 windows * 63 tiles * 10 bytes | |||
| per tile = 2520 bytes_ | per tile = 2520 bytes_ | |||
| _Note_: As LoRaWAN is a radio communication, it is RECOMMENDED for an | ||||
| implementation to use ACK mechanism at the end of each window: | ||||
| o SCHC receiver sends an SCHC ACK after every window even if there | ||||
| is no missing tiles. | ||||
| o SCHC sender waits for the SCHC ACK from the SCHC receiver before | ||||
| sending tiles from next window. If the SCHC ACK is not received | ||||
| it should send an SCHC ACK REQ up to MAX_ACK_REQUESTS time as | ||||
| described previously. | ||||
| This OPTIONAL feature will prevent a device to transmit full payload | ||||
| if the network can not be reach, thus save battery life. | ||||
| 5.6.2.1. Regular fragments | 5.6.2.1. Regular fragments | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ------------------------- + | + ------ + ------------------------- + | |||
| | RuleID | W | FCN | Payload | | | RuleID | W | FCN | Payload | | |||
| + ------ + ------ + ------ + ------- + | + ------ + ------ + ------ + ------- + | |||
| | 8 bits | 2 bits | 6 bits | | | | 8 bits | 2 bits | 6 bits | | | |||
| Figure 6: All fragments except the last one. SCHC header size is 16 | Figure 6: All fragments except the last one. SCHC header size is 16 | |||
| bits, including LoRaWAN FPort. | bits, including LoRaWAN FPort. | |||
| 5.6.2.2. Last fragment (All-1) | 5.6.2.2. Last fragment (All-1) | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ------------------------------------------------ + | + ------ + ---------------------------- + | |||
| | RuleID | W | FCN=All-1 | RCS | Payload | | | RuleID | W | FCN=All-1 | RCS | | |||
| + ------ + ------ + --------- + ------- + ----------------- + | + ------ + ------ + --------- + ------- + | |||
| | 8 bits | 2 bits | 6 bits | 32 bits | Last tile, if any | | | 8 bits | 2 bits | 6 bits | 32 bits | | |||
| Figure 7: All-1 fragment detailed format for the last fragment. | Figure 7: All-1 fragment detailed format for the last fragment. | |||
| 5.6.2.3. SCHC ACK | 5.6.2.3. SCHC ACK | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ----------------------------------------- + | + ------ + ----------------------------------------- + | |||
| | RuleID | W | C | Encoded bitmap (if C = 0) | | | RuleID | W | C | Encoded bitmap (if C = 0) | | |||
| + ------ + ----- + ----- + ------------------------- + | + ------ + ----- + ----- + ------------------------- + | |||
| | 8 bits | 2 bit | 1 bit | 0 to 127 bits | | | 8 bits | 2 bit | 1 bit | 0 to 63 bits | | |||
| Figure 8: SCHC formats, failed RCS check. | Figure 8: SCHC ACK format, failed RCS check. | |||
| 5.6.2.4. Receiver-Abort | 5.6.2.4. Receiver-Abort | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + -------------------------------------------- + | + ------ + -------------------------------------------- + | |||
| | RuleID | W = b'11 | C = 1 | b'11111 | 0xFF (all 1's) | | | RuleID | W = b'11 | C = 1 | b'11111 | 0xFF (all 1's) | | |||
| + ------ + -------- + ------+-------- + ----------------+ | + ------ + -------- + ------+-------- + ----------------+ | |||
| | 8 bits | 2 bits | 1 bit | 5 bits | 8 bits | | | 8 bits | 2 bits | 1 bit | 5 bits | 8 bits | | |||
| next L2 Word boundary ->| <-- L2 Word --> | | next L2 Word boundary ->| <-- L2 Word --> | | |||
| skipping to change at page 13, line 31 ¶ | skipping to change at page 14, line 20 ¶ | |||
| + ------ + ------ + --------------- + | + ------ + ------ + --------------- + | |||
| | 8 bits | 2 bits | 6 bits | | | 8 bits | 2 bits | 6 bits | | |||
| Figure 10: SCHC ACK REQ format. | Figure 10: SCHC ACK REQ format. | |||
| 5.6.3. Downlink fragmentation: From SCHC gateway to a device | 5.6.3. Downlink fragmentation: From SCHC gateway to a device | |||
| In that case the device is the fragmentation receiver, and the SCHC | In that case the device is the fragmentation receiver, and the SCHC | |||
| gateway the fragmentation transmitter. The following fields are | gateway the fragmentation transmitter. The following fields are | |||
| common to all devices. SCHC F/R MUST concatenate FPort and LoRaWAN | common to all devices. SCHC F/R MUST concatenate FPort and LoRaWAN | |||
| payload to retrieve the SCHC fragment as described in Section 5.1. | payload to retrieve the SCHC Packet as described in Section 5.1. | |||
| o SCHC fragmentation reliability mode: | o SCHC fragmentation reliability mode: | |||
| * Unicast downlinks: ACK-Always. | * Unicast downlinks: ACK-Always. | |||
| * Multicast downlinks: No-ACK, reliability has be be ensured by | * Multicast downlinks: No-ACK, reliability has to be ensured by | |||
| the upper layer. This feature is OPTIONAL and may not be | the upper layer. This feature is OPTIONAL and may not be | |||
| implemented by SCHC gateway. | implemented by SCHC gateway. | |||
| o RuleID: 8 bits stored in LoRaWAN FPort. | o RuleID: 8 bits stored in LoRaWAN FPort. | |||
| o Window index (unicast only): encoded on W=1 bit, as per | o Window index (unicast only): encoded on W=1 bit, as per | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc]. | [I-D.ietf-lpwan-ipv6-static-context-hc]. | |||
| o DTag: Size is 0 bit, not used | o DTag: Size is 0 bit, not used | |||
| o FCN: The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile | o FCN: The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile | |||
| (FCN=All-1 is reserved for SCHC). | (FCN=All-1 is reserved for SCHC). | |||
| o RCS calculation algorithm: CRC32 using 0xEDB88320 (i.e. the | o RCS: Use recommended calculation algorithm in | |||
| reverse representation of the polynomial used e.g. in the Ethernet | ||||
| standard [RFC3385]), as per | ||||
| [I-D.ietf-lpwan-ipv6-static-context-hc]. | [I-D.ietf-lpwan-ipv6-static-context-hc]. | |||
| o MAX_ACK_REQUESTS: 8 | o MAX_ACK_REQUESTS: 8 | |||
| As only 1 tile is used, its size can change for each downlink, and | As only 1 tile is used, its size can change for each downlink, and | |||
| will be maximum available MTU. | will be maximum available MTU. | |||
| _Note_: The Fpending bit included in LoRaWAN protocol SHOULD NOT be | _Note_: The Fpending bit included in LoRaWAN protocol SHOULD NOT be | |||
| used for SCHC-over-LoRaWAN protocol. It might be set by the Network | used for SCHC-over-LoRaWAN protocol. It might be set by the Network | |||
| Server for other purposes but not SCHC needs. | Server for other purposes but not SCHC needs. | |||
| 5.6.3.1. Regular fragments | 5.6.3.1. Regular fragments | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ----------------------------------- + | + ------ + ------------------------------------ + | |||
| | RuleID | W | FCN = b'0 | Payload | | | RuleID | W | FCN = b'0 | Payload | | |||
| + ------ + ----- + --------- + --------------- + | + ------ + ----- + --------- + ---------------- + | |||
| | 8 bits | 1 bit | 1 bit | X bytes | | | 8 bits | 1 bit | 1 bit | X bytes + 6 bits | | |||
| Figure 11: All fragments but the last one. Header size 10 bits, | Figure 11: All fragments but the last one. Header size 10 bits, | |||
| including LoraWAN FPort. | including LoraWAN FPort. | |||
| 5.6.3.2. Last fragment (All-1) | 5.6.3.2. Last fragment (All-1) | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ----------------------------------------------- + | + ------ + --------------------------- + | |||
| | RuleID | W | FCN = b'1 | RCS | Payload | | | RuleID | W | FCN = b'1 | RCS | | |||
| + ------ + ----- + --------- + ------- + ----------------- + | + ------ + ----- + --------- + ------- + | |||
| | 8 bits | 1 bit | 1 bit | 32 bits | Last tile, if any | | | 8 bits | 1 bit | 1 bit | 32 bits | | |||
| Figure 12: All-1 SCHC ACK detailed format for the last fragment. | Figure 12: All-1 SCHC Message: the last fragment. | |||
| 5.6.3.3. SCHC acknowledge | 5.6.3.3. SCHC acknowledge | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ---------------------------------- + | + ------ + ---------------------------------- + | |||
| | RuleID | W | C = b'1 | Padding b'000000 | | | RuleID | W | C = b'1 | Padding b'000000 | | |||
| + ------ + ----- + ------- + ---------------- + | + ------ + ----- + ------- + ---------------- + | |||
| | 8 bits | 1 bit | 1 bit | 6 bits | | | 8 bits | 1 bit | 1 bit | 6 bits | | |||
| Figure 13: SCHC ACK format, RCS is correct. | Figure 13: SCHC ACK format, RCS is correct. | |||
| 5.6.3.4. Receiver-Abort | 5.6.3.4. Receiver-Abort | |||
| | FPort | LoRaWAN payload | | | FPort | LoRaWAN payload | | |||
| + ------ + ---------------------------------------------- + | + ------ + ---------------------------------------------- + | |||
| | RuleID | W = b'1 | C = b'1 | b'111111 | 0xFF (all 1's) | | | RuleID | W = b'1 | C = b'1 | b'111111 | 0xFF (all 1's) | | |||
| + ------ + ------- + ------- + -------- + --------------- + | + ------ + ------- + ------- + -------- + --------------- + | |||
| | 8 bits | 1 bit | 1 bits | 6 bits | 8 bits | | | 8 bits | 1 bit | 1 bits | 6 bits | 8 bits | | |||
| next L2 Word boundary ->| <-- L2 Word --> | | next L2 Word boundary ->| <-- L2 Word --> | | |||
| Figure 14: Receiver-Abort packet (following an all-1 packet with | Figure 14: Receiver-Abort packet (following an All-1 SCHC Fragment | |||
| incorrect RCS). | with incorrect RCS). | |||
| Class A and Class B or Class C end-devices do not manage | Class A and Class B or Class C end-devices do not manage | |||
| retransmissions and timers in the same way. | retransmissions and timers in the same way. | |||
| 5.6.3.5. Class A end-devices | 5.6.3.5. Class A end-devices | |||
| Class A end-devices can only receive in an RX slot following the | Class A end-devices can only receive in an RX slot following the | |||
| transmission of an uplink. Therefore there cannot be a concept of | transmission of an uplink. Therefore there cannot be a concept of | |||
| "retransmission timer" for an SCHC gateway. The SCHC gateway cannot | "retransmission timer" for an SCHC gateway. The SCHC gateway cannot | |||
| initiate communication to a Class A end-device. | initiate communication to a Class A end-device. | |||
| The device replies with an ACK message to every single fragment | The device replies with an ACK message to every single fragment | |||
| received from the SCHC gateway (because the window size is 1). | received from the SCHC gateway (because the window size is 1). | |||
| Following the reception of a FCN=0 fragment (fragment that is not the | Following the reception of a FCN=0 fragment (fragment that is not the | |||
| last fragment of the packet or ACK-request, but the end of a window), | last fragment of the packet or SCHC ACK REQ, but the end of a | |||
| the device MUST transmit the SCHC ACK fragment until it receives the | window), the device MUST transmit the SCHC ACK fragment until it | |||
| fragment of the next window. The device SHALL transmit up to | receives the fragment of the next window. The device SHALL transmit | |||
| MAX_ACK_REQUESTS ACK messages before aborting. The device should | up to MAX_ACK_REQUESTS ACK messages before aborting. The device | |||
| transmit those ACK as soon as possible while taking into | should transmit those ACK as soon as possible while taking into | |||
| consideration potential local radio regulation on duty-cycle, to | consideration potential local radio regulation on duty-cycle, to | |||
| progress the fragmentation session as quickly as possible. The ACK | progress the fragmentation session as quickly as possible. The ACK | |||
| bitmap is 1 bit long and is always 1. | bitmap is 1 bit long and is always 1. | |||
| Following the reception of an FCN=All-1 fragment (the last fragment | Following the reception of an FCN=All-1 fragment (the last fragment | |||
| of a datagram) and if the RCS is correct, the device SHALL transmit | of a datagram) and if the RCS is correct, the device SHALL transmit | |||
| the ACK with the "RCS is correct" indicator bit set (C=1). This | the ACK with the "RCS is correct" indicator bit set (C=1). This | |||
| message might be lost therefore the SCHC gateway MAY request a | message might be lost therefore the SCHC gateway MAY request a | |||
| retransmission of this ACK in the next downlink. The device SHALL | retransmission of this ACK in the next downlink. The device SHALL | |||
| keep this ACK message in memory until it receives a downlink, on SCHC | keep this ACK message in memory until it receives a downlink, on SCHC | |||
| FPortDown from the SCHC gateway different from an ACK-request: it | FPortDown from the SCHC gateway different from an SCHC ACK REQ: it | |||
| indicates that the SCHC gateway has received the ACK message. | indicates that the SCHC gateway has received the ACK message. | |||
| Following the reception of a FCN=All-1 fragment (the last fragment of | ||||
| a datagram), if all fragments have been received and the RCS is not | ||||
| correct, the device SHALL transmit a Receiver-Abort fragment. The | ||||
| device SHALL keep this Abort message in memory until it receives a | ||||
| downlink, on SCHC FPortDown, from the SCHC gateway different from an | ||||
| ACK-request indicating that the SCHC gateway has received the Abort | ||||
| message. The fragmentation receiver (device) does not implement | ||||
| retransmission timer and inactivity timer. | ||||
| The fragmentation sender (the SCHC gateway) implements an inactivity | The fragmentation sender (the SCHC gateway) implements an inactivity | |||
| timer with a default duration of 12 hours. Once a fragmentation | timer with a default duration of 12 hours. Once a fragmentation | |||
| session is started, if the SCHC gateway has not received any ACK or | session is started, if the SCHC gateway has not received any ACK or | |||
| Receiver-Abort message 12 hours after the last message from the | Receiver-Abort message 12 hours after the last message from the | |||
| device was received, the SCHC gateway MAY flush the fragmentation | device was received, the SCHC gateway MAY flush the fragmentation | |||
| context. For devices with very low transmission rates (example 1 | context. For devices with very low transmission rates (example 1 | |||
| packet a day in normal operation) , that duration may be extended, | packet a day in normal operation) , that duration may be extended, | |||
| but this is application specific. | but this is application specific. | |||
| 5.6.3.6. Class B or Class C end-devices | 5.6.3.6. Class B or Class C end-devices | |||
| Class B and Class C end-devices can receive in scheduled RX slots or | Class B and Class C end-devices can receive in scheduled RX slots or | |||
| in RX slots following the transmission of an uplink. The device | in RX slots following the transmission of an uplink. The device | |||
| replies with an ACK message to every single fragment received from | replies with an ACK message to every single fragment received from | |||
| the SCHC gateway (because the window size is 1). Following the | the SCHC gateway (because the window size is 1). Following the | |||
| reception of an FCN=0 fragment (fragment that is not the last | reception of an FCN=0 fragment (fragment that is not the last | |||
| fragment of the packet or ACK-request), the device MUST always | fragment of the packet or SCHC ACK REQ), the device MUST always | |||
| transmit the corresponding SCHC ACK message even if that fragment has | transmit the corresponding SCHC ACK message even if that fragment has | |||
| already been received. The ACK bitmap is 1 bit long and is always 1. | already been received. The ACK bitmap is 1 bit long and is always 1. | |||
| If the SCHC gateway receives this ACK, it proceeds to send the next | If the SCHC gateway receives this ACK, it proceeds to send the next | |||
| window fragment. If the retransmission timer elapses and the SCHC | window fragment. If the retransmission timer elapses and the SCHC | |||
| gateway has not received the ACK of the current window it retransmits | gateway has not received the ACK of the current window it retransmits | |||
| the last fragment. The SCHC gateway tries retransmitting up to | the last fragment. The SCHC gateway tries retransmitting up to | |||
| MAX_ACK_REQUESTS times before aborting. | MAX_ACK_REQUESTS times before aborting. | |||
| Following the reception of an FCN=All-1 fragment (the last fragment | Following the reception of an FCN=All-1 fragment (the last fragment | |||
| of a datagram) and if the RCS is correct, the device SHALL transmit | of a datagram) and if the RCS is correct, the device SHALL transmit | |||
| the ACK with the "RCS is correct" indicator bit set. If the SCHC | the ACK with the "RCS is correct" indicator bit set. If the SCHC | |||
| gateway receives this ACK, the current fragmentation session has | gateway receives this ACK, the current fragmentation session has | |||
| succeeded and its context can be cleared. | succeeded and its context can be cleared. | |||
| If the retransmission timer elapses and the SCHC gateway has not | If the retransmission timer elapses and the SCHC gateway has not | |||
| received the SCHC ACK it retransmits the last fragment with the | received the SCHC ACK it retransmits the last fragment with the | |||
| payload (not an ACK-request without payload). The SCHC gateway tries | payload (not an SCHC ACK REQ without payload). The SCHC gateway | |||
| retransmitting up to MAX_ACK_REQUESTS times before aborting. | tries retransmitting up to MAX_ACK_REQUESTS times before aborting. | |||
| Following the reception of an FCN=All-1 fragment (the last fragment | Following the reception of an FCN=All-1 fragment (the last fragment | |||
| of a datagram), if all fragments have been received and if the RCS is | of a datagram), if all fragments have been received and if the RCS is | |||
| NOT correct, the device SHALL transmit a Receiver-Abort fragment. | NOT correct, the device SHALL transmit a Receiver-Abort fragment. | |||
| The retransmission timer is used by the SCHC gateway (the sender), | The retransmission timer is used by the SCHC gateway (the sender), | |||
| the optimal value is very much application specific but here are some | the optimal value is very much application specific but here are some | |||
| recommended default values. For Class B end-devices, this timer | recommended default values. For Class B end-devices, this timer | |||
| trigger is a function of the periodicity of the Class B ping slots. | trigger is a function of the periodicity of the Class B ping slots. | |||
| The RECOMMENDED value is equal to 3 times the Class B ping slot | The RECOMMENDED value is equal to 3 times the Class B ping slot | |||
| periodicity. For Class C end-devices which are nearly constantly | periodicity. For Class C end-devices which are nearly constantly | |||
| receiving, the RECOMMENDED value is 30 seconds. This means that the | receiving, the RECOMMENDED value is 30 seconds. This means that the | |||
| end-device shall try to transmit the ACK within 30 seconds of the | end-device shall try to transmit the ACK within 30 seconds of the | |||
| reception of each fragment. The inactivity timer is implemented by | reception of each fragment. The inactivity timer is implemented by | |||
| the end-device to flush the context in-case it receives nothing from | the end-device to flush the context in case it receives nothing from | |||
| the SCHC gateway over an extended period of time. The RECOMMENDED | the SCHC gateway over an extended period of time. The RECOMMENDED | |||
| value is 12 hours for both Class B and Class C end-devices. | value is 12 hours for both Class B and Class C end-devices. | |||
| 6. Security considerations | 6. Security considerations | |||
| This document is only providing parameters that are expected to be | This document is only providing parameters that are expected to be | |||
| better suited for LoRaWAN networks for | better suited for LoRaWAN networks for | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc]. As such, this document does | [I-D.ietf-lpwan-ipv6-static-context-hc]. IID security is discussed | |||
| not contribute to any new security issues in addition to those | in Section 5.3.As such, this document does not contribute to any new | |||
| identified in [I-D.ietf-lpwan-ipv6-static-context-hc]. | security issues in addition to those identified in | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc]. | ||||
| Acknowledgements | Acknowledgements | |||
| Thanks to all those listed in the Contributors section for the | Thanks to all those listed in the Contributors section for the | |||
| excellent text, insightful discussions, reviews and suggestions. | excellent text, insightful discussions, reviews and suggestions, and | |||
| also to (in alphabetical order) Dominique Barthel, Arunprabhu | ||||
| Kandasamy, Rodrigo Munoz, Alexander Pelov, Pascal Thubert, Laurent | ||||
| Toutain for useful design considerations, reviews and comments. | ||||
| Contributors | Contributors | |||
| Contributors ordered by family name. | Contributors ordered by family name. | |||
| o ins: V. Audebert name: Vincent AUDEBERT org: EDF R&D street: 7 bd | Vincent Audebert | |||
| Gaspard Monge city: 91120 PALAISEAU country: FRANCE email: | EDF R&D | |||
| vincent.audebert@edf.fr | Email: vincent.audebert@edf.fr | |||
| o ins: J. Catalano name: Julien Catalano org: Kerlink street: 1 rue | Julien Catalano | |||
| Jacqueline Auriol city: 35235 Thorigne-Fouillard country: France | Kerlink | |||
| email: j.catalano@kerlink.fr | Email: j.catalano@kerlink.fr | |||
| o ins: M. Coracin name: Michael Coracin org: Semtech street: 14 | Michael Coracin | |||
| Chemin des Clos city: Meylan country: France email: | Semtech | |||
| mcoracin@semtech.com | Email: mcoracin@semtech.com | |||
| o ins: M. Le Gourrierec name: Marc Le Gourrierec org: SagemCom | Marc Le Gourrierec | |||
| street: 250 Route de l'Empereur city: 92500 Rueil Malmaison | Sagemcom | |||
| country: FRANCE email: marc.legourrierec@sagemcom.com | Email: marc.legourrierec@sagemcom.com | |||
| o ins: N. Sornin name: Nicolas Sornin org: Semtech street: 14 | Nicolas Sornin | |||
| Chemin des Clos city: Meylan country: France email: | Semtech | |||
| nsornin@semtech.com | Email: nsornin@semtech.com | |||
| o ins: A. Yegin name: Alper Yegin org: Actility street: . city: | Alper Yegin | |||
| Paris, Paris country: France email: alper.yegin@actility.com | Actility | |||
| Email: alper.yegin@actility.com | ||||
| 9. References | 9. References | |||
| 9.1. Normative References | 9.1. Normative References | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc] | ||||
| Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and J. | ||||
| Zuniga, "Static Context Header Compression (SCHC) and | ||||
| fragmentation for LPWAN, application to UDP/IPv6", draft- | ||||
| ietf-lpwan-ipv6-static-context-hc-24 (work in progress), | ||||
| December 2019. | ||||
| [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>. | |||
| [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>. | |||
| [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing | [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing | |||
| Architecture", RFC 4291, DOI 10.17487/RFC4291, February | Architecture", RFC 4291, DOI 10.17487/RFC4291, February | |||
| 2006, <https://www.rfc-editor.org/info/rfc4291>. | 2006, <https://www.rfc-editor.org/info/rfc4291>. | |||
| [RFC4493] Song, JH., Poovendran, R., Lee, J., and T. Iwata, "The | ||||
| AES-CMAC Algorithm", RFC 4493, DOI 10.17487/RFC4493, June | ||||
| 2006, <https://www.rfc-editor.org/info/rfc4493>. | ||||
| [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, | [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, | |||
| "Transmission of IPv6 Packets over IEEE 802.15.4 | "Transmission of IPv6 Packets over IEEE 802.15.4 | |||
| Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, | Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, | |||
| <https://www.rfc-editor.org/info/rfc4944>. | <https://www.rfc-editor.org/info/rfc4944>. | |||
| [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>. | |||
| [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>. | |||
| [RFC8064] Gont, F., Cooper, A., Thaler, D., and W. Liu, | ||||
| "Recommendation on Stable IPv6 Interface Identifiers", | ||||
| RFC 8064, DOI 10.17487/RFC8064, February 2017, | ||||
| <https://www.rfc-editor.org/info/rfc8064>. | ||||
| [RFC8065] Thaler, D., "Privacy Considerations for IPv6 Adaptation- | ||||
| Layer Mechanisms", RFC 8065, DOI 10.17487/RFC8065, | ||||
| February 2017, <https://www.rfc-editor.org/info/rfc8065>. | ||||
| [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>. | |||
| [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>. | |||
| 9.2. Informative References | 9.2. Informative References | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc] | ||||
| Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and J. | ||||
| Zuniga, "Static Context Header Compression (SCHC) and | ||||
| fragmentation for LPWAN, application to UDP/IPv6", draft- | ||||
| ietf-lpwan-ipv6-static-context-hc-22 (work in progress), | ||||
| October 2019. | ||||
| [lora-alliance-remote-multicast-set] | [lora-alliance-remote-multicast-set] | |||
| Alliance, L., "LoRaWAN Remote Multicast Setup | Alliance, L., "LoRaWAN Remote Multicast Setup | |||
| Specification Version 1.0.0", <https://lora- | Specification Version 1.0.0", <https://lora- | |||
| alliance.org/sites/default/files/2018-09/ | alliance.org/sites/default/files/2018-09/ | |||
| remote_multicast_setup_v1.0.0.pdf>. | remote_multicast_setup_v1.0.0.pdf>. | |||
| [lora-alliance-spec] | [lora-alliance-spec] | |||
| Alliance, L., "LoRaWAN Specification Version V1.0.3", | Alliance, L., "LoRaWAN Specification Version V1.0.3", | |||
| <https://lora-alliance.org/sites/default/files/2018-07/ | <https://lora-alliance.org/sites/default/files/2018-07/ | |||
| lorawan1.0.3.pdf>. | lorawan1.0.3.pdf>. | |||
| Appendix A. Examples | Appendix A. Examples | |||
| A.1. Uplink - Compression example - No fragmentation | A.1. Uplink - Compression example - No fragmentation | |||
| Figure 15 is representing an applicative payload going through SCHC, | This example represents an applicative payload going through SCHC | |||
| no fragmentation required | over LoRaWAN, no fragmentation required | |||
| An applicative payload of 78 bytes is passed to SCHC compression layer | An applicative payload of 78 bytes is passed to SCHC compression | |||
| using rule 1, allowing to compress it to 40 bytes and 5 bits: 1 byte | layer. Rule 1 is used by C/D layer, allowing to compress it to 40 | |||
| ruleID, 21 bits residue + 37 bytes payload. | bytes and 5 bits: 1 byte RuleID, 21 bits residue + 37 bytes payload. | |||
| | RuleID | Compression residue | Payload | Padding=b'000 | | | RuleID | Compression residue | Payload | Padding=b'000 | | |||
| + ------ + ------------------- + --------- + ------------- + | + ------ + ------------------- + --------- + ------------- + | |||
| | 1 | 21 bits | 38 bytes | 3 bits | | | 1 | 21 bits | 37 bytes | 3 bits | | |||
| The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are used by | Figure 15: Uplink example: SCHC Message | |||
| LoRaWAN protocol: 49 bytes are available for SCHC payload; no need for | ||||
| fragmentation. The payload will be transmitted through FPort = 1 | The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are used | |||
| by LoRaWAN protocol: 49 bytes are available for SCHC payload; no need | ||||
| for fragmentation. The payload will be transmitted through FPort = | ||||
| 1. | ||||
| | LoRaWAN Header | LoRaWAN payload (40 bytes) | | | LoRaWAN Header | LoRaWAN payload (40 bytes) | | |||
| + ------------------------- + --------------------------------------- + | + ------------------------- + --------------------------------------- + | |||
| | | FOpts | RuleID=1 | Compression | Payload | Padding=b'000 | | | | FOpts | RuleID=1 | Compression | Payload | Padding=b'000 | | |||
| | | | | residue | | | | | | | | residue | | | | |||
| + ---- + ------- + -------- + ----------- + --------- + ------------- + | + ---- + ------- + -------- + ----------- + --------- + ------------- + | |||
| | XXXX | 2 bytes | 1 byte | 21 bits | 37 bytes | 3 bits | | | XXXX | 2 bytes | 1 byte | 21 bits | 37 bytes | 3 bits | | |||
| Figure 15: Uplink example: compression without fragmentation | Figure 16: Uplink example: LoRaWAN packet | |||
| A.2. Uplink - Compression and fragmentation example | A.2. Uplink - Compression and fragmentation example | |||
| Figure 16 is representing an applicative payload going through SCHC, | This example represents an applicative payload going through SCHC, | |||
| with fragmentation. | with fragmentation. | |||
| An applicative payload of 478 bytes is passed to SCHC compression layer | An applicative payload of 478 bytes is passed to SCHC compression | |||
| using rule 1, allowing to compress it to 282 bytes and 5 bits: 1 byte | layer. Rule 1 is used by C/D layer, allowing to compress it to 282 | |||
| ruleID, 21 bits residue + 279 bytes payload. | bytes and 5 bits: 1 byte RuleID, 21 bits residue + 279 bytes payload. | |||
| | RuleID | Compression residue | Payload | | | RuleID | Compression residue | Payload | | |||
| + ------ + ------------------- + --------- + | + ------ + ------------------- + --------- + | |||
| | 1 | 21 bits | 279 bytes | | | 1 | 21 bits | 279 bytes | | |||
| The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by LoRaWAN | Figure 17: Uplink example: SCHC Message | |||
| protocol: 11 bytes are available for SCHC payload + 1 byte FPort field. | ||||
| SCHC header is 2 bytes (including FPort) so 1 tile is sent in first | ||||
| fragment. | ||||
| | LoRaWAN Header | LoRaWAN payload (11 bytes) | | The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by | |||
| + -------------------------- + -------------------------- + | LoRaWAN protocol: 11 bytes are available for SCHC payload + 1 byte | |||
| | | RuleID=20 | W | FCN | 1 tile | | FPort field. SCHC header is 2 bytes (including FPort) so 1 tile is | |||
| + -------------- + --------- + ----- + ------ + --------- + | sent in first fragment. | |||
| | XXXX | 1 byte | 0 0 | 62 | 10 bytes | | ||||
| Content of the tile is: | | LoRaWAN Header | LoRaWAN payload (11 bytes) | | |||
| | RuleID | Compression residue | Payload | | + -------------------------- + -------------------------- + | |||
| + ------ + ------------------- + ----------------- + | | | RuleID=20 | W | FCN | 1 tile | | |||
| | 1 | 21 bits | 6 byte + 3 bits | | + -------------- + --------- + ----- + ------ + --------- + | |||
| | XXXX | 1 byte | 0 0 | 62 | 10 bytes | | ||||
| Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by | Figure 18: Uplink example: LoRaWAN packet 1 | |||
| LoRaWAN protocol: 9 bytes are available for SCHC payload + 1 byte FPort | ||||
| field, a tile does not fit inside so LoRaWAN stack will send only FOpts. | ||||
| Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are transmitted: | Content of the tile is: | |||
| | RuleID | Compression residue | Payload | | ||||
| + ------ + ------------------- + ----------------- + | ||||
| | 1 | 21 bits | 6 byte + 3 bits | | ||||
| | LoRaWAN Header | LoRaWAN payload (231 bytes) | | Figure 19: Uplink example: LoRaWAN packet 1 - Tile content | |||
| + --------------------------------------+ --------------------------- + | ||||
| | | FOpts | RuleID=20 | W | FCN | 23 tiles | | ||||
| + -------------- + ------- + ---------- + ----- + ----- + ----------- + | ||||
| | XXXX | 4 bytes | 1 byte | 0 0 | 61 | 230 bytes | | ||||
| Next transmission MTU is 242 bytes, no FOpts. All 5 remaining tiles are | Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by | |||
| transmitted, the last tile is only 2 bytes + 5 bits. Padding is added for | LoRaWAN protocol: 9 bytes are available for SCHC payload + 1 byte | |||
| the remaining 3 bits. | FPort field, a tile does not fit inside so LoRaWAN stack will send | |||
| only FOpts. | ||||
| | LoRaWAN Header | LoRaWAN payload (44 bytes) | | Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are | |||
| + ---- + -----------+ ----------------------------------------------- + | transmitted: | |||
| | | RuleID=20 | W | FCN | 5 tiles | Padding=b'000 | | ||||
| | LoRaWAN Header | LoRaWAN payload (231 bytes) | | ||||
| + --------------------------------------+ --------------------------- + | ||||
| | | FOpts | RuleID=20 | W | FCN | 23 tiles | | ||||
| + -------------- + ------- + ---------- + ----- + ----- + ----------- + | ||||
| | XXXX | 4 bytes | 1 byte | 0 0 | 61 | 230 bytes | | ||||
| Figure 20: Uplink example: LoRaWAN packet 2 | ||||
| Next transmission MTU is 242 bytes, no FOpts. All 5 remaining tiles | ||||
| are transmitted, the last tile is only 2 bytes + 5 bits. Padding is | ||||
| added for the remaining 3 bits. | ||||
| | LoRaWAN Header | LoRaWAN payload (44 bytes) | | ||||
| + ---- + -----------+ ------------------------------------------------- + | ||||
| | | RuleID=20 | W | FCN | 5 tiles | Padding=b'000 | | ||||
| + ---- + ---------- + ----- + ----- + ----------------- + ------------- + | + ---- + ---------- + ----- + ----- + ----------------- + ------------- + | |||
| | XXXX | 1 byte | 0 0 | 38 | 42 bytes + 5 bits | 3 bits | | | XXXX | 1 byte | 0 0 | 38 | 42 bytes + 5 bits | 3 bits | | |||
| All packets have been received by the SCHC gateway, computed RCS is | Figure 21: Uplink example: LoRaWAN packet 3 | |||
| correct so the following ACK is sent to the device: | ||||
| | LoRaWAN Header | LoRaWAN payload | | Then All-1 message can be transmitted: | |||
| + -------------- + --------- + ------------------- + | ||||
| | | RuleID=20 | W | C | Padding | | ||||
| + -------------- + --------- + ----- + - + ------- + | ||||
| | XXXX | 1 byte | 0 0 | 1 | 5 bits | | ||||
| Figure 16: Uplink example: compression and fragmentation | | LoRaWAN Header | LoRaWAN payload (44 bytes) | | |||
| + ---- + -----------+ -------------------------- + | ||||
| | | RuleID=20 | W | FCN | RCS | | ||||
| + ---- + ---------- + ----- + ----- + ---------- + | ||||
| | XXXX | 1 byte | 0 0 | 63 | 4 bytes | | ||||
| Figure 22: Uplink example: LoRaWAN packet 4 - All-1 message | ||||
| All packets have been received by the SCHC gateway, computed RCS is | ||||
| correct so the following ACK is sent to the device by the SCHC | ||||
| receiver: | ||||
| | LoRaWAN Header | LoRaWAN payload | | ||||
| + -------------- + --------- + ------------------- + | ||||
| | | RuleID=20 | W | C | Padding | | ||||
| + -------------- + --------- + ----- + - + ------- + | ||||
| | XXXX | 1 byte | 0 0 | 1 | 5 bits | | ||||
| Figure 23: Uplink example: LoRaWAN packet 5 - SCHC ACK | ||||
| A.3. Downlink | A.3. Downlink | |||
| An applicative payload of 443 bytes is passed to SCHC compression layer | An applicative payload of 443 bytes is passed to SCHC compression | |||
| using rule 1, allowing to compress it to 130 bytes and 5 bits: 1 byte | layer. Rule 1 is used by C/D layer, allowing to compress it to 130 | |||
| ruleId, 21 bits residue + 127 bytes payload. | bytes and 5 bits: 1 byte RuleID, 21 bits residue + 127 bytes payload. | |||
| | RuleID | Compression residue | Payload | | | RuleID | Compression residue | Payload | | |||
| + ------ + ------------------- + --------- + | + ------ + ------------------- + --------- + | |||
| | 1 | 21 bits | 127 bytes | | | 1 | 21 bits | 127 bytes | | |||
| The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN | Figure 24: Downlink example: SCHC Message | |||
| protocol: 48 bytes are available for SCHC payload + FPort field => it | ||||
| has to be fragmented. | ||||
| | LoRaWAN Header | LoRaWAN payload (51 bytes) | | The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN | |||
| + ---- + ---------- + --------------------------------------------- + | protocol: 51 bytes are available for SCHC payload + FPort field => it | |||
| | | RuleID=21 | W | FCN | 1 tile | Padding=b'000000 | | has to be fragmented. | |||
| + ---- + ---------- + --- + --- + -------------- + ---------------- + | ||||
| | XXXX | 1 byte | 0 | 0 | 50 bytes | 6 bits | | ||||
| Content of the tile is: | | LoRaWAN Header | LoRaWAN payload (51 bytes) | | |||
| | RuleID | Compression residue | Payload | | + ---- + ---------- + -------------------------------------- + | |||
| + ------ + ------------------- + ------------------ + | | | RuleID=21 | W = 0 | FCN = 0 | 1 tile | | |||
| | 1 | 21 bits | 46 bytes + 3 bits | | + ---- + ---------- + ------ + ------- + ------------------- + | |||
| | XXXX | 1 byte | 1 bit | 1 bit | 50 bytes and 6 bits | | ||||
| The receiver answers with an SCHC ACK | Figure 25: Downlink example: LoRaWAN packet 1 - SCHC Fragment 1 | |||
| | FPortDown | LoRaWAN payload | | Content of the tile is: | |||
| + --------- + ---------------------------------- + | ||||
| | RuleID | W = 0 | C = b'1 | Padding=b'000000 | | ||||
| + --------- + ----- + ------- + ---------------- + | ||||
| | 1 byte | 1 bit | 1 bit | 6 bits | | ||||
| The second downlink is sent, two FOpts: | | RuleID | Compression residue | Payload | | |||
| + ------ + ------------------- + ------------------ + | ||||
| | 1 | 21 bits | 48 bytes and 1 bit | | ||||
| | LoRaWAN Header | LoRaWAN payload (49 bytes) | | Figure 26: Downlink example: LoRaWAN packet 1: Tile content | |||
| + --------------------------- + ------------------ + ---------------- + | ||||
| | | FOpts | RuleID=21 | W | FCN | 1 tile | Padding=b'000000 | | ||||
| + ---- + ------- + ---------- + - + --- + -------- + ---------------- + | ||||
| | XXXX | 2 bytes | 1 byte | 1 | 0 | 48 bytes | 6 bits | | ||||
| The receiver answers with an SCHC ACK | ||||
| | FPortDown | LoRaWAN payload | | The receiver answers with a SCHC ACK: | |||
| + --------- + ---------------------------------- + | ||||
| | RuleID | W = 1 | C = b'1 | Padding=b'000000 | | ||||
| + --------- + ----- + ------- + ---------------- + | ||||
| | 1 byte | 1 bit | 1 bit | 6 bits | | ||||
| The last downlink is sent, no FOpts: | | LoRaWAN Header | LoRaWAN payload | | |||
| + ---- + --------- + -------------------------------- + | ||||
| | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 | | ||||
| + ---- + --------- + ----- + ----- + ---------------- + | ||||
| | XXXX | 1 byte | 1 bit | 1 bit | 6 bits | | ||||
| | LoRaWAN Header | LoRaWAN payload (33 bytes) | | Figure 27: Downlink example: LoRaWAN packet 2 - SCHC ACK | |||
| + ---- + ---------- + ----------------------------------------------- + | ||||
| | | RuleID=21 | W | FCN | 1 tile | Padding=b'0 | | ||||
| + ---- + ---------- + --- + --- + --------------------- + ----------- + | ||||
| | XXXX | 1 byte | 0 | 1 | 32 bytes + 5 bits | 1 bit | | ||||
| The receiver answers with an SCHC ACK | The second downlink is sent, two FOpts: | |||
| | FPortDown | LoRaWAN payload | | | LoRaWAN Header | LoRaWAN payload (49 bytes) | | |||
| + --------- + ---------------------------------- + | + --------------------------- + ------------------------------------- + | |||
| | RuleID | W = 0 | C = b'1 | Padding=b'000000 | | | | FOpts | RuleID=21 | W = 1 | FCN = 0 | 1 tile | | |||
| + --------- + ----- + ------- + ---------------- + | + ---- + ------- + ---------- + ----- + ------- + ------------------- + | |||
| | 1 byte | 1 bit | 1 bit | 6 bits | | | XXXX | 2 bytes | 1 byte | 1 bit | 1 bit | 48 bytes and 6 bits | | |||
| Figure 17: Downlink example: compression and fragmentation | Figure 28: Downlink example: LoRaWAN packet 3 - SCHC Fragment 2 | |||
| Appendix B. Note | The receiver answers with an SCHC ACK: | |||
| | LoRaWAN Header | LoRaWAN payload | | ||||
| + ---- + --------- + -------------------------------- + | ||||
| | | RuleID=21 | W = 1 | C = 1 | Padding=b'000000 | | ||||
| + ---- + --------- + ----- + ----- + ---------------- + | ||||
| | XXXX | 1 byte | 1 bit | 1 bit | 6 bits | | ||||
| Figure 29: Downlink example: LoRaWAN packet 4 - SCHC ACK | ||||
| The last downlink is sent, no FOpts: | ||||
| | LoRaWAN Header | LoRaWAN payload (37 bytes) | | ||||
| + ---- + --------- + ----------------------------------------------------------------- + | ||||
| | | RuleID=21 | W = 0 | FCN = 1 | RCS | 1 tile | Padding=b'00000 | | ||||
| + ---- + --------- + ------- + ------- + ------- + ----------------- + --------------- + | ||||
| | XXXX | 1 byte | 1 bit | 1 bit | 4 bytes | 31 bytes + 1 bits | 5 bits | | ||||
| Figure 30: Uplink example: LoRaWAN packet 5 - All-1 message | ||||
| The receiver answers to the sender with an SCHC ACK: | ||||
| | LoRaWAN Header | LoRaWAN payload | | ||||
| + ---- + --------- + -------------------------------- + | ||||
| | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 | | ||||
| + ---- + --------- + ----- + ----- + ---------------- + | ||||
| | XXXX | 1 byte | 1 bit | 1 bit | 6 bits | | ||||
| Figure 31: Uplink example: LoRaWAN packet 6 - SCHC ACK | ||||
| Authors' Addresses | Authors' Addresses | |||
| Olivier Gimenez (editor) | Olivier Gimenez (editor) | |||
| Semtech | Semtech | |||
| 14 Chemin des Clos | 14 Chemin des Clos | |||
| Meylan | Meylan | |||
| France | France | |||
| Email: ogimenez@semtech.com | Email: ogimenez@semtech.com | |||
| End of changes. 95 change blocks. | ||||
| 270 lines changed or deleted | 360 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/ | ||||