From 00b6c7d229ff69f96fb65272fde836c52b7046c7 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 11:13:17 +0100 Subject: [PATCH 01/50] Use RFC9011 file name --- draft-ietf-lpwan-schc-over-lorawan.md | 1135 ----------------- ...lpwan-schc-over-lorawan.xml => rfc9011.xml | 0 2 files changed, 1135 deletions(-) delete mode 100644 draft-ietf-lpwan-schc-over-lorawan.md rename draft-ietf-lpwan-schc-over-lorawan.xml => rfc9011.xml (100%) diff --git a/draft-ietf-lpwan-schc-over-lorawan.md b/draft-ietf-lpwan-schc-over-lorawan.md deleted file mode 100644 index 08b3e28..0000000 --- a/draft-ietf-lpwan-schc-over-lorawan.md +++ /dev/null @@ -1,1135 +0,0 @@ ---- -stand_alone: true -ipr: trust200902 -docname: draft-ietf-lpwan-schc-over-lorawan-latest -cat: std -pi: - symrefs: 'yes' - sortrefs: 'yes' - strict: 'yes' - compact: 'yes' - toc: 'yes' -title: Static Context Header Compression (SCHC) over LoRaWAN -abbrev: SCHC-over-LoRaWAN -wg: lpwan Working Group -author: -- ins: O. Gimenez - name: Olivier Gimenez - org: Semtech - street: 14 Chemin des Clos - city: Meylan - country: France - email: ogimenez@semtech.com - role: editor -- ins: I. Petrov - name: Ivaylo Petrov - org: Acklio - street: 1137A Avenue des Champs Blancs - city: 35510 Cesson-Sevigne Cedex - country: France - email: ivaylo@ackl.io - role: editor -normative: - RFC2119: - RFC8174: - RFC4291: - RFC4493: - RFC8724: - lora-alliance-spec: - title: LoRaWAN Specification Version V1.0.4 - author: - name: LoRa Alliance - date: 10.2020 - target: https://lora-alliance.org/resource_hub/lorawan-104-specification-package/ -informative: - RFC8064: - RFC8065: - RFC8376: - lora-alliance-remote-multicast-set: - title: LoRaWAN Remote Multicast Setup Specification Version 1.0.0 - author: - name: LoRa Alliance - date: 09.2018 - target: https://lora-alliance.org/sites/default/files/2018-09/remote_multicast_setup_v1.0.0.pdf - ---- abstract - -The Static Context Header Compression (SCHC) specification describes generic -header compression and fragmentation techniques for Low Power Wide Area -Networks (LPWAN) technologies. SCHC is a generic mechanism designed for great -flexibility so that it can be adapted for any of the LPWAN technologies. - -This document specifies a profile of RFC8724 to use SCHC in LoRaWAN® networks, -and provides elements such as efficient parameterization and modes of -operation. - ---- middle - -# Introduction {#Introduction} - -SCHC specification [RFC8724] describes -generic header compression and fragmentation techniques that can be used on all -Low Power Wide Area Networks (LPWAN) technologies defined in -{{RFC8376}}. Even though those technologies share a great -number of common features like star-oriented topologies, network architecture, -devices with mostly quite predictable communications, etc; they do have some -slight differences with respect to payload sizes, reactiveness, etc. - -SCHC provides a generic framework that enables those devices to communicate on -IP networks. However, for efficient performance, some parameters -and modes of operation need to be set appropriately for each of the LPWAN -technologies. - -This document describes the parameters and modes of operation when -SCHC is used over LoRaWAN networks. LoRaWAN protocol is specified by the -LoRa® Alliance in {{lora-alliance-spec}} - -# Terminology - -The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", -"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this -document are to be interpreted as described in BCP 14 {{RFC2119}} {{RFC8174}} -when, and only when, they appear in all capitals, as shown here. - -This section defines the terminology and acronyms used in this document. For -all other definitions, please look up the SCHC specification -[RFC8724]. - -- DevEUI: Device Extended Unique Identifier, an IEEE EUI-64 identifier - used to identify the device during the - procedure while joining the network (Join Procedure). It is assigned by the - manufacturer or the device owner and provisioned on the Network Gateway. -- DevAddr: a 32-bit non-unique identifier assigned to a device either: - - - Statically: by the device manufacturer in *Activation by Personalization* - mode. - - Dynamically: after a Join Procedure by the Network Gateway in *Over The - Air Activation* mode. - -- Downlink: LoRaWAN term for a frame transmitted by the network and - received by the device. -- EUI: Extended Unique Identifier -- LoRaWAN: LoRaWAN is a wireless technology based on Industrial, - Scientific, and Medical (ISM) radio bands that is used for long-range, - low-power, low-data-rate applications developed by the LoRa Alliance, a - membership consortium: [https://www.lora-alliance.org](https://www.lora-alliance.org). -- FRMPayload: Application data in a LoRaWAN frame. -- MSB: Most Significant Byte -- OUI: Organisation Unique Identifier. IEEE assigned prefix for EUI. -- RCS: Reassembly Check Sequence. Used to verify the integrity of the - fragmentation-reassembly process. -- RX: Device's reception window. -- RX1/RX2: LoRaWAN class A devices open two RX windows following an - uplink, called RX1 and RX2. -- SCHC gateway: The LoRaWAN Application Server that manages translation - between IPv6 network and the Network Gateway (LoRaWAN Network - Server). -- Tile: Piece of a fragmented packet as described in [RFC8724] section 8.2.2.1 -- Uplink: LoRaWAN term for a frame transmitted by the device and received - by the network. - -# Static Context Header Compression Overview - -This section contains a short overview of SCHC. For a detailed description, -refer to the full specification [RFC8724]. - -It defines: - -1. Compression mechanisms to avoid transporting information known by both - sender and receiver over the air. Known information is part of the - "context". This component is called SCHC Compressor/Decompressor (SCHC C/D). -2. Fragmentation mechanisms to allow SCHC Packet transportation on small, and - potentially variable, MTU. This component is called SCHC Fragmentation/Reassembly - (SCHC F/R). - -Context exchange or pre-provisioning is out of scope of this document. - -~~~~ - Device App -+----------------+ +----+ +----+ +----+ -| App1 App2 App3 | |App1| |App2| |App3| -| | | | | | | | -| UDP | |UDP | |UDP | |UDP | -| IPv6 | |IPv6| |IPv6| |IPv6| -| | | | | | | | -|SCHC C/D and F/R| | | | | | | -+--------+-------+ +----+ +----+ +----+ - | +---+ +----+ +----+ +----+ . . . - +~ |RGW| === |NGW | == |SCHC| == |SCHC|...... Internet .... - +---+ +----+ |F/R | |C/D | - +----+ +----+ -|<- - - - LoRaWAN - - ->| -~~~~ -{: #Fig-archi title='Architecture'} - -{{Fig-archi}} represents the architecture for compression/decompression, it is -based on {{RFC8376}} terminology. The device is sending applications flows -using IPv6 or IPv6/UDP protocols. These flows might be compressed by a Static -Context Header Compression Compressor/Decompressor (SCHC C/D) to reduce headers -size and fragmented by the SCHC Fragmentation/Reassembly (SCHC F/R). -The resulting information is sent on a layer two -(L2) frame to an LPWAN Radio Gateway (RGW) that forwards the frame to a Network -Gateway (NGW). The NGW sends the data to a SCHC F/R for reassembly, if -required, then to SCHC C/D for decompression. The SCHC C/D shares the same rules with the -device. The SCHC C/D and F/R can be located on the Network Gateway (NGW) or in -another place as long as a communication is established between the NGW and the SCHC -F/R, then SCHC F/R and C/D. The SCHC C/D and F/R in the device and the SCHC gateway MUST -share the same set of rules. After decompression, the packet can be sent on the Internet to -one or several LPWAN Application Servers (App). - -The SCHC C/D and F/R process is bidirectional, so the same principles can -be applied to the other direction. - -In a LoRaWAN network, the RGW is called a Gateway, the NGW is Network Server, -and the SCHC C/D and F/R are an Application Server. It can be provided by -the Network Gateway or any third party software. {{Fig-archi}} can be mapped in -LoRaWAN terminology to: - -~~~~ - End Device App -+--------------+ +----+ +----+ +----+ -|App1 App2 App3| |App1| |App2| |App3| -| | | | | | | | -| UDP | |UDP | |UDP | |UDP | -| IPv6 | |IPv6| |IPv6| |IPv6| -| | | | | | | | -|SCHC C/D & F/R| | | | | | | -+-------+------+ +----+ +----+ +----+ - | +-------+ +-------+ +-----------+ . . . - +~ |Gateway| === |Network| == |Application|..... Internet .... - +-------+ |server | |server | - +-------+ | F/R - C/D | - +-----------+ -|<- - - - - LoRaWAN - - - ->| -~~~~ -{: #Fig-archi-lorawan title='SCHC Architecture mapped to LoRaWAN'} - - -#LoRaWAN Architecture - -An overview of LoRaWAN {{lora-alliance-spec}} protocol and architecture is -described in {{RFC8376}}. The mapping between the LPWAN -architecture entities as described in [RFC8724] -and the ones in {{lora-alliance-spec}} is as follows: - - o Devices are LoRaWAN End Devices (e.g. sensors, - actuators, etc.). There can be a very high density of devices per - radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN end-device. - - o The Radio Gateway (RGW), which is the endpoint of the constrained - link. This entity maps to the LoRaWAN Gateway. - - o The Network Gateway (NGW) is the interconnection node between the - Radio Gateway and the SCHC gateway (LoRaWAN Application server). This - entity maps to the LoRaWAN Network Server. - - o SCHC C/D and F/R are handled by LoRaWAN Application Server; ie the LoRaWAN - application server will do the SCHC C/D and F/R. - - o The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and - deliver security keys in a secure way, so that the devices root key is never exposed. - -~~~~ - (LPWAN-AAA Server) - () () () | +------+ - () () () () / \ +---------+ | Join | - () () () () () / \======| ^ |===|Server| +-----------+ - () () () | | <--|--> | +------+ |Application| - () () () () / \==========| v |=============| Server | - () () () / \ +---------+ +-----------+ - End-devices Gateways Network Server (SCHC C/D and F/R) - (devices) (RGW) (NGW) -~~~~ -{: #Fig-LPWANarchi title='LPWAN Architecture'} - -*Note*: {{Fig-LPWANarchi}} terms are from LoRaWAN, with {{RFC8376}} terminology in brackets. - -SCHC Compressor/Decompressor (SCHC C/D) and SCHC Fragmentation/Reassembly (SCHC F/R) -are performed on the LoRaWAN end-device and the Application Server (called -SCHC gateway). While the point-to-point link between the device and the -Application Server constitutes a single IP hop, the ultimate end-point of the -IP communication may be an Internet node beyond the Application Server. -In other words, the LoRaWAN Application Server (SCHC gateway) acts as the -first hop IP router for the device. The Application Server and Network -Server may be co-located, which effectively turns the Network/Application -Server into the first hop IP router. - - -## Device classes (A, B, C) and interactions - -The LoRaWAN MAC layer supports 3 classes of devices named A, B and C. All -devices implement the Class A, some devices may implement Class B or -Class C. Class B and Class C are mutually exclusive. - -* Class A: The Class A is the simplest class of devices. The device is - allowed to transmit at any time, randomly selecting a communication channel. - The Network Gateway may reply with a downlink in one of the 2 receive windows - immediately following the uplinks. Therefore, the Network Gateway cannot initiate a - downlink, it has to wait for the next uplink from the device to get a - downlink opportunity. The Class A is the lowest power consumption class. -* Class B: Class B devices implement all the functionalities of Class A - devices, but also schedule periodic listen windows. Therefore, opposed to the - Class A devices, Class B devices can receive downlinks that are initiated by the - Network Gateway and not following an uplink. There is a trade-off between the - periodicity of those scheduled Class B listen windows and the power - consumption of the device: if the periodicity is high downlinks from the NGW - will be sent faster, but the device wakes up more often: it will have higher - power consumption. -* Class C: Class C devices implement all the functionalities of Class A - devices, but keep their receiver open whenever they are not transmitting. - Class C devices can receive downlinks at any time at the expense of a higher - power consumption. Battery-powered devices can only operate in Class C for a - limited amount of time (for example for a firmware upgrade over-the-air). - Most of the Class C devices are grid powered (for example Smart Plugs). - -## Device addressing - -LoRaWAN end-devices use a 32-bit network address (devAddr) to communicate with -the Network Gateway over-the-air, this address might not be unique in a LoRaWAN -network. Devices using the same devAddr are distinguished by the Network -Gateway based on the cryptographic signature appended to every LoRaWAN frame. - -To communicate with the SCHC gateway, the Network Gateway MUST identify the -devices by a unique 64-bit device identifier called the DevEUI. - -The DevEUI is assigned to the device during the manufacturing process by the -device's manufacturer. It is built like an Ethernet MAC address by -concatenating the manufacturer's IEEE OUI field with a vendor unique number. -e.g.: 24-bit OUI is concatenated with a 40-bit serial number. -The Network Gateway translates the devAddr into a DevEUI in the uplink -direction and reciprocally on the downlink direction. - -~~~~ - -+--------+ +---------+ +---------+ +----------+ -| Device | <=====> | Network | <====> | SCHC | <======> | Internet | -| | devAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | -+--------+ +---------+ +---------+ +----------+ - -~~~~ -{: #Fig-LoRaWANaddresses title='LoRaWAN addresses'} - -## General Frame Types - -LoRaWAN implements the possibility to send confirmed or unconfirmed frames: - -* Confirmed frame: - The sender asks the receiver to acknowledge the frame. -* Unconfirmed frame: - The sender does not ask the receiver to acknowledge the frame. - -As SCHC defines its own acknowledgment mechanisms, SCHC does not require -the use of LoRaWAN Confirmed frames (MType=0b100 as per -{{lora-alliance-spec}}) - -## LoRaWAN MAC Frames - -In addition to regular data frames, LoRaWAN implements JoinRequest and JoinAccept -frame types, which are used by a device to join a network: - -* JoinRequest: - This frame is used by a device to join a network. It contains the device's - unique identifier DevEUI and a random nonce that will be used for session key - derivation. -* JoinAccept: - To on-board a device, the Network Gateway responds to the JoinRequest - issued by a device with a JoinAccept frame. That frame is - encrypted with the device's AppKey and contains (amongst other fields) - the network's major settings and a random nonce used to derive the session - keys. -* Data: - MAC and application data. Application data are protected with AES-128 - encryption. MAC related data are AES-128 encrypted with another key. - -## LoRaWAN FPort - -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 used. It allows -LoRaWAN networks and applications to identify data. - -## LoRaWAN empty frame {#lorawan-empty-frame} - -A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf {{lorawan-schc-payload}}) -and FRMPayload. - -## Unicast and multicast technology - -LoRaWAN technology supports unicast downlinks, but also multicast: a packet -sent over LoRaWAN radio link can be received by several devices. It is -useful to address many devices with same content, either a large binary -file (firmware upgrade), or same command (e.g: lighting control). -As IPv6 is also a multicast technology this feature can be used to address a -group of devices. - -_Note 1_: IPv6 multicast addresses must be defined as per [RFC4291]. LoRaWAN -multicast group definition in a Network Gateway and the relation between those -groups and IPv6 groupID are out of scope of this document. - -_Note 2_: LoRa Alliance defined {{lora-alliance-remote-multicast-set}} as -the RECOMMENDED way to setup multicast groups on devices and create a synchronized -reception window. - -# SCHC-over-LoRaWAN - -## LoRaWAN FPort and RuleID {#lorawan-schc-payload} - -The FPort field is part of the SCHC Message, as shown in -{{Fig-lorawan-schc-payload}}. The SCHC C/D and the SCHC F/R SHALL concatenate -the FPort field with the LoRaWAN payload to recompose the SCHC Message. - -~~~~ - -| FPort | LoRaWAN payload | -+ ------------------------ + -| SCHC Message | - -~~~~ -{: #Fig-lorawan-schc-payload title='SCHC Message in LoRaWAN'} - -Note: SCHC Message is any datagram sent by SCHC C/D or F/R layers. - -A fragmented datagram with application payload transferred from device to -Network Gateway, is called an uplink fragmented datagram. It uses an FPort for data uplink -and its associated SCHC control downlinks, named FPortUp in this document. The -other way, a fragmented datagram with application payload transferred from -Network Gateway to device, is called downlink fragmented datagram. It uses another -FPort for data downlink and its associated SCHC control uplinks, named FPortDown -in this document. - -All RuleID can use arbitrary values inside the FPort range allowed by LoRaWAN -specification and MUST be shared by the device and SCHC gateway prior to -the communication with the selected rule. -The uplink and downlink fragmentation FPorts MUST be different. - -## Rule ID management {#rule-id-management} - -RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in -{{lorawan-schc-payload}}. LoRaWAN supports up to 223 application FPorts in -the 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 can send non SCHC -traffic by using FPort values different from the ones used for SCHC. - -In order to improve interoperability, RECOMMENDED fragmentation RuleID values are: - -* RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp. -* RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown. -* RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching -compression Rule was found), as described in {{RFC8724}} section 6. - -FPortUp value MUST be different from FPortDown. -The remaining RuleIDs are available for compression. RuleIDs are shared between -uplink and downlink sessions. A RuleID not in the set(s) of FPortUp or FPortDown -means that the fragmentation is not used, thus, on reception, the SCHC Message -MUST be sent to the SCHC C/D layer. - -The only uplink frames using the FPortDown port are the fragmentation SCHC -control messages of a downlink fragmented datagram (for example, SCHC ACKs). -Similarly, the only downlink frames using the FPortUp port are the -fragmentation SCHC control messages of an uplink fragmented datagram. - -An application can have multiple fragmented datagrams between a device and one -or several SCHC gateways. A set of FPort values is REQUIRED for each SCHC gateway -instance the device is required to communicate with. The application can use -additional uplinks or downlink fragmented parameters but SHALL implement at -least the parameters defined in this document. - -The mechanism for context distribution across devices and gateways is -outside the scope of this document. - -## Interface IDentifier (IID) computation {#IID} - -In order to mitigate the risks described in [rfc8064] and [rfc8065], -implementation MUST implement the following algorithm and SHOULD use it. - -1. key = LoRaWAN AppSKey -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 protocol. - -As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, -the IID will change over time; this mitigates privacy, location tracking and -correlation over time risks. Join 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 no correlation between the -hardware identifier (IEEE-64 DevEUI) and the IID, so an attacker cannot use -manufacturer OUI to target devices. - -Example with: - -* DevEUI: 0x1122334455667788 -* appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB - -~~~~ -1. key: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB -2. cmac: 0xBA59F4B196C6C3432D9383C145AD412A -3. IID: 0xBA59F4B196C6C343 -~~~~ -{: #Fig-iid-computation-example title='Example of IID computation.'} - -There is a small probability of IID collision in a LoRaWAN network. If this occurs, -the IID can be changed by rekeying the device at L2 level (ie: trigger a LoRaWAN -join). -The way the device is rekeyed is out of scope of this document and left to the -implementation. - -Note: Implementation also using another IID source MUST ensure that the -same IID is shared between the device and the SCHC gateway in the -compression and decompression of the IPv6 address of the device. - -## Padding - -All padding bits MUST be 0. - -## Decompression {#Decomp} - -SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet -as per {{lorawan-schc-payload}}. - -RuleIDs matching FPortUp and FPortDown are reserved for SCHC Fragmentation. - -## Fragmentation {#Frag} - -The L2 Word Size used by LoRaWAN is 1 byte (8 bits). -The SCHC fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink -fragmentation and Ack-Always mode for downlink fragmentation. A LoRaWAN -device cannot support simultaneous interleaved fragmented datagrams in -the same direction (uplink or downlink). - -The fragmentation parameters are different for uplink and downlink -fragmented datagrams and are successively described in the next sections. - -### DTag {#DTag} - -[RFC8724] section 8.2.4 describes the possibility to interleave several -fragmented SCHC datagrams for the same RuleID. This is not used in SCHC over -LoRaWAN profile. A device cannot interleave several fragmented SCHC datagrams -on the same FPort. This field is not used and its size is 0. - -Note: The device can still have several parallel fragmented datagrams with -more than one SCHC gateway thanks to distinct sets of FPorts, cf {{rule-id-management}}. - -### Uplink fragmentation: From device to SCHC gateway - -In this case, the device is the fragment transmitter, and the SCHC gateway -the fragment receiver. A single fragmentation rule is defined. -SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC -Packet, as per {{lorawan-schc-payload}}. - -* SCHC fragmentation reliability mode: `ACK-on-Error`. -* SCHC header size is two bytes (the FPort byte + 1 additional byte). -* RuleID: 8 bits stored in LoRaWAN FPort. cf {{rule-id-management}} -* DTag: Size T=0 bit, not used. cf {{DTag}} -* Window index: 4 windows are used, encoded on M = 2 bits -* FCN: The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 tiles - are allowed in a window. -* Last tile: it can be carried in a Regular SCHC Fragment, alone in an All-1 SCHC - Fragment or with any of these two methods. Implementation must ensure that: - * The sender MUST ascertain that the receiver will not receive - the last tile through both a Regular SCHC Fragment and an All-1 SCHC - Fragment during the same session. - * If the last tile is in All-1 SCHC message: current L2 MTU MUST be big enough to fit - the All-1 header and the last tile. -* Penultimate tile MUST be equal to the regular size. -* RCS: Use recommended calculation algorithm in [RFC8724] (§8.2.3. Integrity Checking). -* Tile: size is 10 bytes. -* Retransmission timer: Set by the implementation depending on the application - requirements. 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. -* 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. -* MAX_ACK_REQUESTS: 8. -With this set of parameters, the SCHC fragment header is 16 bits, -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 per tile = 2520 bytes_ - -In addition to the per-rule context parameters specified in [RFC8724], -for uplink rules, an additional context parameter is added: whether or -not to ack after each window. -For battery powered devices, it is RECOMMENDED to use the ACK mechanism at the -end of each window instead of waiting until the end of all windows: - -* The SCHC receiver SHOULD send a SCHC ACK after every window even if there is no - missing tile. -* The SCHC sender SHOULD wait for the SCHC ACK from the SCHC receiver before sending -tiles from the next window. If the SCHC ACK is not received, it SHOULD send a SCHC -ACK REQ up to MAX_ACK_REQUESTS times, as described previously. - -This will avoid useless uplinks if the device has lost network coverage. - -For non-battery powered devices, the SCHC receiver MAY also choose to send a SCHC -ACK only at the end of all windows. This will reduce downlink load on the LoRaWAN -network, by reducing the number of downlinks. - -SCHC implementations MUST be compatible with both behaviors, and this selection is -part of the rule context. - -#### Regular fragments - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ------------------------- + -| RuleID | W | FCN | Payload | -+ ------ + ------ + ------ + ------- + -| 8 bits | 2 bits | 6 bits | | - -~~~~ -{: #Fig-fragmentation-header-long-all0 title='All fragments except the last one. SCHC header size is 16 bits, including LoRaWAN FPort.'} - - -#### Last fragment (All-1) - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ---------------------------- + -| RuleID | W | FCN=All-1 | RCS | -+ ------ + ------ + --------- + ------- + -| 8 bits | 2 bits | 6 bits | 32 bits | - -~~~~ -{: #Fig-fragmentation-header-all1-no-tile title='All-1 SCHC Message: the last fragment without last tile.'} - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ---------------------------------------------------------- + -| RuleID | W | FCN=All-1 | RCS | Last tile | Opt. padding | -+ ------ + ------ + --------- + ------- + ------------ + ------------ + -| 8 bits | 2 bits | 6 bits | 32 bits | 1 to 80 bits | 0 to 7 bits | - -~~~~ -{: #Fig-fragmentation-header-all1-last-tile title='All-1 SCHC Message: the last fragment with last tile.'} - -#### SCHC ACK - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + --------------------------+ -| RuleID | W | C = 1 | padding | -| | | | (b'00000) | -+ ------ + ----- + ----- + --------- + -| 8 bits | 2 bit | 1 bit | 5 bits | - -~~~~ -{: #Fig-frag-header-long-schc-ack-rcs-ok title='SCHC ACK format, correct RCS check.'} - -~~~~ -| FPort | LoRaWAN payload | -+ ------ + --------------------------------- + ---------------- + -| RuleID | W | C = 0 | Compressed bitmap | Optional padding | -| | | | (C = 0) | (b'0...0) | -+ ------ + ----- + ----- + ----------------- + ---------------- + -| 8 bits | 2 bit | 1 bit | 5 to 63 bits | 0, 6 or 7 bits | - -~~~~ -{: #Fig-frag-header-long-schc-ack-rcs-fail title='SCHC ACK format, failed RCS check.'} - - -Note: Because of the bitmap compression mechanism and L2 byte alignment, only -the following discrete values are possible for the compressed bitmap size: 5, 13, 21, 29, 37, 45, 53, 61, 62 and 63. -Bitmaps of 63 bits will require 6 bits of padding. - -#### Receiver-Abort - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + -------------------------------------------- + -| RuleID | W = b'11 | C = 1 | b'11111 | 0xFF (all 1's) | -+ ------ + -------- + ------+-------- + ----------------+ -| 8 bits | 2 bits | 1 bit | 5 bits | 8 bits | - next L2 Word boundary ->| <-- L2 Word --> | - -~~~~ -{: #Fig-fragmentation-receiver-abort title='Receiver-Abort format.'} - - -#### SCHC acknowledge request - -~~~~ - -| FPort | LoRaWAN payload | -+------- +------------------------- + -| RuleID | W | FCN = b'000000 | -+ ------ + ------ + --------------- + -| 8 bits | 2 bits | 6 bits | - - -~~~~ -{: #Fig-fragmentation-schc-ack-req title='SCHC ACK REQ format.'} - - - -### Downlink fragmentation: From SCHC gateway to device - -In this case, the device is the fragmentation receiver, and the SCHC gateway the -fragmentation transmitter. The following fields are common to all devices. -SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC -Packet as described in {{lorawan-schc-payload}}. - -* SCHC fragmentation reliability mode: - * Unicast downlinks: ACK-Always. - * Multicast downlinks: No-ACK, reliability has to be ensured by the upper - layer. This feature is OPTIONAL and may not be implemented by SCHC gateway. -* RuleID: 8 bits stored in LoRaWAN FPort. cf {{rule-id-management}} -* DTag: Size T=0 bit, not used. cf {{DTag}} -* FCN: The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile. -* RCS: Use recommended calculation algorithm in [RFC8724] (§8.2.3. Integrity Checking). -* 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. - -The following parameters apply to ACK-Always (Unicast) only: - -* Retransmission timer: See {{downlink-retransmission-timer}}. -* MAX_ACK_REQUESTS: 8. -* Window index (unicast only): encoded on M=1 bit, as per [RFC8724]. - -As only 1 tile is used, its size can change for each downlink, and will be -the currently available MTU. - -Class A devices can only receive during an RX slot, following the transmission of an -uplink. Therefore the SCHC gateway cannot initiate communication (e.g., start a new SCHC -session). In order to create a downlink opportunity it is RECOMMENDED for -Class A devices to send an uplink every 24 hours when no SCHC session is -started, this is application specific and can be disabled. The RECOMMENDED uplink -is a LoRaWAN empty frame as defined {{lorawan-empty-frame}}. -As this uplink is to open an RX window, any LoRaWAN uplink frame from the device -MAY reset this counter. - -_Note_: The Fpending bit included in LoRaWAN protocol SHOULD NOT be used for -SCHC-over-LoRaWAN protocol. It might be set by the Network Gateway for other -purposes but not SCHC needs. - -#### Regular fragments - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ------------------------------------ + -| RuleID | W | FCN = b'0 | Payload | -+ ------ + ----- + --------- + ---------------- + -| 8 bits | 1 bit | 1 bit | X bytes + 6 bits | - -~~~~ -{: #Fig-fragmentation-downlink-header-all0 title='All fragments but the last one. Header size 10 bits, including LoRaWAN FPort.'} - - -#### Last fragment (All-1) - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + --------------------------- + ------------------------- + -| RuleID | W | FCN = b'1 | RCS | Payload | Opt padding | -+ ------ + ----- + --------- + ------- + ----------- + ----------- + -| 8 bits | 1 bit | 1 bit | 32 bits | 6 to X bits | 0 to 7 bits | - -~~~~ -{: #Fig-fragmentation-downlink-header-all1 title='All-1 SCHC Message: the last fragment.'} - -#### SCHC ACK - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ---------------------------------- + -| RuleID | W | C = b'1 | Padding b'000000 | -+ ------ + ----- + ------- + ---------------- + -| 8 bits | 1 bit | 1 bit | 6 bits | - -~~~~ -{: #Fig-frag-downlink-header-schc-ack-rcs-ok title='SCHC ACK format, RCS is correct.'} - - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ------------------------------------------------- + -| RuleID | W | C = b'0 | Bitmap = b'1 | Padding b'000000 | -+ ------ + ----- + ------- + ------------ + ---------------- + -| 8 bits | 1 bit | 1 bit | 1 bit | 5 bits | - -~~~~ -{: #Fig-frag-downlink-header-schc-ack-rcs-fail title='SCHC ACK format, RCS is incorrect.'} - -#### Receiver-Abort - -~~~~ - -| FPort | LoRaWAN payload | -+ ------ + ---------------------------------------------- + -| RuleID | W = b'1 | C = b'1 | b'111111 | 0xFF (all 1's) | -+ ------ + ------- + ------- + -------- + --------------- + -| 8 bits | 1 bit | 1 bits | 6 bits | 8 bits | - next L2 Word boundary ->| <-- L2 Word --> | - - -~~~~ -{: #Fig-fragmentation-downlink-header-abort title='Receiver-Abort packet (following an All-1 SCHC Fragment with incorrect RCS).'} - -#### Downlink retransmission timer {#downlink-retransmission-timer} - -Class A and Class B or Class C devices do not manage retransmissions and timers -the same way. - -##### Class A devices - -Class A devices can only receive in an RX slot following the transmission of an -uplink. - -The SCHC gateway implements an inactivity timer with a RECOMMENDED duration -of 36 hours. For devices with very low transmission rates (example 1 packet a -day in normal operation), that duration may be extended: it is application -specific. - -RETRANSMISSION_TIMER is application specific and its RECOMMENDED value is -INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). - -**SCHC All-0 (FCN=0)** - -All fragments but the last have an FCN=0 (because window size is 1). Following -an All-0 SCHC Fragment, the device MUST transmit the SCHC ACK message. It MUST transmit up to -MAX_ACK_REQUESTS SCHC ACK messages before aborting. In order to progress the -fragmented datagram, the SCHC layer should immediately queue for transmission -those SCHC ACK if no SCHC downlink have been received during RX1 and RX2 window. -LoRaWAN layer will respect the applicable local spectrum regulation. - -_Note_: The ACK bitmap is 1 bit long and is always 1. - -**SCHC All-1 (FCN=1)** - -SCHC All-1 is the last fragment of a datagram, the corresponding SCHC ACK -message might be lost; therefore the SCHC gateway MUST request a retransmission -of this ACK when the retransmission timer expires. To open a downlink -opportunity the device MUST transmit an uplink every -RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * SCHC_ACK_REQ_DN_OPPORTUNITY). -The format of this uplink is application specific. It is RECOMMENDED for a -device to send an empty frame (see {{lorawan-empty-frame}}) but it is application -specific and will be used by the NGW to transmit a potential SCHC ACK REQ. -SCHC_ACK_REQ_DN_OPPORTUNITY is application specific and its recommended value -is 2. It MUST be greater than 1. This allows to open a downlink opportunity to -any downlink with higher priority than the SCHC ACK REQ message. - -_Note_: The device MUST keep this SCHC ACK message in memory until it receives -a downlink SCHC Fragmentation Message (with FPort == FPortDown) that is not a SCHC ACK REQ: it indicates that -the SCHC gateway has received the SCHC ACK message. - -#### Class B or Class C devices - -Class B devices can receive in scheduled RX slots or in RX slots following the -transmission of an uplink. Class C devices are almost in constant reception. - -RECOMMENDED retransmission timer value: - -* Class B: 3 times the ping slot periodicity. -* Class C: 30 seconds. - -The RECOMMENDED inactivity timer value is 12 hours for both Class B and Class -C devices. - -## SCHC Fragment Format - -### All-0 SCHC fragment - -**Uplink fragmentation (Ack-On-Error)**: - -All-0 is distinguishable from a SCHC ACK REQ as [RFC8724] states *This condition -is also met if the SCHC Fragment Header is a multiple of L2 Words*; this -condition met: SCHC header is 2 bytes. - -**Downlink fragmentation (Ack-always)**: - -As per [RFC8724] the SCHC All-1 MUST contain the last tile, implementation must -ensure that SCHC All-0 message Payload will be at least the size of an L2 Word. - -### All-1 SCHC fragment - -All-1 is distinguishable from a SCHC Sender-Abort as [RFC8724] states *This -condition is met if the RCS is present and is at least the size of an L2 Word*; -this condition met: RCS is 4 bytes. - -### Delay after each LoRaWAN frame to respect local regulation - -This profile does not define a delay to be added after each LoRaWAN frame, local -regulation compliance is expected to be enforced by LoRaWAN stack. - -# Security Considerations - -This document is only providing parameters that are expected to be best -suited for LoRaWAN networks for [RFC8724]. IID -security is discussed in {{IID}}. As such, this document does not contribute to -any new security issues beyond those already identified in -[RFC8724]. -Moreover, SCHC data (LoRaWAN payload) are protected at the LoRaWAN level by an AES-128 -encryption with a session key shared by the device and the SCHC gateway. These session keys are renewed at each -LoRaWAN session (ie: each join or rejoin to the LoRaWAN network) - -# IANA Considerations - -This document has no IANA actions. - -# Acknowledgements -{:numbered="false"} - -Thanks to all those listed in the Contributors section for the excellent text, -insightful discussions, reviews and suggestions, and also to (in -alphabetical order) Dominique Barthel, Arunprabhu Kandasamy, Rodrigo Muñoz, -Alexander Pelov, Pascal Thubert, Laurent Toutain for useful design -considerations, reviews and comments. - -# Contributors -{:numbered="false"} - -Contributors ordered by family name. - -Vincent Audebert -EDF R&D -Email: vincent.audebert@edf.fr - -Julien Catalano -Kerlink -Email: j.catalano@kerlink.fr - -Michael Coracin -Semtech -Email: mcoracin@semtech.com - -Marc Le Gourrierec -Sagemcom -Email: marc.legourrierec@sagemcom.com - -Nicolas Sornin -Semtech -Email: nsornin@semtech.com - -Alper Yegin -Actility -Email: alper.yegin@actility.com - ---- back - -# Examples - -In following examples "applicative data" refers to the IPv6 payload sent by the -application to the SCHC layer. - -## Uplink - Compression example - No fragmentation - -This example represents an applicative data going through SCHC over LoRaWAN, -no fragmentation required - -An applicative data of 78 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 40 bytes and 5 bits: 1 byte -RuleID, 21 bits residue + 37 bytes payload. - -~~~~ -| RuleID | Compression residue | Payload | Padding=b'000 | -+ ------ + ------------------- + --------- + ------------- + -| 1 | 21 bits | 37 bytes | 3 bits | -~~~~ -{: #Fig-example-uplink-no-fragmentation-payload-schc-message title='Uplink example: SCHC Message'} - -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) | -+ ------------------------- + --------------------------------------- + -| | FOpts | RuleID=1 | Compression | Payload | Padding=b'000 | -| | | | residue | | | -+ ---- + ------- + -------- + ----------- + --------- + ------------- + -| XXXX | 2 bytes | 1 byte | 21 bits | 37 bytes | 3 bits | -~~~~ -{: #Fig-example-uplink-no-fragmentation-compression title='Uplink example: LoRaWAN packet'} - -## Uplink - Compression and fragmentation example - -This example represents an applicative data going through SCHC, with -fragmentation. - -An applicative data of 300 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 282 bytes and 5 bits: 1 byte -RuleID, 21 bits residue + 279 bytes payload. - -~~~~ -| RuleID | Compression residue | Payload | -+ ------ + ------------------- + --------- + -| 1 | 21 bits | 279 bytes | -~~~~ -{: #Fig-example-uplink-fragmentation-schc-message title='Uplink example: SCHC Message'} - -The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by LoRaWAN -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) | -+ -------------------------- + -------------------------- + -| | RuleID=20 | W | FCN | 1 tile | -+ -------------- + --------- + ----- + ------ + --------- + -| XXXX | 1 byte | 0 0 | 62 | 10 bytes | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-1 title='Uplink example: LoRaWAN packet 1'} - -~~~~ -Content of the tile is: -| RuleID | Compression residue | Payload | -+ ------ + ------------------- + ----------------- + -| 1 | 21 bits | 6 bytes + 3 bits | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content title='Uplink example: LoRaWAN packet 1 - Tile content'} - -Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by -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: - -~~~~ -| LoRaWAN Header | LoRaWAN payload (231 bytes) | -+ --------------------------------------+ --------------------------- + -| | FOpts | RuleID=20 | W | FCN | 23 tiles | -+ -------------- + ------- + ---------- + ----- + ----- + ----------- + -| XXXX | 4 bytes | 1 byte | 0 0 | 61 | 230 bytes | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-2 title='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 | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-3 title='Uplink example: LoRaWAN packet 3'} - -Then All-1 message can be transmitted: - -~~~~ -| LoRaWAN Header | LoRaWAN payload (44 bytes) | -+ ---- + -----------+ -------------------------- + -| | RuleID=20 | W | FCN | RCS | -+ ---- + ---------- + ----- + ----- + ---------- + -| XXXX | 1 byte | 0 0 | 63 | 4 bytes | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-4 title='Uplink example: LoRaWAN packet 4 - All-1 SCHC 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 | -~~~~ -{: #Fig-example-uplink-fragmentation-lorawan-packet-5 title='Uplink example: LoRaWAN packet 5 - SCHC ACK'} - -## Downlink - -An applicative data of 155 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 130 bytes and 5 bits: 1 byte -RuleID, 21 bits residue + 127 bytes payload. - -~~~~ -| RuleID | Compression residue | Payload | -+ ------ + ------------------- + --------- + -| 1 | 21 bits | 127 bytes | -~~~~ -{: #Fig-example-downlink-fragmentation-schc-message title='Downlink example: SCHC Message'} - -The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN -protocol: 51 bytes are available for SCHC payload + FPort field => it -has to be fragmented. - -~~~~ -| LoRaWAN Header | LoRaWAN payload (51 bytes) | -+ ---- + ---------- + -------------------------------------- + -| | RuleID=21 | W = 0 | FCN = 0 | 1 tile | -+ ---- + ---------- + ------ + ------- + ------------------- + -| XXXX | 1 byte | 1 bit | 1 bit | 50 bytes and 6 bits | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-1 title='Downlink example: LoRaWAN packet 1 - SCHC Fragment 1'} - -Content of the tile is: - -~~~~ -| RuleID | Compression residue | Payload | -+ ------ + ------------------- + ------------------ + -| 1 | 21 bits | 48 bytes and 1 bit | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content title='Downlink example: LoRaWAN packet 1: Tile content'} - -The receiver answers with a SCHC ACK: - -~~~~ -| LoRaWAN Header | LoRaWAN payload | -+ ---- + --------- + -------------------------------- + -| | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 | -+ ---- + --------- + ----- + ----- + ---------------- + -| XXXX | 1 byte | 1 bit | 1 bit | 6 bits | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-2 title='Downlink example: LoRaWAN packet 2 - SCHC ACK'} - -The second downlink is sent, two FOpts: - -~~~~ -| LoRaWAN Header | LoRaWAN payload (49 bytes) | -+ --------------------------- + ------------------------------------- + -| | FOpts | RuleID=21 | W = 1 | FCN = 0 | 1 tile | -+ ---- + ------- + ---------- + ----- + ------- + ------------------- + -| XXXX | 2 bytes | 1 byte | 1 bit | 1 bit | 48 bytes and 6 bits | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-3 title='Downlink example: LoRaWAN packet 3 - SCHC Fragment 2'} - -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 | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-4 title='Downlink example: LoRaWAN packet 4 - SCHC ACK'} - -The last downlink is sent, no FOpts: - -~~~~ -| LoRaWAN Header | LoRaWAN payload (37 bytes) | -+ ---- + ------- + --------------------------------------------------- + -| | RuleID | W | FCN | RCS | 1 tile | Padding | -| | 21 | 0 | 1 | | | b'00000 | -+ ---- + ------- + ----- + ----- + ------- + --------------- + ------- + -| XXXX | 1 byte | 1 bit | 1 bit | 4 bytes | 31 bytes+1 bits | 5 bits | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-5 title='Downlink example: LoRaWAN packet 5 - All-1 SCHC 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 | -~~~~ -{: #Fig-example-downlink-fragmentation-lorawan-packet-6 title='Downlink example: LoRaWAN packet 6 - SCHC ACK'} diff --git a/draft-ietf-lpwan-schc-over-lorawan.xml b/rfc9011.xml similarity index 100% rename from draft-ietf-lpwan-schc-over-lorawan.xml rename to rfc9011.xml From 12552ce07e89d5f57858e90e8ceb4c506465f34a Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 11:14:45 +0100 Subject: [PATCH 02/50] Commit rfc9011.form.xml from RFC editors Includes only XMLv2 -> XMLv3 changes --- rfc9011.xml | 2073 +++++++++++++++++++++++++++++---------------------- 1 file changed, 1180 insertions(+), 893 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index d1ce0fa..49cc34b 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1,21 +1,16 @@ - - - + - - - - - + + - + + Static Context Header Compression (SCHC) over LoRaWAN - + Semtech
@@ -32,126 +27,218 @@
1137A Avenue des Champs Blancs - 35510 Cesson-Sevigne Cedex + Cesson-Sevigne Cedex + 35510 France ivaylo@ackl.io
- - - - + lpwan Working Group - - + +example -The Static Context Header Compression (SCHC) specification describes generic + + The Static Context Header Compression (SCHC) specification describes generic header compression and fragmentation techniques for Low Power Wide Area Networks (LPWAN) technologies. SCHC is a generic mechanism designed for great flexibility so that it can be adapted for any of the LPWAN technologies. - -This document specifies a profile of RFC8724 to use SCHC in LoRaWAN® networks, + This document specifies a profile of RFC8724 to use SCHC in LoRaWAN(R) networks, and provides elements such as efficient parameterization and modes of operation. - - - - - - - - -
- -SCHC specification describes +
+ Introduction + SCHC specification describes generic header compression and fragmentation techniques that can be used on all Low Power Wide Area Networks (LPWAN) technologies defined in -. Even though those technologies share a great +. Even though those technologies share a great number of common features like star-oriented topologies, network architecture, devices with mostly quite predictable communications, etc; they do have some slight differences with respect to payload sizes, reactiveness, etc. - -SCHC provides a generic framework that enables those devices to communicate on + SCHC provides a generic framework that enables those devices to communicate on IP networks. However, for efficient performance, some parameters and modes of operation need to be set appropriately for each of the LPWAN technologies. - -This document describes the parameters and modes of operation when + This document describes the parameters and modes of operation when SCHC is used over LoRaWAN networks. LoRaWAN protocol is specified by the -LoRa Alliance® in - -
-
- -The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, -“SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this -document are to be interpreted as described in BCP 14 -when, and only when, they appear in all capitals, as shown here. - -This section defines the terminology and acronyms used in this document. For + LoRa Alliance(R) in +
+
+ Terminology + + The key words "MUST", "MUST NOT", + "REQUIRED", "SHALL", "SHALL + NOT", "SHOULD", "SHOULD NOT", + "RECOMMENDED", "NOT RECOMMENDED", + "MAY", and "OPTIONAL" in this document are + to be interpreted as described in BCP 14 when, and + only when, they appear in all capitals, as shown here. + + This section defines the terminology and acronyms used in this document. For all other definitions, please look up the SCHC specification -. - - - DevEUI: Device Extended Unique Identifier, an IEEE EUI-64 identifier +. + +
+ +
DevEUI: +
+
Device Extended Unique Identifier, an IEEE EUI-64 identifier used to +identify the device during the procedure while joining the network (Join +Procedure). It is assigned by the manufacturer or the device owner and +provisioned on the Network Gateway. +
+ +
DevAddr: +
+
a 32-bit non-unique identifier assigned to a device either: +
+
Statically: +
+
by the device manufacturer in Activation by Personalization + mode. +
+
Dynamically: +
+
after a Join Procedure by the Network Gateway in Over The Air + Activation mode. +
+
+
+ + +
Downlink: +
+
LoRaWAN term for a frame transmitted by the network and received by the device. +
+ +
EUI: +
+
Extended Unique Identifier +
+ +
LoRaWAN: +
+
LoRaWAN is a wireless technology based on Industrial, Scientific, and +Medical (ISM) radio bands that is used for long-range, low-power, +low-data-rate applications developed by the LoRa Alliance, a membership +consortium: https://www.lora-alliance.org +
+ +
FRMPayload: +
+
Application data in a LoRaWAN frame. +
+ +
MSB: +
+
Most Significant Byte +
+ +
OUI: +
+
Organisation Unique Identifier. IEEE assigned prefix for EUI. +
+ +
RCS: +
+
Reassembly Check Sequence. Used to verify the integrity of the fragmentation-reassembly process. +
+ +
RX: +
+
Device's reception window. +
+ +
RX1/RX2: +
+
LoRaWAN class A devices open two RX windows following an uplink, called RX1 and RX2. +
+ +
SCHC gateway: +
+
The LoRaWAN Application Server that manages translation between IPv6 +network and the Network Gateway (LoRaWAN Network Server). +
+ +
Tile: +
+
Piece of a fragmented packet as described in +
+ +
Uplink: +
+
LoRaWAN term for a frame transmitted by the device and received by the network. +
+ + +
+ + + +
+
+ Static Context Header Compression Overview + This section contains a short overview of SCHC. For a detailed description, +refer to the full specification . + It defines: +
  1. Compression mechanisms to avoid + transporting information known by both sender and receiver over the + air. Known information is part of the "context". This component is + called SCHC Compressor/Decompressor (SCHC C/D).
  2. +
  3. Fragmentation mechanisms to allow SCHC Packet transportation on small, and potentially variable, MTU. This component is called SCHC Fragmentation/Reassembly -(SCHC F/R). - - -Context exchange or pre-provisioning is out of scope of this document. - -
    +
+ Context exchange or pre-provisioning is out of scope of this document. +
+ Architecture + | -]]>
- - represents the architecture for compression/decompression, it is -based on terminology. The device is sending applications flows +]]> + + represents the architecture for compression/decompression, it is +based on terminology. The device is sending applications flows using IPv6 or IPv6/UDP protocols. These flows might be compressed by a Static Context Header Compression Compressor/Decompressor (SCHC C/D) to reduce headers size and fragmented by the SCHC Fragmentation/Reassembly (SCHC F/R). @@ -179,19 +266,18 @@ Gateway (NGW). The NGW sends the data to a SCHC F/R for reassembly, if required, then to SCHC C/D for decompression. The SCHC C/D shares the same rules with the device. The SCHC C/D and F/R can be located on the Network Gateway (NGW) or in another place as long as a communication is established between the NGW and the SCHC -F/R, then SCHC F/R and C/D. The SCHC C/D and F/R in the device and the SCHC gateway MUST +F/R, then SCHC F/R and C/D. The SCHC C/D and F/R in the device and the SCHC gateway MUST share the same set of rules. After decompression, the packet can be sent on the Internet to one or several LPWAN Application Servers (App). - -The SCHC C/D and F/R process is bidirectional, so the same principles can + The SCHC C/D and F/R process is bidirectional, so the same principles can be applied to the other direction. - -In a LoRaWAN network, the RGW is called a Gateway, the NGW is Network Server, + In a LoRaWAN network, the RGW is called a Gateway, the NGW is Network Server, and the SCHC C/D and F/R are an Application Server. It can be provided by -the Network Gateway or any third party software. can be mapped in +the Network Gateway or any third party software. can be mapped in LoRaWAN terminology to: - -
+ SCHC Architecture mapped to LoRaWAN + +-------+ | F/R - C/D | +-----------+ |<- - - - - LoRaWAN - - - ->| -]]>
- -
-
- -An overview of LoRaWAN protocol and architecture is -described in . The mapping between the LPWAN -architecture entities as described in -and the ones in is as follows: - -o Devices are LoRaWAN End Devices (e.g. sensors, +]]> + +
+
+ LoRaWAN Architecture + An overview of LoRaWAN protocol and architecture is +described in . The mapping between the LPWAN +architecture entities as described in +and the ones in is as follows: + o Devices are LoRaWAN End Devices (e.g. sensors, actuators, etc.). There can be a very high density of devices per radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN 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. - -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 SCHC gateway (LoRaWAN Application server). This entity maps to the LoRaWAN Network Server. - -o SCHC C/D and F/R are handled by LoRaWAN Application Server; ie the LoRaWAN + o SCHC C/D and F/R are handled by LoRaWAN Application Server; ie the LoRaWAN application server will do the SCHC C/D and F/R. - -o The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and + o The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and deliver security keys in a secure way, so that the devices root key is never exposed. - -
+ LPWAN Architecture + is as follows: () () () / \ +---------+ +-----------+ End-devices Gateways Network Server (SCHC C/D and F/R) (devices) (RGW) (NGW) -]]>
- -Note: terms are from LoRaWAN, with terminology in brackets. - -SCHC Compressor/Decompressor (SCHC C/D) and SCHC Fragmentation/Reassembly (SCHC F/R) +]]> + + Note: terms are from LoRaWAN, with terminology in brackets. + SCHC Compressor/Decompressor (SCHC C/D) and SCHC Fragmentation/Reassembly (SCHC F/R) are performed on the LoRaWAN end-device and the Application Server (called SCHC gateway). While the point-to-point link between the device and the Application Server constitutes a single IP hop, the ultimate end-point of the @@ -257,1062 +338,1268 @@ In other words, the LoRaWAN Application Server (SCHC gateway) acts as the first hop IP router for the device. The Application Server and Network Server may be co-located, which effectively turns the Network/Application Server into the first hop IP router. - -
- -The LoRaWAN MAC layer supports 3 classes of devices named A, B and C. All +
+ Device classes (A, B, C) and interactions + The LoRaWAN MAC layer supports 3 classes of devices named A, B and C. All devices implement the Class A, some devices may implement Class B or Class C. Class B and Class C are mutually exclusive. - - Class A: The Class A is the simplest class of devices. The device is +
+ +
Class A: +
+
The Class A is the simplest class of devices. The device is allowed to +transmit at any time, randomly selecting a communication channel. The Network +Gateway may reply with a downlink in one of the 2 receive windows immediately +following the uplinks. Therefore, the Network Gateway cannot initiate a +downlink, it has to wait for the next uplink from the device to get a downlink +opportunity. The Class A is the lowest power consumption class. +
+ +
Class B: +
+
Class B devices implement all the functionalities of Class A devices, but +also schedule periodic listen windows. Therefore, opposed to the Class A +devices, Class B devices can receive downlinks that are initiated by the +Network Gateway and not following an uplink. There is a trade-off between the +periodicity of those scheduled Class B listen windows and the power +consumption of the device: if the periodicity is high downlinks from the NGW +will be sent faster, but the device wakes up more often: it will have higher +power consumption. +
+ +
Class C: +
+
Class C devices implement all the functionalities of Class A devices, but +keep their receiver open whenever they are not transmitting. Class C devices +can receive downlinks at any time at the expense of a higher power +consumption. Battery-powered devices can only operate in Class C for a limited +amount of time (for example for a firmware upgrade over-the-air). Most of the +Class C devices are grid powered (for example Smart Plugs). +
+ +
+ +
+
+ Device addressing + LoRaWAN end-devices use a 32-bit network address (devAddr) to communicate with the Network Gateway over-the-air, this address might not be unique in a LoRaWAN network. Devices using the same devAddr are distinguished by the Network Gateway based on the cryptographic signature appended to every LoRaWAN frame. - -To communicate with the SCHC gateway, the Network Gateway MUST identify the + To communicate with the SCHC gateway, the Network Gateway MUST identify the devices by a unique 64-bit device identifier called the DevEUI. - -The DevEUI is assigned to the device during the manufacturing process by the -device’s manufacturer. It is built like an Ethernet MAC address by -concatenating the manufacturer’s IEEE OUI field with a vendor unique number. + The DevEUI is assigned to the device during the manufacturing process by the +device's manufacturer. It is built like an Ethernet MAC address by +concatenating the manufacturer's IEEE OUI field with a vendor unique number. e.g.: 24-bit OUI is concatenated with a 40-bit serial number. The Network Gateway translates the devAddr into a DevEUI in the uplink direction and reciprocally on the downlink direction. - -
+ LoRaWAN addresses + | Network | <====> | SCHC | <======> | Internet | | | devAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | +--------+ +---------+ +---------+ +----------+ -]]>
- -
-
- -LoRaWAN implements the possibility to send confirmed or unconfirmed frames: - - - Confirmed frame: -The sender asks the receiver to acknowledge the frame. - Unconfirmed frame: -The sender does not ask the receiver to acknowledge the frame. - - -As SCHC defines its own acknowledgment mechanisms, SCHC does not require +]]> + +
+
+ General Frame Types + LoRaWAN implements the possibility to send confirmed or unconfirmed frames: + +
+ +
Confirmed frame: +
+
The sender asks the receiver to acknowledge the frame. +
+ +
Unconfirmed frame: +
+
The sender does not ask the receiver to acknowledge the frame. +
+ +
+ + + As SCHC defines its own acknowledgment mechanisms, SCHC does not require the use of LoRaWAN Confirmed frames (MType=0b100 as per -) - -
-
- -In addition to regular data frames, LoRaWAN implements JoinRequest and JoinAccept +) +
+
+ LoRaWAN MAC Frames + In addition to regular data frames, LoRaWAN implements JoinRequest and JoinAccept frame types, which are used by a device to join a network: +
- - JoinRequest: -This frame is used by a device to join a network. It contains the device’s +
JoinRequest: +
+
This frame is used by a device to join a network. It contains the device's +unique identifier DevEUI and a random nonce that will be used for session key +derivation. +
+ +
JoinAccept: +
+
To on-board a device, the Network Gateway responds to the JoinRequest +issued by a device with a JoinAccept frame. That frame is encrypted with the +device's AppKey and contains (amongst other fields) the network's major +settings and a random nonce used to derive the session keys. +
+ +
Data: +
+
MAC and application data. Application data are protected with AES-128 +encryption. MAC related data are AES-128 encrypted with another key. +
+ +
+ + + +
+
+ LoRaWAN FPort + 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 used. It allows LoRaWAN networks and applications to identify data. - -
-
- -A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf ) +
+
+ LoRaWAN empty frame + A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf ) and FRMPayload. - -
-
- -LoRaWAN technology supports unicast downlinks, but also multicast: a packet +
+
+ Unicast and multicast technology + LoRaWAN technology supports unicast downlinks, but also multicast: a packet sent over LoRaWAN radio link can be received by several devices. It is useful to address many devices with same content, either a large binary file (firmware upgrade), or same command (e.g: lighting control). As IPv6 is also a multicast technology this feature can be used to address a group of devices. - -Note 1: IPv6 multicast addresses must be defined as per . LoRaWAN + Note 1: IPv6 multicast addresses must be defined as per . LoRaWAN multicast group definition in a Network Gateway and the relation between those groups and IPv6 groupID are out of scope of this document. - -Note 2: LoRa Alliance defined as -the RECOMMENDED way to setup multicast groups on devices and create a synchronized -reception window. - -
-
-
- -
- -The FPort field is part of the SCHC Message, as shown in -. The SCHC C/D and the SCHC F/R SHALL concatenate + Note 2: LoRa Alliance defined as the + RECOMMENDED way to setup multicast groups on devices + and create a synchronized reception window. +
+
+
+ SCHC-over-LoRaWAN +
+ LoRaWAN FPort and RuleID + The FPort field is part of the SCHC Message, as shown in +. The SCHC C/D and the SCHC F/R SHALL concatenate the FPort field with the LoRaWAN payload to recompose the SCHC Message. - -
+ SCHC Message in LoRaWAN +
- -Note: SCHC Message is any datagram sent by SCHC C/D or F/R layers. - -A fragmented datagram with application payload transferred from device to +]]> + + + A fragmented datagram with application payload transferred from device to Network Gateway, is called an uplink fragmented datagram. It uses an FPort for data uplink and its associated SCHC control downlinks, named FPortUp in this document. The other way, a fragmented datagram with application payload transferred from Network Gateway to device, is called downlink fragmented datagram. It uses another FPort for data downlink and its associated SCHC control uplinks, named FPortDown in this document. - -All RuleID can use arbitrary values inside the FPort range allowed by LoRaWAN -specification and MUST be shared by the device and SCHC gateway prior to + All RuleID can use arbitrary values inside the FPort range allowed by LoRaWAN +specification and MUST be shared by the device and SCHC gateway prior to the communication with the selected rule. -The uplink and downlink fragmentation FPorts MUST be different. - -
-
- -RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in -. LoRaWAN supports up to 223 application FPorts in -the range [1;223] as defined in section 4.3.2 of , it implies -that RuleID MSB SHOULD be inside this range. An application can send non SCHC +The uplink and downlink fragmentation FPorts MUST be different. +
+
+ Rule ID management + RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in +. LoRaWAN supports up to 223 application FPorts in +the range [1;223] as defined in section 4.3.2 of , it implies +that RuleID MSB SHOULD be inside this range. An application can send non SCHC traffic by using FPort values different from the ones used for SCHC. - -In order to improve interoperability, RECOMMENDED fragmentation RuleID values are: - - - RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp. - RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown. - RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching -compression Rule was found), as described in section 6. - - -FPortUp value MUST be different from FPortDown. + In order to improve interoperability, RECOMMENDED fragmentation RuleID values are: +
    +
  • RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp.
  • +
  • RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown.
  • +
  • RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching +compression Rule was found), as described in .
  • +
+ FPortUp value MUST be different from FPortDown. The remaining RuleIDs are available for compression. RuleIDs are shared between uplink and downlink sessions. A RuleID not in the set(s) of FPortUp or FPortDown means that the fragmentation is not used, thus, on reception, the SCHC Message -MUST be sent to the SCHC C/D layer. - -The only uplink frames using the FPortDown port are the fragmentation SCHC +MUST be sent to the SCHC C/D layer. + The only uplink frames using the FPortDown port are the fragmentation SCHC control messages of a downlink fragmented datagram (for example, SCHC ACKs). Similarly, the only downlink frames using the FPortUp port are the fragmentation SCHC control messages of an uplink fragmented datagram. - -An application can have multiple fragmented datagrams between a device and one -or several SCHC gateways. A set of FPort values is REQUIRED for each SCHC gateway + An application can have multiple fragmented datagrams between a device and one +or several SCHC gateways. A set of FPort values is REQUIRED for each SCHC gateway instance the device is required to communicate with. The application can use -additional uplinks or downlink fragmented parameters but SHALL implement at +additional uplinks or downlink fragmented parameters but SHALL implement at least the parameters defined in this document. - -The mechanism for context distribution across devices and gateways is + The mechanism for context distribution across devices and gateways is outside the scope of this document. - -
-
- -In order to mitigate the risks described in and , -implementation MUST implement the following algorithm and SHOULD use it. - - - key = LoRaWAN AppSKey - cmac = aes128_cmac(key, DevEUI) - IID = cmac[0..7] - - -aes128_cmac algorithm is described in . It has been chosen as it is +
+
+ Interface IDentifier (IID) computation + In order to mitigate the risks described in and , +implementation MUST implement the following algorithm and SHOULD use it. +
  1. key = LoRaWAN AppSKey
  2. +
  3. cmac = aes128_cmac(key, DevEUI)
  4. +
  5. IID = cmac[0..7]
  6. +
+ aes128_cmac algorithm is described in . It has been chosen as it is already used by devices for LoRaWAN protocol. - -As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this mitigates privacy, location tracking and correlation over time risks. Join periodicity is defined at the application level. - -Address scan risk is mitigated thanks to AES-128, which provides enough entropy + 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 no correlation between the + Using this algorithm will also ensure that there is no correlation between the hardware identifier (IEEE-64 DevEUI) and the IID, so an attacker cannot use manufacturer OUI to target devices. - -Example with: - - - DevEUI: 0x1122334455667788 - appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB - - -
Example with: +
    +
  • DevEUI: 0x1122334455667788
  • +
  • appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
  • +
+
+ Example of IID computation. +
- -There is a small probability of IID collision in a LoRaWAN network. If this occurs, -the IID can be changed by rekeying the device at L2 level (ie: trigger a LoRaWAN -join). -The way the device is rekeyed is out of scope of this document and left to the -implementation. - -Note: Implementation also using another IID source MUST ensure that the -same IID is shared between the device and the SCHC gateway in the -compression and decompression of the IPv6 address of the device. - -
-
- -All padding bits MUST be 0. - -
-
- -SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet -as per . - -RuleIDs matching FPortUp and FPortDown are reserved for SCHC Fragmentation. - -
-
- -The L2 Word Size used by LoRaWAN is 1 byte (8 bits). +]]> + + + There is a small probability of IID collision in a LoRaWAN + network. If this occurs, the IID can be changed by rekeying the device + at L2 level (ie: trigger a LoRaWAN join). The way the device is + rekeyed is out of scope of this document and left to the + implementation. + +
+
+ Padding + All padding bits MUST be 0. +
+
+ Decompression + SCHC C/D MUST concatenate FPort and LoRaWAN payload + to retrieve the SCHC Packet as per . + RuleIDs matching FPortUp and FPortDown are reserved for SCHC Fragmentation. +
+
+ Fragmentation + The L2 Word Size used by LoRaWAN is 1 byte (8 bits). The SCHC fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink fragmentation and Ack-Always mode for downlink fragmentation. A LoRaWAN device cannot support simultaneous interleaved fragmented datagrams in the same direction (uplink or downlink). - -The fragmentation parameters are different for uplink and downlink + The fragmentation parameters are different for uplink and downlink fragmented datagrams and are successively described in the next sections. - -
- - section 8.2.4 describes the possibility to interleave several +
+ DTag + section 8.2.4 describes the possibility to interleave several fragmented SCHC datagrams for the same RuleID. This is not used in SCHC over LoRaWAN profile. A device cannot interleave several fragmented SCHC datagrams on the same FPort. This field is not used and its size is 0. - -Note: The device can still have several parallel fragmented datagrams with -more than one SCHC gateway thanks to distinct sets of FPorts, cf . - -
-
- -In this case, the device is the fragment transmitter, and the SCHC gateway + Note: The device can still have several parallel fragmented datagrams with +more than one SCHC gateway thanks to distinct sets of FPorts, cf . +
+
+ Uplink fragmentation: From device to SCHC gateway + In this case, the device is the fragment transmitter, and the SCHC gateway the fragment receiver. A single fragmentation rule is defined. -SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC -Packet, as per . - - - SCHC fragmentation reliability mode: ACK-on-Error. - SCHC header size is two bytes (the FPort byte + 1 additional byte). - RuleID: 8 bits stored in LoRaWAN FPort. cf - DTag: Size T=0 bit, not used. cf - Window index: 4 windows are used, encoded on M = 2 bits - FCN: The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 tiles -are allowed in a window. - Last tile: it can be carried in a Regular SCHC Fragment, alone in an All-1 SCHC +SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC +Packet, as per . + +
+ +
SCHC fragmentation reliability mode: +
+
ACK-on-Error. +
+ +
SCHC header size: +
+
two bytes (the FPort byte + 1 additional byte). +
+ +
RuleID: +
+
8 bits stored in LoRaWAN FPort. cf +
+ +
DTag: +
+
Size T=0 bit, not used. cf +
+ +
Window index: +
+
4 windows are used, encoded on M = 2 bits +
+ +
FCN: +
+
The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 tiles +are allowed in a window. +
+ + +
Last tile: +
+
it can be carried in a Regular SCHC Fragment, alone in an All-1 SCHC +Fragment or with any of these two methods. Implementation must ensure that: +
    + +
  • The sender MUST ascertain that the receiver will not + receive the last tile through both a Regular SCHC Fragment and an All-1 + SCHC Fragment during the same session. +
  • +
  • If the last tile is in All-1 SCHC message: current L2 MTU + MUST be big enough to fit the All-1 header and the last + tile. +
  • + +
+
+ +
Penultimate tile: +
+
MUST be equal to the regular size. +
+ +
RCS: +
+
Use recommended calculation algorithm in (S.8.2.3. Integrity Checking). +
+ +
Tile: +
+
size is 10 bytes. +
+ +
Retransmission timer: +
+
Set by the implementation depending on the application + requirements. 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. +
+ +
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. +
+ +
MAX_ACK_REQUESTS: +
+
8. With this set of parameters, the SCHC fragment header is 16 bits, + 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 per + tile = 2520 bytes +
+ + +
+ + In addition to the per-rule context parameters specified in , for uplink rules, an additional context parameter is added: whether or -not to ack after each window. -For battery powered devices, it is RECOMMENDED to use the ACK mechanism at the +not to ack after each window. +For battery powered devices, it is RECOMMENDED to use the ACK mechanism at the end of each window instead of waiting until the end of all windows: - - - The SCHC receiver SHOULD send a SCHC ACK after every window even if there is no -missing tile. - The SCHC sender SHOULD wait for the SCHC ACK from the SCHC receiver before sending -tiles from the next window. If the SCHC ACK is not received, it SHOULD send a SCHC -ACK REQ up to MAX_ACK_REQUESTS times, as described previously. - - -This will avoid useless uplinks if the device has lost network coverage. - -For non-battery powered devices, the SCHC receiver MAY also choose to send a SCHC +
    +
  • The SCHC receiver SHOULD send a SCHC ACK after every window even if there is no +missing tile.
  • +
  • The SCHC sender SHOULD wait for the SCHC ACK from the SCHC receiver before sending +tiles from the next window. If the SCHC ACK is not received, it SHOULD send a SCHC +ACK REQ up to MAX_ACK_REQUESTS times, as described previously.
  • +
+ This will avoid useless uplinks if the device has lost network coverage. + For non-battery powered devices, the SCHC receiver MAY also choose to send a SCHC ACK only at the end of all windows. This will reduce downlink load on the LoRaWAN network, by reducing the number of downlinks. - -SCHC implementations MUST be compatible with both behaviors, and this selection is + SCHC implementations MUST be compatible with both behaviors, and this selection is part of the rule context. - -
- -
+ Regular fragments +
+ All fragments except the last one. SCHC header size is 16 bits, including LoRaWAN FPort. +
- -
-
- -
+
+
+
+ Last fragment (All-1) +
+ All-1 SCHC Message: the last fragment without last tile. +
- -
+
+
+ All-1 SCHC Message: the last fragment with last tile. +
- -
-
- -
+
+
+
+ SCHC ACK +
+ SCHC ACK format, correct RCS check. +
- -
+
+
+ SCHC ACK format, failed RCS check. +
- -Note: Because of the bitmap compression mechanism and L2 byte alignment, only +]]> + + Note: Because of the bitmap compression mechanism and L2 byte alignment, only the following discrete values are possible for the compressed bitmap size: 5, 13, 21, 29, 37, 45, 53, 61, 62 and 63. Bitmaps of 63 bits will require 6 bits of padding. - -
-
- -
+
+ Receiver-Abort +
+ Receiver-Abort format. + | <-- L2 Word --> | - -]]>
- -
-
- -
+
+
+
+ SCHC acknowledge request +
+ SCHC ACK REQ format. +
- -
-
-
- -In this case, the device is the fragmentation receiver, and the SCHC gateway the -fragmentation transmitter. The following fields are common to all devices. -SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC -Packet as described in . - - - SCHC fragmentation reliability mode: - - Unicast downlinks: ACK-Always. - Multicast downlinks: No-ACK, reliability has to be ensured by the upper -layer. This feature is OPTIONAL and may not be implemented by SCHC gateway. - - RuleID: 8 bits stored in LoRaWAN FPort. cf - DTag: Size T=0 bit, not used. cf - FCN: The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile. - RCS: Use recommended calculation algorithm in (§8.2.3. Integrity Checking). - 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. - - -The following parameters apply to ACK-Always (Unicast) only: - - - Retransmission timer: See . - MAX_ACK_REQUESTS: 8. - Window index (unicast only): encoded on M=1 bit, as per . - - -As only 1 tile is used, its size can change for each downlink, and will be -the currently available MTU. - -Class A devices can only receive during an RX slot, following the transmission of an +]]> + +
+
+
+ Downlink fragmentation: From SCHC gateway to device + In this case, the device is the fragmentation receiver, and the + SCHC gateway the fragmentation transmitter. The following fields are + common to all devices. SCHC F/R MUST concatenate + FPort and LoRaWAN payload to retrieve the SCHC Packet as described + in . + +
+ +
SCHC fragmentation reliability mode: +
+
+
    +
  • +
    + +
    Unicast downlinks: +
    +
    ACK-Always. +
    +
    Multicast downlinks: +
    +
    No-ACK, reliability has to be ensured by the upper layer. This feature is +OPTIONAL and may not be implemented by SCHC gateway. +
    + +
    +
  • +
+ +
+ +
RuleID: +
+
8 bits stored in LoRaWAN FPort. cf +
+ +
DTag: +
+
Size T=0 bit, not used. cf +
+ +
FCN: +
+
The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile. +
+ +
RCS: +
+
Use recommended calculation algorithm in (S.8.2.3. Integrity Checking). +
+ +
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. +
+ + +
+ + + + + The following parameters apply to ACK-Always (Unicast) only: + + +
+ +
Retransmission timer: +
+
See . +
+ +
MAX_ACK_REQUESTS: +
+
8. +
+ +
Window index (unicast only): +
+
encoded on M=1 bit, as per . +
+ +
+ + + + + As only 1 tile is used, its size can change for each downlink, + and will be the currently available MTU. + Class A devices can only receive during an RX slot, following the transmission of an uplink. Therefore the SCHC gateway cannot initiate communication (e.g., start a new SCHC -session). In order to create a downlink opportunity it is RECOMMENDED for +session). In order to create a downlink opportunity it is RECOMMENDED for Class A devices to send an uplink every 24 hours when no SCHC session is -started, this is application specific and can be disabled. The RECOMMENDED uplink -is a LoRaWAN empty frame as defined . +started, this is application specific and can be disabled. The RECOMMENDED uplink +is a LoRaWAN empty frame as defined . As this uplink is to open an RX window, any LoRaWAN uplink frame from the device -MAY reset this counter. - -Note: The Fpending bit included in LoRaWAN protocol SHOULD NOT be used for +MAY reset this counter. + +
+ Regular fragments +
+ All fragments but the last one. Header size 10 bits, including LoRaWAN FPort. +
- -
-
- -
+
+
+
+ Last fragment (All-1) +
+ All-1 SCHC Message: the last fragment. +
- -
-
- -
+
+
+
+ SCHC ACK +
+ SCHC ACK format, RCS is correct. +
- -
+
+
+ SCHC ACK format, RCS is incorrect. +
- -
-
- -
+
+
+
+ Receiver-Abort +
+ Receiver-Abort packet (following an All-1 SCHC Fragment with incorrect RCS). + | <-- L2 Word --> | - - -]]>
- -
-
- -Class A and Class B or Class C devices do not manage retransmissions and timers +]]> + +
+
+ Downlink retransmission timer + Class A and Class B or Class C devices do not manage retransmissions and timers the same way. - -
- -Class A devices can only receive in an RX slot following the transmission of an +
+ Class A devices + Class A devices can only receive in an RX slot following the transmission of an uplink. - -The SCHC gateway implements an inactivity timer with a RECOMMENDED duration + The SCHC gateway implements an inactivity timer with a RECOMMENDED duration of 36 hours. For devices with very low transmission rates (example 1 packet a day in normal operation), that duration may be extended: it is application specific. - -RETRANSMISSION_TIMER is application specific and its RECOMMENDED value is + RETRANSMISSION_TIMER is application specific and its RECOMMENDED value is INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). - -SCHC All-0 (FCN=0) - -All fragments but the last have an FCN=0 (because window size is 1). Following -an All-0 SCHC Fragment, the device MUST transmit the SCHC ACK message. It MUST transmit up to + SCHC All-0 (FCN=0) + All fragments but the last have an FCN=0 (because window size is 1). Following +an All-0 SCHC Fragment, the device MUST transmit the SCHC ACK message. It MUST transmit up to MAX_ACK_REQUESTS SCHC ACK messages before aborting. In order to progress the fragmented datagram, the SCHC layer should immediately queue for transmission those SCHC ACK if no SCHC downlink have been received during RX1 and RX2 window. LoRaWAN layer will respect the applicable local spectrum regulation. - -Note: The ACK bitmap is 1 bit long and is always 1. - -SCHC All-1 (FCN=1) - -SCHC All-1 is the last fragment of a datagram, the corresponding SCHC ACK -message might be lost; therefore the SCHC gateway MUST request a retransmission + Note: The ACK bitmap is 1 bit long and is always 1. + SCHC All-1 (FCN=1) + SCHC All-1 is the last fragment of a datagram, the corresponding SCHC ACK +message might be lost; therefore the SCHC gateway MUST request a retransmission of this ACK when the retransmission timer expires. To open a downlink -opportunity the device MUST transmit an uplink every +opportunity the device MUST transmit an uplink every RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * SCHC_ACK_REQ_DN_OPPORTUNITY). -The format of this uplink is application specific. It is RECOMMENDED for a -device to send an empty frame (see ) but it is application -specific and will be used by the NGW to transmit a potential SCHC ACK REQ. +The format of this uplink is application specific. It is RECOMMENDED for a +device to send an empty frame (see ) but it is application +specific and will be used by the NGW to transmit a potential SCHC ACK REQ. SCHC_ACK_REQ_DN_OPPORTUNITY is application specific and its recommended value -is 2. It MUST be greater than 1. This allows to open a downlink opportunity to +is 2. It MUST be greater than 1. This allows to open a downlink opportunity to any downlink with higher priority than the SCHC ACK REQ message. - -Note: The device MUST keep this SCHC ACK message in memory until it receives + Note: The device MUST keep this SCHC ACK message in memory until it receives a downlink SCHC Fragmentation Message (with FPort == FPortDown) that is not a SCHC ACK REQ: it indicates that the SCHC gateway has received the SCHC ACK message. - -
-
-
- -Class B devices can receive in scheduled RX slots or in RX slots following the +
+
+
+ Class B or Class C devices + Class B devices can receive in scheduled RX slots or in RX slots following the transmission of an uplink. Class C devices are almost in constant reception. + RECOMMENDED retransmission timer value: -RECOMMENDED retransmission timer value: +
- - Class B: 3 times the ping slot periodicity. - Class C: 30 seconds. - +
Class B: +
+
3 times the ping slot periodicity. +
-The RECOMMENDED inactivity timer value is 12 hours for both Class B and Class -C devices. +
Class C: +
+
30 seconds. +
-
-
-
-
+ + -
-Uplink fragmentation (Ack-On-Error): - -All-0 is distinguishable from a SCHC ACK REQ as states This condition -is also met if the SCHC Fragment Header is a multiple of L2 Words; this + The RECOMMENDED inactivity timer value is 12 hours for both Class B and Class +C devices. +
+
+
+
+ SCHC Fragment Format +
+ All-0 SCHC fragment + Uplink fragmentation (Ack-On-Error): + All-0 is distinguishable from a SCHC ACK REQ as states "This condition +is also met if the SCHC Fragment Header is a multiple of L2 Words"; this condition met: SCHC header is 2 bytes. - -Downlink fragmentation (Ack-always): - -As per the SCHC All-1 MUST contain the last tile, implementation must + Downlink fragmentation (Ack-always): + As per the SCHC All-1 MUST contain the last tile, implementation must ensure that SCHC All-0 message Payload will be at least the size of an L2 Word. - -
-
- -All-1 is distinguishable from a SCHC Sender-Abort as states This -condition is met if the RCS is present and is at least the size of an L2 Word; +
+
+ All-1 SCHC fragment + All-1 is distinguishable from a SCHC Sender-Abort as states This +condition is met if the RCS is present and is at least the size of an L2 Word; this condition met: RCS is 4 bytes. - -
-
- -This profile does not define a delay to be added after each LoRaWAN frame, local +
+
+ Delay after each LoRaWAN frame to respect local regulation + This profile does not define a delay to be added after each LoRaWAN frame, local regulation compliance is expected to be enforced by LoRaWAN stack. - -
-
-
-
- -This document is only providing parameters that are expected to be best -suited for LoRaWAN networks for . IID -security is discussed in . As such, this document does not contribute to +
+
+
+
+ Security Considerations + This document is only providing parameters that are expected to be best +suited for LoRaWAN networks for . IID +security is discussed in . As such, this document does not contribute to any new security issues beyond those already identified in -. +. Moreover, SCHC data (LoRaWAN payload) are protected at the LoRaWAN level by an AES-128 encryption with a session key shared by the device and the SCHC gateway. These session keys are renewed at each LoRaWAN session (ie: each join or rejoin to the LoRaWAN network) - -
-
- -This document has no IANA actions. - -
-
- -Thanks to all those listed in the Contributors section for the excellent text, -insightful discussions, reviews and suggestions, and also to (in -alphabetical order) Dominique Barthel, Arunprabhu Kandasamy, Rodrigo Muñoz, -Alexander Pelov, Pascal Thubert, Laurent Toutain for useful design -considerations, reviews and comments. - -
-
- -Contributors ordered by family name. - -Vincent Audebert -EDF R&D -Email: vincent.audebert@edf.fr - -Julien Catalano -Kerlink -Email: j.catalano@kerlink.fr - -Michael Coracin -Semtech -Email: mcoracin@semtech.com - -Marc Le Gourrierec -Sagemcom -Email: marc.legourrierec@sagemcom.com - -Nicolas Sornin -Semtech -Email: nsornin@semtech.com - -Alper Yegin -Actility -Email: alper.yegin@actility.com - -
- - + +
+ IANA Considerations + This document has no IANA actions. +
+
+ Acknowledgements + Thanks to all those listed in the Contributors section for the + excellent text, insightful discussions, reviews and suggestions, and + also to (in alphabetical order) , + , , , , for + useful design considerations, reviews and comments. +
+
+ Contributors + Contributors ordered by family name. + + + + + EDF R&D +
+ + + + + Email: vincent.audebert@edf.fr +
+
+ + + + + + + + Kerlink +
+ + + + + Email: j.catalano@kerlink.fr +
+
+ + + + + + Semtech +
+ + + + + Email: mcoracin@semtech.com +
+
+ + + + + + + Sagemcom +
+ + + + + Email: marc.legourrierec@sagemcom.com +
+
+ + + + Semtech +
+ + + + + Email: nsornin@semtech.com +
+
+ + + + Actility +
+ + + + + Email: alper.yegin@actility.com +
+
+ + + + +
- - - - - - - - - - -Key words for use in RFCs to Indicate Requirement Levels - - -In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements. - - - - - - - - - - -Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words - - -RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings. - - - - - - - - - - -IP Version 6 Addressing Architecture - - - -This specification defines the addressing architecture of the IP Version 6 (IPv6) protocol. The document includes the IPv6 addressing model, text representations of IPv6 addresses, definition of IPv6 unicast addresses, anycast addresses, and multicast addresses, and an IPv6 node's required addresses.This document obsoletes RFC 3513, "IP Version 6 Addressing Architecture". [STANDARDS-TRACK] - - - - - - - - - -The AES-CMAC Algorithm - - - - - -The National Institute of Standards and Technology (NIST) has recently specified the Cipher-based Message Authentication Code (CMAC), which is equivalent to the One-Key CBC MAC1 (OMAC1) submitted by Iwata and Kurosawa. This memo specifies an authentication algorithm based on CMAC with the 128-bit Advanced Encryption Standard (AES). This new authentication algorithm is named AES-CMAC. The purpose of this document is to make the AES-CMAC algorithm conveniently available to the Internet Community. This memo provides information for the Internet community. - - - - - - - - - -SCHC: Generic Framework for Static Context Header Compression and Fragmentation - - - - - - -This document defines the Static Context Header Compression and fragmentation (SCHC) framework, which provides both a header compression mechanism and an optional fragmentation mechanism. SCHC has been designed with Low-Power Wide Area Networks (LPWANs) in mind.SCHC compression is based on a common static context stored both in the LPWAN device and in the network infrastructure side. This document defines a generic header compression mechanism and its application to compress IPv6/UDP headers.This document also specifies an optional fragmentation and reassembly mechanism. It can be used to support the IPv6 MTU requirement over the LPWAN technologies. Fragmentation is needed for IPv6 datagrams that, after SCHC compression or when such compression was not possible, still exceed the Layer 2 maximum payload size.The SCHC header compression and fragmentation mechanisms are independent of the specific LPWAN technology over which they are used. This document defines generic functionalities and offers flexibility with regard to parameter settings and mechanism choices. This document standardizes the exchange over the LPWAN between two 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. - - - - - - - - - LoRaWAN Specification Version V1.0.4 - - - - - - - + + References + + Normative References + + + + + + + + + + + LoRaWAN 1.0.4 Specification Package + + + + + + + + + Informative References + + + + + + + + + LoRaWAN Remote Multicast Setup Specification v1.0.0 + + + + + + + + - - - - - - - - - -Recommendation on Stable IPv6 Interface Identifiers - - - - - -This document changes the recommended default Interface Identifier (IID) generation scheme for cases where Stateless Address Autoconfiguration (SLAAC) is used to generate a stable IPv6 address. It recommends using the mechanism specified in RFC 7217 in such cases, and recommends against embedding stable link-layer addresses in IPv6 IIDs. It formally updates RFC 2464, RFC 2467, RFC 2470, RFC 2491, RFC 2492, RFC 2497, RFC 2590, RFC 3146, RFC 3572, RFC 4291, RFC 4338, RFC 4391, RFC 5072, and RFC 5121. This document does not change any existing recommendations concerning the use of temporary addresses as specified in RFC 4941. - - - - - - - - - -Privacy Considerations for IPv6 Adaptation-Layer Mechanisms - - -This document discusses how a number of privacy threats apply to technologies designed for IPv6 over various link-layer protocols, and it provides advice to protocol designers on how to address such threats in adaptation-layer specifications for IPv6 over such links. - - - - - - - - - -Low-Power Wide Area Network (LPWAN) Overview - - -Low-Power Wide Area Networks (LPWANs) are wireless technologies with characteristics such as large coverage areas, low bandwidth, possibly very small packet and application-layer data sizes, and long battery life operation. This memo is an informational overview of the set of LPWAN technologies being considered in the IETF and of the gaps that exist between the needs of those technologies and the goal of running IP in LPWANs. - - - - - - - - - LoRaWAN Remote Multicast Setup Specification Version 1.0.0 - - - - - - - - - - - -
- -In following examples “applicative data” refers to the IPv6 payload sent by the +
+ Examples + In following examples "applicative data" refers to the IPv6 payload sent by the application to the SCHC layer. - -
- -This example represents an applicative data going through SCHC over LoRaWAN, +
+ Uplink - Compression example - No fragmentation + This example represents an applicative data going through SCHC over LoRaWAN, no fragmentation required - -An applicative data of 78 bytes is passed to SCHC compression layer. Rule 1 + An applicative data of 78 bytes is passed to SCHC compression layer. Rule 1 is used by SCHC C/D layer, allowing to compress it to 40 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 37 bytes payload. - -
+ Uplink example: SCHC Message +
- -The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are used by +]]> + + 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. - -
+ Uplink example: LoRaWAN packet +
- -
-
- -This example represents an applicative data going through SCHC, with +]]> + +
+
+ Uplink - Compression and fragmentation example + This example represents an applicative data going through SCHC, with fragmentation. - -An applicative data of 300 bytes is passed to SCHC compression layer. Rule 1 + An applicative data of 300 bytes is passed to SCHC compression layer. Rule 1 is used by SCHC C/D layer, allowing to compress it to 282 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 279 bytes payload. - -
+ Uplink example: SCHC Message +
- -The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by LoRaWAN +]]> + + The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by LoRaWAN 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. - -
+ Uplink example: LoRaWAN packet 1 +
- -
+
+
+ Uplink example: LoRaWAN packet 1 - Tile content +
- -Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by +]]> + + Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by 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: - -
Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are transmitted: +
+ Uplink example: LoRaWAN packet 2 +
- -Next transmission MTU is 242 bytes, no FOpts. All 5 remaining tiles are +]]>
+
+ 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. - -
+ Uplink example: LoRaWAN packet 3 +
- -Then All-1 message can be transmitted: - -
+
+ Then All-1 message can be transmitted: +
+ Uplink example: LoRaWAN packet 4 - All-1 SCHC message +
- -All packets have been received by the SCHC gateway, computed RCS is +]]> + + 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: - -
+ Uplink example: LoRaWAN packet 5 - SCHC ACK +
- -
-
- -An applicative data of 155 bytes is passed to SCHC compression layer. Rule 1 +]]> + +
+
+ Downlink + An applicative data of 155 bytes is passed to SCHC compression layer. Rule 1 is used by SCHC C/D layer, allowing to compress it to 130 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 127 bytes payload. - -
+ Downlink example: SCHC Message +
- -The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN +]]> + + The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN protocol: 51 bytes are available for SCHC payload + FPort field => it has to be fragmented. - -
+ Downlink example: LoRaWAN packet 1 - SCHC Fragment 1 +
- -Content of the tile is: - -
+
+ Content of the tile is: +
+ Downlink example: LoRaWAN packet 1: Tile content +
- -The receiver answers with a SCHC ACK: - -
+
+ The receiver answers with a SCHC ACK: +
+ Downlink example: LoRaWAN packet 2 - SCHC ACK +
- -The second downlink is sent, two FOpts: - -
+
+ The second downlink is sent, two FOpts: +
+ Downlink example: LoRaWAN packet 3 - SCHC Fragment 2 +
- -The receiver answers with an SCHC ACK: - -
+
+ The receiver answers with an SCHC ACK: +
+ Downlink example: LoRaWAN packet 4 - SCHC ACK +
- -The last downlink is sent, no FOpts: - -
+
+ The last downlink is sent, no FOpts: +
+ Downlink example: LoRaWAN packet 5 - All-1 SCHC message +
- -The receiver answers to the sender with an SCHC ACK: - -
+
+ The receiver answers to the sender with an SCHC ACK: +
+ Downlink example: LoRaWAN packet 6 - SCHC ACK +
- -
-
- - +]]> + +
+
- - - From 89ec15b42422484efb5a4d6eada53a53e6699831 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:28:59 +0100 Subject: [PATCH 03/50] Commit RFC editorial changes --- rfc9011.xml | 1172 ++++++++++++++++++++++++--------------------------- 1 file changed, 542 insertions(+), 630 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 49cc34b..2b38a52 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1,16 +1,16 @@ - + + - - + - Static Context Header Compression (SCHC) over LoRaWAN - + Static Context Header Compression (SCHC) over LoRaWAN + Semtech
@@ -34,7 +34,7 @@ ivaylo@ackl.io
- + lpwan Working Group example - The Static Context Header Compression (SCHC) specification describes generic -header compression and fragmentation techniques for Low Power Wide Area -Networks (LPWAN) technologies. SCHC is a generic mechanism designed for great -flexibility so that it can be adapted for any of the LPWAN technologies. - This document specifies a profile of RFC8724 to use SCHC in LoRaWAN(R) networks, -and provides elements such as efficient parameterization and modes of -operation. + The Static Context Header Compression (SCHC) specification (RFC 8724) describes + generic header compression and fragmentation techniques for Low-Power + Wide Area Network (LPWAN) technologies. SCHC is a generic mechanism + designed for great flexibility so that it can be adapted for any of the + LPWAN technologies. + + This document specifies a profile of RFC 8724 to use SCHC in + LoRaWAN(R) networks and provides elements such as efficient + parameterization and modes of operation.
Introduction - SCHC specification describes + The SCHC specification describes generic header compression and fragmentation techniques that can be used on all -Low Power Wide Area Networks (LPWAN) technologies defined in +Low-Power Wide Area Network (LPWAN) technologies defined in . Even though those technologies share a great number of common features like star-oriented topologies, network architecture, -devices with mostly quite predictable communications, etc; they do have some +devices with communications that are mostly quite predictable, etc., they do have some slight differences with respect to payload sizes, reactiveness, etc. SCHC provides a generic framework that enables those devices to communicate on IP networks. However, for efficient performance, some parameters and modes of operation need to be set appropriately for each of the LPWAN technologies. This document describes the parameters and modes of operation when -SCHC is used over LoRaWAN networks. LoRaWAN protocol is specified by the - LoRa Alliance(R) in + SCHC is used over LoRaWAN networks. The LoRaWAN protocol is specified by + the LoRa Alliance in .
Terminology @@ -82,7 +84,7 @@ SCHC is used over LoRaWAN networks. LoRaWAN protocol is specified by the format="default"/> when, and only when, they appear in all capitals, as shown here. - This section defines the terminology and acronyms used in this document. For + This section defines the terminology and abbreviations used in this document. For all other definitions, please look up the SCHC specification . @@ -96,19 +98,19 @@ Procedure). It is assigned by the manufacturer or the device owner and provisioned on the Network Gateway. +
DevAddr:
-
a 32-bit non-unique identifier assigned to a device either: +
A 32-bit non-unique identifier assigned to a device either:
Statically:
-
by the device manufacturer in Activation by Personalization - mode. +
by the device manufacturer in Activation-by-Personalization + mode, or
Dynamically:
-
after a Join Procedure by the Network Gateway in Over The Air - Activation mode. +
after a Join Procedure by the Network Gateway in Over-the-Air-Activation mode.
@@ -116,7 +118,7 @@ provisioned on the Network Gateway.
Downlink:
-
LoRaWAN term for a frame transmitted by the network and received by the device. +
A LoRaWAN term for a frame transmitted by the network and received by the device.
EUI: @@ -130,7 +132,7 @@ provisioned on the Network Gateway. Medical (ISM) radio bands that is used for long-range, low-power, low-data-rate applications developed by the LoRa Alliance, a membership consortium: https://www.lora-alliance.org +brackets="angle" target="https://www.lora-alliance.org"/>.
FRMPayload: @@ -145,7 +147,7 @@ target="https://www.lora-alliance.org">https://www.lora-alliance.org
OUI:
-
Organisation Unique Identifier. IEEE assigned prefix for EUI. +
Organizationally Unique Identifier. IEEE-assigned prefix for EUI.
RCS: @@ -155,24 +157,24 @@ target="https://www.lora-alliance.org">https://www.lora-alliance.org
RX:
-
Device's reception window. +
A device's reception window.
RX1/RX2:
-
LoRaWAN class A devices open two RX windows following an uplink, called RX1 and RX2. +
LoRaWAN class A devices open two RX windows following an uplink, called "RX1" and "RX2".
SCHC gateway:
-
The LoRaWAN Application Server that manages translation between IPv6 +
The LoRaWAN Application Server that manages translation between an IPv6 network and the Network Gateway (LoRaWAN Network Server).
Tile:
-
Piece of a fragmented packet as described in +
A piece of a fragmented packet as described in .
Uplink: @@ -184,56 +186,20 @@ sectionFormat="of" section="8.2.2.1" format="default"/> -
- Static Context Header Compression Overview - This section contains a short overview of SCHC. For a detailed description, -refer to the full specification . + SCHC Overview + This section contains a short overview of SCHC. For a detailed + description, refer to the full specification . It defines:
  1. Compression mechanisms to avoid transporting information known by both sender and receiver over the air. Known information is part of the "context". This component is - called SCHC Compressor/Decompressor (SCHC C/D).
  2. -
  3. Fragmentation mechanisms to allow SCHC Packet transportation on small, and -potentially variable, MTU. This component is called SCHC Fragmentation/Reassembly -(SCHC F/R).
  4. + called the "SCHC Compressor/Decompressor" (SCHC C/D). +
  5. Fragmentation mechanisms to allow SCHC Packet transportation on a + small, and potentially variable, MTU. This component is called the "SCHC + Fragmentation/Reassembly" (SCHC F/R).
Context exchange or pre-provisioning is out of scope of this document.
@@ -255,28 +221,31 @@ potentially variable, MTU. This component is called SCHC Fragmentation/Reassembl |<- - - - LoRaWAN - - ->| ]]>
- represents the architecture for compression/decompression, it is -based on terminology. The device is sending applications flows -using IPv6 or IPv6/UDP protocols. These flows might be compressed by a Static -Context Header Compression Compressor/Decompressor (SCHC C/D) to reduce headers -size and fragmented by the SCHC Fragmentation/Reassembly (SCHC F/R). -The resulting information is sent on a layer two -(L2) frame to an LPWAN Radio Gateway (RGW) that forwards the frame to a Network -Gateway (NGW). The NGW sends the data to a SCHC F/R for reassembly, if -required, then to SCHC C/D for decompression. The SCHC C/D shares the same rules with the -device. The SCHC C/D and F/R can be located on the Network Gateway (NGW) or in -another place as long as a communication is established between the NGW and the SCHC -F/R, then SCHC F/R and C/D. The SCHC C/D and F/R in the device and the SCHC gateway MUST -share the same set of rules. After decompression, the packet can be sent on the Internet to + represents the + architecture for compression/decompression; it is based on the terminology from . The device is sending + application flows using IPv6 or IPv6/UDP protocols. These flows might + be compressed by an SCHC C/D to reduce header size, and fragmented + by the SCHC F/R. The resulting + information is sent on a Layer 2 (L2) frame to an LPWAN Radio Gateway + (RGW) that forwards the frame to a Network Gateway (NGW). The NGW sends + the data to an SCHC F/R for reassembly, if required, then to an SCHC C/D for + decompression. The SCHC C/D shares the same rules with the device. The + SCHC C/D and SCHC F/R can be located on the NGW or in + another place as long as a communication is established between the NGW + and the SCHC F/R, then SCHC F/R and SCHC C/D. The SCHC C/D and SCHC F/R in the + device and the SCHC gateway MUST share the same set of + rules. After decompression, the packet can be sent on the Internet to one or several LPWAN Application Servers (App). - The SCHC C/D and F/R process is bidirectional, so the same principles can -be applied to the other direction. - In a LoRaWAN network, the RGW is called a Gateway, the NGW is Network Server, -and the SCHC C/D and F/R are an Application Server. It can be provided by -the Network Gateway or any third party software. can be mapped in + The SCHC C/D and SCHC F/R process is bidirectional, so the same principles + can be applied to the other direction. + In a LoRaWAN network, the RGW is called a "Gateway", the NGW is a + "Network Server", and the SCHC C/D and SCHC F/R are an "Application Server". It + can be provided by the NGW or any third-party + software. can be mapped in LoRaWAN terminology to:
- SCHC Architecture mapped to LoRaWAN + SCHC Architecture Mapped to LoRaWAN
LoRaWAN Architecture - An overview of LoRaWAN protocol and architecture is -described in . The mapping between the LPWAN -architecture entities as described in -and the ones in is as follows: - o Devices are LoRaWAN End Devices (e.g. sensors, - actuators, etc.). There can be a very high density of devices per - radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN end-device. - o The Radio Gateway (RGW), which is the endpoint of the constrained - link. This entity maps to the LoRaWAN Gateway. - o The Network Gateway (NGW) is the interconnection node between the - Radio Gateway and the SCHC gateway (LoRaWAN Application server). This - entity maps to the LoRaWAN Network Server. - o SCHC C/D and F/R are handled by LoRaWAN Application Server; ie the LoRaWAN - application server will do the SCHC C/D and F/R. - o The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and - deliver security keys in a secure way, so that the devices root key is never exposed. + An overview of the LoRaWAN protocol and architecture is described in . The mapping between the LPWAN + architecture entities as described in and the ones in is as follows: +
    +
  • Devices are LoRaWAN End Devices (e.g., sensors, actuators, etc.). There +can be a very high density of devices per radio gateway (LoRaWAN +gateway). This entity maps to the LoRaWAN end device. +
  • +
  • The RGW, which is the endpoint of the constrained +link. This entity maps to the LoRaWAN Gateway. +
  • + +
  • The NGW is the interconnection node between the Radio +Gateway and the SCHC gateway (LoRaWAN Application server). This entity maps to +the LoRaWAN Network Server. +
  • + +
  • The SCHC C/D and SCHC F/R are handled by the LoRaWAN Application Server; that is, the LoRaWAN +application server will do the SCHC C/D and SCHC F/R. +
  • + + + + +
  • The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and +deliver security keys in a secure way so that the devices root key is never +exposed. +
  • +
+
LPWAN Architecture is as follows: () () () | | <--|--> | +------+ |Application| () () () () / \==========| v |=============| Server | () () () / \ +---------+ +-----------+ - End-devices Gateways Network Server (SCHC C/D and F/R) + End devices Gateways Network Server (SCHC C/D and F/R) (devices) (RGW) (NGW) ]]>
- Note: terms are from LoRaWAN, with terminology in brackets. - SCHC Compressor/Decompressor (SCHC C/D) and SCHC Fragmentation/Reassembly (SCHC F/R) -are performed on the LoRaWAN end-device and the Application Server (called -SCHC gateway). While the point-to-point link between the device and the -Application Server constitutes a single IP hop, the ultimate end-point of the -IP communication may be an Internet node beyond the Application Server. -In other words, the LoRaWAN Application Server (SCHC gateway) acts as the -first hop IP router for the device. The Application Server and Network -Server may be co-located, which effectively turns the Network/Application -Server into the first hop IP router. + + The SCHC C/D and SCHC F/R are performed on the LoRaWAN end + device and the Application Server (called the SCHC gateway). While the + point-to-point link between the device and the Application Server + constitutes a single IP hop, the ultimate endpoint of the IP + communication may be an Internet node beyond the Application Server. In + other words, the LoRaWAN Application Server (SCHC gateway) acts as the + first-hop IP router for the device. The Application Server and Network + Server may be co-located, which effectively turns the + Network/Application Server into the first-hop IP router.
- Device classes (A, B, C) and interactions - The LoRaWAN MAC layer supports 3 classes of devices named A, B and C. All -devices implement the Class A, some devices may implement Class B or -Class C. Class B and Class C are mutually exclusive. + Device Classes (A, B, C) and Interactions
Class A:
-
The Class A is the simplest class of devices. The device is allowed to +
Class A is the simplest class of devices. The device is allowed to transmit at any time, randomly selecting a communication channel. The Network -Gateway may reply with a downlink in one of the 2 receive windows immediately +Gateway may reply with a downlink in one of the two receive windows immediately following the uplinks. Therefore, the Network Gateway cannot initiate a -downlink, it has to wait for the next uplink from the device to get a downlink -opportunity. The Class A is the lowest power consumption class. +downlink; it has to wait for the next uplink from the device to get a downlink +opportunity. Class A is the lowest power consumption class.
Class B:
-
Class B devices implement all the functionalities of Class A devices, but -also schedule periodic listen windows. Therefore, opposed to the Class A +
Class B devices implement all the functionalities of Class A devices but +also schedule periodic listen windows. Therefore, as opposed to Class A devices, Class B devices can receive downlinks that are initiated by the Network Gateway and not following an uplink. There is a trade-off between the periodicity of those scheduled Class B listen windows and the power -consumption of the device: if the periodicity is high downlinks from the NGW +consumption of the device: if the periodicity is high, downlinks from the NGW will be sent faster, but the device wakes up more often: it will have higher power consumption.
Class C:
-
Class C devices implement all the functionalities of Class A devices, but +
Class C devices implement all the functionalities of Class A devices but keep their receiver open whenever they are not transmitting. Class C devices can receive downlinks at any time at the expense of a higher power consumption. Battery-powered devices can only operate in Class C for a limited -amount of time (for example for a firmware upgrade over-the-air). Most of the -Class C devices are grid powered (for example Smart Plugs). +amount of time (for example, for a firmware upgrade over-the-air). Most of the +Class C devices are grid powered (for example, Smart Plugs).
- +
- Device addressing - LoRaWAN end-devices use a 32-bit network address (devAddr) to communicate with -the Network Gateway over-the-air, this address might not be unique in a LoRaWAN -network. Devices using the same devAddr are distinguished by the Network -Gateway based on the cryptographic signature appended to every LoRaWAN frame. - To communicate with the SCHC gateway, the Network Gateway MUST identify the -devices by a unique 64-bit device identifier called the DevEUI. - The DevEUI is assigned to the device during the manufacturing process by the -device's manufacturer. It is built like an Ethernet MAC address by -concatenating the manufacturer's IEEE OUI field with a vendor unique number. -e.g.: 24-bit OUI is concatenated with a 40-bit serial number. -The Network Gateway translates the devAddr into a DevEUI in the uplink -direction and reciprocally on the downlink direction. + Device Addressing + LoRaWAN end devices use a 32-bit network address (devAddr) to + communicate with the Network Gateway over the air; this address might + not be unique in a LoRaWAN network. Devices using the same devAddr are + distinguished by the Network Gateway based on the cryptographic + signature appended to every LoRaWAN frame. + To communicate with the SCHC gateway, the Network Gateway + MUST identify the devices by a unique 64-bit device + identifier called the "DevEUI". + The DevEUI is assigned to the device during the manufacturing + process by the device's manufacturer. It is built like an Ethernet MAC + address by concatenating the manufacturer's IEEE OUI field with a + vendor unique number. For example, a 24-bit OUI is concatenated with a 40-bit + serial number. The Network Gateway translates the devAddr into a + DevEUI in the uplink direction and reciprocally on the downlink + direction.
- LoRaWAN addresses + LoRaWAN Addresses | Network | <====> | SCHC | <======> | Internet | @@ -454,8 +420,8 @@ The sender asks the receiver to acknowledge the frame. The sender does not ask the receiver to acknowledge the frame. --> As SCHC defines its own acknowledgment mechanisms, SCHC does not require -the use of LoRaWAN Confirmed frames (MType=0b100 as per -) +the use of LoRaWAN Confirmed frames (MType = 0b100 as per +).
LoRaWAN MAC Frames @@ -472,38 +438,20 @@ derivation.
JoinAccept:
-
To on-board a device, the Network Gateway responds to the JoinRequest +
To onboard a device, the Network Gateway responds to the JoinRequest issued by a device with a JoinAccept frame. That frame is encrypted with the -device's AppKey and contains (amongst other fields) the network's major +device's AppKey and contains (among other fields) the network's major settings and a random nonce used to derive the session keys.
Data:
-
MAC and application data. Application data are protected with AES-128 -encryption. MAC related data are AES-128 encrypted with another key. +
This refers to MAC and application data. Application data is protected with AES-128 +encryption. MAC-related data is AES-128 encrypted with another key.
- -
LoRaWAN FPort @@ -512,29 +460,35 @@ encryption. MAC related data are AES-128 encrypted with another key. LoRaWAN networks and applications to identify data.
- LoRaWAN empty frame - A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf ) -and FRMPayload. + LoRaWAN Empty Frame + A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf. ) and FRMPayload.
- Unicast and multicast technology - LoRaWAN technology supports unicast downlinks, but also multicast: a packet -sent over LoRaWAN radio link can be received by several devices. It is -useful to address many devices with same content, either a large binary -file (firmware upgrade), or same command (e.g: lighting control). -As IPv6 is also a multicast technology this feature can be used to address a -group of devices. - Note 1: IPv6 multicast addresses must be defined as per . LoRaWAN -multicast group definition in a Network Gateway and the relation between those -groups and IPv6 groupID are out of scope of this document. - Note 2: LoRa Alliance defined Unicast and Multicast Technology + LoRaWAN technology supports unicast downlinks but also multicast; a + packet sent over LoRaWAN a radio link can be received by several + devices. It is useful to address many devices with the same content, + either a large binary file (firmware upgrade) or same command (e.g., + lighting control). As IPv6 is also a multicast technology, this + feature can be used to address a group of devices. + + + +
- SCHC-over-LoRaWAN + SCHC over LoRaWAN
LoRaWAN FPort and RuleID The FPort field is part of the SCHC Message, as shown in @@ -549,26 +503,33 @@ the FPort field with the LoRaWAN payload to recompose the SCHC Message. ]]> - + A fragmented datagram with application payload transferred from device to -Network Gateway, is called an uplink fragmented datagram. It uses an FPort for data uplink -and its associated SCHC control downlinks, named FPortUp in this document. The +Network Gateway is called an "uplink-fragmented datagram". It uses an FPort for data uplink +and its associated SCHC control downlinks, named "FPortUp" in this document. The other way, a fragmented datagram with application payload transferred from -Network Gateway to device, is called downlink fragmented datagram. It uses another -FPort for data downlink and its associated SCHC control uplinks, named FPortDown +Network Gateway to device is called a "downlink-fragmented datagram". It uses another +FPort for data downlink and its associated SCHC control uplinks, named "FPortDown" in this document. - All RuleID can use arbitrary values inside the FPort range allowed by LoRaWAN -specification and MUST be shared by the device and SCHC gateway prior to -the communication with the selected rule. -The uplink and downlink fragmentation FPorts MUST be different. + All RuleIDs can use arbitrary values inside the FPort range allowed + by the LoRaWAN specification and MUST be shared by the + device and SCHC gateway prior to the communication with the selected + rule. The uplink and downlink fragmentation FPorts + MUST be different.
- Rule ID management - RuleID MUST be 8 bits, encoded in the LoRaWAN FPort as described in -. LoRaWAN supports up to 223 application FPorts in -the range [1;223] as defined in section 4.3.2 of , it implies -that RuleID MSB SHOULD be inside this range. An application can send non SCHC -traffic by using FPort values different from the ones used for SCHC. + Rule ID Management + The RuleID MUST be 8 bits and encoded in the LoRaWAN + FPort as described in . + + + LoRaWAN supports up to 223 application FPorts in + the range [1;223] as defined in Section 4.3.2 of ; it implies that the RuleID MSB + SHOULD be inside this range. An application can send + non-SCHC traffic by using FPort values different from the ones used + for SCHC. In order to improve interoperability, RECOMMENDED fragmentation RuleID values are:
  • RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp.
  • @@ -576,49 +537,58 @@ traffic by using FPort values different from the ones used for SCHC.
  • RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching compression Rule was found), as described in .
- FPortUp value MUST be different from FPortDown. -The remaining RuleIDs are available for compression. RuleIDs are shared between -uplink and downlink sessions. A RuleID not in the set(s) of FPortUp or FPortDown -means that the fragmentation is not used, thus, on reception, the SCHC Message -MUST be sent to the SCHC C/D layer. - The only uplink frames using the FPortDown port are the fragmentation SCHC -control messages of a downlink fragmented datagram (for example, SCHC ACKs). -Similarly, the only downlink frames using the FPortUp port are the -fragmentation SCHC control messages of an uplink fragmented datagram. + + The FPortUp value MUST be different from FPortDown. The + remaining RuleIDs are available for compression. RuleIDs are shared + between uplink and downlink sessions. A RuleID not in the set(s) of + FPortUp or FPortDown means that the fragmentation is not used; thus, + on reception, the SCHC Message MUST be sent to the SCHC + C/D layer. + The only uplink frames using the FPortDown port are the + fragmentation SCHC control messages of a downlink-fragmented datagram + (for example, SCHC ACKs). Similarly, the only downlink frames using + the FPortUp port are the fragmentation SCHC control messages of an + uplink-fragmented datagram. An application can have multiple fragmented datagrams between a device and one or several SCHC gateways. A set of FPort values is REQUIRED for each SCHC gateway instance the device is required to communicate with. The application can use -additional uplinks or downlink fragmented parameters but SHALL implement at +additional uplinks or downlink-fragmented parameters but SHALL implement at least the parameters defined in this document. The mechanism for context distribution across devices and gateways is outside the scope of this document.
+ + +
- Interface IDentifier (IID) computation + Interface IDentifier (IID) Computation In order to mitigate the risks described in and , -implementation MUST implement the following algorithm and SHOULD use it. +implementations MUST implement the following algorithm and SHOULD use it.
  1. key = LoRaWAN AppSKey
  2. cmac = aes128_cmac(key, DevEUI)
  3. IID = cmac[0..7]
- aes128_cmac algorithm is described in . It has been chosen as it is -already used by devices for LoRaWAN protocol. - As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, -the IID will change over time; this mitigates privacy, location tracking and -correlation over time risks. Join 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 no correlation between the -hardware identifier (IEEE-64 DevEUI) and the IID, so an attacker cannot use -manufacturer OUI to target devices. + The aes128_cmac algorithm is described in . It has been chosen as it is already used by + devices for the LoRaWAN protocol. + + + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN + network, the IID will change over time; this + mitigates privacy, location tracking, and correlation over time + risks. Join 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 no correlation + between the hardware identifier (IEEE-64 DevEUI) and the IID, so an + attacker cannot use the manufacturer OUI to target devices. Example with:
  • DevEUI: 0x1122334455667788
  • appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
- Example of IID computation. + Example of IID Computation
There is a small probability of IID collision in a LoRaWAN network. If this occurs, the IID can be changed by rekeying the device - at L2 level (ie: trigger a LoRaWAN join). The way the device is + at the L2 level (i.e., triggering a LoRaWAN join). The way the device is rekeyed is out of scope of this document and left to the implementation. -
Decompression - SCHC C/D MUST concatenate FPort and LoRaWAN payload + The SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet as per . RuleIDs matching FPortUp and FPortDown are reserved for SCHC Fragmentation. @@ -654,23 +624,28 @@ The SCHC fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink fragmentation and Ack-Always mode for downlink fragmentation. A LoRaWAN device cannot support simultaneous interleaved fragmented datagrams in the same direction (uplink or downlink). - The fragmentation parameters are different for uplink and downlink -fragmented datagrams and are successively described in the next sections. + The fragmentation parameters are different for uplink- and downlink-fragmented datagrams and are successively described in the next sections.
DTag - section 8.2.4 describes the possibility to interleave several -fragmented SCHC datagrams for the same RuleID. This is not used in SCHC over -LoRaWAN profile. A device cannot interleave several fragmented SCHC datagrams -on the same FPort. This field is not used and its size is 0. - Note: The device can still have several parallel fragmented datagrams with -more than one SCHC gateway thanks to distinct sets of FPorts, cf . + + describes the possibility to interleave several + fragmented SCHC datagrams for the same RuleID. This is not used in + the SCHC-over-LoRaWAN profile. A device cannot interleave several + fragmented SCHC datagrams on the same FPort. This field is not used, + and its size is 0. +
- Uplink fragmentation: From device to SCHC gateway - In this case, the device is the fragment transmitter, and the SCHC gateway -the fragment receiver. A single fragmentation rule is defined. -SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC -Packet, as per . + + Uplink Fragmentation: From Device to SCHC Gateway + In this case, the device is the fragment transmitter and the SCHC + gateway is the fragment receiver. A single fragmentation rule is + defined. The SCHC F/R MUST concatenate FPort and LoRaWAN + payload to retrieve the SCHC Packet, as per .
@@ -681,23 +656,23 @@ Packet, as per .
SCHC header size:
-
two bytes (the FPort byte + 1 additional byte). +
2 bytes (the FPort byte + 1 additional byte).
RuleID:
-
8 bits stored in LoRaWAN FPort. cf +
8 bits stored in the LoRaWAN FPort (cf. ).
DTag:
-
Size T=0 bit, not used. cf +
Size T = 0 bits, not used (cf. ).
Window index:
-
4 windows are used, encoded on M = 2 bits +
4 windows are used, encoded on M = 2 bits.
FCN: @@ -709,15 +684,15 @@ are allowed in a window.
Last tile:
-
it can be carried in a Regular SCHC Fragment, alone in an All-1 SCHC -Fragment or with any of these two methods. Implementation must ensure that: +
It can be carried in a Regular SCHC Fragment, alone in an All-1 SCHC +Fragment, or with any of these two methods. Implementations must ensure that:
  • The sender MUST ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment during the same session.
  • -
  • If the last tile is in All-1 SCHC message: current L2 MTU +
  • If the last tile is in an All-1 SCHC Message, the current L2 MTU MUST be big enough to fit the All-1 header and the last tile.
  • @@ -732,13 +707,13 @@ Fragment or with any of these two methods. Implementation must ensure that:
    RCS:
    -
    Use recommended calculation algorithm in (S.8.2.3. Integrity Checking). +
    Use the recommended calculation algorithm in , Integrity Checking.
    Tile:
    -
    size is 10 bytes. +
    Size is 10 bytes.
    Retransmission timer: @@ -759,72 +734,42 @@ Fragment or with any of these two methods. Implementation must ensure that:
    MAX_ACK_REQUESTS:
    -
    8. With this set of parameters, the SCHC fragment header is 16 bits, +
    8. With this set of parameters, the SCHC Fragment Header is 16 bits, 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 per - tile = 2520 bytes + part of LoRaWAN payload. MTU is: 4 windows * 63 tiles * 10 bytes per + tile = 2520 bytes.
- + In addition to the per-rule context parameters specified in , for uplink rules, an additional context parameter is added: whether or not to ack after each window. For battery powered devices, it is RECOMMENDED to use the ACK mechanism at the end of each window instead of waiting until the end of all windows:
    -
  • The SCHC receiver SHOULD send a SCHC ACK after every window even if there is no +
  • The SCHC receiver SHOULD send an SCHC ACK after every window even if there is no missing tile.
  • -
  • The SCHC sender SHOULD wait for the SCHC ACK from the SCHC receiver before sending -tiles from the next window. If the SCHC ACK is not received, it SHOULD send a SCHC -ACK REQ up to MAX_ACK_REQUESTS times, as described previously.
  • +
  • The SCHC sender SHOULD wait for the SCHC ACK + from the SCHC receiver before sending tiles from the next + window. If the SCHC ACK is not received, it SHOULD + send an SCHC ACK REQ up to MAX_ACK_REQUESTS times, as described + previously.
This will avoid useless uplinks if the device has lost network coverage. - For non-battery powered devices, the SCHC receiver MAY also choose to send a SCHC -ACK only at the end of all windows. This will reduce downlink load on the LoRaWAN -network, by reducing the number of downlinks. + For non-battery powered devices, the SCHC receiver + MAY also choose to send an SCHC ACK only at the end + of all windows. This will reduce downlink load on the LoRaWAN + network by reducing the number of downlinks. SCHC implementations MUST be compatible with both behaviors, and this selection is part of the rule context.
- Regular fragments + Regular Fragments +
- All fragments except the last one. SCHC header size is 16 bits, including LoRaWAN FPort. + All Fragments Except the Last One.  SCHC Header Size is 16 + Bits, Including the LoRaWAN FPort.
- Last fragment (All-1) + Last Fragment (All-1)
- All-1 SCHC Message: the last fragment without last tile. + All-1 SCHC Message: The Last Fragment without Last Tile ]]>
- All-1 SCHC Message: the last fragment with last tile. + All-1 SCHC Message: The Last Fragment with Last Tile
+ SCHC ACK
- SCHC ACK format, correct RCS check. + SCHC ACK Format, Correct RCS Check ]]>
- SCHC ACK format, failed RCS check. + SCHC ACK Format, Failed RCS Check
- Note: Because of the bitmap compression mechanism and L2 byte alignment, only -the following discrete values are possible for the compressed bitmap size: 5, 13, 21, 29, 37, 45, 53, 61, 62 and 63. -Bitmaps of 63 bits will require 6 bits of padding. +
Receiver-Abort
- Receiver-Abort format. + Receiver-Abort Format
- SCHC acknowledge request + SCHC Acknowledge Request
- SCHC ACK REQ format. + SCHC ACK REQ Format
- Downlink fragmentation: From SCHC gateway to device - In this case, the device is the fragmentation receiver, and the - SCHC gateway the fragmentation transmitter. The following fields are - common to all devices. SCHC F/R MUST concatenate + Downlink Fragmentation: From SCHC Gateway to Device + In this case, the device is the fragmentation receiver and the + SCHC gateway is the fragmentation transmitter. The following fields are + common to all devices. The SCHC F/R MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet as described in . @@ -936,8 +882,8 @@ Bitmaps of 63 bits will require 6 bits of padding.
Multicast downlinks:
-
No-ACK, reliability has to be ensured by the upper layer. This feature is -OPTIONAL and may not be implemented by SCHC gateway. +
No-ACK; reliability has to be ensured by the upper layer. This feature is +OPTIONAL and may not be implemented by the SCHC gateway.
@@ -948,24 +894,24 @@ Bitmaps of 63 bits will require 6 bits of padding.
RuleID:
-
8 bits stored in LoRaWAN FPort. cf +
8 bits stored in the LoRaWAN FPort (cf. ).
DTag:
-
Size T=0 bit, not used. cf +
Size T = 0 bit, not used (cf. ).
FCN:
-
The FCN field is encoded on N=1 bit, so WINDOW_SIZE = 1 tile. +
The FCN field is encoded on N = 1 bit, so WINDOW_SIZE = 1 tile.
RCS:
-
Use recommended calculation algorithm in (S.8.2.3. Integrity Checking). +
Use the recommended calculation algorithm in , Integrity Checking.
Inactivity timer: @@ -979,25 +925,6 @@ be changed by the application. - - The following parameters apply to ACK-Always (Unicast) only: @@ -1015,36 +942,33 @@ the application.
Window index (unicast only):
-
encoded on M=1 bit, as per . +
encoded on M = 1 bit, as per .
- - - As only 1 tile is used, its size can change for each downlink, - and will be the currently available MTU. - Class A devices can only receive during an RX slot, following the transmission of an -uplink. Therefore the SCHC gateway cannot initiate communication (e.g., start a new SCHC -session). In order to create a downlink opportunity it is RECOMMENDED for -Class A devices to send an uplink every 24 hours when no SCHC session is -started, this is application specific and can be disabled. The RECOMMENDED uplink -is a LoRaWAN empty frame as defined . -As this uplink is to open an RX window, any LoRaWAN uplink frame from the device -MAY reset this counter. - + As only one tile is used, its size can change for each downlink and + will be the currently available MTU. + Class A devices can only receive during an RX slot, following the + transmission of an uplink. Therefore, the SCHC gateway cannot + initiate communication (e.g., start a new SCHC session). In order to + create a downlink opportunity, it is RECOMMENDED for + Class A devices to send an uplink every 24 hours when no SCHC + session is started; this is application specific and can be + disabled. The RECOMMENDED uplink is a LoRaWAN empty + frame as defined in . As this uplink is to open an RX window, any + LoRaWAN uplink frame from the device MAY reset this + counter. + +
- Regular fragments + Regular Fragments
- All fragments but the last one. Header size 10 bits, including LoRaWAN FPort. + All Fragments but the Last One.  Header Size is 10 Bits, Including the LoRaWAN FPort.
- Last fragment (All-1) + Last Fragment (All-1)
- All-1 SCHC Message: the last fragment. + All-1 SCHC Message: The Last Fragment
SCHC ACK
- SCHC ACK format, RCS is correct. + SCHC ACK Format, RCS is Correct ]]>
- SCHC ACK format, RCS is incorrect. + SCHC ACK Format, RCS is Incorrect
Receiver-Abort
- Receiver-Abort packet (following an All-1 SCHC Fragment with incorrect RCS). + Receiver-Abort Packet (Following an All-1 SCHC Fragment with Incorrect RCS)
- Downlink retransmission timer - Class A and Class B or Class C devices do not manage retransmissions and timers -the same way. + Downlink Retransmission Timer + + + Class A and Class B or Class C devices do not manage + retransmissions and timers the same way. +
- Class A devices - Class A devices can only receive in an RX slot following the transmission of an -uplink. - The SCHC gateway implements an inactivity timer with a RECOMMENDED duration -of 36 hours. For devices with very low transmission rates (example 1 packet a -day in normal operation), that duration may be extended: it is application -specific. - RETRANSMISSION_TIMER is application specific and its RECOMMENDED value is + Class A Devices + Class A devices can only receive in an RX slot following the + transmission of an uplink. + The SCHC gateway implements an inactivity timer with a + RECOMMENDED duration of 36 hours. For devices + with very low transmission rates (for example, 1 packet a day in + normal operation), that duration may be extended; it is + application specific. + RETRANSMISSION_TIMER is application specific and its + RECOMMENDED value is INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). - SCHC All-0 (FCN=0) - All fragments but the last have an FCN=0 (because window size is 1). Following -an All-0 SCHC Fragment, the device MUST transmit the SCHC ACK message. It MUST transmit up to -MAX_ACK_REQUESTS SCHC ACK messages before aborting. In order to progress the -fragmented datagram, the SCHC layer should immediately queue for transmission -those SCHC ACK if no SCHC downlink have been received during RX1 and RX2 window. -LoRaWAN layer will respect the applicable local spectrum regulation. - Note: The ACK bitmap is 1 bit long and is always 1. - SCHC All-1 (FCN=1) - SCHC All-1 is the last fragment of a datagram, the corresponding SCHC ACK -message might be lost; therefore the SCHC gateway MUST request a retransmission -of this ACK when the retransmission timer expires. To open a downlink -opportunity the device MUST transmit an uplink every -RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * SCHC_ACK_REQ_DN_OPPORTUNITY). -The format of this uplink is application specific. It is RECOMMENDED for a -device to send an empty frame (see ) but it is application -specific and will be used by the NGW to transmit a potential SCHC ACK REQ. -SCHC_ACK_REQ_DN_OPPORTUNITY is application specific and its recommended value -is 2. It MUST be greater than 1. This allows to open a downlink opportunity to -any downlink with higher priority than the SCHC ACK REQ message. - Note: The device MUST keep this SCHC ACK message in memory until it receives -a downlink SCHC Fragmentation Message (with FPort == FPortDown) that is not a SCHC ACK REQ: it indicates that -the SCHC gateway has received the SCHC ACK message. + SCHC All-0 (FCN = 0) + All fragments but the last have an FCN = 0 (because the window size + is 1). Following an All-0 SCHC Fragment, the device + MUST transmit the SCHC ACK message. It + MUST transmit up to MAX_ACK_REQUESTS SCHC ACK + messages before aborting. In order to progress the fragmented + datagram, the SCHC layer should immediately queue for + transmission those SCHC ACK messages if no SCHC downlinks have been + received during the RX1 and RX2 window.s The LoRaWAN layer will respect + the applicable local spectrum regulation. + + SCHC All-1 (FCN = 1) + SCHC All-1 is the last fragment of a datagram, and the + corresponding SCHC ACK message might be lost; therefore, the SCHC + gateway MUST request a retransmission of this ACK + when the retransmission timer expires. To open a downlink + opportunity, the device MUST transmit an uplink + every RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * + SCHC_ACK_REQ_DN_OPPORTUNITY). The format of this uplink is + application specific. It is RECOMMENDED for a + device to send an empty frame (see ), but it is + application specific and will be used by the NGW to transmit a + potential SCHC ACK REQ. SCHC_ACK_REQ_DN_OPPORTUNITY is + application specific and its recommended value is 2. It + MUST be greater than 1. This allows the opening of a + downlink opportunity to any downlink with higher priority than + the SCHC ACK REQ message. +
- Class B or Class C devices + Class B or Class C Devices Class B devices can receive in scheduled RX slots or in RX slots following the transmission of an uplink. Class C devices are almost in constant reception. - RECOMMENDED retransmission timer value: + RECOMMENDED retransmission timer values are:
@@ -1162,42 +1101,42 @@ transmission of an uplink. Class C devices are almost in constant reception.
- - The RECOMMENDED inactivity timer value is 12 hours for both Class B and Class -C devices. + The RECOMMENDED inactivity timer value is 12 + hours for both Class B and Class C devices.
SCHC Fragment Format
- All-0 SCHC fragment - Uplink fragmentation (Ack-On-Error): - All-0 is distinguishable from a SCHC ACK REQ as states "This condition -is also met if the SCHC Fragment Header is a multiple of L2 Words"; this -condition met: SCHC header is 2 bytes. + All-0 SCHC Fragment + Uplink Fragmentation (Ack-on-Error): + All-0 is distinguishable from an SCHC ACK REQ, as states "This condition is also + met if the SCHC Fragment Header is a multiple of L2 Words", the + following condition being met: SCHC header is 2 bytes. Downlink fragmentation (Ack-always): - As per the SCHC All-1 MUST contain the last tile, implementation must -ensure that SCHC All-0 message Payload will be at least the size of an L2 Word. + As per , SCHC All-1 + MUST contain the last tile, and implementations must + ensure that SCHC All-0 message Payload will be at least the size of + an L2 Word.
- All-1 SCHC fragment - All-1 is distinguishable from a SCHC Sender-Abort as states This -condition is met if the RCS is present and is at least the size of an L2 Word; -this condition met: RCS is 4 bytes. + All-1 SCHC Fragment + All-1 is distinguishable from an SCHC Sender-Abort, as states "This condition is met + if the RCS is present and is at least the size of an L2 Word", + the following condition being met: RCS is 4 bytes.
- Delay after each LoRaWAN frame to respect local regulation - This profile does not define a delay to be added after each LoRaWAN frame, local -regulation compliance is expected to be enforced by LoRaWAN stack. + Delay after Each LoRaWAN Frame to Respect Local Regulation + This profile does not define a delay to be added after each + LoRaWAN frame; local regulation compliance is expected to be + enforced by the LoRaWAN stack.
+
@@ -1209,137 +1148,13 @@ any new security issues beyond those already identified in . Moreover, SCHC data (LoRaWAN payload) are protected at the LoRaWAN level by an AES-128 encryption with a session key shared by the device and the SCHC gateway. These session keys are renewed at each -LoRaWAN session (ie: each join or rejoin to the LoRaWAN network) +LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network).
IANA Considerations This document has no IANA actions.
-
- Acknowledgements - Thanks to all those listed in the Contributors section for the - excellent text, insightful discussions, reviews and suggestions, and - also to (in alphabetical order) , - , , , , for - useful design considerations, reviews and comments. -
-
- Contributors - Contributors ordered by family name. - - - - - EDF R&D -
- - - - - Email: vincent.audebert@edf.fr -
-
- - - - - - - - Kerlink -
- - - - - Email: j.catalano@kerlink.fr -
-
- - - - - - Semtech -
- - - - - Email: mcoracin@semtech.com -
-
- - - - - - - Sagemcom -
- - - - - Email: marc.legourrierec@sagemcom.com -
-
- - - - Semtech -
- - - - - Email: nsornin@semtech.com -
-
- - - - Actility -
- - - - - Email: alper.yegin@actility.com -
-
- - - -
@@ -1352,13 +1167,13 @@ LoRaWAN session (ie: each join or rejoin to the LoRaWAN network) - + LoRaWAN 1.0.4 Specification Package - - + + LoRa Alliance @@ -1375,8 +1190,8 @@ LoRaWAN session (ie: each join or rejoin to the LoRaWAN network) LoRaWAN Remote Multicast Setup Specification v1.0.0 - - + + LoRa Alliance @@ -1387,28 +1202,32 @@ LoRaWAN session (ie: each join or rejoin to the LoRaWAN network)
Examples - In following examples "applicative data" refers to the IPv6 payload sent by the -application to the SCHC layer. + In the following examples, "applicative data" refers to the IPv6 payload + sent by the application to the SCHC layer.
- Uplink - Compression example - No fragmentation - This example represents an applicative data going through SCHC over LoRaWAN, -no fragmentation required - An applicative data of 78 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 40 bytes and 5 bits: 1 byte -RuleID, 21 bits residue + 37 bytes payload. + Uplink - Compression Example - No Fragmentation + This example represents an applicative data going through SCHC over + LoRaWAN; no fragmentation required. + An applicative data of 78 bytes is passed to the SCHC compression + layer. Rule 1 is used by the SCHC C/D layer, allowing to compress it + to 40 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 37 bytes + payload. +
- Uplink example: SCHC Message + Uplink Example: SCHC Message
- 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. + The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are + used by the LoRaWAN protocol: 49 bytes are available for SCHC payload; no + need for fragmentation. The payload will be transmitted through FPort + = 1. +
- Uplink example: LoRaWAN packet + Uplink Example: LoRaWAN Packet
- Uplink - Compression and fragmentation example + Uplink - Compression and Fragmentation Example This example represents an applicative data going through SCHC, with fragmentation. - An applicative data of 300 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 282 bytes and 5 bits: 1 byte + An applicative data of 300 bytes is passed to the SCHC compression layer. Rule 1 +is used by the SCHC C/D layer, allowing to compress it to 282 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 279 bytes payload.
- Uplink example: SCHC Message + Uplink Example: SCHC Message
- The current LoRaWAN MTU is 11 bytes, 0 bytes FOpts are used by LoRaWAN -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. + The current LoRaWAN MTU is 11 bytes; 0 bytes FOpts are used by + the LoRaWAN protocol: 11 bytes are available for SCHC payload + 1 byte + FPort field. The SCHC header is 2 bytes (including FPort), so 1 tile is + sent in the first fragment.
- Uplink example: LoRaWAN packet 1 + Uplink Example: LoRaWAN Packet 1 ]]>
- Uplink example: LoRaWAN packet 1 - Tile content + Uplink Example: LoRaWAN Packet 1 - Tile Content
- Next transmission MTU is 11 bytes, although 2 bytes FOpts are used by -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 11 bytes, although 2 bytes FOpts are used + by the LoRaWAN protocol: 9 bytes are available for SCHC payload + 1 + byte FPort field, a tile does not fit inside so the LoRaWAN stack will + send only FOpts. Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are transmitted:
- Uplink example: LoRaWAN packet 2 + Uplink Example: LoRaWAN Packet 2 transmitted, the last tile is only 2 bytes + 5 bits. Padding is added for the remaining 3 bits.
- Uplink example: LoRaWAN packet 3 + Uplink Example: LoRaWAN Packet 3
Then All-1 message can be transmitted:
- Uplink example: LoRaWAN packet 4 - All-1 SCHC message + Uplink Example: LoRaWAN Packet 4 - All-1 SCHC 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:
- Uplink example: LoRaWAN packet 5 - SCHC ACK + Uplink Example: LoRaWAN Packet 5 - SCHC ACK
Downlink - An applicative data of 155 bytes is passed to SCHC compression layer. Rule 1 -is used by SCHC C/D layer, allowing to compress it to 130 bytes and 5 bits: 1 byte + An applicative data of 155 bytes is passed to the SCHC compression layer. Rule 1 +is used by the SCHC C/D layer, allowing to compress it to 130 bytes and 5 bits: 1 byte RuleID, 21 bits residue + 127 bytes payload.
- Downlink example: SCHC Message + Downlink Example: SCHC Message
- The current LoRaWAN MTU is 51 bytes, no FOpts are used by LoRaWAN -protocol: 51 bytes are available for SCHC payload + FPort field => it -has to be fragmented. + The current LoRaWAN MTU is 51 bytes; no FOpts are used by the + LoRaWAN protocol: 51 bytes are available for SCHC payload + FPort + field => it has to be fragmented. + +
- Downlink example: LoRaWAN packet 1 - SCHC Fragment 1 + Downlink Example: LoRaWAN Packet 1 - SCHC Fragment 1 ]]>
Content of the tile is: + +
- Downlink example: LoRaWAN packet 1: Tile content + Downlink Example: LoRaWAN Packet 1: Tile Content
- The receiver answers with a SCHC ACK: + The receiver answers with an SCHC ACK:
- Downlink example: LoRaWAN packet 2 - SCHC ACK + Downlink Example: LoRaWAN Packet 2 - SCHC ACK
The second downlink is sent, two FOpts:
- Downlink example: LoRaWAN packet 3 - SCHC Fragment 2 + Downlink Example: LoRaWAN Packet 3 - SCHC Fragment 2
The receiver answers with an SCHC ACK:
- Downlink example: LoRaWAN packet 4 - SCHC ACK + Downlink Example: LoRaWAN Packet 4 - SCHC ACK
The last downlink is sent, no FOpts:
- Downlink example: LoRaWAN packet 5 - All-1 SCHC message + Downlink Example: LoRaWAN Packet 5 - All-1 SCHC Message
The receiver answers to the sender with an SCHC ACK:
- Downlink example: LoRaWAN packet 6 - SCHC ACK + Downlink Example: LoRaWAN Packet 6 - SCHC ACK
+ +
+ Acknowledgements + Thanks to all those listed in the Contributors Section for the + excellent text, insightful discussions, reviews, and suggestions, and + also to (in alphabetical order) , + , , , , and for + useful design considerations, reviews, and comments. +
+ + +
+ Contributors + Contributors ordered by family name. + + + + + EDF R&D +
+ + + + + vincent.audebert@edf.fr +
+
+ + + Kerlink +
+ + + + + j.catalano@kerlink.fr +
+
+ + + Semtech +
+ + + + + mcoracin@semtech.com +
+
+ + + + Sagemcom +
+ + + + + marc.legourrierec@sagemcom.com +
+
+ + + Semtech +
+ + + + + nsornin@semtech.com +
+
+ + + Actility +
+ + + + + alper.yegin@actility.com +
+
+ +
+
From 7794118c8f0d8e9535b2facb14557800189bc5f9 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:44:28 +0100 Subject: [PATCH 04/50] Add keyword list --- rfc9011.xml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 2b38a52..f556de4 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -38,9 +38,35 @@ lpwan Working Group - -example +the title) for use on https://www.rfc-editor.org/search. + +Author (OGZ) + Added keyword list. Most of them from RFC8724 + --> + +header compression +compression +fragmentation +static context +rule-based +LPWAN +LPWANs +low power +low-power +LoRa +LoRaWAN +IoT +Internet of Things +adaptation layer +UDP +IPv6 +sensor network +wireless sensor network +802.15.4 +constrained network +constrained node +constrained-node network +SCHC The Static Context Header Compression (SCHC) specification (RFC 8724) describes From 0771000120b643bb1bb83800d4dcdfb15bd75c3b Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:46:14 +0100 Subject: [PATCH 05/50] Move LoRaWAN trademark to Acknowledgements --- rfc9011.xml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index f556de4..abe83d4 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -75,8 +75,29 @@ Author (OGZ) designed for great flexibility so that it can be adapted for any of the LPWAN technologies. + This document specifies a profile of RFC 8724 to use SCHC in - LoRaWAN(R) networks and provides elements such as efficient + LoRaWAN networks and provides elements such as efficient parameterization and modes of operation. @@ -1461,6 +1482,7 @@ RuleID, 21 bits residue + 127 bytes payload. Munoz"/>, , , and for useful design considerations, reviews, and comments. + LoRaWAN is a registered trademark of the LoRa Alliance.
From 54fcff7459ecd713f4367313c6641d9f60792891 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:49:41 +0100 Subject: [PATCH 06/50] Resolve RFC Ed. comment 3 --- rfc9011.xml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index abe83d4..27cdef9 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -152,16 +152,43 @@ provisioned on the Network Gateway.
Statically:
-
by the device manufacturer in Activation-by-Personalization +
by the device manufacturer in "Activation-by-Personalization" mode, or
Dynamically:
-
after a Join Procedure by the Network Gateway in Over-the-Air-Activation mode. +
after a Join Procedure by the Network Gateway in "Over-the-Air-Activation" mode.
+ + +
Downlink:
From 40d57857c123604755932becd814646dcc27d17b Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:56:20 +0100 Subject: [PATCH 07/50] Resolve RFC ed. comment 6 --- rfc9011.xml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 27cdef9..be173d4 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -270,7 +270,7 @@ sectionFormat="of" section="8.2.2.1" format="default"/>.
  1. Compression mechanisms to avoid transporting information known by both sender and receiver over the air. Known information is part of the "context". This component is - called the "SCHC Compressor/Decompressor" (SCHC C/D).
  2. + called the "SCHC Compression/Decompression" (SCHC C/D).
  3. Fragmentation mechanisms to allow SCHC Packet transportation on a small, and potentially variable, MTU. This component is called the "SCHC Fragmentation/Reassembly" (SCHC F/R).
  4. @@ -310,14 +310,30 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. and the SCHC F/R, then SCHC F/R and SCHC C/D. The SCHC C/D and SCHC F/R in the device and the SCHC gateway MUST share the same set of rules. After decompression, the packet can be sent on the Internet to -one or several LPWAN Application Servers (App). + one or several LPWAN Application Servers (App). The SCHC C/D and SCHC F/R process is bidirectional, so the same principles can be applied to the other direction. In a LoRaWAN network, the RGW is called a "Gateway", the NGW is a - "Network Server", and the SCHC C/D and SCHC F/R are an "Application Server". It - can be provided by the NGW or any third-party + "Network Server", and the SCHC C/D and SCHC F/R are one or more + "Application Server". Application servers can be provided by the NGW or any third-party software. can be mapped in -LoRaWAN terminology to: + LoRaWAN terminology to: + +
    SCHC Architecture Mapped to LoRaWAN Date: Tue, 23 Mar 2021 12:58:27 +0100 Subject: [PATCH 08/50] Resolve RFC ed. comment 7 --- rfc9011.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index be173d4..f480395 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -368,7 +368,21 @@ Author (OGZ) can be a very high density of devices per radio gateway (LoRaWAN gateway). This entity maps to the LoRaWAN end device. -
  5. The RGW, which is the endpoint of the constrained + +
  6. The RGW is the endpoint of the constrained link. This entity maps to the LoRaWAN Gateway.
  7. From 6f7537c8cf013dca54c4f5ff9262e570e01df853 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 12:59:57 +0100 Subject: [PATCH 09/50] Resolve RFC ed. comment 8 --- rfc9011.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index f480395..10e8f03 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -391,12 +391,22 @@ Gateway and the SCHC gateway (LoRaWAN Application server). This entity maps to the LoRaWAN Network Server. -
  8. The SCHC C/D and SCHC F/R are handled by the LoRaWAN Application Server; that is, the LoRaWAN -application server will do the SCHC C/D and SCHC F/R. +
  9. The SCHC C/D and SCHC F/R are handled by the LoRaWAN Application Server.
  10. +
  11. The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and deliver security keys in a secure way so that the devices root key is never From 1cf7dfec34282aba7e35f2aaf356e329b1bd12fe Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 15:50:50 +0100 Subject: [PATCH 10/50] Resolve RFC ed. comment 9 --- rfc9011.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/rfc9011.xml b/rfc9011.xml index 10e8f03..9a22160 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -443,6 +443,25 @@ exposed.
    Device Classes (A, B, C) and Interactions + + The LoRaWAN Medium Access Control (MAC) layer supports three + classes of devices named A, B, and C. All devices implement Class + A, and some devices may implement Class B or Class C. Class B and Class C + are mutually exclusive. +
    Class A: From 58ca6818199759f54fc407948c3b6e4f92c163d0 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 16:37:20 +0100 Subject: [PATCH 11/50] Resolve RFC ed. comment 10 --- rfc9011.xml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 9a22160..10c0fce 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -482,9 +482,39 @@ devices, Class B devices can receive downlinks that are initiated by the Network Gateway and not following an uplink. There is a trade-off between the periodicity of those scheduled Class B listen windows and the power consumption of the device: if the periodicity is high, downlinks from the NGW -will be sent faster, but the device wakes up more often: it will have higher -power consumption. +will be sent faster, but the device wakes up more often. Therefore, it will +have higher power consumption. +
      +
    • High periodicity: downlinks from the NGW will be sent faster but the +device wakes up more often and power consumption is increased. +
    • +
    • Low periodicity: higher latency but lower power consumption. +
    • +
    + +
    Class C:
    From 3066d14dea8e22c8c42e8e5521ea1e4ec6975d50 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 16:42:31 +0100 Subject: [PATCH 12/50] Resolve RFC ed. comment 11 --- rfc9011.xml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 10c0fce..a8dca46 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -574,16 +574,24 @@ Class C devices are grid powered (for example, Smart Plugs).
    + +Original: + As SCHC defines its own acknowledgment mechanisms, SCHC does not + require the use of LoRaWAN Confirmed frames (MType=0b100 as per + [lora-alliance-spec]) + +Author (OGZ) + Thanks. It is now "Ftype" instead of "MType". Chapter 4.2.1, table 4 + Searching for characters "0b100" does not work as it is written "100" + in [LORA-SPEC]. Nevertheless, I would like to explain that we are + using binary base to write this. +--> As SCHC defines its own acknowledgment mechanisms, SCHC does not require -the use of LoRaWAN Confirmed frames (MType = 0b100 as per +the use of LoRaWAN Confirmed frames (FType = 0b100 as per ).
    From 4163ad84b55de2581e8b6c90be5d6765c2a05e2d Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:11:47 +0100 Subject: [PATCH 13/50] Resolve RFC ed. comment 12 --- rfc9011.xml | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index a8dca46..2ffc12c 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -635,12 +635,38 @@ LoRaWAN networks and applications to identify data. A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf. ) and FRMPayload.
    + + + +
    Unicast and Multicast Technology LoRaWAN technology supports unicast downlinks but also multicast; a - packet sent over LoRaWAN a radio link can be received by several - devices. It is useful to address many devices with the same content, - either a large binary file (firmware upgrade) or same command (e.g., + devices. It is useful to address many devices with the same content: + either a large binary file (firmware upgrade) or the same command (e.g., lighting control). As IPv6 is also a multicast technology, this feature can be used to address a group of devices. From 5e76fb1f42674dc86f0e2d70cd19da57281e3f31 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:27:14 +0100 Subject: [PATCH 14/50] Resolve RFC ed. comment 13 --- rfc9011.xml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 2ffc12c..9006cdc 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -707,9 +707,25 @@ and its associated SCHC control downlinks, named "FPortUp" in this document. The other way, a fragmented datagram with application payload transferred from Network Gateway to device is called a "downlink-fragmented datagram". It uses another FPort for data downlink and its associated SCHC control uplinks, named "FPortDown" -in this document. + in this document. + All RuleIDs can use arbitrary values inside the FPort range allowed - by the LoRaWAN specification and MUST be shared by the + by the LoRaWAN specification [LORA-SPEC] and MUST be shared by the device and SCHC gateway prior to the communication with the selected rule. The uplink and downlink fragmentation FPorts MUST be different. From 2f66ec1e5caf86a3fbd9704d436f33239664251d Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:29:55 +0100 Subject: [PATCH 15/50] Resolve RFC ed. comment 14 --- rfc9011.xml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 9006cdc..e205d7d 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -736,9 +736,26 @@ Author (OGZ) FPort as described in . + + LoRaWAN supports up to 223 application FPorts in - the range [1;223] as defined in Section 4.3.2 of ; it implies that the RuleID MSB SHOULD be inside this range. An application can send non-SCHC traffic by using FPort values different from the ones used From 8a344e17ed6d6ba489c815376f36b672b80e26a8 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:31:03 +0100 Subject: [PATCH 16/50] Resolve RFC ed. comment 15 --- rfc9011.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index e205d7d..4b740c7 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -767,8 +767,19 @@ Author (OGZ)
  12. RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching compression Rule was found), as described in .
  13. + - The FPortUp value MUST be different from FPortDown. The + The FPortUp value MUST be different from the FPortDown value. The remaining RuleIDs are available for compression. RuleIDs are shared between uplink and downlink sessions. A RuleID not in the set(s) of FPortUp or FPortDown means that the fragmentation is not used; thus, From b067aac403bed9da86eff6ef0a964d3d613ccf3c Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:34:00 +0100 Subject: [PATCH 17/50] Resolve RFC ed. comment 16 --- rfc9011.xml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 4b740c7..f5a5086 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -813,11 +813,20 @@ implementations MUST implement the following algorithm and . It has been chosen as it is already used by devices for the LoRaWAN protocol. + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this - mitigates privacy, location tracking, and correlation over time - risks. Join periodicity is defined at the application level. + mitigates privacy concerns, for example location tracking or correlation + over time. Join 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 no correlation From 8c4d82c45d869e3dc47bd738b809aa3cf0ebd472 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:36:22 +0100 Subject: [PATCH 18/50] Resolve RFC ed. comment 17 --- rfc9011.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index f5a5086..96dfc45 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1208,9 +1208,24 @@ be changed by the application. session is started; this is application specific and can be disabled. The RECOMMENDED uplink is a LoRaWAN empty frame as defined in . As this uplink is to open an RX window, any + format="default"/>. As this uplink is send only to open an RX window, any LoRaWAN uplink frame from the device MAY reset this counter. +
    Downlink Retransmission Timer + - Class A and Class B or Class C devices do not manage + Class A, Class B, and Class C devices do not manage retransmissions and timers the same way.
    From b4bb129091ca90e351352954005c10d5c2dde1b3 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:49:56 +0100 Subject: [PATCH 20/50] Resolve RFC ed. comment 19 --- rfc9011.xml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index ebbf071..0fff12c 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1324,7 +1324,7 @@ Author (OGZ) application specific. RETRANSMISSION_TIMER is application specific and its RECOMMENDED value is -INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). + INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). SCHC All-0 (FCN = 0) All fragments but the last have an FCN = 0 (because the window size is 1). Following an All-0 SCHC Fragment, the device @@ -1333,8 +1333,27 @@ INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1). messages before aborting. In order to progress the fragmented datagram, the SCHC layer should immediately queue for transmission those SCHC ACK messages if no SCHC downlinks have been - received during the RX1 and RX2 window.s The LoRaWAN layer will respect + received during the RX1 and RX2 windows. The LoRaWAN layer will respect the applicable local spectrum regulation. + SCHC All-1 (FCN = 1) SCHC All-1 is the last fragment of a datagram, and the From 1f4129f19f1f04a6d86115fefa74f9e5fa47e69e Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 17:51:36 +0100 Subject: [PATCH 21/50] Resolve RFC ed. comment 20 --- rfc9011.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 0fff12c..03cce16 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1356,12 +1356,26 @@ Author (OGZ) --> SCHC All-1 (FCN = 1) + + SCHC All-1 is the last fragment of a datagram, and the corresponding SCHC ACK message might be lost; therefore, the SCHC gateway MUST request a retransmission of this ACK when the retransmission timer expires. To open a downlink opportunity, the device MUST transmit an uplink - every RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * + every interval of RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * SCHC_ACK_REQ_DN_OPPORTUNITY). The format of this uplink is application specific. It is RECOMMENDED for a device to send an empty frame (see Date: Tue, 23 Mar 2021 17:54:10 +0100 Subject: [PATCH 22/50] Resolve RFC ed. comment 21 --- rfc9011.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 03cce16..44f9a15 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1496,8 +1496,20 @@ LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network). - + LoRaWAN Remote Multicast Setup Specification v1.0.0 From 37c97e6d7932fca8fe2921d0a90dc29f42464ebe Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 18:02:33 +0100 Subject: [PATCH 23/50] Resolve RFC ed. comment 22 --- rfc9011.xml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 44f9a15..73e8185 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1544,11 +1544,30 @@ Author (OGZ) | 1 | 21 bits | 37 bytes | 3 bits | ]]>
  14. - The current LoRaWAN MTU is 51 bytes, although 2 bytes FOpts are + The current LoRaWAN MTU is 51 bytes, although 2-byte FOpts are used by the LoRaWAN protocol: 49 bytes are available for SCHC payload; no need for fragmentation. The payload will be transmitted through FPort = 1. +
    Uplink Example: LoRaWAN Packet | 1 | 21 bits | 279 bytes | ]]>
    - The current LoRaWAN MTU is 11 bytes; 0 bytes FOpts are used by + The current LoRaWAN MTU is 11 bytes; 0-byte FOpts are used by the LoRaWAN protocol: 11 bytes are available for SCHC payload + 1 byte FPort field. The SCHC header is 2 bytes (including FPort), so 1 tile is sent in the first fragment. @@ -1599,11 +1618,11 @@ Content of the tile is: | 1 | 21 bits | 6 bytes + 3 bits | ]]> - Next transmission MTU is 11 bytes, although 2 bytes FOpts are used + Next transmission MTU is 11 bytes, although 2-byte FOpts are used by the LoRaWAN protocol: 9 bytes are available for SCHC payload + 1 byte FPort field, a tile does not fit inside so the LoRaWAN stack will send only FOpts. - Next transmission MTU is 242 bytes, 4 bytes FOpts. 23 tiles are transmitted: + Next transmission MTU is 242 bytes, 4-byte FOpts. 23 tiles are transmitted:
    Uplink Example: LoRaWAN Packet 2 Date: Tue, 23 Mar 2021 18:06:30 +0100 Subject: [PATCH 24/50] Resolve RFC ed. comment 23 --- rfc9011.xml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 73e8185..36c9152 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1685,8 +1685,27 @@ RuleID, 21 bits residue + 127 bytes payload.
    The current LoRaWAN MTU is 51 bytes; no FOpts are used by the LoRaWAN protocol: 51 bytes are available for SCHC payload + FPort - field => it has to be fragmented. + field; The applicative data has to be fragmented.
    +
    Downlink Example: LoRaWAN Packet 1 - SCHC Fragment 1 From 3b0f375b54031adb0c4603481bf0c11eae9f90b3 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 18:37:53 +0100 Subject: [PATCH 25/50] Resolve RFC ed. comment 24 --- rfc9011.xml | 84 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 15 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 36c9152..ff377da 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1016,10 +1016,13 @@ missing tile. part of the rule context.
    Regular Fragments - + Figure + is an example of a regular frament for all fragments except + the last one. SCHC Header Size is 16 Bits, including the + LoRaWAN FPort. +
    - All Fragments Except the Last One.  SCHC Header Size is 16 - Bits, Including the LoRaWAN FPort. + All Fragments Except the Last One.
    Last Fragment (All-1) + Following figures are examples of All-1 messages. + is without the last tile, + is with the last tile. +
    - All-1 SCHC Message: The Last Fragment without Last Tile + All-1 SCHC Message without Last Tile ]]>
    - All-1 SCHC Message: The Last Fragment with Last Tile + All-1 SCHC Message with Last Tile SCHC ACK
    - SCHC ACK Format, Correct RCS Check + SCHC ACK Format - Correct RCS Check ]]>
    - SCHC ACK Format, Failed RCS Check + SCHC ACK Format - Incorrect RCS Check be used for the SCHC-over-LoRaWAN protocol. It might be set by the Network Gateway for other purposes but not SCHC needs.
    Regular Fragments + Figure + is an example of a regular frament for all fragments except + the last one. SCHC Header Size is 10 Bits, including the + LoRaWAN FPort. +
    - All Fragments but the Last One.  Header Size is 10 Bits, Including the LoRaWAN FPort. + All Fragments but the Last One.
    SCHC ACK
    - SCHC ACK Format, RCS is Correct + SCHC ACK Format - Correct RCS Check ]]>
    - SCHC ACK Format, RCS is Incorrect + SCHC ACK Format - Incorrect RCS Check
    Receiver-Abort + Figure + is an example of a Receiver-Abort packet, following an All-1 + SCHC Fragment with incorrect RCS. +
    - Receiver-Abort Packet (Following an All-1 SCHC Fragment with Incorrect RCS) + Receiver-Abort Packet IANA Considerations This document has no IANA actions.
    - + @@ -1609,8 +1625,10 @@ RuleID, 21 bits residue + 279 bytes payload. | XXXX | 1 byte | 0 0 | 62 | 10 bytes | ]]>
    + The tile content is described in figure +
    - Uplink Example: LoRaWAN Packet 1 - Tile Content + Uplink Example: First Tile Content
    - Content of the tile is: + The tile content is described in figure + + + +
    - Downlink Example: LoRaWAN Packet 1: Tile Content + Downlink Example: First Tile Content Date: Tue, 23 Mar 2021 18:43:42 +0100 Subject: [PATCH 26/50] Resolve RFC ed. comment 25.1 --- rfc9011.xml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index ff377da..c6c8be2 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -830,7 +830,7 @@ Author (OGZ) 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 no correlation - between the hardware identifier (IEEE-64 DevEUI) and the IID, so an + between the hardware identifier (DevEUI) and the IID, so an attacker cannot use the manufacturer OUI to target devices. Example with:
      @@ -1774,6 +1774,19 @@ Author (OGZ) --> + + +
      Downlink Example: First Tile Content Date: Tue, 23 Mar 2021 18:46:28 +0100 Subject: [PATCH 27/50] Resolve RFC ed. comment 25.4 --- rfc9011.xml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index c6c8be2..02bdafb 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -157,7 +157,7 @@ provisioned on the Network Gateway.
      Dynamically:
      -
      after a Join Procedure by the Network Gateway in "Over-the-Air-Activation" mode. +
      after a LoRaWAN "Join Procedure" by the Network Gateway in "Over-the-Air-Activation" mode.
      @@ -1783,7 +1783,23 @@ Author (OGZ) Ok, I changed section 5.3 to reference only the DevEUI, which is defined in the terminology section as an IEEE EUI-64. +2. FYI: We've updated "Fpending bit" to "FPending bit" per the LoRa Alliance website. +Author (OGZ) + OK + +3. We have updated to use "SCHC C/D and SCHC F/R" instead of "SCHC C/D and F/R" everywhere but in figures. Please let us know any objections. + +Author (OGZ) + OK + +4. Please verify that "Join Procedure" should be capitalized in this document. Its only other apparent use in past RFCs is lowercased. + +Original: + Dynamically: after a Join Procedure by the Network Gateway in Over The Air Activation mode. + +Author (OGZ) + Updated to LoRaWAN "Join Procedure" as it is a LoRaWAN terminology like "Over-The-Air-Activation" --> From 7a02f02aae53af468af640e8d62c77d630a71b9e Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 18:52:11 +0100 Subject: [PATCH 28/50] Resolve RFC ed. comment 25.5 --- rfc9011.xml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 02bdafb..f46e570 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -9,7 +9,7 @@ - Static Context Header Compression (SCHC) over LoRaWAN + Static Context Header Compression and fragementation (SCHC) over LoRaWAN Semtech @@ -69,7 +69,7 @@ Author (OGZ) SCHC - The Static Context Header Compression (SCHC) specification (RFC 8724) describes + The Static Context Header Compression and fragmentation (SCHC) specification (RFC 8724) describes generic header compression and fragmentation techniques for Low-Power Wide Area Network (LPWAN) technologies. SCHC is a generic mechanism designed for great flexibility so that it can be adapted for any of the @@ -1800,6 +1800,23 @@ Original: Author (OGZ) Updated to LoRaWAN "Join Procedure" as it is a LoRaWAN terminology like "Over-The-Air-Activation" + +5. As the last C in SCHC stands for Compression, may we update to use simply "SCHC" instead of "SCHC compression" where it occurs? + +Author (OGZ) + No, SCHC is not an acronym, it means "Static Context Header Compression and + fragmentation" but the "And fragmentation" part is not in SCHC. Please see + RFC8724 absctract. Nevertheless it was not correctly explained in this + document, I changed: + Static Context Header Compression (SCHC) over LoRaWAN + to + Static Context Header Compression and fragementation (SCHC) over LoRaWAN + + and + The Static Context Header Compression (SCHC) specification (RFC 8724) describes + to + The Static Context Header Compression and fragmentation (SCHC) specification (RFC 8724) describes + --> From 170c0ed3de3f31dc2d55521f23ee6892a6fb6f83 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 19:00:01 +0100 Subject: [PATCH 29/50] Resolve RFC ed. comment 25.6 --- rfc9011.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rfc9011.xml b/rfc9011.xml index f46e570..cfb17bc 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -137,6 +137,18 @@ all other definitions, please look up the SCHC specification
      +
      AppKey: +
      +
      Application Key. An AES-128 root key specific to each device. +
      + +
      AppSKey: +
      +
      Application Session Key. An AES-128 key derived from the AppKey for +each new session. It is used to encrypt the payload field of a LoRaWAN +applicative frame. +
      +
      DevEUI:
      Device Extended Unique Identifier, an IEEE EUI-64 identifier used to @@ -1817,6 +1829,12 @@ Author (OGZ) to The Static Context Header Compression and fragmentation (SCHC) specification (RFC 8724) describes +6. Please confirm the use of both "AppKey" and "AppSKey". If both are correct, may we expand them as "application key" and "application session key", respectively? Perhaps add them to the Terminology section? + +Author (OGZ) + I confirm their use. It is better not to expand them as it is usually + not done in LoRaWAN documents. Nevertheless I added them in the + terminology section --> From ede657e7cf2e09a0f085da1bfc21767b21f31e15 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 19:10:24 +0100 Subject: [PATCH 30/50] Resolve RFC ed. comment 25.7 --- rfc9011.xml | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index cfb17bc..5843714 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -399,7 +399,7 @@ link. This entity maps to the LoRaWAN Gateway.
    • The NGW is the interconnection node between the Radio -Gateway and the SCHC gateway (LoRaWAN Application server). This entity maps to +Gateway and the SCHC gateway (LoRaWAN Application Server). This entity maps to the LoRaWAN Network Server.
    • @@ -883,7 +883,7 @@ Author (OGZ) Fragmentation The L2 Word Size used by LoRaWAN is 1 byte (8 bits). The SCHC fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink -fragmentation and Ack-Always mode for downlink fragmentation. A LoRaWAN +fragmentation and ACK-Always mode for downlink fragmentation. A LoRaWAN device cannot support simultaneous interleaved fragmented datagrams in the same direction (uplink or downlink). The fragmentation parameters are different for uplink- and downlink-fragmented datagrams and are successively described in the next sections. @@ -1456,7 +1456,7 @@ transmission of an uplink. Class C devices are almost in constant reception.
      target="RFC8724" format="default"/> states "This condition is also met if the SCHC Fragment Header is a multiple of L2 Words", the following condition being met: SCHC header is 2 bytes. - Downlink fragmentation (Ack-always): + Downlink fragmentation (ACK-Always): As per , SCHC All-1 MUST contain the last tile, and implementations must ensure that SCHC All-0 message Payload will be at least the size of @@ -1835,6 +1835,39 @@ Author (OGZ) I confirm their use. It is better not to expand them as it is usually not done in LoRaWAN documents. Nevertheless I added them in the terminology section + +7. We see each of the following similar forms. May these be made consistent? If so, what is the preferred form? + +Ack-Always vs. ACK-Always vs. Ack-always + +LoRaWAN Application Server vs. LoRaWAN Application server vs. LoRaWAN application server + +LoRaWAN Join server vs. LoRaWAN join + +LoRaWANEnd Device vs. LoRaWAN device + +SCHC Fragmentation vs. SCHC fragmentation vs. Regular SCHC Fragment vs. SCHC Fragment Header + +RuleID vs. Rule ID + +Author (OGZ) + + ACK-Always, as per RFC8724 + + LoRaWAN Application Server, as per [LORA-SPEC] + + "LoRaWAN Join Server" is for a component called "Join Server" + "LoRaWAN join" is the action done during the "Join Procedure" + => No changes to be made + + LoRaWAN End Device: "End-device" is LoRaWAN terminology, it should be + used only where the mapping between SCHC and LoRaWAN is explained. + "device" describes the same component in "IETF terminology" from + RFC8376, it should be used everywhere in this document except in the + explanations of the mapping between SCHC and LoRaWAN. + => No changes to be made expect maybe "LoRaWAN End Device" to + "LoRaWAN End-Device" if we want to respect [LORA-SPEC] ? + --> From 1f32276cf804ca5684c11a878522558441ef5e18 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 19:13:53 +0100 Subject: [PATCH 31/50] Suggest changes to RFC ed. --- rfc9011.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/rfc9011.xml b/rfc9011.xml index 5843714..3adb397 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -279,6 +279,11 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. description, refer to the full specification . It defines: +
      1. Compression mechanisms to avoid transporting information known by both sender and receiver over the air. Known information is part of the "context". This component is @@ -674,9 +679,23 @@ Author (OGZ) --> + +
        Unicast and Multicast Technology LoRaWAN technology supports unicast downlinks but also multicast; a + multical packet sent over a LoRaWAN radio link can be received by several devices. It is useful to address many devices with the same content: either a large binary file (firmware upgrade) or the same command (e.g., lighting control). As IPv6 is also a multicast technology, this From 3473f3bbc9d71d9cc147b9b2a9f338c655de1f8f Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 19:32:39 +0100 Subject: [PATCH 32/50] Fix IID example --- rfc9011.xml | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 3adb397..1b2a8e8 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -295,6 +295,12 @@ Moreover changing it to SCHC "Compression/Decompression" is be more consistent w Context exchange or pre-provisioning is out of scope of this document.
        Architecture + + + - + + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this mitigates privacy concerns, for example location tracking or correlation over time. Join periodicity is defined at the application level. Address-scan risk is mitigated thanks to AES-128, which provides - enough entropy bits of the IID. + enough entropy in the IID. Using this algorithm will also ensure that there is no correlation between the hardware identifier (DevEUI) and the IID, so an attacker cannot use the manufacturer OUI to target devices. @@ -872,11 +889,14 @@ Author (OGZ) Example of IID Computation
        + There is a small probability of IID collision in a LoRaWAN network. If this occurs, the IID can be changed by rekeying the device at the L2 level (i.e., triggering a LoRaWAN join). The way the device is @@ -1170,8 +1190,20 @@ Bitmaps of 63 bits will require 6 bits of padding.
      Multicast downlinks:
      + +
      No-ACK; reliability has to be ensured by the upper layer. This feature is +OPTIONAL for the SCHC gateway and REQUIRED for the device.
      From 0d0f111ca6af2f4c65ac959299235b4c1694ae07 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 19:41:02 +0100 Subject: [PATCH 33/50] =?UTF-8?q?Fix=20answer=20to=20RFC=20Ed.=20N=C2=B010?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rfc9011.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 1b2a8e8..3703cda 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -504,17 +504,14 @@ also schedule periodic listen windows. Therefore, as opposed to Class A devices, Class B devices can receive downlinks that are initiated by the Network Gateway and not following an uplink. There is a trade-off between the periodicity of those scheduled Class B listen windows and the power -consumption of the device: if the periodicity is high, downlinks from the NGW -will be sent faster, but the device wakes up more often. Therefore, it will -have higher power consumption. +consumption of the device: -
        -
      • High periodicity: downlinks from the NGW will be sent faster but the -device wakes up more often and power consumption is increased. -
      • -
      • Low periodicity: higher latency but lower power consumption. -
      • -
      +
      High periodicity:
      +
      Downlinks from the NGW will be sent faster but the +device wakes up more often and power consumption is increased.
      + +
      Low periodicity:
      +
      Higher latency but lower power consumption.
      Class C: From b9d618abf0f4f1af131277bee0cfd93f582a026f Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 20:00:43 +0100 Subject: [PATCH 34/50] Fix AppSkey case --- rfc9011.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 3703cda..0c996d8 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -883,7 +883,7 @@ Address-scan risk is mitigated thanks to AES-128, which provides Example with:
      • DevEUI: 0x1122334455667788
      • -
      • appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
      • +
      • AppSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
      Example of IID Computation From e7006551510282ee0d23cd2c5712e5a60bd95f48 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Tue, 23 Mar 2021 20:02:56 +0100 Subject: [PATCH 35/50] Fix Figure before Figure reference --- rfc9011.xml | 57 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 0c996d8..22a1488 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -299,6 +299,13 @@ Moreover changing it to SCHC "Compression/Decompression" is be more consistent w SCHC Architecture Mapped to LoRaWAN | ]]>
      @@ -1067,7 +1074,7 @@ missing tile. part of the rule context.
      Regular Fragments - Figure + is an example of a regular frament for all fragments except the last one. SCHC Header Size is 16 Bits, including the LoRaWAN FPort. @@ -1302,7 +1309,7 @@ NOT be used for the SCHC-over-LoRaWAN protocol. It might be set by the Network Gateway for other purposes but not SCHC needs.
      Regular Fragments - Figure + is an example of a regular frament for all fragments except the last one. SCHC Header Size is 10 Bits, including the LoRaWAN FPort. @@ -1356,7 +1363,7 @@ Network Gateway for other purposes but not SCHC needs.
      Receiver-Abort - Figure + is an example of a Receiver-Abort packet, following an All-1 SCHC Fragment with incorrect RCS. @@ -1688,7 +1695,7 @@ RuleID, 21 bits residue + 279 bytes payload. | XXXX | 1 byte | 0 0 | 62 | 10 bytes | ]]>
      - The tile content is described in figure + The tile content is described in
      Uplink Example: First Tile Content @@ -1798,7 +1805,7 @@ Author (OGZ) | XXXX | 1 byte | 1 bit | 1 bit | 50 bytes and 6 bits | ]]>
      - The tile content is described in figure + The tile content is described in @@ -1967,12 +1974,12 @@ Author (OGZ)
      Downlink Example: LoRaWAN Packet 5 - All-1 SCHC Message
      The receiver answers to the sender with an SCHC ACK: From 535e82f823321614fccd74c073ab884758711de3 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 18:14:41 +0200 Subject: [PATCH 36/50] Add 2nd revision from RFC editors --- rfc9011.xml | 494 +++++++--------------------------------------------- 1 file changed, 61 insertions(+), 433 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 22a1488..3c6d6a7 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1,15 +1,15 @@ - + - + - Static Context Header Compression and fragementation (SCHC) over LoRaWAN + Static Context Header Compression and Fragementation (SCHC) over LoRaWAN Semtech @@ -37,13 +37,6 @@ lpwan Working Group - - header compression compression fragmentation @@ -75,27 +68,6 @@ Author (OGZ) designed for great flexibility so that it can be adapted for any of the LPWAN technologies.
      - This document specifies a profile of RFC 8724 to use SCHC in LoRaWAN networks and provides elements such as efficient parameterization and modes of operation. @@ -174,21 +146,7 @@ provisioned on the Network Gateway. - -
      Downlink: @@ -283,6 +243,9 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. SCHC Compressor/Decompressor is called SCHC Compression/Decompression in RFC 8704 Moreover changing it to SCHC "Compression/Decompression" is be more consistent with "SCHC Fragmentation/Reassembly" + +ask for AD approval - probably okay + -->
      1. Compression mechanisms to avoid transporting information known by both sender and receiver over the @@ -299,13 +262,11 @@ Moreover changing it to SCHC "Compression/Decompression" is be more consistent w In a LoRaWAN network, the RGW is called a "Gateway", the NGW is a "Network Server", and the SCHC C/D and SCHC F/R are one or more - "Application Server". Application servers can be provided by the NGW or any third-party + "Application Servers". + + Application servers can be provided by the NGW or any third-party software. can be mapped in LoRaWAN terminology to: -
        SCHC Architecture Mapped to LoRaWAN -
      2. The RGW is the endpoint of the constrained link. This entity maps to the LoRaWAN Gateway.
      3. @@ -423,20 +360,6 @@ the LoRaWAN Network Server.
      4. The SCHC C/D and SCHC F/R are handled by the LoRaWAN Application Server.
      5. -
      6. The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and deliver security keys in a secure way so that the devices root key is never @@ -473,20 +396,6 @@ exposed.
        Device Classes (A, B, C) and Interactions - The LoRaWAN Medium Access Control (MAC) layer supports three classes of devices named A, B, and C. All devices implement Class A, and some devices may implement Class B or Class C. Class B and Class C @@ -506,34 +415,39 @@ opportunity. Class A is the lowest power consumption class.
        Class B:
        -
        Class B devices implement all the functionalities of Class A devices but +
        Class B devices implement all the functionalities of Class A devices but also schedule periodic listen windows. Therefore, as opposed to Class A devices, Class B devices can receive downlinks that are initiated by the Network Gateway and not following an uplink. There is a trade-off between the periodicity of those scheduled Class B listen windows and the power -consumption of the device: -
        +consumption of the device:
        + + +
        +
        High periodicity:
        -
        Downlinks from the NGW will be sent faster but the -device wakes up more often and power consumption is increased.
        +
        Downlinks from the NGW will be sent faster but the device wakes up more +often and power consumption is increased.
        Low periodicity:
        -
        Higher latency but lower power consumption.
        +
        Downlinks from the NGW will have higher latency but lower power consumption.
        +
        -
        Class C: @@ -583,7 +509,6 @@ Class C devices are grid powered (for example, Smart Plugs). | Device | <=====> | Network | <====> | SCHC | <======> | Internet | | | devAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | +--------+ +---------+ +---------+ +----------+ - ]]>
    @@ -604,22 +529,7 @@ Class C devices are grid powered (for example, Smart Plugs). - As SCHC defines its own acknowledgment mechanisms, SCHC does not require the use of LoRaWAN Confirmed frames (FType = 0b100 as per ). @@ -666,49 +576,10 @@ LoRaWAN networks and applications to identify data. target="lorawan-schc-payload" format="default"/>) and FRMPayload.
    - - - - -
    Unicast and Multicast Technology LoRaWAN technology supports unicast downlinks but also multicast; a - multical packet sent over a LoRaWAN radio link can be received by several + multicast packet sent over a LoRaWAN radio link can be received by several devices. It is useful to address many devices with the same content: either a large binary file (firmware upgrade) or the same command (e.g., lighting control). As IPv6 is also a multicast technology, this @@ -741,7 +612,6 @@ the FPort field with the LoRaWAN payload to recompose the SCHC Message. | FPort | LoRaWAN payload | + ------------------------ + | SCHC Message | - ]]>
    @@ -752,22 +622,7 @@ other way, a fragmented datagram with application payload transferred from Network Gateway to device is called a "downlink-fragmented datagram". It uses another FPort for data downlink and its associated SCHC control uplinks, named "FPortDown" in this document.
    - All RuleIDs can use arbitrary values inside the FPort range allowed by the LoRaWAN specification [LORA-SPEC] and MUST be shared by the device and SCHC gateway prior to the communication with the selected @@ -780,22 +635,6 @@ Author (OGZ) FPort as described in . - LoRaWAN supports up to 223 application FPorts in @@ -811,17 +650,7 @@ Author (OGZ)
  15. RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching compression Rule was found), as described in .
  16. - The FPortUp value MUST be different from the FPortDown value. The remaining RuleIDs are available for compression. RuleIDs are shared @@ -856,31 +685,10 @@ implementations MUST implement the following algorithm and The aes128_cmac algorithm is described in . It has been chosen as it is already used by devices for the LoRaWAN protocol. - - - - + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this - mitigates privacy concerns, for example location tracking or correlation + mitigates privacy concerns, for example, location tracking or correlation over time. Join periodicity is defined at the application level. Address-scan risk is mitigated thanks to AES-128, which provides enough entropy in the IID. @@ -903,6 +711,8 @@ Address-scan risk is mitigated thanks to AES-128, which provides There is a small probability of IID collision in a LoRaWAN network. If this occurs, the IID can be changed by rekeying the device @@ -1198,16 +1008,17 @@ Bitmaps of 63 bits will require 6 bits of padding.
    Multicast downlinks:
    No-ACK; reliability has to be ensured by the upper layer. This feature is OPTIONAL for the SCHC gateway and REQUIRED for the device. @@ -1285,23 +1096,24 @@ be changed by the application. session is started; this is application specific and can be disabled. The RECOMMENDED uplink is a LoRaWAN empty frame as defined in . As this uplink is send only to open an RX window, any + format="default"/>. As this uplink is sent only to open an RX window, any LoRaWAN uplink frame from the device MAY reset this counter.
    Downlink Retransmission Timer - - Class A, Class B, and Class C devices do not manage retransmissions and timers the same way. @@ -1418,43 +1216,34 @@ Author (OGZ) MUST transmit up to MAX_ACK_REQUESTS SCHC ACK messages before aborting. In order to progress the fragmented datagram, the SCHC layer should immediately queue for - transmission those SCHC ACK messages if no SCHC downlinks have been + transmission those SCHC ACK messages if no SCHC downlink has been received during the RX1 and RX2 windows. The LoRaWAN layer will respect the applicable local spectrum regulation. - - SCHC All-1 (FCN = 1) - + + SCHC All-1 (FCN = 1) + SCHC All-1 is the last fragment of a datagram, and the corresponding SCHC ACK message might be lost; therefore, the SCHC @@ -1582,20 +1371,6 @@ LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network). - LoRaWAN Remote Multicast Setup Specification v1.0.0 @@ -1635,25 +1410,6 @@ Author (OGZ) need for fragmentation. The payload will be transmitted through FPort = 1. -
    Uplink Example: LoRaWAN Packet
    The current LoRaWAN MTU is 51 bytes; no FOpts are used by the LoRaWAN protocol: 51 bytes are available for SCHC payload + FPort - field; The applicative data has to be fragmented. + field; the applicative data has to be fragmented. -
    Downlink Example: LoRaWAN Packet 1 - SCHC Fragment 1 @@ -1809,122 +1546,13 @@ Author (OGZ) - - - From 3dd2f6c18dcb313f4d1b1f4acb9b89d91ddce453 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 18:21:37 +0200 Subject: [PATCH 37/50] Fix terminology --- rfc9011.xml | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 3c6d6a7..7daf1b2 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -27,7 +27,7 @@
    1137A Avenue des Champs Blancs - Cesson-Sevigne Cedex + Cesson-Sevigne Cedex 35510 France @@ -160,6 +160,9 @@ Author (OGZ) The terms SCHC C/D, SCHC F/r, NGW, and RGW are used in prior to their expansion in this document and readers not familiar wiith the terms would have to look at other documents to understand their meaning. As a few of the terms are used in Figure 1, where adjacent expansion is not possible, it would be ideal to include them in the terminology section. + +Author (OGZ) +Ok, I added them -->
    Downlink: @@ -167,6 +170,11 @@ The terms SCHC C/D, SCHC F/r, NGW, and RGW are used in prior to their expansion
    A LoRaWAN term for a frame transmitted by the network and received by the device.
    +
    IID: +
    +
    Interface Identifier. +
    +
    EUI:
    Extended Unique Identifier @@ -196,11 +204,21 @@ brackets="angle" target="https://www.lora-alliance.org"/>.
    Organizationally Unique Identifier. IEEE-assigned prefix for EUI.
    +
    NGW: +
    +
    Network Gateway. +
    +
    RCS:
    Reassembly Check Sequence. Used to verify the integrity of the fragmentation-reassembly process.
    +
    RGW: +
    +
    Radio Gateway. +
    +
    RX:
    A device's reception window. @@ -211,6 +229,16 @@ brackets="angle" target="https://www.lora-alliance.org"/>.
    LoRaWAN class A devices open two RX windows following an uplink, called "RX1" and "RX2".
    +
    SCHC C/D +
    +
    SCHC Compression/Decompression. +
    + +
    SCHC F/R +
    +
    SCHC Fragmentation/Reassembly. +
    +
    SCHC gateway:
    The LoRaWAN Application Server that manages translation between an IPv6 @@ -232,7 +260,7 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. -
    +
SCHC Overview This section contains a short overview of SCHC. For a detailed From a628174dd7542de3cd5236e0e45497d308bee1d8 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 18:22:13 +0200 Subject: [PATCH 38/50] Accept RFC editors proposition --- rfc9011.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 7daf1b2..ca49285 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -494,7 +494,8 @@ High periodicity: Low periodicity: Higher latency but lower power consumption. - +Author (OGZ) +OK, thank you @@ -1142,6 +1143,9 @@ Author (OGZ) We changed "uplink is send only" to "uplink is sent only" as we felt past tense was intended. Please let us know if this is not the case. +Author (OGZ) + Correct, regular mistake on my side + -->
+
LoRaWAN Architecture An overview of the LoRaWAN protocol and architecture
Low periodicity:
Downlinks from the NGW will have higher latency but lower power consumption.
- + @@ -650,7 +653,7 @@ and its associated SCHC control downlinks, named "FPortUp" in this document. The other way, a fragmented datagram with application payload transferred from Network Gateway to device is called a "downlink-fragmented datagram". It uses another FPort for data downlink and its associated SCHC control uplinks, named "FPortDown" - in this document.
+in this document. All RuleIDs can use arbitrary values inside the FPort range allowed by the LoRaWAN specification [LORA-SPEC] and MUST be shared by the @@ -680,7 +683,7 @@ FPort for data downlink and its associated SCHC control uplinks, named "FPortDow compression Rule was found), as described in . - + The FPortUp value MUST be different from the FPortDown value. The remaining RuleIDs are available for compression. RuleIDs are shared between uplink and downlink sessions. A RuleID not in the set(s) of @@ -848,23 +851,23 @@ Fragment, or with any of these two methods. Implementations must ensure that:
Penultimate tile: -
+
MUST be equal to the regular size.
RCS: -
+
Use the recommended calculation algorithm in , Integrity Checking.
Tile: -
+
Size is 10 bytes.
Retransmission timer: -
+
Set by the implementation depending on the application requirements. The default RECOMMENDED duration of this timer is 12 hours; this value is mainly driven by application requirements @@ -872,7 +875,7 @@ Fragment, or with any of these two methods. Implementations must ensure that:
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 @@ -880,7 +883,7 @@ Fragment, or with any of these two methods. Implementations must ensure that:
MAX_ACK_REQUESTS: -
+
8. With this set of parameters, the SCHC Fragment Header is 16 bits, 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 per @@ -957,7 +960,7 @@ part of the rule context.
- + SCHC ACK
SCHC ACK Format - Correct RCS Check @@ -1210,7 +1213,7 @@ Network Gateway for other purposes but not SCHC needs. is an example of a Receiver-Abort packet, following an All-1 SCHC Fragment with incorrect RCS. - +
Receiver-Abort Packet , and for useful design considerations, reviews, and comments. LoRaWAN is a registered trademark of the LoRa Alliance. -
+
From 1dba64f7a557d706814ae61a40b029d1357f8cd7 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 20:50:55 +0200 Subject: [PATCH 40/50] Use RuleID instead of Rule ID --- rfc9011.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 524cd13..11477d2 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -662,7 +662,7 @@ in this document. MUST be different.
- Rule ID Management + RuleID Management The RuleID MUST be 8 bits and encoded in the LoRaWAN FPort as described in . @@ -1591,6 +1591,9 @@ We still need answers for the following terms: SCHC Fragmentation vs. SCHC fragmentation vs. Regular SCHC Fragment vs. SCHC Fragment Header RuleID vs. Rule ID +Author (OGZ) + + RuleID as per RF8724, I replaced the occurance of Rule ID --> From f0c6801454f4a1444d744a26e1936882918d2fa3 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 20:53:14 +0200 Subject: [PATCH 41/50] Update contributor contact --- rfc9011.xml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 11477d2..2f38d88 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1728,15 +1728,18 @@ Author (OGZ) marc.legourrierec@sagemcom.com
- + - Semtech + Chirp Foundation
- nsornin@semtech.com + nicolas.sornin@chirpfoundation.org
From ce963cdec6755f3965834bac8d3a254de03fcdbf Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 21:00:30 +0200 Subject: [PATCH 42/50] Use SCHC fragmentation instead of SCHC Fragmentation --- rfc9011.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 2f38d88..8daab0b 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -765,7 +765,7 @@ Verify this either through email search or just ask AD again. The SCHC C/D MUST concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet as per . - RuleIDs matching FPortUp and FPortDown are reserved for SCHC Fragmentation. + RuleIDs matching FPortUp and FPortDown are reserved for SCHC fragmentation.
Fragmentation @@ -1594,6 +1594,7 @@ RuleID vs. Rule ID Author (OGZ) RuleID as per RF8724, I replaced the occurance of Rule ID + We are using SCHC fragmentation as a concept and (Regular) SCHC Fragment (Header) as it descibes a type of message. --> From 59b84bd8452bf1724415723ea221a186153ce970 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 2 Apr 2021 21:04:27 +0200 Subject: [PATCH 43/50] Update address scan mitigation following Eric proposition --- rfc9011.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 8daab0b..2a79597 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -722,8 +722,12 @@ implementations MUST implement the following algorithm and - Address-scan risk is mitigated thanks to AES-128, which provides - enough entropy in the IID. + + Address-scan risk is mitigated thanks to the entropy added to + the IID by the inclusion of AppSKey. Using this algorithm will also ensure that there is no correlation between the hardware identifier (DevEUI) and the IID, so an attacker cannot use the manufacturer OUI to target devices. From 37f5c412aecd9cd83b12c9fd680c4832cd0a32b4 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 9 Apr 2021 18:17:04 +0200 Subject: [PATCH 44/50] Change "an SCHC" to "a SCHC" as per RFC8724 --- rfc9011.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 2a79597..4cba723 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -321,11 +321,11 @@ Author (OGZ) architecture for compression/decompression; it is based on the terminology from . The device is sending application flows using IPv6 or IPv6/UDP protocols. These flows might - be compressed by an SCHC C/D to reduce header size, and fragmented + be compressed by a SCHC C/D to reduce header size, and fragmented by the SCHC F/R. The resulting information is sent on a Layer 2 (L2) frame to an LPWAN Radio Gateway (RGW) that forwards the frame to a Network Gateway (NGW). The NGW sends - the data to an SCHC F/R for reassembly, if required, then to an SCHC C/D for + the data to a SCHC F/R for reassembly, if required, then to a SCHC C/D for decompression. The SCHC C/D shares the same rules with the device. The SCHC C/D and SCHC F/R can be located on the NGW or in another place as long as a communication is established between the NGW @@ -903,17 +903,17 @@ not to ack after each window. For battery powered devices, it is RECOMMENDED to use the ACK mechanism at the end of each window instead of waiting until the end of all windows:
    -
  • The SCHC receiver SHOULD send an SCHC ACK after every window even if there is no +
  • The SCHC receiver SHOULD send a SCHC ACK after every window even if there is no missing tile.
  • The SCHC sender SHOULD wait for the SCHC ACK from the SCHC receiver before sending tiles from the next window. If the SCHC ACK is not received, it SHOULD - send an SCHC ACK REQ up to MAX_ACK_REQUESTS times, as described + send a SCHC ACK REQ up to MAX_ACK_REQUESTS times, as described previously.
This will avoid useless uplinks if the device has lost network coverage. For non-battery powered devices, the SCHC receiver - MAY also choose to send an SCHC ACK only at the end + MAY also choose to send a SCHC ACK only at the end of all windows. This will reduce downlink load on the LoRaWAN network by reducing the number of downlinks. SCHC implementations MUST be compatible with both behaviors, and this selection is @@ -1341,7 +1341,7 @@ transmission of an uplink. Class C devices are almost in constant reception.
All-0 SCHC Fragment Uplink Fragmentation (Ack-on-Error): - All-0 is distinguishable from an SCHC ACK REQ, as All-0 is distinguishable from a SCHC ACK REQ, as states "This condition is also met if the SCHC Fragment Header is a multiple of L2 Words", the following condition being met: SCHC header is 2 bytes. @@ -1353,7 +1353,7 @@ transmission of an uplink. Class C devices are almost in constant reception.
All-1 SCHC Fragment - All-1 is distinguishable from an SCHC Sender-Abort, as All-1 is distinguishable from a SCHC Sender-Abort, as states "This condition is met if the RCS is present and is at least the size of an L2 Word", the following condition being met: RCS is 4 bytes. @@ -1611,7 +1611,7 @@ Author (OGZ) | 1 | 21 bits | 48 bytes and 1 bit | ]]> - The receiver answers with an SCHC ACK: + The receiver answers with a SCHC ACK:
Downlink Example: LoRaWAN Packet 2 - SCHC ACK
- The receiver answers with an SCHC ACK: + The receiver answers with a SCHC ACK:
Downlink Example: LoRaWAN Packet 4 - SCHC ACK
- The receiver answers to the sender with an SCHC ACK: + The receiver answers to the sender with a SCHC ACK:
Downlink Example: LoRaWAN Packet 6 - SCHC ACK Date: Fri, 9 Apr 2021 18:18:56 +0200 Subject: [PATCH 45/50] Add SCHC pronounciation --- rfc9011.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rfc9011.xml b/rfc9011.xml index 4cba723..f3694d5 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -259,6 +259,16 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. + + + +The SCHC acronym is pronounced like "sheek" in English (or "chic" in +French). Therefore, this document writes "a SCHC Packet" instead of +"an SCHC Packet". +
From 94cfb241dd8e04a060bea4d517209107e55096ce Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 9 Apr 2021 18:21:03 +0200 Subject: [PATCH 46/50] Fix two typos --- rfc9011.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index f3694d5..348a5bf 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -9,7 +9,7 @@ - Static Context Header Compression and Fragementation (SCHC) over LoRaWAN + Static Context Header Compression and Fragmentation (SCHC) over LoRaWAN Semtech @@ -27,7 +27,7 @@
1137A Avenue des Champs Blancs - Cesson-Sevigne Cedex + Cesson-Sévigné Cedex 35510 France From 2ac8a8a67687e5378389ddb36d135460c84a5ae7 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 9 Apr 2021 18:25:54 +0200 Subject: [PATCH 47/50] Changed LORA-XXX to LORAWAN-XXX references --- rfc9011.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 348a5bf..5463989 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -89,7 +89,7 @@ and modes of operation need to be set appropriately for each of the LPWAN technologies. This document describes the parameters and modes of operation when SCHC is used over LoRaWAN networks. The LoRaWAN protocol is specified by - the LoRa Alliance in . + the LoRa Alliance in .
Terminology @@ -378,11 +378,11 @@ Author (OGZ)
LoRaWAN Architecture - An overview of the LoRaWAN protocol and architecture An overview of the LoRaWAN protocol and architecture is described in . The mapping between the LPWAN architecture entities as described in and the ones in and the ones in is as follows:
  • Devices are LoRaWAN End Devices (e.g., sensors, actuators, etc.). There @@ -574,7 +574,7 @@ Class C devices are grid powered (for example, Smart Plugs). As SCHC defines its own acknowledgment mechanisms, SCHC does not require the use of LoRaWAN Confirmed frames (FType = 0b100 as per -). +).
LoRaWAN MAC Frames @@ -666,7 +666,7 @@ FPort for data downlink and its associated SCHC control uplinks, named "FPortDow in this document. All RuleIDs can use arbitrary values inside the FPort range allowed - by the LoRaWAN specification [LORA-SPEC] and MUST be shared by the + by the LoRaWAN specification [LORAWAN-SPEC] and MUST be shared by the device and SCHC gateway prior to the communication with the selected rule. The uplink and downlink fragmentation FPorts MUST be different. @@ -681,7 +681,7 @@ in this document. LoRaWAN supports up to 223 application FPorts in the range [1..223] as defined in Section 4.3.2 of ; it implies that the RuleID MSB + target="LORAWAN-SPEC" format="default"/>; it implies that the RuleID MSB SHOULD be inside this range. An application can send non-SCHC traffic by using FPort values different from the ones used for SCHC. @@ -1405,9 +1405,11 @@ LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network). - - - + + LoRaWAN 1.0.4 Specification Package From c47ff9524a5790b368c5d882c9459ca03fd6e1a5 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Fri, 9 Apr 2021 18:29:42 +0200 Subject: [PATCH 48/50] Fix MUST case --- rfc9011.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rfc9011.xml b/rfc9011.xml index 5463989..e3f13d1 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1357,7 +1357,7 @@ transmission of an uplink. Class C devices are almost in constant reception. following condition being met: SCHC header is 2 bytes. Downlink fragmentation (ACK-Always): As per , SCHC All-1 - MUST contain the last tile, and implementations must + MUST contain the last tile, and implementations MUST ensure that SCHC All-0 message Payload will be at least the size of an L2 Word.
From 5079747c3cda1de53f614150df1d6e6a6c67ae75 Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Wed, 14 Apr 2021 12:19:01 +0200 Subject: [PATCH 49/50] Commit version from RFC editors --- rfc9011.xml | 288 ++++++++++++---------------------------------------- 1 file changed, 67 insertions(+), 221 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index e3f13d1..5a61986 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -1,13 +1,9 @@ - - - - Static Context Header Compression and Fragmentation (SCHC) over LoRaWAN @@ -34,7 +30,7 @@ ivaylo@ackl.io - + lpwan Working Group header compression @@ -107,6 +103,11 @@ technologies. all other definitions, please look up the SCHC specification . + +
AppKey: @@ -121,13 +122,6 @@ each new session. It is used to encrypt the payload field of a LoRaWAN applicative frame. -
DevEUI: -
-
Device Extended Unique Identifier, an IEEE EUI-64 identifier used to -identify the device during the procedure while joining the network (Join -Procedure). It is assigned by the manufacturer or the device owner and -provisioned on the Network Gateway. -
DevAddr: @@ -146,40 +140,40 @@ provisioned on the Network Gateway.
-
Downlink:
A LoRaWAN term for a frame transmitted by the network and received by the device.
-
IID: -
-
Interface Identifier. -
EUI:
Extended Unique Identifier
+
FRMPayload: +
+
Application data in a LoRaWAN frame +
+ + +
IID: +
+
Interface Identifier +
+ +
LoRaWAN:
LoRaWAN is a wireless technology based on Industrial, Scientific, and @@ -189,26 +183,24 @@ consortium: .
-
FRMPayload: -
-
Application data in a LoRaWAN frame. -
MSB:
Most Significant Byte
-
OUI: +
NGW:
-
Organizationally Unique Identifier. IEEE-assigned prefix for EUI. +
Network Gateway
-
NGW: + +
OUI:
-
Network Gateway. +
Organizationally Unique Identifier. IEEE-assigned prefix for EUI.
+
RCS:
Reassembly Check Sequence. Used to verify the integrity of the fragmentation-reassembly process. @@ -216,7 +208,7 @@ brackets="angle" target="https://www.lora-alliance.org"/>.
RGW:
-
Radio Gateway. +
Radio Gateway
RX: @@ -229,14 +221,14 @@ brackets="angle" target="https://www.lora-alliance.org"/>.
LoRaWAN class A devices open two RX windows following an uplink, called "RX1" and "RX2".
-
SCHC C/D +
SCHC C/D:
-
SCHC Compression/Decompression. +
SCHC Compression/Decompression
-
SCHC F/R +
SCHC F/R:
-
SCHC Fragmentation/Reassembly. +
SCHC Fragmentation/Reassembly
SCHC gateway: @@ -259,17 +251,6 @@ sectionFormat="of" section="8.2.2.1" format="default"/>. - - - -The SCHC acronym is pronounced like "sheek" in English (or "chic" in -French). Therefore, this document writes "a SCHC Packet" instead of -"an SCHC Packet". - -
SCHC Overview @@ -277,14 +258,7 @@ French). Therefore, this document writes "a SCHC Packet" instead of description, refer to the full specification . It defines: -
  1. Compression mechanisms to avoid transporting information known by both sender and receiver over the air. Known information is part of the "context". This component is @@ -297,19 +271,6 @@ ask for AD approval - probably okay
    Architecture - - In a LoRaWAN network, the RGW is called a "Gateway", the NGW is a "Network Server", and the SCHC C/D and SCHC F/R are one or more "Application Servers". - + Application servers can be provided by the NGW or any third-party software. can be mapped in LoRaWAN terminology to: @@ -375,7 +335,7 @@ Author (OGZ) |<- - - - - LoRaWAN - - - ->| ]]>
    -
+
LoRaWAN Architecture An overview of the LoRaWAN protocol and architecture - -
Class C:
Class C devices implement all the functionalities of Class A devices but @@ -529,9 +453,9 @@ Class C devices are grid powered (for example, Smart Plugs).
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 Gateway over the air; this address might - not be unique in a LoRaWAN network. Devices using the same devAddr are + not be unique in a LoRaWAN network. Devices using the same DevAddr are distinguished by the Network Gateway based on the cryptographic signature appended to every LoRaWAN frame. To communicate with the SCHC gateway, the Network Gateway @@ -541,7 +465,7 @@ Class C devices are grid powered (for example, Smart Plugs). process by the device's manufacturer. It is built like an Ethernet MAC address by concatenating the manufacturer's IEEE OUI field with a vendor unique number. For example, a 24-bit OUI is concatenated with a 40-bit - serial number. The Network Gateway translates the devAddr into a + serial number. The Network Gateway translates the DevAddr into a DevEUI in the uplink direction and reciprocally on the downlink direction.
@@ -549,7 +473,7 @@ Class C devices are grid powered (for example, Smart Plugs). | Network | <====> | SCHC | <======> | Internet | -| | devAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | +| | DevAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | +--------+ +---------+ +---------+ +----------+ ]]>
@@ -666,10 +590,10 @@ FPort for data downlink and its associated SCHC control uplinks, named "FPortDow in this document.
All RuleIDs can use arbitrary values inside the FPort range allowed - by the LoRaWAN specification [LORAWAN-SPEC] and MUST be shared by the - device and SCHC gateway prior to the communication with the selected - rule. The uplink and downlink fragmentation FPorts - MUST be different. + by the LoRaWAN specification and + MUST be shared by the device and SCHC gateway prior to + the communication with the selected rule. The uplink and downlink + fragmentation FPorts MUST be different.
RuleID Management @@ -727,15 +651,12 @@ implementations MUST implement the following algorithm and The aes128_cmac algorithm is described in . It has been chosen as it is already used by devices for the LoRaWAN protocol. - + As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this mitigates privacy concerns, for example, location tracking or correlation over time. Join periodicity is defined at the application level. - + Address-scan risk is mitigated thanks to the entropy added to the IID by the inclusion of AppSKey. Using this algorithm will also ensure that there is no correlation @@ -755,11 +676,7 @@ Author (OGZ) ]]> - There is a small probability of IID collision in a LoRaWAN network. If this occurs, the IID can be changed by rekeying the device at the L2 level (i.e., triggering a LoRaWAN join). The way the device is @@ -783,12 +700,14 @@ Verify this either through email search or just ask AD again.
Fragmentation - The L2 Word Size used by LoRaWAN is 1 byte (8 bits). -The SCHC fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink -fragmentation and ACK-Always mode for downlink fragmentation. A LoRaWAN -device cannot support simultaneous interleaved fragmented datagrams in -the same direction (uplink or downlink). - The fragmentation parameters are different for uplink- and downlink-fragmented datagrams and are successively described in the next sections. + The L2 Word Size used by LoRaWAN is 1 byte (8 bits). The SCHC + fragmentation over LoRaWAN uses the ACK-on-Error mode for uplink + fragmentation and ACK-Always mode for downlink fragmentation. A + LoRaWAN device cannot support simultaneous interleaved fragmented + datagrams in the same direction (uplink or downlink). + The fragmentation parameters are different for uplink- and + downlink-fragmented datagrams and are successively described in the + next sections.
DTag @@ -1053,19 +972,7 @@ Bitmaps of 63 bits will require 6 bits of padding.
Multicast downlinks:
-
No-ACK; reliability has to be ensured by the upper layer. This feature is OPTIONAL for the SCHC gateway and REQUIRED for the device.
@@ -1145,25 +1052,6 @@ be changed by the application. format="default"/>. As this uplink is sent only to open an RX window, any LoRaWAN uplink frame from the device MAY reset this counter. - transmission those SCHC ACK messages if no SCHC downlink has been received during the RX1 and RX2 windows. The LoRaWAN layer will respect the applicable local spectrum regulation. - + SCHC All-1 (FCN = 1) @@ -1315,15 +1179,16 @@ OK the SCHC ACK REQ message.
Class B or Class C Devices - Class B devices can receive in scheduled RX slots or in RX slots following the -transmission of an uplink. Class C devices are almost in constant reception. + Class B devices can receive in scheduled RX slots or in RX + slots following the transmission of an uplink. Class C devices are + almost in constant reception. RECOMMENDED retransmission timer values are:
@@ -1357,9 +1222,9 @@ transmission of an uplink. Class C devices are almost in constant reception. following condition being met: SCHC header is 2 bytes. Downlink fragmentation (ACK-Always): As per , SCHC All-1 - MUST contain the last tile, and implementations MUST - ensure that SCHC All-0 message Payload will be at least the size of - an L2 Word. + MUST contain the last tile, and implementations + MUST ensure that SCHC All-0 message Payload will be + at least the size of an L2 Word.
All-1 SCHC Fragment @@ -1405,10 +1270,8 @@ LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network). - + + LoRaWAN 1.0.4 Specification Package @@ -1600,20 +1463,6 @@ RuleID, 21 bits residue + 127 bytes payload. - -
Downlink Example: First Tile Content @@ -1745,10 +1594,7 @@ Author (OGZ) marc.legourrierec@sagemcom.com - + Chirp Foundation
From 62f012ed1f376fbe7598478d7bce3fab5116b6ba Mon Sep 17 00:00:00 2001 From: Oliv4945 Date: Wed, 14 Apr 2021 12:21:19 +0200 Subject: [PATCH 50/50] Fix LORA- => LORAWAN- in editors document --- rfc9011.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rfc9011.xml b/rfc9011.xml index 5a61986..f84d6dd 100644 --- a/rfc9011.xml +++ b/rfc9011.xml @@ -558,7 +558,7 @@ LoRaWAN networks and applications to identify data. and IPv6 groupID are out of scope of this document. @@ -1288,7 +1288,7 @@ LoRaWAN session (i.e., each join or rejoin to the LoRaWAN network). - + LoRaWAN Remote Multicast Setup Specification v1.0.0