<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.3.24 --><!DOCTYPE rfc SYSTEM"rfc2629.dtd" [ ]> <?rfc symrefs="yes"?> <?rfc sortrefs="yes"?> <?rfc strict="yes"?> <?rfc compact="yes"?> <?rfc toc="yes"?>"rfc2629-xhtml.ent"> <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-lpwan-schc-over-lorawan-14"category="std">number="9011" obsoletes="" updates="" submissionType="IETF" category="std" consensus="true" xml:lang="en" symRefs="true" sortRefs="true" tocInclude="true" version="3"> <front> <titleabbrev="SCHC-over-LoRaWAN">Staticabbrev="SCHC over LoRaWAN">Static Context Header Compression and Fragmentation (SCHC) over LoRaWAN</title> <seriesInfo name="RFC" value="9011"/> <author initials="O." surname="Gimenez" fullname="Olivier Gimenez" role="editor"> <organization>Semtech</organization> <address> <postal> <street>14 Chemin des Clos</street> <city>Meylan</city> <country>France</country> </postal> <email>ogimenez@semtech.com</email> </address> </author> <author initials="I." surname="Petrov" fullname="Ivaylo Petrov" role="editor"> <organization>Acklio</organization> <address> <postal> <street>1137A Avenue des Champs Blancs</street><city>35510 Cesson-Sevigne<city>Cesson-Sévigné Cedex</city> <code>35510</code> <country>France</country> </postal> <email>ivaylo@ackl.io</email> </address> </author> <date year="2021"month="February" day="01"/>month="April"/> <workgroup>lpwan Working Group</workgroup> <keyword>header compression</keyword> <keyword>compression</keyword> <keyword>fragmentation</keyword> <keyword>static context</keyword> <keyword>rule-based</keyword> <keyword>LPWAN</keyword> <keyword>LPWANs</keyword> <keyword>low power</keyword> <keyword>low-power</keyword> <keyword>LoRa</keyword> <keyword>LoRaWAN</keyword> <keyword>IoT</keyword> <keyword>Internet of Things</keyword> <keyword>adaptation layer</keyword> <keyword>UDP</keyword> <keyword>IPv6</keyword> <keyword>sensor network</keyword> <keyword>wireless sensor network</keyword> <keyword>802.15.4</keyword> <keyword>constrained network</keyword> <keyword>constrained node</keyword> <keyword>constrained-node network</keyword> <keyword>SCHC</keyword> <abstract> <t>The Static Context Header Compression and fragmentation (SCHC) specification (RFC 8724) describes generic header compression and fragmentation techniques forLow PowerLow-Power Wide AreaNetworksNetwork (LPWAN) technologies. SCHC is a generic mechanism designed for great flexibility so that it can be adapted for any of the LPWAN technologies.</t> <t>This document specifies a profile ofRFC8724RFC 8724 to use SCHC inLoRaWAN® networks,LoRaWAN networks and provides elements such as efficient parameterization and modes of operation.</t> </abstract> </front> <middle> <section anchor="Introduction"title="Introduction"> <t>SCHCnumbered="true" toc="default"> <name>Introduction</name> <t>The SCHC specification <xreftarget="RFC8724"></xref>target="RFC8724" format="default"/> describes generic header compression and fragmentation techniques that can be used on allLow PowerLow-Power Wide AreaNetworksNetwork (LPWAN) technologies defined in <xreftarget="RFC8376"/>.target="RFC8376" format="default"/>. Even though those technologies share a great number of common features like star-oriented topologies, network architecture, devices with communications that are mostly quitepredictable communications, etc;predictable, etc., they do have some slight differences with respect to payload sizes, reactiveness, etc.</t> <t>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.</t> <t>This document describes the parameters and modes of operation when SCHC is used over LoRaWAN networks. The LoRaWAN protocol is specified by the LoRaAlliance®Alliance in <xreftarget="lora-alliance-spec"/></t>target="LORAWAN-SPEC" format="default"/>.</t> </section> <section anchor="terminology"title="Terminology">numbered="true" toc="default"> <name>Terminology</name> <t>The key words“MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”,"<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and“OPTIONAL”"<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described inBCP 14BCP 14 <xreftarget="RFC2119"/>target="RFC2119" format="default"/> <xreftarget="RFC8174"/>target="RFC8174" format="default"/> when, and only when, they appear in all capitals, as shown here.</t> <t>This section defines the terminology andacronymsabbreviations used in this document. For all other definitions, please look up the SCHC specification <xreftarget="RFC8724"></xref>.</t> <t><list style="symbols"> <t>DevEUI: Devicetarget="RFC8724" format="default"/>.</t> <aside><t> Note: 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". </t></aside> <dl> <dt>AppKey: </dt> <dd>Application Key. An AES-128 root key specific to each device. </dd> <dt>AppSKey: </dt> <dd>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. </dd> <dt>DevAddr: </dt> <dd><t>A 32-bit non-unique identifier assigned to a device either:</t> <dl> <dt>Statically: </dt> <dd>by the device manufacturer in "Activation-by-Personalization" mode, or </dd> <dt>Dynamically: </dt> <dd>after a LoRaWAN "Join Procedure" by the Network Gateway in "Over-the-Air-Activation" mode. </dd> </dl> </dd> <dt>DevEUI: </dt> <dd>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 NetworkGateway.</t> <t>DevAddr: a 32-bit non-unique identifier assigned to a device either: <list style="symbols"> <t>Statically: by the device manufacturer in <spanx style="emph">Activation by Personalization</spanx> mode.</t> <t>Dynamically: after a Join Procedure by the Network Gateway in <spanx style="emph">Over The Air Activation</spanx> mode.</t> </list></t> <t>Downlink:Gateway. </dd> <dt>Downlink: </dt> <dd>A LoRaWAN term for a frame transmitted by the network and received by thedevice.</t> <t>EUI: Extendeddevice. </dd> <dt>EUI: </dt> <dd>Extended UniqueIdentifier</t> <t>LoRaWAN:Identifier </dd> <dt>FRMPayload: </dt> <dd>Application data in a LoRaWAN frame </dd> <dt>IID: </dt> <dd>Interface Identifier </dd> <dt>LoRaWAN: </dt> <dd>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: <ereftarget="https://www.lora-alliance.org">https://www.lora-alliance.org</eref>.</t> <t>FRMPayload: Application data in a LoRaWAN frame.</t> <t>MSB: Mostbrackets="angle" target="https://www.lora-alliance.org"/>. </dd> <dt>MSB: </dt> <dd>Most SignificantByte</t> <t>OUI: OrganisationByte </dd> <dt>NGW: </dt> <dd>Network Gateway </dd> <dt>OUI: </dt> <dd>Organizationally Unique Identifier.IEEE assignedIEEE-assigned prefix forEUI.</t> <t>RCS: ReassemblyEUI. </dd> <dt>RCS: </dt> <dd>Reassembly Check Sequence. Used to verify the integrity of the fragmentation-reassemblyprocess.</t> <t>RX: Device’sprocess. </dd> <dt>RGW: </dt> <dd>Radio Gateway </dd> <dt>RX: </dt> <dd>A device's receptionwindow.</t> <t>RX1/RX2: LoRaWANwindow. </dd> <dt>RX1/RX2: </dt> <dd>LoRaWAN class A devices open two RX windows following an uplink, calledRX1"RX1" andRX2.</t> <t>SCHC"RX2". </dd> <dt>SCHC C/D: </dt> <dd>SCHC Compression/Decompression </dd> <dt>SCHC F/R: </dt> <dd>SCHC Fragmentation/Reassembly </dd> <dt>SCHC gateway:The</dt> <dd>The LoRaWAN Application Server that manages translation between an IPv6 network and the Network Gateway (LoRaWAN NetworkServer).</t> <t>Tile: PieceServer). </dd> <dt>Tile: </dt> <dd>A piece of a fragmented packet as described in <xreftarget="RFC8724"></xref> section 8.2.2.1</t> <t>Uplink: LoRaWANtarget="RFC8724" sectionFormat="of" section="8.2.2.1" format="default"/>. </dd> <dt>Uplink: </dt> <dd>LoRaWAN term for a frame transmitted by the device and received by thenetwork.</t> </list></t>network. </dd> </dl> </section> <section anchor="static-context-header-compression-overview"title="Static Context Header Compression Overview">numbered="true" toc="default"> <name>SCHC Overview</name> <t>This section contains a short overview of SCHC. For a detailed description, refer to the full specification <xreftarget="RFC8724"></xref>.</t>target="RFC8724" format="default"/>.</t> <t>It defines:</t><t><list style="numbers"> <t>Compression<ol spacing="normal" type="1"><li>Compression mechanisms to avoid transporting information known by both sender and receiver over the air. Known information is part of the“context”."context". This component is calledSCHC Compressor/Decompressorthe "SCHC Compression/Decompression" (SCHCC/D).</t> <t>FragmentationC/D).</li> <li>Fragmentation mechanisms to allow SCHC Packet transportation on a small, and potentially variable, MTU. This component is calledSCHC Fragmentation/Reassemblythe "SCHC Fragmentation/Reassembly" (SCHCF/R).</t> </list></t>F/R).</li> </ol> <t>Context exchange or pre-provisioning is out of scope of this document.</t> <figuretitle="Architecture" anchor="Fig-archi"><artwork><![CDATA[anchor="Fig-archi"> <name>Architecture</name> <artwork name="" type="" align="left" alt=""><![CDATA[ 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 - - ->|]]></artwork></figure>]]></artwork> </figure> <t><xreftarget="Fig-archi"/>target="Fig-archi" format="default"/> represents the architecture forcompression/decompression,compression/decompression; it is based on the terminology from <xreftarget="RFC8376"/> terminology.target="RFC8376" format="default"/>. The device is sendingapplicationsapplication flows using IPv6 or IPv6/UDP protocols. These flows might be compressed by aStatic Context Header Compression Compressor/Decompressor (SCHC C/D)SCHC C/D to reduceheaders sizeheader size, and fragmented by the SCHCFragmentation/Reassembly (SCHC F/R).F/R. The resulting information is sent on alayer twoLayer 2 (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 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 theNetwork Gateway (NGW)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 gatewayMUST<bcp14>MUST</bcp14> share the same set of rules. After decompression, the packet can be sent on the Internet to one or several LPWAN Application Servers (App).</t> <t>The SCHC C/D and SCHC F/R process is bidirectional, so the same principles can be applied to the other direction.</t> <t>In a LoRaWAN network, the RGW is called aGateway,"Gateway", the NGW isNetwork Server,a "Network Server", and the SCHC C/D and SCHC F/R areanone or more "Application Servers". ApplicationServer. Itservers can be provided by theNetwork GatewayNGW or anythird partythird-party software. <xreftarget="Fig-archi"/>target="Fig-archi" format="default"/> can be mapped in LoRaWAN terminology to:</t> <figuretitle="SCHCanchor="Fig-archi-lorawan"> <name>SCHC ArchitecturemappedMapped toLoRaWAN" anchor="Fig-archi-lorawan"><artwork><![CDATA[LoRaWAN</name> <artwork name="" type="" align="left" alt=""><![CDATA[ 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 - - - ->|]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="lorawan-architecture"title="LoRaWAN Architecture">numbered="true" toc="default"> <name>LoRaWAN Architecture</name> <t>An overview of the LoRaWAN<xref target="lora-alliance-spec"/>protocol and architecture <xref target="LORAWAN-SPEC" format="default"/> is described in <xreftarget="RFC8376"/>.target="RFC8376" format="default"/>. The mapping between the LPWAN architecture entities as described in <xreftarget="RFC8724"></xref>target="RFC8724" format="default"/> and the ones in <xreftarget="lora-alliance-spec"/>target="LORAWAN-SPEC" format="default"/> is as follows:</t><t>o Devices<ul> <li>Devices are LoRaWAN End Devices(e.g.(e.g., sensors, actuators, etc.). There can be a very high density of devices per radio gateway (LoRaWAN gateway). This entity maps to the LoRaWANend-device.</t> <t>o The Radio Gateway (RGW), whichend device. </li> <li>The RGW is the endpoint of the constrained link. This entity maps to the LoRaWANGateway.</t> <t>o The Network Gateway (NGW)Gateway. </li> <li>The NGW is the interconnection node between the Radio Gateway and the SCHC gateway (LoRaWAN Applicationserver).Server). This entity maps to the LoRaWAN NetworkServer.</t> <t>oServer. </li> <li>The SCHC C/D and SCHC F/R are handled byLoRaWAN Application Server; iethe LoRaWANapplication server will do the SCHC C/D and F/R.</t> <t>o TheApplication Server. </li> <li>The LPWAN-AAA Server is the LoRaWAN Join Server. Its role is to manage and deliver security keys in a secureway,way so that the devices root key is neverexposed.</t>exposed. </li> </ul> <figuretitle="LPWAN Architecture" anchor="Fig-LPWANarchi"><artwork><![CDATA[anchor="Fig-LPWANarchi"> <name>LPWAN Architecture</name> <artwork name="" type="" align="left" alt=""><![CDATA[ (LPWAN-AAA Server) () () () | +------+ () () () () / \ +---------+ | Join | () () () () () / \======| ^ |===|Server| +-----------+ () () () | | <--|--> | +------+ |Application| () () () () / \==========| v |=============| Server | () () () / \ +---------+ +-----------+End-devicesEnd devices Gateways Network Server (SCHC C/D and F/R) (devices) (RGW) (NGW)]]></artwork></figure> <t><spanx style="emph">Note</spanx>:]]></artwork> </figure> <aside> <t>Note: <xreftarget="Fig-LPWANarchi"/>target="Fig-LPWANarchi" format="default"/> terms are from LoRaWAN, with <xreftarget="RFC8376"/>target="RFC8376" format="default"/> terminology inbrackets.</t> <t>SCHC Compressor/Decompressor (SCHC C/D)brackets.</t></aside> <t>The SCHC C/D and SCHCFragmentation/Reassembly (SCHC F/R)F/R are performed on the LoRaWANend-deviceend 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 ultimateend-pointendpoint of the IP communication may be an Internet node beyond the Application Server. In other words, the LoRaWAN Application Server (SCHC gateway) acts as thefirst hopfirst-hop IP router for the device. The Application Server and Network Server may be co-located, which effectively turns the Network/Application Server into thefirst hopfirst-hop IP router.</t> <section anchor="device-classes-a-b-c-and-interactions"title="Device classesnumbered="true" toc="default"> <name>Device Classes (A, B, C) andinteractions">Interactions</name> <t>The LoRaWANMACMedium Access Control (MAC) layer supports3three classes of devices named A,BB, and C. All devices implementtheClass A, and some devices may implement Class B or Class C. Class B and Class C are mutually exclusive.</t><t><list style="symbols"> <t>Class<dl> <dt>Class A:The Class</dt> <dd>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 the2two receive windows immediately following the uplinks. Therefore, the Network Gateway cannot initiate adownlink,downlink; it has to wait for the next uplink from the device to get a downlink opportunity.TheClass A is the lowest power consumptionclass.</t> <t>Classclass. </dd> <dt>Class B:Class</dt> <dd><t>Class B devices implement all the functionalities of Class Adevices,devices but also schedule periodic listen windows. Therefore, as opposed totheClass 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</t> <dl> <dt>High periodicity:</dt> <dd>Downlinks from the NGW will be sentfaster,faster but the device wakes up moreoften: itoften and power consumption is increased.</dd> <dt>Low periodicity:</dt> <dd>Downlinks from the NGW will have higher latency but lower powerconsumption.</t> <t>Classconsumption.</dd> </dl> </dd> <dt>Class C:Class</dt> <dd>Class C devices implement all the functionalities of Class Adevices,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 (forexampleexample, for a firmware upgrade over-the-air). Most of the Class C devices are grid powered (forexampleexample, SmartPlugs).</t> </list></t>Plugs). </dd> </dl> </section> <section anchor="device-addressing"title="Device addressing">numbered="true" toc="default"> <name>Device Addressing</name> <t>LoRaWANend-devicesend devices use a 32-bit network address(devAddr)(DevAddr) to communicate with the Network Gatewayover-the-air,over the air; this address might not be unique in a LoRaWAN network. Devices using the samedevAddrDevAddr are distinguished by the Network Gateway based on the cryptographic signature appended to every LoRaWAN frame.</t> <t>To communicate with the SCHC gateway, the Network GatewayMUST<bcp14>MUST</bcp14> identify the devices by a unique 64-bit device identifier called theDevEUI.</t>"DevEUI".</t> <t>The DevEUI is assigned to the device during the manufacturing process by thedevice’sdevice's manufacturer. It is built like an Ethernet MAC address by concatenating themanufacturer’smanufacturer's IEEE OUI field with a vendor unique number.e.g.:For example, a 24-bit OUI is concatenated with a 40-bit serial number. The Network Gateway translates thedevAddrDevAddr into a DevEUI in the uplink direction and reciprocally on the downlink direction.</t> <figuretitle="LoRaWAN addresses" anchor="Fig-LoRaWANaddresses"><artwork><![CDATA[anchor="Fig-LoRaWANaddresses"> <name>LoRaWAN Addresses</name> <artwork name="" type="" align="left" alt=""><![CDATA[ +--------+ +---------+ +---------+ +----------+ | Device | <=====> | Network | <====> | SCHC | <======> | Internet | | |devAddrDevAddr | Gateway | DevEUI | Gateway | IPv6/UDP | | +--------+ +---------+ +---------+ +----------+]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="general-frame-types"title="Generalnumbered="true" toc="default"> <name>General FrameTypes">Types</name> <t>LoRaWAN implements the possibility to send confirmed or unconfirmed frames:</t><t><list style="symbols"> <t>Confirmed<dl> <dt>Confirmed frame:The</dt> <dd>The sender asks the receiver to acknowledge theframe.</t> <t>Unconfirmedframe. </dd> <dt>Unconfirmed frame:The</dt> <dd>The sender does not ask the receiver to acknowledge theframe.</t> </list></t>frame. </dd> </dl> <t>As SCHC defines its own acknowledgment mechanisms, SCHC does not require the use of LoRaWAN Confirmed frames(MType=0b100(FType = 0b100 as per <xreftarget="lora-alliance-spec"/>)</t>target="LORAWAN-SPEC" format="default"/>).</t> </section> <section anchor="lorawan-mac-frames"title="LoRaWANnumbered="true" toc="default"> <name>LoRaWAN MACFrames">Frames</name> <t>In addition to regular data frames, LoRaWAN implements JoinRequest and JoinAccept frame types, which are used by a device to join a network:</t><t><list style="symbols"> <t>JoinRequest: This<dl> <dt>JoinRequest: </dt> <dd>This frame is used by a device to join a network. It contains thedevice’sdevice's unique identifier DevEUI and a random nonce that will be used for session keyderivation.</t> <t>JoinAccept: To on-boardderivation. </dd> <dt>JoinAccept: </dt> <dd>To onboard a device, the Network Gateway responds to the JoinRequest issued by a device with a JoinAccept frame. That frame is encrypted with thedevice’sdevice's AppKey and contains(amongst(among other fields) thenetwork’snetwork's major settings and a random nonce used to derive the sessionkeys.</t> <t>Data:keys. </dd> <dt>Data: </dt> <dd>This refers to MAC and application data. Application dataareis protected with AES-128 encryption.MAC relatedMAC-related dataareis AES-128 encrypted with anotherkey.</t> </list></t>key. </dd> </dl> </section> <section anchor="lorawan-fport"title="LoRaWAN FPort">numbered="true" toc="default"> <name>LoRaWAN FPort</name> <t>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.</t> </section> <section anchor="lorawan-empty-frame"title="LoRaWAN empty frame">numbered="true" toc="default"> <name>LoRaWAN Empty Frame</name> <t>A LoRaWAN empty frame is a LoRaWAN frame without FPort(cf(cf. <xreftarget="lorawan-schc-payload"/>)target="lorawan-schc-payload" format="default"/>) and FRMPayload.</t> </section> <section anchor="unicast-and-multicast-technology"title="Unicastnumbered="true" toc="default"> <name>Unicast andmulticast technology">Multicast Technology</name> <t>LoRaWAN technology supports unicastdownlinks,downlinks but alsomulticast:multicast; a multicast packet sent over a LoRaWAN radio link can be received by several devices. It is useful to address many devices with the samecontent,content: either a large binary file (firmwareupgrade),upgrade) or the same command(e.g:(e.g., lighting control). As IPv6 is also a multicasttechnologytechnology, this feature can be used to address a group of devices.</t><t><spanx style="emph">Note 1</spanx>:<aside> <t>Note 1: IPv6 multicast addresses must be defined as per <xreftarget="RFC4291"></xref>.target="RFC4291" format="default"/>. The LoRaWAN multicast group definition in a Network Gateway and the relation between those groups and IPv6 groupID are out of scope of this document.</t><t><spanx style="emph">Note 2</spanx>:</aside> <aside> <t>Note 2: The LoRa Alliance defined <xreftarget="lora-alliance-remote-multicast-set"/>target="LORAWAN-REMOTE-MULTICAST-SET" format="default"/> as theRECOMMENDED<bcp14>RECOMMENDED</bcp14> way tosetupset up multicast groups on devices and create a synchronized reception window.</t> </aside> </section> </section> <section anchor="schc-over-lorawan"title="SCHC-over-LoRaWAN">numbered="true" toc="default"> <name>SCHC over LoRaWAN</name> <section anchor="lorawan-schc-payload"title="LoRaWANnumbered="true" toc="default"> <name>LoRaWAN FPort andRuleID">RuleID</name> <t>The FPort field is part of the SCHC Message, as shown in <xreftarget="Fig-lorawan-schc-payload"/>.target="Fig-lorawan-schc-payload" format="default"/>. The SCHC C/D and the SCHC F/RSHALL<bcp14>SHALL</bcp14> concatenate the FPort field with the LoRaWAN payload to recompose the SCHC Message.</t> <figuretitle="SCHCanchor="Fig-lorawan-schc-payload"> <name>SCHC Message inLoRaWAN" anchor="Fig-lorawan-schc-payload"><artwork><![CDATA[LoRaWAN</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------------------------ + | SCHC Message |]]></artwork></figure> <t>Note:]]></artwork> </figure> <aside><t>Note: The SCHC Message is any datagram sent by the SCHC C/D or F/Rlayers.</t>layers.</t></aside> <t>A fragmented datagram with application payload transferred from device to NetworkGateway,Gateway is called anuplink fragmented datagram."uplink-fragmented datagram". It uses an FPort for data uplink and its associated SCHC control downlinks, namedFPortUp"FPortUp" in this document. The other way, a fragmented datagram with application payload transferred from Network Gateway todevice,device is calleddownlink fragmented datagram.a "downlink-fragmented datagram". It uses another FPort for data downlink and its associated SCHC control uplinks, namedFPortDown"FPortDown" in this document.</t> <t>AllRuleIDRuleIDs can use arbitrary values inside the FPort range allowed by the LoRaWAN specification <xref target="LORAWAN-SPEC"/> andMUST<bcp14>MUST</bcp14> be shared by the device and SCHC gateway prior to the communication with the selected rule. The uplink and downlink fragmentation FPortsMUST<bcp14>MUST</bcp14> be different.</t> </section> <section anchor="rule-id-management"title="Rule ID management"> <t>RuleID MUSTnumbered="true" toc="default"> <name>RuleID Management</name> <t>The RuleID <bcp14>MUST</bcp14> be 8bits,bits and encoded in the LoRaWAN FPort as described in <xreftarget="lorawan-schc-payload"/>.target="lorawan-schc-payload" format="default"/>. LoRaWAN supports up to 223 application FPorts in the range[1;223][1..223] as defined insectionSection 4.3.2 of <xreftarget="lora-alliance-spec"/>,target="LORAWAN-SPEC" format="default"/>; it implies that the RuleID MSBSHOULD<bcp14>SHOULD</bcp14> be inside this range. An application can sendnon SCHCnon-SCHC traffic by using FPort values different from the ones used for SCHC.</t> <t>In order to improve interoperability,RECOMMENDED<bcp14>RECOMMENDED</bcp14> fragmentation RuleID values are:</t><t><list style="symbols"> <t>RuleID<ul spacing="normal"> <li>RuleID = 20 (8-bit) for uplink fragmentation, namedFPortUp.</t> <t>RuleIDFPortUp.</li> <li>RuleID = 21 (8-bit) for downlink fragmentation, namedFPortDown.</t> <t>RuleIDFPortDown.</li> <li>RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching compression Rule was found), as described in <xreftarget="RFC8724"/> section 6.</t> </list></t> <t>FPortUptarget="RFC8724" sectionFormat="of" section="6" format="default"/>.</li> </ul> <t>The FPortUp valueMUST<bcp14>MUST</bcp14> be different fromFPortDown.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 notused,used; thus, on reception, the SCHC MessageMUST<bcp14>MUST</bcp14> be sent to the SCHC C/D layer.</t> <t>The only uplink frames using the FPortDown port are the fragmentation SCHC control messages of adownlink fragmenteddownlink-fragmented datagram (for example, SCHC ACKs). Similarly, the only downlink frames using the FPortUp port are the fragmentation SCHC control messages of anuplink fragmenteduplink-fragmented datagram.</t> <t>An application can have multiple fragmented datagrams between a device and one or several SCHC gateways. A set of FPort values isREQUIRED<bcp14>REQUIRED</bcp14> for each SCHC gateway instance the device is required to communicate with. The application can use additional uplinks ordownlink fragmenteddownlink-fragmented parameters butSHALL<bcp14>SHALL</bcp14> implement at least the parameters defined in this document.</t> <t>The mechanism for context distribution across devices and gateways is outside the scope of this document.</t> </section> <section anchor="IID"title="Interfacenumbered="true" toc="default"> <name>Interface IDentifier (IID)computation">Computation</name> <t>In order to mitigate the risks described in <xreftarget="RFC8064"></xref>target="RFC8064" format="default"/> and <xreftarget="RFC8065"></xref>, implementation MUSTtarget="RFC8065" format="default"/>, implementations <bcp14>MUST</bcp14> implement the following algorithm andSHOULD<bcp14>SHOULD</bcp14> use it.</t><t><list style="numbers"> <t>key<ol spacing="normal" type="1"><li>key = LoRaWANAppSKey</t> <t>cmacAppSKey</li> <li>cmac = aes128_cmac(key,DevEUI)</t> <t>IIDDevEUI)</li> <li>IID =cmac[0..7]</t> </list></t> <t>aes128_cmaccmac[0..7]</li> </ol> <t>The aes128_cmac algorithm is described in <xreftarget="RFC4493"></xref>.target="RFC4493" format="default"/>. It has been chosen as it is already used by devices for the LoRaWAN protocol.</t> <t>As AppSKey is renewed each time a device joins or rejoins a LoRaWAN network, the IID will change over time; this mitigatesprivacy,privacy concerns, for example, location trackingandor correlation overtime risks.time. Join periodicity is defined at the application level.</t><t>Address scan<t>Address-scan risk is mitigated thanks toAES-128, which provides enoughthe entropybits ofadded to the IID by theIID.</t>inclusion of AppSKey.</t> <t>Using this algorithm will also ensure that there is no correlation between the hardware identifier(IEEE-64 DevEUI)(DevEUI) and the IID, so an attacker cannot use the manufacturer OUI to target devices.</t> <t>Example with:</t><t><list style="symbols"> <t>DevEUI: 0x1122334455667788</t> <t>appSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB</t> </list></t><ul spacing="normal"> <li>DevEUI: 0x1122334455667788</li> <li>AppSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB</li> </ul> <figuretitle="Exampleanchor="Fig-iid-computation-example"> <name>Example of IIDcomputation." anchor="Fig-iid-computation-example"><artwork><![CDATA[Computation</name> <sourcecode><![CDATA[ 1. key: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB 2. cmac:0xBA59F4B196C6C3432D9383C145AD412A0x4E822D9775B2649928F82066AF804FEC 3. IID:0xBA59F4B196C6C343 ]]></artwork></figure>0x4E822D9775B26499 ]]></sourcecode> </figure> <t>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(ie: trigger(i.e., triggering a LoRaWAN join). The way the device is rekeyed is out of scope of this document and left to the implementation.</t><t>Note: Implementation<aside><t>Note: Implementations also using another IID sourceMUST<bcp14>MUST</bcp14> ensure that the same IID is shared between the device and the SCHC gateway in the compression and decompression of the IPv6 address of thedevice.</t>device.</t></aside> </section> <section anchor="padding"title="Padding">numbered="true" toc="default"> <name>Padding</name> <t>All padding bitsMUST<bcp14>MUST</bcp14> be 0.</t> </section> <section anchor="Decomp"title="Decompression"> <t>SCHCnumbered="true" toc="default"> <name>Decompression</name> <t>The SCHC C/DMUST<bcp14>MUST</bcp14> concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet as per <xreftarget="lorawan-schc-payload"/>.</t>target="lorawan-schc-payload" format="default"/>.</t> <t>RuleIDs matching FPortUp and FPortDown are reserved for SCHCFragmentation.</t>fragmentation.</t> </section> <section anchor="Frag"title="Fragmentation">numbered="true" toc="default"> <name>Fragmentation</name> <t>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 andAck-AlwaysACK-Always mode for downlink fragmentation. A LoRaWAN device cannot support simultaneous interleaved fragmented datagrams in the same direction (uplink or downlink).</t> <t>The fragmentation parameters are different foruplinkuplink- anddownlink fragmenteddownlink-fragmented datagrams and are successively described in the next sections.</t> <section anchor="DTag"title="DTag">numbered="true" toc="default"> <name>DTag</name> <t><xreftarget="RFC8724"></xref> section 8.2.4target="RFC8724" sectionFormat="of" section="8.2.4" format="default"/> describes the possibility to interleave several fragmented SCHC datagrams for the same RuleID. This is not used inSCHC over LoRaWANthe SCHC-over-LoRaWAN profile. A device cannot interleave several fragmented SCHC datagrams on the same FPort. This field is notusedused, and its size is 0.</t> <aside> <t>Note: The device can still have several parallel fragmented datagrams with more than one SCHC gateway thanks to distinct sets of FPorts,cfcf. <xreftarget="rule-id-management"/>.</t>target="rule-id-management" format="default"/>.</t></aside> </section> <section anchor="uplink-fragmentation-from-device-to-schc-gateway"title="Uplink fragmentation:numbered="true" toc="default"> <name>Uplink Fragmentation: FromdeviceDevice to SCHCgateway">Gateway</name> <t>In this case, the device is the fragmenttransmitter,transmitter and the SCHC gateway is the fragment receiver. A single fragmentation rule is defined. The SCHC F/RMUST<bcp14>MUST</bcp14> concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet, as per <xreftarget="lorawan-schc-payload"/>.</t> <t><list style="symbols"> <t>SCHCtarget="lorawan-schc-payload" format="default"/>.</t> <dl> <dt>SCHC fragmentation reliability mode:<spanx style="verb">ACK-on-Error</spanx>.</t> <t>SCHC</dt> <dd><tt>ACK-on-Error</tt>. </dd> <dt>SCHC headersize is twosize: </dt> <dd>2 bytes (the FPort byte + 1 additionalbyte).</t> <t>RuleID: 8byte). </dd> <dt>RuleID: </dt> <dd>8 bits stored in the LoRaWANFPort. cfFPort (cf. <xreftarget="rule-id-management"/></t> <t>DTag: Size T=0 bit,target="rule-id-management" format="default"/>). </dd> <dt>DTag: </dt> <dd>Size T = 0 bits, notused. cfused (cf. <xreftarget="DTag"/></t> <t>Windowtarget="DTag" format="default"/>). </dd> <dt>Window index:4</dt> <dd>4 windows are used, encoded on M = 2bits</t> <t>FCN: Thebits. </dd> <dt>FCN: </dt> <dd>The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 tiles are allowed in awindow.</t> <t>Lastwindow. </dd> <dt>Last tile:it</dt> <dd><t>It can be carried in a Regular SCHC Fragment, alone in an All-1 SCHCFragmentFragment, or with any of these two methods.ImplementationImplementations must ensurethat: <list style="symbols"> <t>Thethat:</t> <ul> <li>The senderMUST<bcp14>MUST</bcp14> ascertain that the receiver will not receive the last tile through both a Regular SCHC Fragment and an All-1 SCHC Fragment during the samesession.</t> <t>Ifsession. </li> <li>If the last tile is in an All-1 SCHCmessage:Message, the current L2 MTUMUST<bcp14>MUST</bcp14> be big enough to fit the All-1 header and the lasttile.</t> </list></t> <t>Penultimate tile MUSTtile. </li> </ul> </dd> <dt>Penultimate tile: </dt> <dd><bcp14>MUST</bcp14> be equal to the regularsize.</t> <t>RCS: Usesize. </dd> <dt>RCS: </dt> <dd>Use the recommended calculation algorithm in <xreftarget="RFC8724"></xref> (§8.2.3.target="RFC8724" sectionFormat="of" section="8.2.3"/>, IntegrityChecking).</t> <t>Tile: sizeChecking. </dd> <dt>Tile: </dt> <dd>Size is 10bytes.</t> <t>Retransmissionbytes. </dd> <dt>Retransmission timer:Set</dt> <dd>Set by the implementation depending on the application requirements. The defaultRECOMMENDED<bcp14>RECOMMENDED</bcp14> duration of this timer is 12 hours; this value is mainly driven by application requirements andMAY<bcp14>MAY</bcp14> be changed by theapplication.</t> <t>Inactivityapplication. </dd> <dt>Inactivity timer:The</dt> <dd>The SCHC gateway implements an“inactivity timer”."inactivity timer". The defaultRECOMMENDED<bcp14>RECOMMENDED</bcp14> duration of this timer is 12 hours; this value is mainly driven by application requirements andMAY<bcp14>MAY</bcp14> be changed by theapplication.</t> <t>MAX_ACK_REQUESTS:application. </dd> <dt>MAX_ACK_REQUESTS: </dt> <dd> 8. With this set of parameters, the SCHCfragment headerFragment Header is 16 bits, including FPort; payload overhead will be 8 bits as FPort is already a part of LoRaWAN payload. MTU is:<spanx style="emph">44 windows * 63 tiles * 10 bytes per tile = 2520bytes</spanx></t> </list></t>bytes. </dd> </dl> <t>In addition to the per-rule context parameters specified in <xreftarget="RFC8724"></xref>,target="RFC8724" format="default"/>, for uplink rules, an additional context parameter is added: whether or not to ack after eachwindow.<vspace />window. For battery powered devices, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> to use the ACK mechanism at the end of each window instead of waiting until the end of all windows:</t><t><list style="symbols"> <t>The<ul spacing="normal"> <li>The SCHC receiverSHOULD<bcp14>SHOULD</bcp14> send a SCHC ACK after every window even if there is no missingtile.</t> <t>Thetile.</li> <li>The SCHC senderSHOULD<bcp14>SHOULD</bcp14> wait for the SCHC ACK from the SCHC receiver before sending tiles from the next window. If the SCHC ACK is not received, itSHOULD<bcp14>SHOULD</bcp14> send a SCHC ACK REQ up to MAX_ACK_REQUESTS times, as describedpreviously.</t> </list></t>previously.</li> </ul> <t>This will avoid useless uplinks if the device has lost network coverage.</t> <t>For non-battery powered devices, the SCHC receiverMAY<bcp14>MAY</bcp14> also choose to send a SCHC ACK only at the end of all windows. This will reduce downlink load on the LoRaWANnetwork,network by reducing the number of downlinks.</t> <t>SCHC implementationsMUST<bcp14>MUST</bcp14> be compatible with both behaviors, and this selection is part of the rule context.</t> <section anchor="regular-fragments"title="Regular fragments"> <figure title="Allnumbered="true" toc="default"> <name>Regular Fragments</name> <t><xref target="Fig-fragmentation-header-long-all0" format="default"/> is an example of a regular fragment for all fragments except the last one. SCHCheader sizeHeader Size is 16bits,Bits, including the LoRaWANFPort." anchor="Fig-fragmentation-header-long-all0"><artwork><![CDATA[FPort. </t> <figure anchor="Fig-fragmentation-header-long-all0"> <name>All Fragments Except the Last One.</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + ------------------------- + | RuleID | W | FCN | Payload | + ------ + ------ + ------ + ------- + | 8 bits | 2 bits | 6 bits | |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="last-fragment-all-1"title="Last fragment (All-1)"> <figure title="All-1 SCHC Message:numbered="true" toc="default"> <name>Last Fragment (All-1)</name> <t>Following figures are examples of All-1 messages. <xref target="Fig-fragmentation-header-all1-no-tile" format="default"/> is without the lastfragment withouttile, <xref target="Fig-fragmentation-header-all1-last-tile" format="default"/> is with the lasttile." anchor="Fig-fragmentation-header-all1-no-tile"><artwork><![CDATA[tile. </t> <figure anchor="Fig-fragmentation-header-all1-no-tile"> <name>All-1 SCHC Message without Last Tile</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + ---------------------------- + | RuleID | W | FCN=All-1 | RCS | + ------ + ------ + --------- + ------- + | 8 bits | 2 bits | 6 bits | 32 bits |]]></artwork></figure>]]></artwork> </figure> <figuretitle="All-1anchor="Fig-fragmentation-header-all1-last-tile"> <name>All-1 SCHCMessage: the last fragmentMessage withlast tile." anchor="Fig-fragmentation-header-all1-last-tile"><artwork><![CDATA[Last Tile</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="schc-ack"title="SCHC ACK">numbered="true" toc="default"> <name>SCHC ACK</name> <figuretitle="SCHCanchor="Fig-frag-header-long-schc-ack-rcs-ok"> <name>SCHC ACKformat, correctFormat - Correct RCScheck." anchor="Fig-frag-header-long-schc-ack-rcs-ok"><artwork><![CDATA[Check</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + --------------------------+ | RuleID | W | C = 1 | padding | | | | | (b'00000) | + ------ + ----- + ----- + --------- + | 8 bits | 2 bit | 1 bit | 5 bits |]]></artwork></figure>]]></artwork> </figure> <figuretitle="SCHCanchor="Fig-frag-header-long-schc-ack-rcs-fail"> <name>SCHC ACKformat, failedFormat - Incorrect RCScheck." anchor="Fig-frag-header-long-schc-ack-rcs-fail"><artwork><![CDATA[Check</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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,66, or 7 bits |]]></artwork></figure> <t>Note:]]></artwork> </figure> <aside><t>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,6262, and 63. Bitmaps of 63 bits will require 6 bits ofpadding.</t>padding.</t></aside> </section> <section anchor="receiver-abort"title="Receiver-Abort">numbered="true" toc="default"> <name>Receiver-Abort</name> <figuretitle="Receiver-Abort format." anchor="Fig-fragmentation-receiver-abort"><artwork><![CDATA[anchor="Fig-fragmentation-receiver-abort"> <name>Receiver-Abort Format</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 --> |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="schc-acknowledge-request"title="SCHC acknowledge request">numbered="true" toc="default"> <name>SCHC Acknowledge Request</name> <figuretitle="SCHCanchor="Fig-fragmentation-schc-ack-req"> <name>SCHC ACK REQformat." anchor="Fig-fragmentation-schc-ack-req"><artwork><![CDATA[Format</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | +------- +------------------------- + | RuleID | W | FCN = b'000000 | + ------ + ------ + --------------- + | 8 bits | 2 bits | 6 bits |]]></artwork></figure>]]></artwork> </figure> </section> </section> <section anchor="downlink-fragmentation-from-schc-gateway-to-device"title="Downlink fragmentation:numbered="true" toc="default"> <name>Downlink Fragmentation: From SCHCgatewayGateway todevice">Device</name> <t>In this case, the device is the fragmentationreceiver,receiver and the SCHC gateway is the fragmentation transmitter. The following fields are common to all devices. The SCHC F/RMUST<bcp14>MUST</bcp14> concatenate FPort and LoRaWAN payload to retrieve the SCHC Packet as described in <xreftarget="lorawan-schc-payload"/>.</t> <t><list style="symbols"> <t>SCHCtarget="lorawan-schc-payload" format="default"/>.</t> <dl> <dt>SCHC fragmentation reliability mode:<list style="symbols"> <t>Unicast</dt> <dd> <ul empty="true"> <li> <dl> <dt >Unicast downlinks:ACK-Always.</t> <t>Multicast</dt> <dd>ACK-Always. </dd> <dt>Multicast downlinks:No-ACK,</dt> <dd>No-ACK; reliability has to be ensured by the upper layer. This feature isOPTIONAL and may not be implemented by<bcp14>OPTIONAL</bcp14> for the SCHCgateway.</t> </list></t> <t>RuleID: 8gateway and <bcp14>REQUIRED</bcp14> for the device. </dd> </dl> </li> </ul> </dd> <dt>RuleID: </dt> <dd>8 bits stored in the LoRaWANFPort. cfFPort (cf. <xreftarget="rule-id-management"/></t> <t>DTag: Size T=0target="rule-id-management" format="default"/>). </dd> <dt>DTag: </dt> <dd>Size T = 0 bit, notused. cfused (cf. <xreftarget="DTag"/></t> <t>FCN: Thetarget="DTag" format="default"/>). </dd> <dt>FCN: </dt> <dd>The FCN field is encoded onN=1N = 1 bit, so WINDOW_SIZE = 1tile.</t> <t>RCS: Usetile. </dd> <dt>RCS: </dt> <dd>Use the recommended calculation algorithm in <xreftarget="RFC8724"></xref> (§8.2.3.target="RFC8724" sectionFormat="of" format="default" section="8.2.3"/>, IntegrityChecking).</t> <t>InactivityChecking. </dd> <dt>Inactivity timer:The</dt> <dd>The defaultRECOMMENDED<bcp14>RECOMMENDED</bcp14> duration of this timer is 12 hours; this value is mainly driven by application requirements andMAY<bcp14>MAY</bcp14> be changed by theapplication.</t> </list></t>application. </dd> </dl> <t>The following parameters apply to ACK-Always (Unicast) only:</t><t><list style="symbols"> <t>Retransmission<dl> <dt>Retransmission timer:See</dt> <dd>See <xreftarget="downlink-retransmission-timer"/>.</t> <t>MAX_ACK_REQUESTS: 8.</t> <t>Windowtarget="downlink-retransmission-timer" format="default"/>. </dd> <dt>MAX_ACK_REQUESTS: </dt> <dd>8. </dd> <dt>Window index (unicast only):encoded</dt> <dd>encoded onM=1M = 1 bit, as per <xreftarget="RFC8724"></xref>.</t> </list></t>target="RFC8724" format="default"/>. </dd> </dl> <t>As only1one tile is used, its size can change for eachdownlink,downlink and will be the currently available MTU.</t> <t>Class A devices can only receive during an RX slot, following the transmission of an uplink.ThereforeTherefore, the SCHC gateway cannot initiate communication (e.g., start a new SCHC session). In order to create a downlinkopportunityopportunity, it isRECOMMENDED<bcp14>RECOMMENDED</bcp14> for Class A devices to send an uplink every 24 hours when no SCHC session isstarted,started; this is application specific and can be disabled. TheRECOMMENDED<bcp14>RECOMMENDED</bcp14> uplink is a LoRaWAN empty frame as defined in <xreftarget="lorawan-empty-frame"/>.target="lorawan-empty-frame" format="default"/>. As this uplink is sent only to open an RX window, any LoRaWAN uplink frame from the deviceMAY<bcp14>MAY</bcp14> reset this counter.</t><t><spanx style="emph">Note</spanx>:<aside><t>Note: TheFpendingFPending bit included in the LoRaWAN protocolSHOULD NOT<bcp14>SHOULD NOT</bcp14> be used for the SCHC-over-LoRaWAN protocol. It might be set by the Network Gateway for other purposes but not SCHCneeds.</t>needs.</t></aside> <section anchor="regular-fragments-1"title="Regular fragments"> <figure title="Allnumbered="true" toc="default"> <name>Regular Fragments</name> <t><xref target="Fig-fragmentation-downlink-header-all0" format="default"/> is an example of a regular fragment for all fragmentsbutexcept the last one. SCHC HeadersizeSize is 10bits,Bits, including the LoRaWANFPort." anchor="Fig-fragmentation-downlink-header-all0"><artwork><![CDATA[FPort. </t> <figure anchor="Fig-fragmentation-downlink-header-all0"> <name>All Fragments but the Last One.</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + ------------------------------------ + | RuleID | W | FCN = b'0 | Payload | + ------ + ----- + --------- + ---------------- + | 8 bits | 1 bit | 1 bit | X bytes + 6 bits |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="last-fragment-all-1-1"title="Last fragment (All-1)">numbered="true" toc="default"> <name>Last Fragment (All-1)</name> <figuretitle="All-1anchor="Fig-fragmentation-downlink-header-all1"> <name>All-1 SCHC Message:the last fragment." anchor="Fig-fragmentation-downlink-header-all1"><artwork><![CDATA[The Last Fragment</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="schc-ack-1"title="SCHC ACK">numbered="true" toc="default"> <name>SCHC ACK</name> <figuretitle="SCHCanchor="Fig-frag-downlink-header-schc-ack-rcs-ok"> <name>SCHC ACKformat,Format - Correct RCSis correct." anchor="Fig-frag-downlink-header-schc-ack-rcs-ok"><artwork><![CDATA[Check</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + ---------------------------------- + | RuleID | W | C = b'1 | Padding b'000000 | + ------ + ----- + ------- + ---------------- + | 8 bits | 1 bit | 1 bit | 6 bits |]]></artwork></figure>]]></artwork> </figure> <figuretitle="SCHCanchor="Fig-frag-downlink-header-schc-ack-rcs-fail"> <name>SCHC ACKformat,Format - Incorrect RCSis incorrect." anchor="Fig-frag-downlink-header-schc-ack-rcs-fail"><artwork><![CDATA[Check</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | FPort | LoRaWAN payload | + ------ + ------------------------------------------------- + | RuleID | W | C = b'0 | Bitmap = b'1 | Padding b'000000 | + ------ + ----- + ------- + ------------ + ---------------- + | 8 bits | 1 bit | 1 bit | 1 bit | 5 bits |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="receiver-abort-1"title="Receiver-Abort"> <figure title="Receiver-Abort packet (followingnumbered="true" toc="default"> <name>Receiver-Abort</name> <t><xref target="Fig-fragmentation-downlink-header-abort" format="default"/> is an example of a Receiver-Abort packet, following an All-1 SCHC Fragment with incorrectRCS)." anchor="Fig-fragmentation-downlink-header-abort"><artwork><![CDATA[RCS. </t> <figure anchor="Fig-fragmentation-downlink-header-abort"> <name>Receiver-Abort Packet</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 --> |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="downlink-retransmission-timer"title="Downlink retransmission timer">numbered="true" toc="default"> <name>Downlink Retransmission Timer</name> <t>ClassA andA, ClassB orB, and Class C devices do not manage retransmissions and timers the same way.</t> <section anchor="class-a-devices"title="Classnumbered="true" toc="default"> <name>Class Adevices">Devices</name> <t>Class A devices can only receive in an RX slot following the transmission of an uplink.</t> <t>The SCHC gateway implements an inactivity timer with aRECOMMENDED<bcp14>RECOMMENDED</bcp14> duration of 36 hours. For devices with very low transmission rates(example(for example, 1 packet a day in normal operation), that duration may beextended:extended; it is application specific.</t> <t>RETRANSMISSION_TIMER is application specific and itsRECOMMENDED<bcp14>RECOMMENDED</bcp14> value is INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1).</t><t><spanx style="strong">SCHC<t><strong>SCHC All-0(FCN=0)</spanx></t>(FCN = 0)</strong></t> <t>All fragments but the last have anFCN=0FCN = 0 (because the window size is 1). Following an All-0 SCHC Fragment, the deviceMUST<bcp14>MUST</bcp14> transmit the SCHC ACK message. ItMUST<bcp14>MUST</bcp14> 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 downlinkhavehas been received during the RX1 and RX2window.windows. The LoRaWAN layer will respect the applicable local spectrum regulation.</t><t><spanx style="emph">Note</spanx>:<aside> <t>Note: The ACK bitmap is 1 bit long and is always1.</t> <t><spanx style="strong">SCHC1.</t></aside> <t><strong>SCHC All-1(FCN=1)</spanx></t>(FCN = 1)</strong></t> <t>SCHC All-1 is the last fragment of a datagram, and the corresponding SCHC ACK message might be lost;thereforetherefore, the SCHC gatewayMUST<bcp14>MUST</bcp14> request a retransmission of this ACK when the retransmission timer expires. To open a downlinkopportunityopportunity, the deviceMUST<bcp14>MUST</bcp14> transmit an uplink every interval of RETRANSMISSION_TIMER/(MAX_ACK_REQUESTS * SCHC_ACK_REQ_DN_OPPORTUNITY). The format of this uplink is application specific. It isRECOMMENDED<bcp14>RECOMMENDED</bcp14> for a device to send an empty frame (see <xreftarget="lorawan-empty-frame"/>)target="lorawan-empty-frame" format="default"/>), but it is application specific and will be used by the NGW to transmit a potential SCHC ACKREQ.<vspace />REQ. SCHC_ACK_REQ_DN_OPPORTUNITY is application specific and its recommended value is 2. ItMUST<bcp14>MUST</bcp14> be greater than 1. This allowsto openthe opening of a downlink opportunity to any downlink with higher priority than the SCHC ACK REQ message.</t><t><spanx style="emph">Note</spanx>:<aside> <t>Note: The deviceMUST<bcp14>MUST</bcp14> keep this SCHC ACK message in memory until it receives a downlink SCHC Fragmentation Message (with FPort == FPortDown) that is not a SCHC ACKREQ: itREQ; this indicates that the SCHC gateway has received the SCHC ACKmessage.</t>message.</t></aside> </section> </section> <section anchor="class-b-or-class-c-devices"title="Classnumbered="true" toc="default"> <name>Class B or Class Cdevices">Devices</name> <t>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.</t><t>RECOMMENDED<t><bcp14>RECOMMENDED</bcp14> retransmission timervalue:</t> <t><list style="symbols"> <t>Classvalues are:</t> <dl> <dt>Class B:3</dt> <dd>3 times the ping slotperiodicity.</t> <t>Classperiodicity. </dd> <dt>Class C:30 seconds.</t> </list></t></dt> <dd>30 seconds. </dd> </dl> <t>TheRECOMMENDED<bcp14>RECOMMENDED</bcp14> inactivity timer value is 12 hours for both Class B and Class C devices.</t> </section> </section> </section> <section anchor="schc-fragment-format"title="SCHCnumbered="true" toc="default"> <name>SCHC FragmentFormat">Format</name> <section anchor="all-0-schc-fragment"title="All-0numbered="true" toc="default"> <name>All-0 SCHCfragment"> <t><spanx style="strong">Uplink fragmentation (Ack-On-Error)</spanx>:</t>Fragment</name> <t><strong>Uplink Fragmentation (Ack-on-Error)</strong>:</t> <t>All-0 is distinguishable from a SCHC ACKREQREQ, as <xreftarget="RFC8724"></xref>target="RFC8724" format="default"/> states<spanx style="emph">This"This condition is also met if the SCHC Fragment Header is a multiple of L2Words</spanx>; thisWords", the following condition being met: SCHC header is 2 bytes.</t><t><spanx style="strong">Downlink<t><strong>Downlink fragmentation(Ack-always)</spanx>:</t>(ACK-Always)</strong>:</t> <t>As per <xreftarget="RFC8724"></xref> thetarget="RFC8724" format="default"/>, SCHC All-1MUST<bcp14>MUST</bcp14> contain the last tile,implementation mustand implementations <bcp14>MUST</bcp14> ensure that SCHC All-0 message Payload will be at least the size of an L2 Word.</t> </section> <section anchor="all-1-schc-fragment"title="All-1numbered="true" toc="default"> <name>All-1 SCHCfragment">Fragment</name> <t>All-1 is distinguishable from a SCHCSender-AbortSender-Abort, as <xreftarget="RFC8724"></xref>target="RFC8724" format="default"/> states<spanx style="emph">This"This condition is met if the RCS is present and is at least the size of an L2Word</spanx>; thisWord", the following condition being met: RCS is 4 bytes.</t> </section> <section anchor="delay-after-each-lorawan-frame-to-respect-local-regulation"title="Delaynumbered="true" toc="default"> <name>Delay aftereachEach LoRaWANframeFrame torespect local regulation">Respect Local Regulation</name> <t>This profile does not define a delay to be added after each LoRaWANframe,frame; local regulation compliance is expected to be enforced by the LoRaWAN stack.</t> </section> </section> </section> <section anchor="security-considerations"title="Security Considerations">numbered="true" toc="default"> <name>Security Considerations</name> <t>This document is only providing parameters that are expected to be best suited for LoRaWAN networks for <xreftarget="RFC8724"></xref>.target="RFC8724" format="default"/>. IID security is discussed in <xreftarget="IID"/>.target="IID" format="default"/>. As such, this document does not contribute to any new securityissues beyond those already identified in <xref target="RFC8724"></xref>. 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)</t> </section> <section anchor="iana-considerations" title="IANA Considerations"> <t>This document has no IANA actions.</t> </section> <section numbered="false" anchor="acknowledgements" title="Acknowledgements"> <t>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.</t> </section> <section numbered="false" anchor="contributors" title="Contributors"> <t>Contributors ordered by family name.</t> <t>Vincent Audebert<vspace /> EDF R&D<vspace /> Email: vincent.audebert@edf.fr</t> <t>Julien Catalano<vspace /> Kerlink<vspace /> Email: j.catalano@kerlink.fr</t> <t>Michael Coracin<vspace /> Semtech<vspace /> Email: mcoracin@semtech.com</t> <t>Marc Le Gourrierec<vspace /> Sagemcom<vspace /> Email: marc.legourrierec@sagemcom.com</t> <t>Nicolas Sornin<vspace /> Semtech<vspace /> Email: nsornin@semtech.com</t> <t>Alper Yegin<vspace /> Actility<vspace /> Email: alper.yegin@actility.com</t> </section> </middle> <back> <references title='Normative References'> <reference anchor="RFC2119" target='https://www.rfc-editor.org/info/rfc2119'> <front> <title>Key words for use in RFCs to Indicate Requirement Levels</title> <author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author> <date year='1997' month='March' /> <abstract><t>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.</t></abstract> </front> <seriesInfo name='BCP' value='14'/> <seriesInfo name='RFC' value='2119'/> <seriesInfo name='DOI' value='10.17487/RFC2119'/> </reference> <reference anchor="RFC8174" target='https://www.rfc-editor.org/info/rfc8174'> <front> <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title> <author initials='B.' surname='Leiba' fullname='B. Leiba'><organization /></author> <date year='2017' month='May' /> <abstract><t>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.</t></abstract> </front> <seriesInfo name='BCP' value='14'/> <seriesInfo name='RFC' value='8174'/> <seriesInfo name='DOI' value='10.17487/RFC8174'/> </reference> <reference anchor="RFC4291" target='https://www.rfc-editor.org/info/rfc4291'> <front> <title>IP Version 6 Addressing Architecture</title> <author initials='R.' surname='Hinden' fullname='R. Hinden'><organization /></author> <author initials='S.' surname='Deering' fullname='S. Deering'><organization /></author> <date year='2006' month='February' /> <abstract><t>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.</t><t>This document obsoletes RFC 3513, "IP Version 6 Addressing Architecture". [STANDARDS-TRACK]</t></abstract> </front> <seriesInfo name='RFC' value='4291'/> <seriesInfo name='DOI' value='10.17487/RFC4291'/> </reference> <reference anchor="RFC4493" target='https://www.rfc-editor.org/info/rfc4493'> <front> <title>The AES-CMAC Algorithm</title> <author initials='JH.' surname='Song' fullname='JH. Song'><organization /></author> <author initials='R.' surname='Poovendran' fullname='R. Poovendran'><organization /></author> <author initials='J.' surname='Lee' fullname='J. Lee'><organization /></author> <author initials='T.' surname='Iwata' fullname='T. Iwata'><organization /></author> <date year='2006' month='June' /> <abstract><t>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.</t></abstract> </front> <seriesInfo name='RFC' value='4493'/> <seriesInfo name='DOI' value='10.17487/RFC4493'/> </reference> <reference anchor="RFC8724" target='https://www.rfc-editor.org/info/rfc8724'> <front> <title>SCHC: Generic Framework for Static Context Header Compression and Fragmentation</title> <author initials='A.' surname='Minaburo' fullname='A. Minaburo'><organization /></author> <author initials='L.' surname='Toutain' fullname='L. Toutain'><organization /></author> <author initials='C.' surname='Gomez' fullname='C. Gomez'><organization /></author> <author initials='D.' surname='Barthel' fullname='D. Barthel'><organization /></author> <author initials='JC.' surname='Zúñiga' fullname='JC. Zúñiga'><organization /></author> <date year='2020' month='April' /> <abstract><t>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.</t><t>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.</t><t>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.</t><t>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.</t></abstract> </front> <seriesInfo name='RFC' value='8724'/> <seriesInfo name='DOI' value='10.17487/RFC8724'/> </reference> <reference anchor="lora-alliance-spec" target="https://lora-alliance.org/resource_hub/lorawan-104-specification-package/"> <front> <title>LoRaWAN Specification Version V1.0.4</title> <author initials="L." surname="Alliance" fullname="LoRa Alliance"> <organization></organization> </author> <date /> </front> </reference> </references> <references title='Informative References'> <reference anchor="RFC8064" target='https://www.rfc-editor.org/info/rfc8064'> <front> <title>Recommendation on Stable IPv6 Interface Identifiers</title> <author initials='F.' surname='Gont' fullname='F. Gont'><organization /></author> <author initials='A.' surname='Cooper' fullname='A. Cooper'><organization /></author> <author initials='D.' surname='Thaler' fullname='D. Thaler'><organization /></author> <author initials='W.' surname='Liu' fullname='W. Liu'><organization /></author> <date year='2017' month='February' /> <abstract><t>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.</t></abstract> </front> <seriesInfo name='RFC' value='8064'/> <seriesInfo name='DOI' value='10.17487/RFC8064'/> </reference> <reference anchor="RFC8065" target='https://www.rfc-editor.org/info/rfc8065'> <front> <title>Privacy Considerations for IPv6 Adaptation-Layer Mechanisms</title> <author initials='D.' surname='Thaler' fullname='D. Thaler'><organization /></author> <date year='2017' month='February' /> <abstract><t>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.</t></abstract> </front> <seriesInfo name='RFC' value='8065'/> <seriesInfo name='DOI' value='10.17487/RFC8065'/> </reference> <reference anchor="RFC8376" target='https://www.rfc-editor.org/info/rfc8376'> <front> <title>Low-Power Wide Area Network (LPWAN) Overview</title> <author initials='S.' surname='Farrell' fullname='S. Farrell' role='editor'><organization /></author> <date year='2018' month='May' /> <abstract><t>Low-Power Wide Area Networks (LPWANs) are wireless technologies with characteristics such as large coverage areas, low bandwidth, possibly very small packet and application-layerissues beyond those already identified in <xref target="RFC8724" format="default"/>. Moreover, SCHC datasizes, and long battery life operation. This memo is an informational overview of(LoRaWAN payload) are protected at theset of LPWAN technologies being considered inLoRaWAN level by an AES-128 encryption with a session key shared by theIETFdevice andof the gaps that exist betweentheneeds of those technologies andSCHC gateway. These session keys are renewed at each LoRaWAN session (i.e., each join or rejoin to thegoal of running IP in LPWANs.</t></abstract>LoRaWAN network).</t> </section> <section anchor="iana-considerations" numbered="true" toc="default"> <name>IANA Considerations</name> <t>This document has no IANA actions.</t> </section> </middle> <back> <references> <name>References</name> <references> <name>Normative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4291.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4493.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8724.xml"/> <reference anchor="LORAWAN-SPEC" target="https://lora-alliance.org/resource_hub/lorawan-104-specification-package/"> <front> <title>LoRaWAN 1.0.4 Specification Package</title> <author> <organization>LoRa Alliance</organization> </author> <date/> </front><seriesInfo name='RFC' value='8376'/> <seriesInfo name='DOI' value='10.17487/RFC8376'/></reference> </references> <references> <name>Informative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8064.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8065.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8376.xml"/> <referenceanchor="lora-alliance-remote-multicast-set" target="https://lora-alliance.org/sites/default/files/2018-09/remote_multicast_setup_v1.0.0.pdf">anchor="LORAWAN-REMOTE-MULTICAST-SET" target="https://lora-alliance.org/resource_hub/lorawan-remote-multicast-setup-specification-v1-0-0/"> <front> <title>LoRaWAN Remote Multicast Setup SpecificationVersion 1.0.0</title> <author initials="L." surname="Alliance" fullname="LoRa Alliance"> <organization></organization>v1.0.0</title> <author> <organization>LoRa Alliance</organization> </author><date /><date/> </front> </reference> </references> </references> <section anchor="examples"title="Examples">numbered="true" toc="default"> <name>Examples</name> <t>In the followingexamples “applicative data”examples, "applicative data" refers to the IPv6 payload sent by the application to the SCHC layer.</t> <section anchor="uplink-compression-example-no-fragmentation"title="Uplinknumbered="true" toc="default"> <name>Uplink - CompressionexampleExample - Nofragmentation">Fragmentation</name> <t>This example represents an applicative data going through SCHC overLoRaWAN,LoRaWAN; no fragmentationrequired</t>required.</t> <t>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.</t> <figuretitle="Uplink example: SCHC Message" anchor="Fig-example-uplink-no-fragmentation-payload-schc-message"><artwork><![CDATA[anchor="Fig-example-uplink-no-fragmentation-payload-schc-message"> <name>Uplink Example: SCHC Message</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | RuleID | Compression residue | Payload | Padding=b'000 | + ------ + ------------------- + --------- + ------------- + | 1 | 21 bits | 37 bytes | 3 bits |]]></artwork></figure>]]></artwork> </figure> <t>The current LoRaWAN MTU is 51 bytes, although2 bytes2-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.</t> <figuretitle="Uplink example: LoRaWAN packet" anchor="Fig-example-uplink-no-fragmentation-compression"><artwork><![CDATA[anchor="Fig-example-uplink-no-fragmentation-compression"> <name>Uplink Example: LoRaWAN Packet</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="uplink-compression-and-fragmentation-example"title="Uplinknumbered="true" toc="default"> <name>Uplink - Compression andfragmentation example">Fragmentation Example</name> <t>This example represents an applicative data going through SCHC, with fragmentation.</t> <t>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.</t> <figuretitle="Uplink example: SCHC Message" anchor="Fig-example-uplink-fragmentation-schc-message"><artwork><![CDATA[anchor="Fig-example-uplink-fragmentation-schc-message"> <name>Uplink Example: SCHC Message</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | RuleID | Compression residue | Payload | + ------ + ------------------- + --------- + | 1 | 21 bits | 279 bytes |]]></artwork></figure>]]></artwork> </figure> <t>The current LoRaWAN MTU is 11bytes, 0 bytesbytes; 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 (includingFPort)FPort), so 1 tile is sent in the first fragment.</t> <figuretitle="Uplink example:anchor="Fig-example-uplink-fragmentation-lorawan-packet-1"> <name>Uplink Example: LoRaWANpacket 1" anchor="Fig-example-uplink-fragmentation-lorawan-packet-1"><artwork><![CDATA[Packet 1</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload (11 bytes) | + -------------------------- + -------------------------- + | | RuleID=20 | W | FCN | 1 tile | + -------------- + --------- + ----- + ------ + --------- + | XXXX | 1 byte | 0 0 | 62 | 10 bytes |]]></artwork></figure>]]></artwork> </figure> <t>The tile content is described in <xref target="Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content" format="default"/> </t> <figuretitle="Uplink example: LoRaWAN packet 1 -anchor="Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content"> <name>Uplink Example: First Tilecontent" anchor="Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content"><artwork><![CDATA[Content</name> <artwork name="" type="" align="left" alt=""><![CDATA[ Content of the tile is: | RuleID | Compression residue | Payload | + ------ + ------------------- + ----------------- + | 1 | 21 bits | 6 bytes + 3 bits |]]></artwork></figure>]]></artwork> </figure> <t>Next transmission MTU is 11 bytes, although2 bytes2-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.</t> <t>Next transmission MTU is 242 bytes,4 bytes4-byte FOpts. 23 tiles are transmitted:</t> <figuretitle="Uplink example:anchor="Fig-example-uplink-fragmentation-lorawan-packet-2"> <name>Uplink Example: LoRaWANpacket 2" anchor="Fig-example-uplink-fragmentation-lorawan-packet-2"><artwork><![CDATA[Packet 2</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload (231 bytes) | + --------------------------------------+ --------------------------- + | | FOpts | RuleID=20 | W | FCN | 23 tiles | + -------------- + ------- + ---------- + ----- + ----- + ----------- + | XXXX | 4 bytes | 1 byte | 0 0 | 61 | 230 bytes |]]></artwork></figure>]]></artwork> </figure> <t>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.</t> <figuretitle="Uplink example:anchor="Fig-example-uplink-fragmentation-lorawan-packet-3"> <name>Uplink Example: LoRaWANpacket 3" anchor="Fig-example-uplink-fragmentation-lorawan-packet-3"><artwork><![CDATA[Packet 3</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure>]]></artwork> </figure> <t>Then All-1 message can be transmitted:</t> <figuretitle="Uplink example:anchor="Fig-example-uplink-fragmentation-lorawan-packet-4"> <name>Uplink Example: LoRaWANpacketPacket 4 - All-1 SCHCmessage" anchor="Fig-example-uplink-fragmentation-lorawan-packet-4"><artwork><![CDATA[Message</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload (44 bytes) | + ---- + -----------+ -------------------------- + | | RuleID=20 | W | FCN | RCS | + ---- + ---------- + ----- + ----- + ---------- + | XXXX | 1 byte | 0 0 | 63 | 4 bytes |]]></artwork></figure>]]></artwork> </figure> <t>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:</t> <figuretitle="Uplink example:anchor="Fig-example-uplink-fragmentation-lorawan-packet-5"> <name>Uplink Example: LoRaWANpacketPacket 5 - SCHCACK" anchor="Fig-example-uplink-fragmentation-lorawan-packet-5"><artwork><![CDATA[ACK</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload | + -------------- + --------- + ------------------- + | | RuleID=20 | W | C | Padding | + -------------- + --------- + ----- + - + ------- + | XXXX | 1 byte | 0 0 | 1 | 5 bits |]]></artwork></figure>]]></artwork> </figure> </section> <section anchor="downlink"title="Downlink">numbered="true" toc="default"> <name>Downlink</name> <t>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.</t> <figuretitle="Downlink example: SCHC Message" anchor="Fig-example-downlink-fragmentation-schc-message"><artwork><![CDATA[anchor="Fig-example-downlink-fragmentation-schc-message"> <name>Downlink Example: SCHC Message</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | RuleID | Compression residue | Payload | + ------ + ------------------- + --------- + | 1 | 21 bits | 127 bytes |]]></artwork></figure>]]></artwork> </figure> <t>The current LoRaWAN MTU is 51bytes,bytes; no FOpts are used by the LoRaWAN protocol: 51 bytes are available for SCHC payload + FPortfield => itfield; the applicative data has to be fragmented.</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-1"> <name>Downlink Example: LoRaWANpacketPacket 1 - SCHC Fragment1" anchor="Fig-example-downlink-fragmentation-lorawan-packet-1"><artwork><![CDATA[1</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure> <t>Content of the]]></artwork> </figure> <t>The tileis:</t>content is described in <xref target="Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content" format="default"/> </t> <figuretitle="Downlink example: LoRaWAN packet 1:anchor="Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content"> <name>Downlink Example: First Tilecontent" anchor="Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content"><artwork><![CDATA[Content</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | RuleID | Compression residue | Payload | + ------ + ------------------- + ------------------ + | 1 | 21 bits | 48 bytes and 1 bit |]]></artwork></figure>]]></artwork> </figure> <t>The receiver answers with a SCHC ACK:</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-2"> <name>Downlink Example: LoRaWANpacketPacket 2 - SCHCACK" anchor="Fig-example-downlink-fragmentation-lorawan-packet-2"><artwork><![CDATA[ACK</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload | + ---- + --------- + -------------------------------- + | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 | + ---- + --------- + ----- + ----- + ---------------- + | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |]]></artwork></figure>]]></artwork> </figure> <t>The second downlink is sent, two FOpts:</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-3"> <name>Downlink Example: LoRaWANpacketPacket 3 - SCHC Fragment2" anchor="Fig-example-downlink-fragmentation-lorawan-packet-3"><artwork><![CDATA[2</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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 |]]></artwork></figure>]]></artwork> </figure> <t>The receiver answers withana SCHC ACK:</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-4"> <name>Downlink Example: LoRaWANpacketPacket 4 - SCHCACK" anchor="Fig-example-downlink-fragmentation-lorawan-packet-4"><artwork><![CDATA[ACK</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload | + ---- + --------- + -------------------------------- + | | RuleID=21 | W = 1 | C = 1 | Padding=b'000000 | + ---- + --------- + ----- + ----- + ---------------- + | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |]]></artwork></figure>]]></artwork> </figure> <t>The last downlink is sent, no FOpts:</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-5"> <name>Downlink Example: LoRaWANpacketPacket 5 - All-1 SCHCmessage" anchor="Fig-example-downlink-fragmentation-lorawan-packet-5"><artwork><![CDATA[Message</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | 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+1bitsbit | 5 bits |]]></artwork></figure>]]></artwork> </figure> <t>The receiver answers to the sender withana SCHC ACK:</t> <figuretitle="Downlink example:anchor="Fig-example-downlink-fragmentation-lorawan-packet-6"> <name>Downlink Example: LoRaWANpacketPacket 6 - SCHCACK" anchor="Fig-example-downlink-fragmentation-lorawan-packet-6"><artwork><![CDATA[ACK</name> <artwork name="" type="" align="left" alt=""><![CDATA[ | LoRaWAN Header | LoRaWAN payload | + ---- + --------- + -------------------------------- + | | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 | + ---- + --------- + ----- + ----- + ---------------- + | XXXX | 1 byte | 1 bit | 1 bit | 6 bits |]]></artwork></figure>]]></artwork> </figure> </section> </section> <section numbered="false" anchor="acknowledgements" toc="default"> <name>Acknowledgements</name> <t>Thanks to all those listed in the Contributors Section for the excellent text, insightful discussions, reviews, and suggestions, and also to (in alphabetical order) <contact fullname="Dominique Barthel"/>, <contact fullname="Arunprabhu Kandasamy"/>, <contact fullname="Rodrigo Munoz"/>, <contact fullname="Alexander Pelov"/>, <contact fullname="Pascal Thubert"/>, and <contact fullname="Laurent Toutain"/> for useful design considerations, reviews, and comments.</t> <t>LoRaWAN is a registered trademark of the LoRa Alliance.</t> </section> <section numbered="false" anchor="contributors" toc="default"> <name>Contributors</name> <t>Contributors ordered by family name.</t> <contact fullname="Vincent Audebert"> <organization>EDF R&D</organization> <address> <postal> <city></city> <country></country> </postal> <email>vincent.audebert@edf.fr</email> </address> </contact> <contact fullname="Julien Catalano"> <organization>Kerlink</organization> <address> <postal> <city></city> <country></country> </postal> <email>j.catalano@kerlink.fr</email> </address> </contact> <contact fullname="Michael Coracin"> <organization>Semtech</organization> <address> <postal> <city></city> <country></country> </postal> <email>mcoracin@semtech.com</email> </address> </contact> <contact fullname="Marc Le Gourrierec"> <organization>Sagemcom</organization> <address> <postal> <city></city> <country></country> </postal> <email>marc.legourrierec@sagemcom.com</email> </address> </contact> <contact fullname="Nicolas Sornin"> <organization>Chirp Foundation</organization> <address> <postal> <city></city> <country></country> </postal> <email>nicolas.sornin@chirpfoundation.org</email> </address> </contact> <contact fullname="Alper Yegin"> <organization>Actility</organization> <address> <postal> <city></city> <country></country> </postal> <email>alper.yegin@actility.com</email> </address> </contact> </section> </back> </rfc>