<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-lpwan-schc-over-lorawan-14" indexInclude="true" ipr="trust200902" number="9011" prepTime="2021-04-21T16:50:59" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-lpwan-schc-over-lorawan-14" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc9011" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="SCHC over LoRaWAN">Static Context Header Compression and Fragmentation (SCHC) over LoRaWAN</title>
    <seriesInfo name="RFC" value="9011" stream="IETF"/>
    <author initials="O." surname="Gimenez" fullname="Olivier Gimenez" role="editor">
      <organization showOnFrontPage="true">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 showOnFrontPage="true">Acklio</organization>
      <address>
        <postal>
          <street>1137A Avenue des Champs Blancs</street>
          <city>Cesson-Sévigné Cedex</city>
          <code>35510</code>
          <country>France</country>
        </postal>
        <email>ivaylo@ackl.io</email>
      </address>
    </author>
    <date month="04" year="2021"/>
    <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 pn="section-abstract">
      <t indent="0" pn="section-abstract-1">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
      LPWAN technologies.</t>
      <t indent="0" pn="section-abstract-2">This document defines a profile of SCHC (RFC 8724) for use in
      LoRaWAN networks and provides elements such as efficient
      parameterization and modes of operation.</t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc9011" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2021 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) in effect on the date of
            publication of this document. Please review these documents
            carefully, as they describe your rights and restrictions with
            respect to this document. Code Components extracted from this
            document must include Simplified BSD License text as described in
            Section 4.e of the Trust Legal Provisions and are provided without
            warranty as described in the Simplified BSD License.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" keepWithNext="true" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-schc-overview">SCHC Overview</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lorawan-architecture">LoRaWAN Architecture</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.4.2">
              <li pn="section-toc.1-1.4.2.1">
                <t indent="0" pn="section-toc.1-1.4.2.1.1"><xref derivedContent="4.1" format="counter" sectionFormat="of" target="section-4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-device-classes-a-b-c-and-in">Device Classes (A, B, C) and Interactions</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.2">
                <t indent="0" pn="section-toc.1-1.4.2.2.1"><xref derivedContent="4.2" format="counter" sectionFormat="of" target="section-4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-device-addressing">Device Addressing</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.3">
                <t indent="0" pn="section-toc.1-1.4.2.3.1"><xref derivedContent="4.3" format="counter" sectionFormat="of" target="section-4.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-general-frame-types">General Frame Types</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.4">
                <t indent="0" pn="section-toc.1-1.4.2.4.1"><xref derivedContent="4.4" format="counter" sectionFormat="of" target="section-4.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lorawan-mac-frames">LoRaWAN MAC Frames</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.5">
                <t indent="0" pn="section-toc.1-1.4.2.5.1"><xref derivedContent="4.5" format="counter" sectionFormat="of" target="section-4.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lorawan-fport">LoRaWAN FPort</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.6">
                <t indent="0" pn="section-toc.1-1.4.2.6.1"><xref derivedContent="4.6" format="counter" sectionFormat="of" target="section-4.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lorawan-empty-frame">LoRaWAN Empty Frame</xref></t>
              </li>
              <li pn="section-toc.1-1.4.2.7">
                <t indent="0" pn="section-toc.1-1.4.2.7.1"><xref derivedContent="4.7" format="counter" sectionFormat="of" target="section-4.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-unicast-and-multicast-techn">Unicast and Multicast Technology</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-schc-over-lorawan">SCHC over LoRaWAN</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2">
              <li pn="section-toc.1-1.5.2.1">
                <t indent="0" pn="section-toc.1-1.5.2.1.1"><xref derivedContent="5.1" format="counter" sectionFormat="of" target="section-5.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-lorawan-fport-and-ruleid">LoRaWAN FPort and RuleID</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.2">
                <t indent="0" pn="section-toc.1-1.5.2.2.1"><xref derivedContent="5.2" format="counter" sectionFormat="of" target="section-5.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-ruleid-management">RuleID Management</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.3">
                <t indent="0" pn="section-toc.1-1.5.2.3.1"><xref derivedContent="5.3" format="counter" sectionFormat="of" target="section-5.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-interface-identifier-iid-co">Interface IDentifier (IID) Computation</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.4">
                <t indent="0" pn="section-toc.1-1.5.2.4.1"><xref derivedContent="5.4" format="counter" sectionFormat="of" target="section-5.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-padding">Padding</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.5">
                <t indent="0" pn="section-toc.1-1.5.2.5.1"><xref derivedContent="5.5" format="counter" sectionFormat="of" target="section-5.5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-decompression">Decompression</xref></t>
              </li>
              <li pn="section-toc.1-1.5.2.6">
                <t indent="0" pn="section-toc.1-1.5.2.6.1"><xref derivedContent="5.6" format="counter" sectionFormat="of" target="section-5.6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-fragmentation">Fragmentation</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.6.2">
                  <li pn="section-toc.1-1.5.2.6.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.6.2.1.1"><xref derivedContent="5.6.1" format="counter" sectionFormat="of" target="section-5.6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-dtag">DTag</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.6.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.6.2.2.1"><xref derivedContent="5.6.2" format="counter" sectionFormat="of" target="section-5.6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-uplink-fragmentation-from-d">Uplink Fragmentation: From Device to SCHC Gateway</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.6.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.6.2.3.1"><xref derivedContent="5.6.3" format="counter" sectionFormat="of" target="section-5.6.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-downlink-fragmentation-from">Downlink Fragmentation: From SCHC Gateway to Device</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.5.2.7">
                <t indent="0" pn="section-toc.1-1.5.2.7.1"><xref derivedContent="5.7" format="counter" sectionFormat="of" target="section-5.7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-schc-fragment-format">SCHC Fragment Format</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.5.2.7.2">
                  <li pn="section-toc.1-1.5.2.7.2.1">
                    <t indent="0" pn="section-toc.1-1.5.2.7.2.1.1"><xref derivedContent="5.7.1" format="counter" sectionFormat="of" target="section-5.7.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-all-0-schc-fragment">All-0 SCHC Fragment</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.7.2.2">
                    <t indent="0" pn="section-toc.1-1.5.2.7.2.2.1"><xref derivedContent="5.7.2" format="counter" sectionFormat="of" target="section-5.7.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-all-1-schc-fragment">All-1 SCHC Fragment</xref></t>
                  </li>
                  <li pn="section-toc.1-1.5.2.7.2.3">
                    <t indent="0" pn="section-toc.1-1.5.2.7.2.3.1"><xref derivedContent="5.7.3" format="counter" sectionFormat="of" target="section-5.7.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-delay-after-each-lorawan-fr">Delay after Each LoRaWAN Frame to Respect Local Regulation</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-references">References</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.8.2">
              <li pn="section-toc.1-1.8.2.1">
                <t indent="0" pn="section-toc.1-1.8.2.1.1"><xref derivedContent="8.1" format="counter" sectionFormat="of" target="section-8.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
              </li>
              <li pn="section-toc.1-1.8.2.2">
                <t indent="0" pn="section-toc.1-1.8.2.2.1"><xref derivedContent="8.2" format="counter" sectionFormat="of" target="section-8.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="Appendix A" format="default" sectionFormat="of" target="section-appendix.a"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-examples">Examples</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.9.2">
              <li pn="section-toc.1-1.9.2.1">
                <t indent="0" pn="section-toc.1-1.9.2.1.1"><xref derivedContent="A.1" format="counter" sectionFormat="of" target="section-a.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-uplink-compression-example-">Uplink - Compression Example - No Fragmentation</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.2">
                <t indent="0" pn="section-toc.1-1.9.2.2.1"><xref derivedContent="A.2" format="counter" sectionFormat="of" target="section-a.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-uplink-compression-and-frag">Uplink - Compression and Fragmentation Example</xref></t>
              </li>
              <li pn="section-toc.1-1.9.2.3">
                <t indent="0" pn="section-toc.1-1.9.2.3.1"><xref derivedContent="A.3" format="counter" sectionFormat="of" target="section-a.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-downlink">Downlink</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgements">Acknowledgements</xref></t>
          </li>
          <li pn="section-toc.1-1.11">
            <t indent="0" pn="section-toc.1-1.11.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.c"/><xref derivedContent="" format="title" sectionFormat="of" target="name-contributors">Contributors</xref></t>
          </li>
          <li pn="section-toc.1-1.12">
            <t indent="0" pn="section-toc.1-1.12.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.d"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="Introduction" numbered="true" toc="include" removeInRFC="false" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">The SCHC specification <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/> describes
generic header compression and fragmentation techniques that can be used on all
Low-Power Wide Area Network (LPWAN) technologies defined in
<xref target="RFC8376" format="default" sectionFormat="of" derivedContent="RFC8376"/>. Even though those technologies share a great
number of common features like star-oriented topologies, network architecture,
devices with communications that are mostly quite predictable, etc., they do have some
slight differences with respect to payload sizes, reactiveness, etc.</t>
      <t indent="0" pn="section-1-2">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 indent="0" pn="section-1-3">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 <xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/>.</t>
    </section>
    <section anchor="terminology" numbered="true" toc="include" removeInRFC="false" pn="section-2">
      <name slugifiedName="name-terminology">Terminology</name>
      <t indent="0" pn="section-2-1">The key words "<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 "<bcp14>OPTIONAL</bcp14>" in this document are
      to be interpreted as described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> when, and
      only when, they appear in all capitals, as shown here.</t>
      <t indent="0" pn="section-2-2">This section defines the terminology and abbreviations used in this document. For
all other definitions, please look up the SCHC specification
<xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>.</t>
      <aside pn="section-2-3">
        <t indent="0" pn="section-2-3.1">
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 indent="3" newline="false" spacing="normal" pn="section-2-4">
        <dt pn="section-2-4.1">AppKey:
</dt>
        <dd pn="section-2-4.2">Application Key. An AES-128 root key specific to each device.
</dd>
        <dt pn="section-2-4.3">AppSKey:
</dt>
        <dd pn="section-2-4.4">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 pn="section-2-4.5">DevAddr:
</dt>
        <dd pn="section-2-4.6">
          <t indent="0" pn="section-2-4.6.1">A 32-bit non-unique identifier assigned to a device either:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-2-4.6.2">
            <dt pn="section-2-4.6.2.1">Statically:
            </dt>
            <dd pn="section-2-4.6.2.2">by the device manufacturer in "Activation-by-Personalization"
    mode, or
    </dd>
            <dt pn="section-2-4.6.2.3">Dynamically:
            </dt>
            <dd pn="section-2-4.6.2.4">after a LoRaWAN "Join Procedure" by the Network Gateway in "Over-the-Air-Activation" mode.
    </dd>
          </dl>
        </dd>
        <dt pn="section-2-4.7">DevEUI:
</dt>
        <dd pn="section-2-4.8">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.
</dd>
        <dt pn="section-2-4.9">Downlink:
</dt>
        <dd pn="section-2-4.10">A LoRaWAN term for a frame transmitted by the network and received by the device.
</dd>
        <dt pn="section-2-4.11">EUI:
</dt>
        <dd pn="section-2-4.12">Extended Unique Identifier
</dd>
        <dt pn="section-2-4.13">FRMPayload:
</dt>
        <dd pn="section-2-4.14">Application data in a LoRaWAN frame
</dd>
        <dt pn="section-2-4.15">IID:
</dt>
        <dd pn="section-2-4.16">Interface Identifier
</dd>
        <dt pn="section-2-4.17">LoRaWAN:
</dt>
        <dd pn="section-2-4.18">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: <eref brackets="angle" target="https://www.lora-alliance.org"/>.
</dd>
        <dt pn="section-2-4.19">MSB: 
</dt>
        <dd pn="section-2-4.20">Most Significant Byte
</dd>
        <dt pn="section-2-4.21">NGW:
</dt>
        <dd pn="section-2-4.22">Network Gateway
</dd>
        <dt pn="section-2-4.23">OUI:
</dt>
        <dd pn="section-2-4.24">Organizationally Unique Identifier. IEEE-assigned prefix for EUI.
</dd>
        <dt pn="section-2-4.25">RCS:
</dt>
        <dd pn="section-2-4.26">Reassembly Check Sequence. Used to verify the integrity of the fragmentation-reassembly process.
</dd>
        <dt pn="section-2-4.27">RGW:
</dt>
        <dd pn="section-2-4.28">Radio Gateway
</dd>
        <dt pn="section-2-4.29">RX:
</dt>
        <dd pn="section-2-4.30">A device's reception window.
</dd>
        <dt pn="section-2-4.31">RX1/RX2:
</dt>
        <dd pn="section-2-4.32">LoRaWAN class A devices open two RX windows following an uplink, called "RX1" and "RX2".
</dd>
        <dt pn="section-2-4.33">SCHC C/D:
</dt>
        <dd pn="section-2-4.34">SCHC Compression/Decompression
</dd>
        <dt pn="section-2-4.35">SCHC F/R:
</dt>
        <dd pn="section-2-4.36">SCHC Fragmentation/Reassembly
</dd>
        <dt pn="section-2-4.37">SCHC gateway:
</dt>
        <dd pn="section-2-4.38">The LoRaWAN Application Server that manages translation between an IPv6
network and the Network Gateway (LoRaWAN Network Server).
</dd>
        <dt pn="section-2-4.39">Tile:
</dt>
        <dd pn="section-2-4.40">A piece of a fragmented packet as described in <xref target="RFC8724" sectionFormat="of" section="8.2.2.1" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8724#section-8.2.2.1" derivedContent="RFC8724"/>.
</dd>
        <dt pn="section-2-4.41">Uplink:
</dt>
        <dd pn="section-2-4.42">LoRaWAN term for a frame transmitted by the device and received by the network.
</dd>
      </dl>
    </section>
    <section anchor="static-context-header-compression-overview" numbered="true" toc="include" removeInRFC="false" pn="section-3">
      <name slugifiedName="name-schc-overview">SCHC Overview</name>
      <t indent="0" pn="section-3-1">This section contains a short overview of SCHC. For a detailed
      description, refer to the full specification <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>.</t>
      <t indent="0" pn="section-3-2">It defines:</t>
      <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-3-3"><li pn="section-3-3.1" derivedCounter="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 Compression/Decompression" (SCHC C/D).</li>
        <li pn="section-3-3.2" derivedCounter="2.">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).</li>
      </ol>
      <t indent="0" pn="section-3-4">Context exchange or pre-provisioning is out of scope of this document.</t>
      <figure anchor="Fig-archi" align="left" suppress-title="false" pn="figure-1">
        <name slugifiedName="name-architecture">Architecture</name>
        <artwork name="" type="" align="left" alt="" pn="section-3-5.1">
    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 |
                                +----+    +----+
|&lt;- - - - LoRaWAN - - -&gt;|
</artwork>
      </figure>
      <t indent="0" pn="section-3-6"><xref target="Fig-archi" format="default" sectionFormat="of" derivedContent="Figure 1"/> represents the
      architecture for compression/decompression; it is based on the terminology from <xref target="RFC8376" format="default" sectionFormat="of" derivedContent="RFC8376"/>. The device is sending
      application flows using IPv6 or IPv6/UDP protocols. These flows might
      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 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
      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 <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 indent="0" pn="section-3-7">The SCHC C/D and SCHC F/R process is bidirectional, so the same principles
      can be applied to the other direction.</t>
      <t indent="0" pn="section-3-8">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. <xref target="Fig-archi" format="default" sectionFormat="of" derivedContent="Figure 1"/> can be mapped in
      LoRaWAN terminology to:</t>
      <figure anchor="Fig-archi-lorawan" align="left" suppress-title="false" pn="figure-2">
        <name slugifiedName="name-schc-architecture-mapped-to">SCHC Architecture Mapped to LoRaWAN</name>
        <artwork name="" type="" align="left" alt="" pn="section-3-9.1">
   End Device                                              App
+--------------+                                   +----+ +----+ +----+
|App1 App2 App3|                                   |App1| |App2| |App3|
|              |                                   |    | |    | |    |
|      UDP     |                                   |UDP | |UDP | |UDP |
|     IPv6     |                                   |IPv6| |IPv6| |IPv6|
|              |                                   |    | |    | |    |
|SCHC C/D &amp; F/R|                                   |    | |    | |    |
+-------+------+                                   +----+ +----+ +----+
        |  +-------+    +-------+    +-----------+    .      .      .
        +~ |Gateway| == |Network| == |Application|..... Internet ....
           +-------+    |server |    |server     |
                        +-------+    | F/R - C/D |
                                     +-----------+
|&lt;- - - - - LoRaWAN - - - -&gt;|
</artwork>
      </figure>
    </section>
    <section anchor="lorawan-architecture" numbered="true" toc="include" removeInRFC="false" pn="section-4">
      <name slugifiedName="name-lorawan-architecture">LoRaWAN Architecture</name>
      <t indent="0" pn="section-4-1">An overview of the LoRaWAN protocol and architecture <xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/> is described in <xref target="RFC8376" format="default" sectionFormat="of" derivedContent="RFC8376"/>. The mapping between the LPWAN
      architecture entities as described in <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/> and the ones in <xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/> is as follows:</t>
      <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-4-2">
        <li pn="section-4-2.1">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.
</li>
        <li pn="section-4-2.2">The RGW is the endpoint of the constrained
link. This entity maps to the LoRaWAN Gateway.
</li>
        <li pn="section-4-2.3">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.
</li>
        <li pn="section-4-2.4">The SCHC C/D and SCHC F/R are handled by the LoRaWAN Application Server.
</li>
        <li pn="section-4-2.5">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.
</li>
      </ul>
      <figure anchor="Fig-LPWANarchi" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-lpwan-architecture">LPWAN Architecture</name>
        <artwork name="" type="" align="left" alt="" pn="section-4-3.1">
                                         (LPWAN-AAA Server)
    ()   ()   ()       |                      +------+
     ()  () () ()     / \       +---------+   | Join |
    () () () () ()   /   \======|    ^    |===|Server|  +-----------+
     () ()  ()      |           | &lt;--|--&gt; |   +------+  |Application|
    () ()  ()  ()  / \==========|    v    |=============|  Server   |
     ()  ()  ()   /   \         +---------+             +-----------+
    End devices  Gateways     Network Server          (SCHC C/D and F/R)
     (devices)    (RGW)            (NGW)
</artwork>
      </figure>
      <aside pn="section-4-4">
        <t indent="0" pn="section-4-4.1">Note: <xref target="Fig-LPWANarchi" format="default" sectionFormat="of" derivedContent="Figure 3"/> terms
      are from LoRaWAN, with <xref target="RFC8376" format="default" sectionFormat="of" derivedContent="RFC8376"/>
      terminology in brackets.</t>
      </aside>
      <t indent="0" pn="section-4-5">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.</t>
      <section anchor="device-classes-a-b-c-and-interactions" numbered="true" toc="include" removeInRFC="false" pn="section-4.1">
        <name slugifiedName="name-device-classes-a-b-c-and-in">Device Classes (A, B, C) and Interactions</name>
        <t indent="0" pn="section-4.1-1">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.</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-4.1-2">
          <dt pn="section-4.1-2.1">Class A:
</dt>
          <dd pn="section-4.1-2.2">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 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. Class A is the lowest power consumption class.
</dd>
          <dt pn="section-4.1-2.3">Class B:
</dt>
          <dd pn="section-4.1-2.4">
            <t indent="0" pn="section-4.1-2.4.1">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: </t>
            <dl indent="3" newline="false" spacing="normal" pn="section-4.1-2.4.2">
              <dt pn="section-4.1-2.4.2.1">High periodicity:</dt>
              <dd pn="section-4.1-2.4.2.2">Downlinks from the NGW will be sent faster but the device wakes up more
often and power consumption is increased.</dd>
              <dt pn="section-4.1-2.4.2.3">Low periodicity:</dt>
              <dd pn="section-4.1-2.4.2.4">Downlinks from the NGW will have higher latency but lower power consumption.</dd>
            </dl>
          </dd>
          <dt pn="section-4.1-2.5">Class C:
</dt>
          <dd pn="section-4.1-2.6">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).
</dd>
        </dl>
      </section>
      <section anchor="device-addressing" numbered="true" toc="include" removeInRFC="false" pn="section-4.2">
        <name slugifiedName="name-device-addressing">Device Addressing</name>
        <t indent="0" pn="section-4.2-1">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.</t>
        <t indent="0" pn="section-4.2-2">To communicate with the SCHC gateway, the Network Gateway
        <bcp14>MUST</bcp14> identify the devices by a unique 64-bit device
        identifier called the "DevEUI".</t>
        <t indent="0" pn="section-4.2-3">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.</t>
        <figure anchor="Fig-LoRaWANaddresses" align="left" suppress-title="false" pn="figure-4">
          <name slugifiedName="name-lorawan-addresses">LoRaWAN Addresses</name>
          <artwork name="" type="" align="left" alt="" pn="section-4.2-4.1">
+--------+         +---------+        +---------+          +----------+
| Device | &lt;=====&gt; | Network | &lt;====&gt; | SCHC    | &lt;======&gt; | Internet |
|        | DevAddr | Gateway | DevEUI | Gateway | IPv6/UDP |          |
+--------+         +---------+        +---------+          +----------+
</artwork>
        </figure>
      </section>
      <section anchor="general-frame-types" numbered="true" toc="include" removeInRFC="false" pn="section-4.3">
        <name slugifiedName="name-general-frame-types">General Frame Types</name>
        <t indent="0" pn="section-4.3-1">LoRaWAN implements the possibility to send confirmed or unconfirmed frames:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-4.3-2">
          <dt pn="section-4.3-2.1">Confirmed frame:
</dt>
          <dd pn="section-4.3-2.2">The sender asks the receiver to acknowledge the frame.
</dd>
          <dt pn="section-4.3-2.3">Unconfirmed frame:
</dt>
          <dd pn="section-4.3-2.4">The sender does not ask the receiver to acknowledge the frame.
</dd>
        </dl>
        <t indent="0" pn="section-4.3-3">As SCHC defines its own acknowledgment mechanisms, SCHC does not require
the use of LoRaWAN Confirmed frames (FType = 0b100 as per
<xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/>).</t>
      </section>
      <section anchor="lorawan-mac-frames" numbered="true" toc="include" removeInRFC="false" pn="section-4.4">
        <name slugifiedName="name-lorawan-mac-frames">LoRaWAN MAC Frames</name>
        <t indent="0" pn="section-4.4-1">In addition to regular data frames, LoRaWAN implements JoinRequest and JoinAccept
frame types, which are used by a device to join a network:</t>
        <dl indent="3" newline="false" spacing="normal" pn="section-4.4-2">
          <dt pn="section-4.4-2.1">JoinRequest:
</dt>
          <dd pn="section-4.4-2.2">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.
</dd>
          <dt pn="section-4.4-2.3">JoinAccept:
</dt>
          <dd pn="section-4.4-2.4">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 (among other fields) the network's major
settings and a random nonce used to derive the session keys.
</dd>
          <dt pn="section-4.4-2.5">Data:
</dt>
          <dd pn="section-4.4-2.6">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.
</dd>
        </dl>
      </section>
      <section anchor="lorawan-fport" numbered="true" toc="include" removeInRFC="false" pn="section-4.5">
        <name slugifiedName="name-lorawan-fport">LoRaWAN FPort</name>
        <t indent="0" pn="section-4.5-1">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" numbered="true" toc="include" removeInRFC="false" pn="section-4.6">
        <name slugifiedName="name-lorawan-empty-frame">LoRaWAN Empty Frame</name>
        <t indent="0" pn="section-4.6-1">A LoRaWAN empty frame is a LoRaWAN frame without FPort (cf. <xref target="lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Section 5.1"/>) and FRMPayload.</t>
      </section>
      <section anchor="unicast-and-multicast-technology" numbered="true" toc="include" removeInRFC="false" pn="section-4.7">
        <name slugifiedName="name-unicast-and-multicast-techn">Unicast and Multicast Technology</name>
        <t indent="0" pn="section-4.7-1">LoRaWAN technology supports unicast downlinks but also 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 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.</t>
        <aside pn="section-4.7-2">
          <t indent="0" pn="section-4.7-2.1">Note 1: IPv6 multicast addresses must be defined as per
        <xref target="RFC4291" format="default" sectionFormat="of" derivedContent="RFC4291"/>.  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>
        </aside>
        <aside pn="section-4.7-3">
          <t indent="0" pn="section-4.7-3.1">Note 2: The LoRa Alliance defined <xref target="LORAWAN-REMOTE-MULTICAST-SET" format="default" sectionFormat="of" derivedContent="LORAWAN-REMOTE-MULTICAST-SET"/> as the
        <bcp14>RECOMMENDED</bcp14> way to set up multicast groups on devices
        and create a synchronized reception window.</t>
        </aside>
      </section>
    </section>
    <section anchor="schc-over-lorawan" numbered="true" toc="include" removeInRFC="false" pn="section-5">
      <name slugifiedName="name-schc-over-lorawan">SCHC over LoRaWAN</name>
      <section anchor="lorawan-schc-payload" numbered="true" toc="include" removeInRFC="false" pn="section-5.1">
        <name slugifiedName="name-lorawan-fport-and-ruleid">LoRaWAN FPort and RuleID</name>
        <t indent="0" pn="section-5.1-1">The FPort field is part of the SCHC Message, as shown in
<xref target="Fig-lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Figure 5"/>. The SCHC C/D and the SCHC F/R <bcp14>SHALL</bcp14> concatenate
the FPort field with the LoRaWAN payload to recompose the SCHC Message.</t>
        <figure anchor="Fig-lorawan-schc-payload" align="left" suppress-title="false" pn="figure-5">
          <name slugifiedName="name-schc-message-in-lorawan">SCHC Message in LoRaWAN</name>
          <artwork name="" type="" align="left" alt="" pn="section-5.1-2.1">
| FPort | LoRaWAN payload  |
+ ------------------------ +
|       SCHC Message       |
</artwork>
        </figure>
        <aside pn="section-5.1-3">
          <t indent="0" pn="section-5.1-3.1">Note: The SCHC Message is any datagram sent by the SCHC C/D or F/R layers.</t>
        </aside>
        <t indent="0" pn="section-5.1-4">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 a "downlink-fragmented datagram". It uses another
FPort for data downlink and its associated SCHC control uplinks, named "FPortDown"
in this document.</t>
        <t indent="0" pn="section-5.1-5">All RuleIDs can use arbitrary values inside the FPort range allowed
        by the LoRaWAN specification <xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/> and
        <bcp14>MUST</bcp14> be shared by the device and SCHC gateway prior to
        the communication with the selected rule.  The uplink and downlink
        fragmentation FPorts <bcp14>MUST</bcp14> be different.</t>
      </section>
      <section anchor="rule-id-management" numbered="true" toc="include" removeInRFC="false" pn="section-5.2">
        <name slugifiedName="name-ruleid-management">RuleID Management</name>
        <t indent="0" pn="section-5.2-1">The RuleID <bcp14>MUST</bcp14> be 8 bits and encoded in the LoRaWAN
        FPort as described in <xref target="lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.


	
	LoRaWAN supports up to 223 application FPorts in
        the range [1..223] as defined in Section 4.3.2 of <xref target="LORAWAN-SPEC" format="default" sectionFormat="of" derivedContent="LORAWAN-SPEC"/>; it implies that the RuleID MSB
        <bcp14>SHOULD</bcp14> be inside this range. An application can send
        non-SCHC traffic by using FPort values different from the ones used
        for SCHC.</t>
        <t indent="0" pn="section-5.2-2">In order to improve interoperability, <bcp14>RECOMMENDED</bcp14> fragmentation RuleID values are:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.2-3">
          <li pn="section-5.2-3.1">RuleID = 20 (8-bit) for uplink fragmentation, named FPortUp.</li>
          <li pn="section-5.2-3.2">RuleID = 21 (8-bit) for downlink fragmentation, named FPortDown.</li>
          <li pn="section-5.2-3.3">RuleID = 22 (8-bit) for which SCHC compression was not possible (i.e., no matching
compression Rule was found), as described in <xref target="RFC8724" sectionFormat="of" section="6" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8724#section-6" derivedContent="RFC8724"/>.</li>
        </ul>
        <t indent="0" pn="section-5.2-4">The FPortUp value <bcp14>MUST</bcp14> 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,
        on reception, the SCHC Message <bcp14>MUST</bcp14> be sent to the SCHC
        C/D layer.</t>
        <t indent="0" pn="section-5.2-5">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.</t>
        <t indent="0" pn="section-5.2-6">An application can have multiple fragmented datagrams between a device and one
or several SCHC gateways.  A set of FPort values is <bcp14>REQUIRED</bcp14> for each SCHC gateway
instance the device is required to communicate with.  The application can use
additional uplinks or downlink-fragmented parameters but <bcp14>SHALL</bcp14> implement at
least the parameters defined in this document.</t>
        <t indent="0" pn="section-5.2-7">The mechanism for context distribution across devices and gateways is
outside the scope of this document.</t>
      </section>
      <section anchor="IID" numbered="true" toc="include" removeInRFC="false" pn="section-5.3">
        <name slugifiedName="name-interface-identifier-iid-co">Interface IDentifier (IID) Computation</name>
        <t indent="0" pn="section-5.3-1">In order to mitigate the risks described in <xref target="RFC8064" format="default" sectionFormat="of" derivedContent="RFC8064"/> and <xref target="RFC8065" format="default" sectionFormat="of" derivedContent="RFC8065"/>,
implementations <bcp14>MUST</bcp14> implement the following algorithm and <bcp14>SHOULD</bcp14> use it.</t>
        <ol spacing="normal" type="1" indent="adaptive" start="1" pn="section-5.3-2"><li pn="section-5.3-2.1" derivedCounter="1.">key = LoRaWAN AppSKey</li>
          <li pn="section-5.3-2.2" derivedCounter="2.">cmac = aes128_cmac(key, DevEUI)</li>
          <li pn="section-5.3-2.3" derivedCounter="3.">IID = cmac[0..7]</li>
        </ol>
        <t indent="0" pn="section-5.3-3">The aes128_cmac algorithm is described in <xref target="RFC4493" format="default" sectionFormat="of" derivedContent="RFC4493"/>. It has been chosen as it is already used by
        devices for the LoRaWAN protocol.</t>
        <t indent="0" pn="section-5.3-4">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.</t>
        <t indent="0" pn="section-5.3-5">Address-scan risk is mitigated thanks to the entropy added to
        the IID by the inclusion of AppSKey.</t>
        <t indent="0" pn="section-5.3-6">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.</t>
        <t indent="0" pn="section-5.3-7">Example with:</t>
        <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.3-8">
          <li pn="section-5.3-8.1">DevEUI: 0x1122334455667788</li>
          <li pn="section-5.3-8.2">AppSKey: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB</li>
        </ul>
        <figure anchor="Fig-iid-computation-example" align="left" suppress-title="false" pn="figure-6">
          <name slugifiedName="name-example-of-iid-computation">Example of IID Computation</name>
          <sourcecode markers="false" pn="section-5.3-9.1">
1. key: 0x00AABBCCDDEEFF00AABBCCDDEEFFAABB
2. cmac: 0x4E822D9775B2649928F82066AF804FEC
3. IID: 0x4E822D9775B26499
</sourcecode>
        </figure>
        <t indent="0" pn="section-5.3-10">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
        rekeyed is out of scope of this document and left to the
        implementation.</t>
        <aside pn="section-5.3-11">
          <t indent="0" pn="section-5.3-11.1">Note: Implementations also using another IID source
        <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 the device.</t>
        </aside>
      </section>
      <section anchor="padding" numbered="true" toc="include" removeInRFC="false" pn="section-5.4">
        <name slugifiedName="name-padding">Padding</name>
        <t indent="0" pn="section-5.4-1">All padding bits <bcp14>MUST</bcp14> be 0.</t>
      </section>
      <section anchor="Decomp" numbered="true" toc="include" removeInRFC="false" pn="section-5.5">
        <name slugifiedName="name-decompression">Decompression</name>
        <t indent="0" pn="section-5.5-1">The SCHC C/D <bcp14>MUST</bcp14> concatenate FPort and LoRaWAN payload
        to retrieve the SCHC Packet as per <xref target="lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.</t>
        <t indent="0" pn="section-5.5-2">RuleIDs matching FPortUp and FPortDown are reserved for SCHC fragmentation.</t>
      </section>
      <section anchor="Frag" numbered="true" toc="include" removeInRFC="false" pn="section-5.6">
        <name slugifiedName="name-fragmentation">Fragmentation</name>
        <t indent="0" pn="section-5.6-1">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).</t>
        <t indent="0" pn="section-5.6-2">The fragmentation parameters are different for uplink- and
        downlink-fragmented datagrams and are successively described in the
        next sections.</t>
        <section anchor="DTag" numbered="true" toc="include" removeInRFC="false" pn="section-5.6.1">
          <name slugifiedName="name-dtag">DTag</name>
          <t indent="0" pn="section-5.6.1-1"><xref target="RFC8724" sectionFormat="of" section="8.2.4" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8724#section-8.2.4" derivedContent="RFC8724"/> 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.</t>
          <aside pn="section-5.6.1-2">
            <t indent="0" pn="section-5.6.1-2.1">Note: The device can still have several parallel fragmented
datagrams with more than one SCHC gateway thanks to distinct sets of FPorts,
cf. <xref target="rule-id-management" format="default" sectionFormat="of" derivedContent="Section 5.2"/>.</t>
          </aside>
        </section>
        <section anchor="uplink-fragmentation-from-device-to-schc-gateway" numbered="true" toc="include" removeInRFC="false" pn="section-5.6.2">
          <name slugifiedName="name-uplink-fragmentation-from-d">Uplink Fragmentation: From Device to SCHC Gateway</name>
          <t indent="0" pn="section-5.6.2-1">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 <bcp14>MUST</bcp14> concatenate FPort and LoRaWAN
          payload to retrieve the SCHC Packet, as per <xref target="lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-5.6.2-2">
            <dt pn="section-5.6.2-2.1">SCHC fragmentation reliability mode:
</dt>
            <dd pn="section-5.6.2-2.2">
              <tt>ACK-on-Error</tt>.
</dd>
            <dt pn="section-5.6.2-2.3">SCHC header size:
</dt>
            <dd pn="section-5.6.2-2.4">2 bytes (the FPort byte + 1 additional byte).
</dd>
            <dt pn="section-5.6.2-2.5">RuleID:
</dt>
            <dd pn="section-5.6.2-2.6">8 bits stored in the LoRaWAN FPort (cf. <xref target="rule-id-management" format="default" sectionFormat="of" derivedContent="Section 5.2"/>).
</dd>
            <dt pn="section-5.6.2-2.7">DTag:
</dt>
            <dd pn="section-5.6.2-2.8">Size T = 0 bits, not used (cf. <xref target="DTag" format="default" sectionFormat="of" derivedContent="Section 5.6.1"/>).
</dd>
            <dt pn="section-5.6.2-2.9">Window index:
</dt>
            <dd pn="section-5.6.2-2.10">4 windows are used, encoded on M = 2 bits.
</dd>
            <dt pn="section-5.6.2-2.11">FCN:
</dt>
            <dd pn="section-5.6.2-2.12">The FCN field is encoded on N = 6 bits, so WINDOW_SIZE = 63 tiles                
are allowed in a window.
</dd>
            <dt pn="section-5.6.2-2.13">Last tile:
</dt>
            <dd pn="section-5.6.2-2.14">
              <t indent="0" pn="section-5.6.2-2.14.1">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:</t>
              <ul bare="false" empty="false" indent="3" spacing="normal" pn="section-5.6.2-2.14.2">
                <li pn="section-5.6.2-2.14.2.1">The sender <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 same session.
    </li>
                <li pn="section-5.6.2-2.14.2.2">If the last tile is in an All-1 SCHC Message, the current L2 MTU
    <bcp14>MUST</bcp14> be big enough to fit the All-1 header and the last
    tile.
    </li>
              </ul>
            </dd>
            <dt pn="section-5.6.2-2.15">Penultimate tile:
</dt>
            <dd pn="section-5.6.2-2.16">
              <bcp14>MUST</bcp14> be equal to the regular size.
    </dd>
            <dt pn="section-5.6.2-2.17">RCS:
</dt>
            <dd pn="section-5.6.2-2.18">Use the recommended calculation algorithm in <xref target="RFC8724" sectionFormat="of" section="8.2.3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc8724#section-8.2.3" derivedContent="RFC8724"/>, Integrity Checking.
    </dd>
            <dt pn="section-5.6.2-2.19">Tile:
</dt>
            <dd pn="section-5.6.2-2.20">Size is 10 bytes.
    </dd>
            <dt pn="section-5.6.2-2.21">Retransmission timer:
</dt>
            <dd pn="section-5.6.2-2.22">Set by the implementation depending on the application
    requirements. The default <bcp14>RECOMMENDED</bcp14> duration of this
    timer is 12 hours; this value is mainly driven by application requirements
    and <bcp14>MAY</bcp14> be changed by the application.
    </dd>
            <dt pn="section-5.6.2-2.23">Inactivity timer:
</dt>
            <dd pn="section-5.6.2-2.24">The SCHC gateway implements an "inactivity timer". The default
    <bcp14>RECOMMENDED</bcp14> duration of this timer is 12 hours; this value
    is mainly driven by application requirements and <bcp14>MAY</bcp14> be
    changed by the application.
    </dd>
            <dt pn="section-5.6.2-2.25">MAX_ACK_REQUESTS:
</dt>
            <dd pn="section-5.6.2-2.26"> 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.
    </dd>
          </dl>
          <t indent="0" pn="section-5.6.2-3">In addition to the per-rule context parameters specified in <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>,
for uplink rules, an additional context parameter is added: whether or
not to ack after each window.
For battery powered devices, it is <bcp14>RECOMMENDED</bcp14> to use the ACK mechanism at the
end of each window instead of waiting until the end of all windows:</t>
          <ul spacing="normal" bare="false" empty="false" indent="3" pn="section-5.6.2-4">
            <li pn="section-5.6.2-4.1">The SCHC receiver <bcp14>SHOULD</bcp14> send a SCHC ACK after every window even if there is no
missing tile.</li>
            <li pn="section-5.6.2-4.2">The SCHC sender <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, it <bcp14>SHOULD</bcp14>
            send a SCHC ACK REQ up to MAX_ACK_REQUESTS times, as described
            previously.</li>
          </ul>
          <t indent="0" pn="section-5.6.2-5">This will avoid useless uplinks if the device has lost network coverage.</t>
          <t indent="0" pn="section-5.6.2-6">For non-battery powered devices, the SCHC receiver
          <bcp14>MAY</bcp14> 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.</t>
          <t indent="0" pn="section-5.6.2-7">SCHC implementations <bcp14>MUST</bcp14> be compatible with both behaviors, and this selection is
part of the rule context.</t>
          <section anchor="regular-fragments" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.2.1">
            <name slugifiedName="name-regular-fragments">Regular Fragments</name>
            <t indent="0" pn="section-5.6.2.1-1"><xref target="Fig-fragmentation-header-long-all0" format="default" sectionFormat="of" derivedContent="Figure 7"/>
            is an example of a regular fragment for all fragments except
            the last one.  SCHC Header Size is 16 Bits, including the
            LoRaWAN FPort.
            </t>
            <figure anchor="Fig-fragmentation-header-long-all0" align="left" suppress-title="false" pn="figure-7">
              <name slugifiedName="name-all-fragments-except-the-la">All Fragments Except the Last One.</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.1-2.1">
| FPort  |  LoRaWAN payload          |
+ ------ + ------------------------- +
| RuleID |   W    | FCN    | Payload |
+ ------ + ------ + ------ + ------- +
| 8 bits | 2 bits | 6 bits |         |
</artwork>
            </figure>
          </section>
          <section anchor="last-fragment-all-1" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.2.2">
            <name slugifiedName="name-last-fragment-all-1">Last Fragment (All-1)</name>
            <t indent="0" pn="section-5.6.2.2-1">Following figures are examples of All-1 messages. <xref target="Fig-fragmentation-header-all1-no-tile" format="default" sectionFormat="of" derivedContent="Figure 8"/>
            is without the last tile, <xref target="Fig-fragmentation-header-all1-last-tile" format="default" sectionFormat="of" derivedContent="Figure 9"/>
            is with the last tile.
            </t>
            <figure anchor="Fig-fragmentation-header-all1-no-tile" align="left" suppress-title="false" pn="figure-8">
              <name slugifiedName="name-all-1-schc-message-without-">All-1 SCHC Message without Last Tile</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.2-2.1">
| FPort  | LoRaWAN payload              |
+ ------ + ---------------------------- +
| RuleID |   W    | FCN=All-1 |  RCS    |
+ ------ + ------ + --------- + ------- +
| 8 bits | 2 bits | 6 bits    | 32 bits |
</artwork>
            </figure>
            <figure anchor="Fig-fragmentation-header-all1-last-tile" align="left" suppress-title="false" pn="figure-9">
              <name slugifiedName="name-all-1-schc-message-with-las">All-1 SCHC Message with Last Tile</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.2-3.1">
| 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>
          </section>
          <section anchor="schc-ack" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.2.3">
            <name slugifiedName="name-schc-ack">SCHC ACK</name>
            <figure anchor="Fig-frag-header-long-schc-ack-rcs-ok" align="left" suppress-title="false" pn="figure-10">
              <name slugifiedName="name-schc-ack-format-correct-rcs">SCHC ACK Format - Correct RCS Check</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.3-1.1">
| FPort  | LoRaWAN payload           |
+ ------ + --------------------------+
| RuleID |   W   | C = 1 |  padding  |
|        |       |       | (b'00000) |
+ ------ + ----- + ----- + --------- +
| 8 bits | 2 bit | 1 bit |  5 bits   |
</artwork>
            </figure>
            <figure anchor="Fig-frag-header-long-schc-ack-rcs-fail" align="left" suppress-title="false" pn="figure-11">
              <name slugifiedName="name-schc-ack-format-incorrect-r">SCHC ACK Format - Incorrect RCS Check</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.3-2.1">
| 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 |
</artwork>
            </figure>
            <aside pn="section-5.6.2.3-3">
              <t indent="0" pn="section-5.6.2.3-3.1">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.</t>
            </aside>
          </section>
          <section anchor="receiver-abort" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.2.4">
            <name slugifiedName="name-receiver-abort">Receiver-Abort</name>
            <figure anchor="Fig-fragmentation-receiver-abort" align="left" suppress-title="false" pn="figure-12">
              <name slugifiedName="name-receiver-abort-format">Receiver-Abort Format</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.4-1.1">
| 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 -&gt;| &lt;-- L2 Word --&gt; |
</artwork>
            </figure>
          </section>
          <section anchor="schc-acknowledge-request" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.2.5">
            <name slugifiedName="name-schc-acknowledge-request">SCHC Acknowledge Request</name>
            <figure anchor="Fig-fragmentation-schc-ack-req" align="left" suppress-title="false" pn="figure-13">
              <name slugifiedName="name-schc-ack-req-format">SCHC ACK REQ Format</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.2.5-1.1">
| FPort  | LoRaWAN payload          |
+------- +------------------------- +
| RuleID | W      | FCN = b'000000  |
+ ------ + ------ + --------------- +
| 8 bits | 2 bits | 6 bits          |
</artwork>
            </figure>
          </section>
        </section>
        <section anchor="downlink-fragmentation-from-schc-gateway-to-device" numbered="true" toc="include" removeInRFC="false" pn="section-5.6.3">
          <name slugifiedName="name-downlink-fragmentation-from">Downlink Fragmentation: From SCHC Gateway to Device</name>
          <t indent="0" pn="section-5.6.3-1">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 <bcp14>MUST</bcp14> concatenate
          FPort and LoRaWAN payload to retrieve the SCHC Packet as described
          in <xref target="lorawan-schc-payload" format="default" sectionFormat="of" derivedContent="Section 5.1"/>.</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-5.6.3-2">
            <dt pn="section-5.6.3-2.1">SCHC fragmentation reliability mode:
</dt>
            <dd pn="section-5.6.3-2.2">
              <ul empty="true" bare="false" indent="3" spacing="normal" pn="section-5.6.3-2.2.1">
                <li pn="section-5.6.3-2.2.1.1">
                  <dl indent="3" newline="false" spacing="normal" pn="section-5.6.3-2.2.1.1.1">
                    <dt pn="section-5.6.3-2.2.1.1.1.1">Unicast downlinks:
</dt>
                    <dd pn="section-5.6.3-2.2.1.1.1.2">ACK-Always.
</dd>
                    <dt pn="section-5.6.3-2.2.1.1.1.3">Multicast downlinks:
</dt>
                    <dd pn="section-5.6.3-2.2.1.1.1.4">No-ACK; reliability has to be ensured by the upper layer. This feature is
<bcp14>OPTIONAL</bcp14> for the SCHC gateway and <bcp14>REQUIRED</bcp14> for the device.
</dd>
                  </dl>
                </li>
              </ul>
            </dd>
            <dt pn="section-5.6.3-2.3">RuleID: 
</dt>
            <dd pn="section-5.6.3-2.4">8 bits stored in the LoRaWAN FPort (cf. <xref target="rule-id-management" format="default" sectionFormat="of" derivedContent="Section 5.2"/>).
</dd>
            <dt pn="section-5.6.3-2.5">DTag:
</dt>
            <dd pn="section-5.6.3-2.6">Size T = 0 bit, not used (cf. <xref target="DTag" format="default" sectionFormat="of" derivedContent="Section 5.6.1"/>).
</dd>
            <dt pn="section-5.6.3-2.7">FCN:
</dt>
            <dd pn="section-5.6.3-2.8">The FCN field is encoded on N = 1 bit, so WINDOW_SIZE = 1 tile.
</dd>
            <dt pn="section-5.6.3-2.9">RCS:
</dt>
            <dd pn="section-5.6.3-2.10">Use the recommended calculation algorithm in <xref target="RFC8724" sectionFormat="of" format="default" section="8.2.3" derivedLink="https://rfc-editor.org/rfc/rfc8724#section-8.2.3" derivedContent="RFC8724"/>, Integrity Checking.
</dd>
            <dt pn="section-5.6.3-2.11">Inactivity timer:
</dt>
            <dd pn="section-5.6.3-2.12">The default <bcp14>RECOMMENDED</bcp14> duration of this timer is 12 hours;
this value is mainly driven by application requirements and <bcp14>MAY</bcp14>
be changed by the application.
</dd>
          </dl>
          <t indent="0" pn="section-5.6.3-3">The following parameters apply to ACK-Always (Unicast) only:</t>
          <dl indent="3" newline="false" spacing="normal" pn="section-5.6.3-4">
            <dt pn="section-5.6.3-4.1">Retransmission timer:
</dt>
            <dd pn="section-5.6.3-4.2">See <xref target="downlink-retransmission-timer" format="default" sectionFormat="of" derivedContent="Section 5.6.3.5"/>.
</dd>
            <dt pn="section-5.6.3-4.3">MAX_ACK_REQUESTS:
</dt>
            <dd pn="section-5.6.3-4.4">8.
</dd>
            <dt pn="section-5.6.3-4.5">Window index (unicast only):
</dt>
            <dd pn="section-5.6.3-4.6">encoded on M = 1 bit, as per <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>.
</dd>
          </dl>
          <t indent="0" pn="section-5.6.3-5">As only one tile is used, its size can change for each downlink and
          will be the currently available MTU.</t>
          <t indent="0" pn="section-5.6.3-6">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 <bcp14>RECOMMENDED</bcp14> 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 <bcp14>RECOMMENDED</bcp14> uplink is a LoRaWAN empty
          frame as defined in <xref target="lorawan-empty-frame" format="default" sectionFormat="of" derivedContent="Section 4.6"/>.  As this uplink is sent only to open an RX window, any
          LoRaWAN uplink frame from the device <bcp14>MAY</bcp14> reset this
          counter.</t>
          <aside pn="section-5.6.3-7">
            <t indent="0" pn="section-5.6.3-7.1">Note: The FPending bit included in the LoRaWAN protocol <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 SCHC needs.</t>
          </aside>
          <section anchor="regular-fragments-1" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.1">
            <name slugifiedName="name-regular-fragments-2">Regular Fragments</name>
            <t indent="0" pn="section-5.6.3.1-1"><xref target="Fig-fragmentation-downlink-header-all0" format="default" sectionFormat="of" derivedContent="Figure 14"/>
            is an example of a regular fragment for all fragments except
            the last one.  SCHC Header Size is 10 Bits, including the
            LoRaWAN FPort.
            </t>
            <figure anchor="Fig-fragmentation-downlink-header-all0" align="left" suppress-title="false" pn="figure-14">
              <name slugifiedName="name-all-fragments-but-the-last-">All Fragments but the Last One.</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.3.1-2.1">
| FPort  | LoRaWAN payload                      |
+ ------ + ------------------------------------ +
| RuleID | W     | FCN = b'0 | Payload          |
+ ------ + ----- + --------- + ---------------- +
| 8 bits | 1 bit | 1 bit     | X bytes + 6 bits |
</artwork>
            </figure>
          </section>
          <section anchor="last-fragment-all-1-1" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.2">
            <name slugifiedName="name-last-fragment-all-1-2">Last Fragment (All-1)</name>
            <figure anchor="Fig-fragmentation-downlink-header-all1" align="left" suppress-title="false" pn="figure-15">
              <name slugifiedName="name-all-1-schc-message-the-last">All-1 SCHC Message: The Last Fragment</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.3.2-1.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 |
</artwork>
            </figure>
          </section>
          <section anchor="schc-ack-1" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.3">
            <name slugifiedName="name-schc-ack-2">SCHC ACK</name>
            <figure anchor="Fig-frag-downlink-header-schc-ack-rcs-ok" align="left" suppress-title="false" pn="figure-16">
              <name slugifiedName="name-schc-ack-format-correct-rcs-">SCHC ACK Format - Correct RCS Check</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.3.3-1.1">
| FPort  | LoRaWAN payload                    |
+ ------ + ---------------------------------- +
| RuleID | W     | C = b'1 | Padding b'000000 |
+ ------ + ----- + ------- + ---------------- +
| 8 bits | 1 bit | 1 bit   | 6 bits           |
</artwork>
            </figure>
            <figure anchor="Fig-frag-downlink-header-schc-ack-rcs-fail" align="left" suppress-title="false" pn="figure-17">
              <name slugifiedName="name-schc-ack-format-incorrect-rc">SCHC ACK Format - Incorrect RCS Check</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.3.3-2.1">
| 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>
          </section>
          <section anchor="receiver-abort-1" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.4">
            <name slugifiedName="name-receiver-abort-2">Receiver-Abort</name>
            <t indent="0" pn="section-5.6.3.4-1"><xref target="Fig-fragmentation-downlink-header-abort" format="default" sectionFormat="of" derivedContent="Figure 18"/>
            is an example of a Receiver-Abort packet, following an All-1
            SCHC Fragment with incorrect RCS.
            </t>
            <figure anchor="Fig-fragmentation-downlink-header-abort" align="left" suppress-title="false" pn="figure-18">
              <name slugifiedName="name-receiver-abort-packet">Receiver-Abort Packet</name>
              <artwork name="" type="" align="left" alt="" pn="section-5.6.3.4-2.1">
| 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 -&gt;| &lt;-- L2 Word --&gt; |
</artwork>
            </figure>
          </section>
          <section anchor="downlink-retransmission-timer" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.5">
            <name slugifiedName="name-downlink-retransmission-tim">Downlink Retransmission Timer</name>
            <t indent="0" pn="section-5.6.3.5-1">Class A, Class B, and Class C devices do not manage
            retransmissions and timers the same way.</t>
            <section anchor="class-a-devices" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.5.1">
              <name slugifiedName="name-class-a-devices">Class A Devices</name>
              <t indent="0" pn="section-5.6.3.5.1-1">Class A devices can only receive in an RX slot following the
              transmission of an uplink.</t>
              <t indent="0" pn="section-5.6.3.5.1-2">The SCHC gateway implements an inactivity timer with a
              <bcp14>RECOMMENDED</bcp14> 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.</t>
              <t indent="0" pn="section-5.6.3.5.1-3">RETRANSMISSION_TIMER is application specific and its
              <bcp14>RECOMMENDED</bcp14> value is
              INACTIVITY_TIMER/(MAX_ACK_REQUESTS + 1).</t>
              <t indent="0" pn="section-5.6.3.5.1-4"><strong>SCHC All-0 (FCN = 0)</strong></t>
              <t indent="0" pn="section-5.6.3.5.1-5">All fragments but the last have an FCN = 0 (because the window size
              is 1).  Following an All-0 SCHC Fragment, the device
              <bcp14>MUST</bcp14> transmit the SCHC ACK message. It
              <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 downlink has been
              received during the RX1 and RX2 windows.  The LoRaWAN layer will respect
              the applicable local spectrum regulation.</t>
              <aside pn="section-5.6.3.5.1-6">
                <t indent="0" pn="section-5.6.3.5.1-6.1">Note: The ACK bitmap is 1 bit long and is always 1.</t>
              </aside>
              <t indent="0" pn="section-5.6.3.5.1-7"><strong>SCHC All-1 (FCN = 1)</strong></t>
              <t indent="0" pn="section-5.6.3.5.1-8">SCHC All-1 is the last fragment of a datagram, and the
              corresponding SCHC ACK message might be lost; therefore, the SCHC
              gateway <bcp14>MUST</bcp14> request a retransmission of this ACK
              when the retransmission timer expires.  To open a downlink
              opportunity, the device <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 is <bcp14>RECOMMENDED</bcp14> for a
              device to send an empty frame (see <xref target="lorawan-empty-frame" format="default" sectionFormat="of" derivedContent="Section 4.6"/>), 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
              <bcp14>MUST</bcp14> be greater than 1. This allows the opening of a
              downlink opportunity to any downlink with higher priority than
              the SCHC ACK REQ message.</t>
              <aside pn="section-5.6.3.5.1-9">
                <t indent="0" pn="section-5.6.3.5.1-9.1">Note: The device <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 ACK REQ; this indicates that the SCHC gateway has received
              the SCHC ACK message.</t>
              </aside>
            </section>
          </section>
          <section anchor="class-b-or-class-c-devices" numbered="true" toc="exclude" removeInRFC="false" pn="section-5.6.3.6">
            <name slugifiedName="name-class-b-or-class-c-devices">Class B or Class C Devices</name>
            <t indent="0" pn="section-5.6.3.6-1">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 indent="0" pn="section-5.6.3.6-2"><bcp14>RECOMMENDED</bcp14> retransmission timer values are:</t>
            <dl indent="3" newline="false" spacing="normal" pn="section-5.6.3.6-3">
              <dt pn="section-5.6.3.6-3.1">Class B: 
</dt>
              <dd pn="section-5.6.3.6-3.2">3 times the ping slot periodicity.
</dd>
              <dt pn="section-5.6.3.6-3.3">Class C: 
</dt>
              <dd pn="section-5.6.3.6-3.4">30 seconds.
</dd>
            </dl>
            <t indent="0" pn="section-5.6.3.6-4">The <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" numbered="true" toc="include" removeInRFC="false" pn="section-5.7">
        <name slugifiedName="name-schc-fragment-format">SCHC Fragment Format</name>
        <section anchor="all-0-schc-fragment" numbered="true" toc="include" removeInRFC="false" pn="section-5.7.1">
          <name slugifiedName="name-all-0-schc-fragment">All-0 SCHC Fragment</name>
          <t indent="0" pn="section-5.7.1-1"><strong>Uplink Fragmentation (Ack-on-Error)</strong>:</t>
          <t indent="0" pn="section-5.7.1-2">All-0 is distinguishable from a SCHC ACK REQ, as <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/> 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.</t>
          <t indent="0" pn="section-5.7.1-3"><strong>Downlink fragmentation (ACK-Always)</strong>:</t>
          <t indent="0" pn="section-5.7.1-4">As per <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>, SCHC All-1
          <bcp14>MUST</bcp14> contain the last tile, and 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" numbered="true" toc="include" removeInRFC="false" pn="section-5.7.2">
          <name slugifiedName="name-all-1-schc-fragment">All-1 SCHC Fragment</name>
          <t indent="0" pn="section-5.7.2-1">All-1 is distinguishable from a SCHC Sender-Abort, as <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/> 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.</t>
        </section>
        <section anchor="delay-after-each-lorawan-frame-to-respect-local-regulation" numbered="true" toc="include" removeInRFC="false" pn="section-5.7.3">
          <name slugifiedName="name-delay-after-each-lorawan-fr">Delay after Each LoRaWAN Frame to Respect Local Regulation</name>
          <t indent="0" pn="section-5.7.3-1">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.</t>
        </section>
      </section>
    </section>
    <section anchor="security-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-6">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-6-1">This document is only providing parameters that are expected to be best
suited for LoRaWAN networks for <xref target="RFC8724" format="default" sectionFormat="of" derivedContent="RFC8724"/>. IID
security is discussed in <xref target="IID" format="default" sectionFormat="of" derivedContent="Section 5.3"/>. As such, this document does not contribute to
any new security issues beyond those already identified in
<xref target="RFC8724" format="default" sectionFormat="of" derivedContent="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 (i.e., each join or rejoin to the LoRaWAN network).</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="include" removeInRFC="false" pn="section-7">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <t indent="0" pn="section-7-1">This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references pn="section-8">
      <name slugifiedName="name-references">References</name>
      <references pn="section-8.1">
        <name slugifiedName="name-normative-references">Normative References</name>
        <reference anchor="LORAWAN-SPEC" target="https://lora-alliance.org/resource_hub/lorawan-104-specification-package/" quoteTitle="true" derivedAnchor="LORAWAN-SPEC">
          <front>
            <title>LoRaWAN 1.0.4 Specification Package</title>
            <author>
              <organization showOnFrontPage="true">LoRa Alliance</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="1997" month="March"/>
            <abstract>
              <t indent="0">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="RFC4291" target="https://www.rfc-editor.org/info/rfc4291" quoteTitle="true" derivedAnchor="RFC4291">
          <front>
            <title>IP Version 6 Addressing Architecture</title>
            <author initials="R." surname="Hinden" fullname="R. Hinden">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="S." surname="Deering" fullname="S. Deering">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="February"/>
            <abstract>
              <t indent="0">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 indent="0">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" quoteTitle="true" derivedAnchor="RFC4493">
          <front>
            <title>The AES-CMAC Algorithm</title>
            <author initials="JH." surname="Song" fullname="JH. Song">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="R." surname="Poovendran" fullname="R. Poovendran">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="J." surname="Lee" fullname="J. Lee">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="T." surname="Iwata" fullname="T. Iwata">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2006" month="June"/>
            <abstract>
              <t indent="0">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="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="May"/>
            <abstract>
              <t indent="0">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="RFC8724" target="https://www.rfc-editor.org/info/rfc8724" quoteTitle="true" derivedAnchor="RFC8724">
          <front>
            <title>SCHC: Generic Framework for Static Context Header Compression and Fragmentation</title>
            <author initials="A." surname="Minaburo" fullname="A. Minaburo">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="L." surname="Toutain" fullname="L. Toutain">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="C." surname="Gomez" fullname="C. Gomez">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Barthel" fullname="D. Barthel">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="JC." surname="Zúñiga" fullname="JC. Zúñiga">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2020" month="April"/>
            <abstract>
              <t indent="0">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 indent="0">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 indent="0">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 indent="0">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>
      </references>
      <references pn="section-8.2">
        <name slugifiedName="name-informative-references">Informative References</name>
        <reference anchor="LORAWAN-REMOTE-MULTICAST-SET" target="https://lora-alliance.org/resource_hub/lorawan-remote-multicast-setup-specification-v1-0-0/" quoteTitle="true" derivedAnchor="LORAWAN-REMOTE-MULTICAST-SET">
          <front>
            <title>LoRaWAN Remote Multicast Setup Specification v1.0.0</title>
            <author>
              <organization showOnFrontPage="true">LoRa Alliance</organization>
            </author>
            <date/>
          </front>
        </reference>
        <reference anchor="RFC8064" target="https://www.rfc-editor.org/info/rfc8064" quoteTitle="true" derivedAnchor="RFC8064">
          <front>
            <title>Recommendation on Stable IPv6 Interface Identifiers</title>
            <author initials="F." surname="Gont" fullname="F. Gont">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="A." surname="Cooper" fullname="A. Cooper">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="D." surname="Thaler" fullname="D. Thaler">
              <organization showOnFrontPage="true"/>
            </author>
            <author initials="W." surname="Liu" fullname="W. Liu">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="February"/>
            <abstract>
              <t indent="0">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" quoteTitle="true" derivedAnchor="RFC8065">
          <front>
            <title>Privacy Considerations for IPv6 Adaptation-Layer Mechanisms</title>
            <author initials="D." surname="Thaler" fullname="D. Thaler">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2017" month="February"/>
            <abstract>
              <t indent="0">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" quoteTitle="true" derivedAnchor="RFC8376">
          <front>
            <title>Low-Power Wide Area Network (LPWAN) Overview</title>
            <author initials="S." surname="Farrell" fullname="S. Farrell" role="editor">
              <organization showOnFrontPage="true"/>
            </author>
            <date year="2018" month="May"/>
            <abstract>
              <t indent="0">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.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8376"/>
          <seriesInfo name="DOI" value="10.17487/RFC8376"/>
        </reference>
      </references>
    </references>
    <section anchor="examples" numbered="true" toc="include" removeInRFC="false" pn="section-appendix.a">
      <name slugifiedName="name-examples">Examples</name>
      <t indent="0" pn="section-appendix.a-1">In the following examples, "applicative data" refers to the IPv6 payload
      sent by the application to the SCHC layer.</t>
      <section anchor="uplink-compression-example-no-fragmentation" numbered="true" toc="include" removeInRFC="false" pn="section-a.1">
        <name slugifiedName="name-uplink-compression-example-">Uplink - Compression Example - No Fragmentation</name>
        <t indent="0" pn="section-a.1-1">This example represents an applicative data going through SCHC over
        LoRaWAN; no fragmentation required.</t>
        <t indent="0" pn="section-a.1-2">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>
        <figure anchor="Fig-example-uplink-no-fragmentation-payload-schc-message" align="left" suppress-title="false" pn="figure-19">
          <name slugifiedName="name-uplink-example-schc-message">Uplink Example: SCHC Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.1-3.1">
| RuleID | Compression residue |  Payload  | Padding=b'000 |
+ ------ + ------------------- + --------- + ------------- +
|   1    |       21 bits       |  37 bytes |    3 bits     |
</artwork>
        </figure>
        <t indent="0" pn="section-a.1-4">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.</t>
        <figure anchor="Fig-example-uplink-no-fragmentation-compression" align="left" suppress-title="false" pn="figure-20">
          <name slugifiedName="name-uplink-example-lorawan-pack">Uplink Example: LoRaWAN Packet</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.1-5.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     |
</artwork>
        </figure>
      </section>
      <section anchor="uplink-compression-and-fragmentation-example" numbered="true" toc="include" removeInRFC="false" pn="section-a.2">
        <name slugifiedName="name-uplink-compression-and-frag">Uplink - Compression and Fragmentation Example</name>
        <t indent="0" pn="section-a.2-1">This example represents an applicative data going through SCHC, with
fragmentation.</t>
        <t indent="0" pn="section-a.2-2">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>
        <figure anchor="Fig-example-uplink-fragmentation-schc-message" align="left" suppress-title="false" pn="figure-21">
          <name slugifiedName="name-uplink-example-schc-message-2">Uplink Example: SCHC Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-3.1">
| RuleID | Compression residue |  Payload  |
+ ------ + ------------------- + --------- +
|   1    |       21 bits       | 279 bytes |
</artwork>
        </figure>
        <t indent="0" pn="section-a.2-4">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.</t>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-1" align="left" suppress-title="false" pn="figure-22">
          <name slugifiedName="name-uplink-example-lorawan-packe">Uplink Example: LoRaWAN Packet 1</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-5.1">
| LoRaWAN Header             | LoRaWAN payload (11 bytes) |
+ -------------------------- + -------------------------- +
|                | RuleID=20 |   W   |  FCN   |  1 tile   |
+ -------------- + --------- + ----- + ------ + --------- +
|       XXXX     | 1 byte    | 0   0 |   62   | 10 bytes  |
</artwork>
        </figure>
        <t indent="0" pn="section-a.2-6">The tile content is described in <xref target="Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content" format="default" sectionFormat="of" derivedContent="Figure 23"/>
        </t>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-1-tile-content" align="left" suppress-title="false" pn="figure-23">
          <name slugifiedName="name-uplink-example-first-tile-c">Uplink Example: First Tile Content</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-7.1">
Content of the tile is:
| RuleID | Compression residue |  Payload          |
+ ------ + ------------------- + ----------------- +
|   1    |       21 bits       |  6 bytes + 3 bits |
</artwork>
        </figure>
        <t indent="0" pn="section-a.2-8">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.</t>
        <t indent="0" pn="section-a.2-9">Next transmission MTU is 242 bytes, 4-byte FOpts. 23 tiles are transmitted:</t>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-2" align="left" suppress-title="false" pn="figure-24">
          <name slugifiedName="name-uplink-example-lorawan-packet">Uplink Example: LoRaWAN Packet 2</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-10.1">
| 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>
        <t indent="0" pn="section-a.2-11">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>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-3" align="left" suppress-title="false" pn="figure-25">
          <name slugifiedName="name-uplink-example-lorawan-packet-">Uplink Example: LoRaWAN Packet 3</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-12.1">
| 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>
        <t indent="0" pn="section-a.2-13">Then All-1 message can be transmitted:</t>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-4" align="left" suppress-title="false" pn="figure-26">
          <name slugifiedName="name-uplink-example-lorawan-packet-4">Uplink Example: LoRaWAN Packet 4 - All-1 SCHC Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-14.1">
| LoRaWAN Header    | LoRaWAN payload (44 bytes) |
+ ---- + -----------+ -------------------------- +
|      | RuleID=20  |   W   |  FCN  |     RCS    |
+ ---- + ---------- + ----- + ----- + ---------- +
| XXXX | 1 byte     | 0   0 |   63  |  4 bytes   |
</artwork>
        </figure>
        <t indent="0" pn="section-a.2-15">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>
        <figure anchor="Fig-example-uplink-fragmentation-lorawan-packet-5" align="left" suppress-title="false" pn="figure-27">
          <name slugifiedName="name-uplink-example-lorawan-packet-5">Uplink Example: LoRaWAN Packet 5 - SCHC ACK</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.2-16.1">
| LoRaWAN Header             | LoRaWAN payload     |
+ -------------- + --------- + ------------------- +
|                | RuleID=20 |   W   | C | Padding |
+ -------------- + --------- + ----- + - + ------- +
|       XXXX     | 1 byte    | 0   0 | 1 | 5 bits  |
</artwork>
        </figure>
      </section>
      <section anchor="downlink" numbered="true" toc="include" removeInRFC="false" pn="section-a.3">
        <name slugifiedName="name-downlink">Downlink</name>
        <t indent="0" pn="section-a.3-1">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>
        <figure anchor="Fig-example-downlink-fragmentation-schc-message" align="left" suppress-title="false" pn="figure-28">
          <name slugifiedName="name-downlink-example-schc-messa">Downlink Example: SCHC Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-2.1">
| RuleID | Compression residue |  Payload  |
+ ------ + ------------------- + --------- +
|   1    |       21 bits       | 127 bytes |
</artwork>
        </figure>
        <t indent="0" pn="section-a.3-3">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.</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-1" align="left" suppress-title="false" pn="figure-29">
          <name slugifiedName="name-downlink-example-lorawan-pa">Downlink Example: LoRaWAN Packet 1 - SCHC Fragment 1</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-4.1">
| 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 indent="0" pn="section-a.3-5">The tile content is described in <xref target="Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content" format="default" sectionFormat="of" derivedContent="Figure 30"/>
        </t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-1-tile-content" align="left" suppress-title="false" pn="figure-30">
          <name slugifiedName="name-downlink-example-first-tile">Downlink Example: First Tile Content</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-6.1">
| RuleID | Compression residue |        Payload     |
+ ------ + ------------------- + ------------------ +
|   1    |       21 bits       | 48 bytes and 1 bit |
</artwork>
        </figure>
        <t indent="0" pn="section-a.3-7">The receiver answers with a SCHC ACK:</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-2" align="left" suppress-title="false" pn="figure-31">
          <name slugifiedName="name-downlink-example-lorawan-pac">Downlink Example: LoRaWAN Packet 2 -  SCHC ACK</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-8.1">
| LoRaWAN Header   | LoRaWAN payload                  |
+ ---- + --------- + -------------------------------- +
|      | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 |
+ ---- + --------- + ----- + ----- + ---------------- +
| XXXX |  1 byte   | 1 bit | 1 bit |     6 bits       |
</artwork>
        </figure>
        <t indent="0" pn="section-a.3-9">The second downlink is sent, two FOpts:</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-3" align="left" suppress-title="false" pn="figure-32">
          <name slugifiedName="name-downlink-example-lorawan-pack">Downlink Example: LoRaWAN Packet 3 - SCHC Fragment 2</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-10.1">
| 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>
        <t indent="0" pn="section-a.3-11">The receiver answers with a SCHC ACK:</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-4" align="left" suppress-title="false" pn="figure-33">
          <name slugifiedName="name-downlink-example-lorawan-packe">Downlink Example: LoRaWAN Packet 4 -  SCHC ACK</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-12.1">
| LoRaWAN Header   | LoRaWAN payload                  |
+ ---- + --------- + -------------------------------- +
|      | RuleID=21 | W = 1 | C = 1 | Padding=b'000000 |
+ ---- + --------- + ----- + ----- + ---------------- +
| XXXX |  1 byte   | 1 bit | 1 bit |     6 bits       |
</artwork>
        </figure>
        <t indent="0" pn="section-a.3-13">The last downlink is sent, no FOpts:</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-5" align="left" suppress-title="false" pn="figure-34">
          <name slugifiedName="name-downlink-example-lorawan-packet">Downlink Example: LoRaWAN Packet 5 - All-1 SCHC Message</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-14.1">
| 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 bit | 5 bits  |
</artwork>
        </figure>
        <t indent="0" pn="section-a.3-15">The receiver answers to the sender with a SCHC ACK:</t>
        <figure anchor="Fig-example-downlink-fragmentation-lorawan-packet-6" align="left" suppress-title="false" pn="figure-35">
          <name slugifiedName="name-downlink-example-lorawan-packet-">Downlink Example: LoRaWAN Packet 6 - SCHC ACK</name>
          <artwork name="" type="" align="left" alt="" pn="section-a.3-16.1">
| LoRaWAN Header   | LoRaWAN payload                  |
+ ---- + --------- + -------------------------------- +
|      | RuleID=21 | W = 0 | C = 1 | Padding=b'000000 |
+ ---- + --------- + ----- + ----- + ---------------- +
| XXXX |  1 byte   | 1 bit | 1 bit |     6 bits       |
</artwork>
        </figure>
      </section>
    </section>
    <section numbered="false" anchor="acknowledgements" toc="include" removeInRFC="false" pn="section-appendix.b">
      <name slugifiedName="name-acknowledgements">Acknowledgements</name>
      <t indent="0" pn="section-appendix.b-1">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 indent="0" pn="section-appendix.b-2">LoRaWAN is a registered trademark of the LoRa Alliance.</t>
    </section>
    <section numbered="false" anchor="contributors" toc="include" removeInRFC="false" pn="section-appendix.c">
      <name slugifiedName="name-contributors">Contributors</name>
      <t indent="0" pn="section-appendix.c-1">Contributors ordered by family name.</t>
      <contact fullname="Vincent Audebert">
        <organization showOnFrontPage="true">EDF R&amp;D</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>vincent.audebert@edf.fr</email>
        </address>
      </contact>
      <contact fullname="Julien Catalano">
        <organization showOnFrontPage="true">Kerlink</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>j.catalano@kerlink.fr</email>
        </address>
      </contact>
      <contact fullname="Michael Coracin">
        <organization showOnFrontPage="true">Semtech</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>mcoracin@semtech.com</email>
        </address>
      </contact>
      <contact fullname="Marc Le Gourrierec">
        <organization showOnFrontPage="true">Sagemcom</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>marc.legourrierec@sagemcom.com</email>
        </address>
      </contact>
      <contact fullname="Nicolas Sornin">
        <organization showOnFrontPage="true">Chirp Foundation</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>nicolas.sornin@chirpfoundation.org</email>
        </address>
      </contact>
      <contact fullname="Alper Yegin">
        <organization showOnFrontPage="true">Actility</organization>
        <address>
          <postal>
            <city/>
            <country/>
          </postal>
          <email>alper.yegin@actility.com</email>
        </address>
      </contact>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.d">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="O." surname="Gimenez" fullname="Olivier Gimenez" role="editor">
        <organization showOnFrontPage="true">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 showOnFrontPage="true">Acklio</organization>
        <address>
          <postal>
            <street>1137A Avenue des Champs Blancs</street>
            <city>Cesson-Sévigné Cedex</city>
            <code>35510</code>
            <country>France</country>
          </postal>
          <email>ivaylo@ackl.io</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
