6lo Working Group                                               C. Gomez
Internet-Draft                                                       UPC
Intended status: Standards Track                             A. Minaburo
Expires: 11 September 2023                                    F. Moullec
                                                                  Acklio
                                                              March 2023


  Transmission of SCHC-compressed packets over IEEE 802.15.4 networks
                     draft-ietf-6lo-schc-15dot4-01

Abstract

   A framework called Static Context Header Compression and
   fragmentation (SCHC) has been designed with the primary goal of
   supporting IPv6 over Low Power Wide Area Network (LPWAN) technologies
   [RFC8724].  One of the SCHC components is a header compression
   mechanism.  If used properly, SCHC header compression allows a
   greater compression ratio than that achievable with traditional
   6LoWPAN header compression [RFC6282].  For this reason, it may make
   sense to use SCHC header compression in some 6LoWPAN environments,
   including IEEE 802.15.4 networks.  This document specifies how a
   SCHC-compressed packet can be carried over IEEE 802.15.4 networks.
   The document also enables the transmission of SCHC-compressed UDP/
   CoAP headers over 6LoWPAN-compressed IPv6 packets.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 2 September 2023.

Copyright Notice

   Copyright (c) 2023 IETF Trust and the persons identified as the
   document authors.  All rights reserved.




Gomez, et al.           Expires 11 September 2023               [Page 1]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) 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 Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
     2.1.  Requirements language . . . . . . . . . . . . . . . . . .   4
     2.2.  Background on previous specifications . . . . . . . . . .   4
   3.  Architecture  . . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Protocol stack  . . . . . . . . . . . . . . . . . . . . .   4
     3.2.  Network topologies  . . . . . . . . . . . . . . . . . . .   6
     3.3.  Multihop communication  . . . . . . . . . . . . . . . . .   6
       3.3.1.  Straightforward Route-Over approach . . . . . . . . .   7
       3.3.2.  Tunneled, RPL-based Route-Over approach . . . . . . .   7
       3.3.3.  Pointer-based Route-over approach . . . . . . . . . .   8
       3.3.4.  Mesh-Under approach . . . . . . . . . . . . . . . . .   9
     3.4.  Summary . . . . . . . . . . . . . . . . . . . . . . . . .   9
   4.  Frame Format  . . . . . . . . . . . . . . . . . . . . . . . .   9
     4.1.  Single-hop or straightforward Route-Over frame format . .  10
       4.1.1.  SCHC Dispatch . . . . . . . . . . . . . . . . . . . .  10
       4.1.2.  SCHC Header . . . . . . . . . . . . . . . . . . . . .  10
       4.1.3.  Padding . . . . . . . . . . . . . . . . . . . . . . .  11
     4.2.  Tunneled, RPL-based Route-Over frame format . . . . . . .  11
     4.3.  Pointer-based, Route-Over frame format  . . . . . . . . .  12
     4.4.  Mesh-Under frame format . . . . . . . . . . . . . . . . .  14
   5.  Enabling the transition protocol stack  . . . . . . . . . . .  15
   6.  SCHC compression for IPv6, UDP, and CoAP headers  . . . . . .  16
     6.1.  SCHC compression for IPv6 and UDP headers . . . . . . . .  16
       6.1.1.  Compression of IPv6 addresses . . . . . . . . . . . .  16
       6.1.2.  UDP checksum field  . . . . . . . . . . . . . . . . .  17
     6.2.  SCHC compression for CoAP headers . . . . . . . . . . . .  17
   7.  Neighbor Discovery  . . . . . . . . . . . . . . . . . . . . .  17
   8.  Fragmentation and reassembly  . . . . . . . . . . . . . . . .  18
   9.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  18
   10. Security Considerations . . . . . . . . . . . . . . . . . . .  18
   11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  18
   12. References  . . . . . . . . . . . . . . . . . . . . . . . . .  19
     12.1.  Normative References . . . . . . . . . . . . . . . . . .  19
     12.2.  Informative References . . . . . . . . . . . . . . . . .  21
   Appendix A.  Header compression examples  . . . . . . . . . . . .  21
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  21



Gomez, et al.           Expires 11 September 2023               [Page 2]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


1.  Introduction

   RFC 6282 is the main specification for IPv6 over Low power Wireless
   Personal Area Network (6LoWPAN) IPv6 header compression [RFC6282].
   That RFC was designed assuming IEEE 802.15.4 as the layer below the
   6LoWPAN adaptation layer, and it has also been reused (with proper
   adaptations) for IPv6 header compression over many other technologies
   relatively similar to IEEE 802.15.4 in terms of characteristics such
   as physical layer bit rate, layer 2 maximum payload size, etc.
   Examples of such technologies comprise BLE, DECT-ULE, ITU G.9959, MS/
   TP, NFC, and PLC.  RFC 6282 provides additional functionality, such
   as a mechanism for UDP header compression.

   In the best cases, RFC 6282 allows to compress a 40-byte IPv6 header
   down to a 2-byte compressed header (for link-local interactions) or a
   3-byte compressed header (when global IPv6 addresses are used).  On
   the other hand, an RFC 6282 compressed UDP header has a typical size
   of 4 bytes.  Therefore, in advantageous conditions, a 48-byte
   uncompressed IPv6/UDP header may be compressed down to a 6-byte
   format (when using link-local addresses) or a 7-byte format (for
   global interactions) by using RFC 6282.

   Recently, a framework called Static Context Header Compression (SCHC)
   has been designed with the primary goal of supporting IPv6 over Low
   Power Wide Area Network (LPWAN) technologies [RFC8724].  SCHC
   comprises header compression and fragmentation functionality tailored
   to the extraordinary constraints of LPWAN technologies, which are
   more severe than those exhibited by IEEE 802.15.4 or other relatively
   similar technologies.  SCHC header compression allows a greater
   compression ratio than that of RFC 6282.  If used properly, SCHC
   allows to compress an IPv6/UDP header down to e.g. a single byte.  In
   addition, SCHC can be used to compress Constrained Application
   Protocol (CoAP) headers as well [RFC7252][RFC8824], which further
   increases the achievable performance improvement of using SCHC header
   compression, since there is no 6LoWPAN header compression mechanism
   defined for CoAP.  Therefore, it may make sense to use SCHC header
   compression in some 6LoWPAN environments, including IEEE 802.15.4
   networks, considering its greater efficiency.

   This document specifies how a SCHC-compressed packet can be carried
   over IEEE 802.15.4 networks.  In order to ease a transition from
   existing 6LoWPAN/6Lo implementations to support SCHC header
   compression, the document also enables the transmission of SCHC-
   compressed UDP/CoAP headers over 6LoWPAN-compressed IPv6 packets.







Gomez, et al.           Expires 11 September 2023               [Page 3]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   Note that, as per this document, and while SCHC defines fragmentation
   mechanisms as well, 6LoWPAN/6Lo fragmentation is used when necessary
   to transport SCHC-compressed packets over IEEE 802.15.4 networks
   [RFC4944][RFC8930][RFC8931].

   This specification updates RFC 8138 and RFC 9008.

2.  Terminology

2.1.  Requirements language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in
   BCP14 [RFC2119], [RFC8174], when, and only when, they appear in all
   capitals, as shown here.

2.2.  Background on previous specifications

   The reader is expected to be familiar with the terms and concepts
   defined in specifications of 6LoWPAN frame formats [RFC4944], RPL
   [RFC6550] and companion documents [RFC6553][RFC6554][RFC9008],
   6LoWPAN Routing Header [RFC8138], SCHC [RFC8724], and SCHC for CoAP
   [RFC8824].

   RFC 8724 defines the Rule concept, whereby a Rule may be used to
   support header compression or fragmentation functionality.  In the
   present document, Rules are only used for header compression.

3.  Architecture

3.1.  Protocol stack

   The traditional 6LoWPAN-based protocol stack for constrained devices
   (Figure 1, left) places the 6LoWPAN adaptation layer between IPv6 and
   an underlying technology such as IEEE 802.15.4.  Suitable upper layer
   protocols include CoAP [RFC7252] and UDP.  (Note that, while CoAP has
   also been specified over TCP, and TCP may play a significant role in
   IoT environments [RFC9006], 6LoWPAN header compression has not been
   defined for TCP.)

   6LoWPAN can be envisioned as a set of two main sublayers, where the
   upper one provides header compression, while the lower one offers
   fragmentation.







Gomez, et al.           Expires 11 September 2023               [Page 4]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   This document defines an alternative approach for packet header
   compression over IEEE 802.15.4, which leads to a modified protocol
   stack (Figure 1, right).  Fragmentation functionality remains the one
   defined by 6LoWPAN [RFC4944] and 6Lo [RFC8930][RFC8931].



        +------------+          +------------+
        | CoAP, other|          | CoAP, other|
        +------------+          +------------+
        | UDP, other |          | UDP, other |
        +------------+          +------------+
        |    IPv6    |          |    IPv6    |
        +------------+          +------------+
        | 6LoWPAN HC |          |  SCHC HC   |  <-- NEW
        +------------+          +------------+
        |6LoWPAN Frag|          |6LoWPAN Frag|
        +------------+          +------------+
        |  802.15.4  |          |  802.15.4  |
        +------------+          +------------+


        Figure 1: Traditional 6LoWPAN-based protocol stack over IEEE
       802.15.4 (left) and alternative protocol stack using SCHC for
         header compression (right).  HC and Frag stand for Header
                Compression and Fragmentation, respectively.

   SCHC header compression may be applied to the headers of different
   protocols or sets of protocols.  Some examples include: i) IPv6
   packet headers, ii) joint IPv6 and UDP packet headers, iii) joint
   IPv6, UDP and CoAP packet headers, etc.

   In order to ease a transition from existing 6LoWPAN implementations
   to support SCHC header compression, the document also enables the
   transmission of SCHC-compressed UDP/CoAP headers over 6LoWPAN-
   compressed IPv6 packets.  The "transition" protocol stack is shown in
   Figure 2 (rightmost).














Gomez, et al.           Expires 11 September 2023               [Page 5]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


                                                 +------------+
                                                 |    CoAP    |
    +------------+   +------------+              +------------+
    | CoAP, other|   | CoAP, other|              |     UDP    |
    +------------+   +------------+              +------------+
    | UDP, other |   | UDP, other |              |   SCHC HC  |  <-- NEW
    +------------+   +------------+              +------------+
    |    IPv6    |   |    IPv6    |              |    IPv6    |
    +------------+   +------------+              +------------+
    | 6LoWPAN HC |   |  SCHC HC   |  <-- NEW     | 6LoWPAN HC |
    +------------+   +------------+              +------------+
    |6LoWPAN Frag|   |6LoWPAN Frag|              |6LoWPAN Frag|
    +------------+   +------------+              +------------+
    |  802.15.4  |   |  802.15.4  |              |  802.15.4  |
    +------------+   +------------+              +------------+



       Figure 2: Traditional 6LoWPAN-based protocol stack over IEEE
    802.15.4 (left), alternative protocol stack using SCHC for header
      compression (middle), and transition protocol stack using SCHC
     for header compression of UDP/CoAP headers (right).  HC and Frag
      stand for Header Compression and Fragmentation, respectively.

3.2.  Network topologies

   IEEE 802.15.4 supports two main network topologies: the star
   topology, and the peer-to-peer (i.e., mesh) topology.

   SCHC has been designed for LPWAN technologies, which are typically
   based on a star topology where constrained devices (e.g., sensors)
   communicate with a less constrained, central network gateway [RFC
   8376].  However, as stated in [draft-ietf-lpwan-architecture], SCHC
   is generic and it can also be used in networking environments beyond
   the ones originally considered for SCHC.

   SCHC compression is applicable to both star topology and mesh
   topology IEEE 802.15.4 networks.

3.3.  Multihop communication

   6LoWPAN defines two approaches for multihop communication: Route-Over
   and Mesh-Under [RFC6606].  In Route-Over, routing is performed at the
   IP layer.  In Mesh-Under, routing functionality is located at the
   adaptation layer, below IP.  This section describes how SCHC-
   compressed packets are transmitted over a multihop IEEE 802.15.4
   network, for both Route-Over and Mesh-Under.




Gomez, et al.           Expires 11 September 2023               [Page 6]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


3.3.1.  Straightforward Route-Over approach

   SCHC header compression MAY be used in a Route-Over network in a
   straightforward approach, whereby all network nodes MUST store all
   the Rules in use by any nodes in the network.  In this case, 6LoWPAN
   routers are able to decompress (if needed) received packet headers
   and compress packet headers before being forwarded.

   The frame format to be used to carry a SCHC-compressed packet in the
   straightforward Route-Over approach is described in Section 4.1.

3.3.2.  Tunneled, RPL-based Route-Over approach

   In a Route-Over network that uses the IPv6 Routing Protocol for Low-
   Power and Lossy Networks (RPL) [RFC6550], the RPL non-storing mode
   [RFC6550, RFC 6554] and [RFC8138] MAY be exploited in order to
   efficiently transmit SCHC-compressed packets.  In this approach,
   packets sent by a 6LN are tunneled to the root, and packets intended
   for 6LNs are tunneled from the root (note: a tunnel is not needed
   when the root itself is the source).  Traffic between two 6LNs
   traverses an Upward tunnel to the root and a Downward tunnel from the
   root.

   In this approach, a network node MUST store the Rules defined for its
   communication with other endpoints.  A 6LR is thus relieved to store
   Rules used by pairs of endpoints that do not include the 6LR itself.
   A 6LBR MUST store all the Rules used by all nodes in the network.

   RFC 9008 describes how the communication between a 6LN and another
   endpoint (another 6LN or the root of the same RPL domain, or an
   external node, e.g., on the Internet) is performed.  In RPL non-
   storing mode, for Downward traffic, the root adds a source-routing
   header.  The root also performs IPv6-in-IPv6 encapsulation, except
   when the root itself is the packet source.  The IPv6-in-IPv6
   encapsulation terminates at the 6LN (if it is a RAL) or at the last
   6LR (if the 6LN is a RUL).  For Upward traffic, IPv6-in-IPv6
   encapsulation is performed by the first 6LR when the 6LN is a RUL
   that sends a packet to an external node or to another 6LN in the same
   RPL domain, but not to the root.  When the 6LN is a RAL that sends
   packets to the same destinations, IPv6-in-IPv6 encapsulation may be
   performed (by the RAL).  The destination in the outer header of the
   IPv6-in-IPv6 encapsulation for Upward traffic is the root.









Gomez, et al.           Expires 11 September 2023               [Page 7]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   This document updates RFC 9008 by specifying that, in the tunneled,
   RPL-based Route-Over approach, when a 6LN transmits an IPv6 packet
   whose header is compressed by means of SCHC instead of 6LoWPAN header
   compression (RFC 6282), the SCHC-compressed packet MUST be tunneled
   by means of IPv6-in-IPv6 encapsulation up to the root.  This applies
   regardless of the inner, SCHC-compressed packet destination.

   For Upward traffic, when the 6LN is a RAL, the 6LN itself performs
   the IPv6-in-IPv6 encapsulation.  However, if the 6LN is a RUL, IPv6-
   in-IPv6 encapsulation is performed by the first 6LR.  In the latter
   case, in order to enable efficient packet transmission in the first
   hop from the 6LN, the first 6LR SHOULD be provided with SCHC Rules
   allowing efficient header compression of packets sent by that 6LN.

   For Downward traffic, when the 6LN is a RUL, in order to enable
   efficient packet transmission in the last hop to the 6LN, the last
   6LR SHOULD be provided with SCHC Rules allowing efficient header
   compression of packets sent to that 6LN.

   For the sake of efficiency, RFC 8138 MUST be used to compress IPv6-
   in-IPv6 headers, the RPL Option (RFC 6553) and the source routing
   header (RPL Routing Header type 3, RFC 6554).

   The frame format to be used to carry a SCHC-compressed packet in the
   tunneled, RPL-based Route-Over approach is described in Section 4.3.

3.3.3.  Pointer-based Route-over approach

   In the previous approach, intermediate nodes do not have to know the
   IPv6 destination address of a SCHC-compressed IPv6 packet to be able
   to forward it.  An alternative approach where intermediate nodes
   neither have to store the Rules used by the endpoints for packet
   header compression/decompression, which also does not require IPv6-
   in-IPv6 encapsulation, non-storing mode RPL and RFC 8138 compression,
   is the Pointer-based Route-Over approach.  In this approach, a SCHC
   pointer is added after the SCHC Dispatch, in order to indicate the
   location and length of the destination address residue in the SCHC
   header.

   TO-DO: clarify assumption regarding the IPv6 destination prefix.

   The Pointer-based Route-over approach is compatible with RPL storing
   mode, as well as with other routing protocols.








Gomez, et al.           Expires 11 September 2023               [Page 8]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


3.3.4.  Mesh-Under approach

   When SCHC header compression is used in a Mesh-Under network, Mesh-
   Under operates as described in RFC 4944.  The frame format to be used
   to carry a SCHC-compressed packet in the Mesh-Under approach is
   described in Section 4.3.

   For header compression in a Mesh-Under network, a network node MUST
   store the Rules defined for its communication with other endpoints.

   In this case, a RuleID MAY be reused across disjoint pairs of
   endpoints, to identify different Rules used by such disjoint pairs of
   endpoints, at the expense of increased RuleID management and device
   configuration complexity.

3.4.  Summary

   The different transmission alternatives enabled by the present
   document are shown in Figure 3:


   +------------+---------------------------------------------------------+
   |  One hop   |                        Multihop                         |
   +------------+----------+----------------------------------------------+
   |            |Mesh-under|             Route-Over                       |
   |            |          +----------------+--------------+--------------+
   |            |          |    RPL-based, non-storing     | RPL (or other|
   |            |          +----------------+--------------+ routing)     |
   |            |          |      Up        |     Down     |   storing    |
   +------------+----------+----------------+--------------+--------------+
   |SCHC Disp   |Mesh Hdrs,|IP-in-IP, 6LoRH,| 6LoRH,       | SCHC Dispatch|
   |            |SCHC Disp |SCHC Dispatch   | SCHC Dsptch  | (with ptr)   |
   +------------+----------+----------------+--------------+--------------+
   | see 4.1    |  see 4.4 |    see 4.2     |   see 4.2    |   see 4.3    |
   +------------+----------+----------------+--------------+--------------+


    Figure 3: Summary of transmission alternatives enabled by the
                           present document

4.  Frame Format

   This section defines the frame format to be used when a SCHC-
   compressed packet is carried over IEEE 802.15.4.  Such format is
   carried as IEEE 802.15.4 frame payload.






Gomez, et al.           Expires 11 September 2023               [Page 9]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


4.1.  Single-hop or straightforward Route-Over frame format

   This subsection defines the frame format for carrying SCHC-compressed
   packets over IEEE 802.15.4 for single-hop communication or when the
   straightforward Route-Over approach (see 3.3.1) is used.  This format
   comprises a SCHC Dispatch Type, a SCHC Packet (i.e. a SCHC-compressed
   packet (RFC 8724), and Padding bits, if any).  Figure 4 illustrates
   the described frame format.


           <---------- IEEE 802.15.4 frame payload ---------->

                           <----- SCHC Packet ----->
           +---------------+-------------+---------+ - - - - +
           | SCHC Dispatch | SCHC Header | Payload | Padding |
           +---------------+-------------+---------+ - - - - +


     Figure 4: Encapsulated, SCHC-compressed packet, for single-hop or
    straightforward Route-Over transmission.  Padding bits are added if
                                  needed.

4.1.1.  SCHC Dispatch

   Adding SCHC header compression to the panoply of header compression
   mechanisms used in 6LoWPAN/6Lo environments creates the need to
   signal when a packet header has been compressed by using SCHC.  To
   this end, the present document specifies the SCHC Dispatch.  The SCHC
   Dispatch indicates that the next field in the frame format is a SCHC-
   compressed header (SCHC Header in Figure 4, see 4.2)).

   This document defines the SCHC Dispatch as a 6LoWPAN Dispatch Type
   for SCHC header compression [RFC4944].  With the aim to minimize
   overhead, the present document allocates a 1-byte pattern in Page 0
   [RFC8025] for the SCHC Dispatch Type:

   SCHC Dispatch Type bit pattern: 01000100 (Page 0) (Note: to be
   confirmed by IANA))

4.1.2.  SCHC Header

   SCHC Header (Figure 4) corresponds to a packet header that has been
   compressed by using SCHC.  As defined in [RFC8724], the SCHC Header
   comprises a RuleID, and a compression residue.  As per the present
   specification, a RuleID size between 1 and 16 bits is RECOMMENDED.
   In order to decide the RuleID size to be used in a network, the
   trade-off between (compressed) header overhead and the number of
   Rules needs to be carefully assessed.



Gomez, et al.           Expires 11 September 2023              [Page 10]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


4.1.3.  Padding

   If SCHC header compression leads to a SCHC Packet size of a non-
   integer number of bytes, padding bits of value equal to zero MUST be
   appended to the SCHC Packet as appropriate to align to an octet
   boundary.

4.2.  Tunneled, RPL-based Route-Over frame format

   This subsection defines the frame formats for carrying SCHC-
   compressed packets over IEEE 802.15.4 in the tunneled, RPL-based
   Route-Over approach (see 3.3.2).  Such formats are based on RFC 8138;
   however, instead of RFC 6282 header compression, this specification
   uses SCHC header compression.  Accordingly, this specification
   updates RFC 8138 by stating that a 6LoRH header MUST always be placed
   before the LOWPAN_IPHC as defined in RFC 6282 [RFC6282] or the SCHC
   Dispatch, followed by the SCHC-compressed packet, as defined in the
   present specification.

   Since 6LoRH uses Dispatch Types in Page 1, the present specification
   also defines a SCHC Dispatch Type in Page 1, with the same bit
   pattern as the one in Page 0: 01000100 (to be confirmed by IANA).

   In the tunneled, RPL-based Route-Over frame formats, the SCHC-
   compressed header is preceded by the SCHC Dispatch (in this case, in
   Page 1).

   The frame format for Downward transmission, except when the SCHC-
   compressed packet source is a RPL root, is shown in Figure 5:


        <----------------- IEEE 802.15.4 frame payload ---------------------->

                                                          <- SCHC pkt ->
        +-- ... -+-- ... --+- ... -+--- ... --+---- ... -+-----+-------+ - - +
        |11110001|SRH-6LoRH| RPI-  | IP-in-IP | 01000100 |SCHC |payload| pad |
        |Page 1  |         | 6LoRH |  6LoRH   |SCHCDsptch| hdr |       |     |
        +-- ... -+-- ... --+- ... -+--- ... --+---- ... -+-----+-------+ - - +
                                                (Page 1)

                                              <----- This specification ----->


    Figure 5: Downward frame format for SCHC-compressed packets in
   the tunneled, RPL-based Route-Over approach, when the source is
                           not a RPL root.





Gomez, et al.           Expires 11 September 2023              [Page 11]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   The frame format for Downward transmission, when the SCHC-compressed
   packet source is a RPL root, is shown in Figure 6:


            <-------------- IEEE 802.15.4 frame payload -------------->

                                                  <- SCHC pkt ->
           +-- ... -+-- ... --+- ... -+---- ... -+-----+-------+ - - +
           |11110001|SRH-6LoRH| RPI-  | 01000100 |SCHC |payload| pad |
           |Page 1  |         | 6LoRH |SCHCDsptch| hdr |       |     |
           +-- ... -+-- ... --+- ... -+---- ... -+-----+-------+ - - +
                                        (Page 1)

                                      <----- This specification ----->


       Figure 6: Downward frame format for SCHC-compressed packets in
     the tunneled, RPL-based Route-Over approach, when the source is a
                                 RPL root.

   The frame format for Upward transmission is shown in Figure 7 (note
   that it does not include the source routing header that is present in
   the Downward frame format):


           <------------- IEEE 802.15.4 frame payload ---------------->

                                                   <- SCHC pkt ->
           +-- ... -+- ... -+--- ... --+---- ... -+-----+-------+ - - +
           |11110001| RPI-  | IP-in-IP | 01000100 |SCHC |payload| pad |
           |Page 1  | 6LoRH |  6LoRH   |SCHCDsptch| hdr |       |     |
           +-- ... -+- ... -+--- ... --+---- ... -+-----+-------+ - - +
                                         (Page 1)

                                       <----- This specification ----->


      Figure 7: Upward frame format for SCHC-compressed packets in the
                 tunneled, RPL- based Route-Over approach.

4.3.  Pointer-based, Route-Over frame format

   This subsection describes the frame format for carrying SCHC-
   compressed packets over IEEE 802.15.4 in the Pointer-based Route-Over
   approach (see 3.3.3).  Such format is shown in Figure 8:






Gomez, et al.           Expires 11 September 2023              [Page 12]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


    <---------------- IEEE 802.15.4 frame payload ------------------->

                                   <----- SCHC Packet ----->
    +---------------+--------------+-------------+---------+ - - - - +
    | SCHC Dispatch | SCHC Pointer | SCHC Header | Payload | Padding |
    +---------------+--------------+-------------+---------+ - - - - +
                           v             <->
                           |              |
                           +---------------+
                           compr. resd. addr.


         Figure 8: frame format for SCHC-compressed packets in the
                    Pointer-based Route- Over approach.

   The SCHC Pointer indicates the position of the first bit of the IPv6
   destination address residue in the SCHC Header (note that the latter
   starts with the RuleID), and the length (in bits) of the IPv6
   destination address residue.  The SCHC Pointer format is shown in
   Figure 9:


               0 1 2 3 4 5 6 0 1 2 3 4 5 6
              +-+-----------+-+-----------+
              |P|  Bit      |0|  Address  |
              | |  pointer  | |  length   |
              +-+-----------+-+-----------+


                       Figure 9: SCHC Pointer format.

   The SCHC Pointer Format comprises three fields, namely: P, Bit
   pointer and Address length.

   The first field, P, is an indication of whether the Bit pointer and
   Address length fields are present (P=1) or not (P=0).

   If P is set to 1, the Bit pointer gives the starting position of the
   IPv6 destination address residue in the SCHC Header (in bits), and
   Address length indicates the size of the IPv6 destination address
   residue (in bits).

   If P is set to 0, neither the Bit Pointer nor the Address length
   fields are present (note: the "0" that precedes the Address length is
   not present either).






Gomez, et al.           Expires 11 September 2023              [Page 13]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


4.4.  Mesh-Under frame format

   This subsection describes the frame formats for carrying SCHC-
   compressed packets over IEEE 802.15.4 in the Mesh-Under approach (see
   3.3.3).  Note that the formats are provided in this section for the
   sake of clarity and completeness, since they are the same as those in
   RFC 4944, except for the fact that SCHC-compressed packets are
   carried.

   The frame format for a SCHC-compressed packet to be sent by means of
   Mesh-Under, when fragmentation is not needed, is shown in Figure 10:


    <-------------------- IEEE 802.15.4 frame payload ---------------------->

                                              <----- SCHC Packet ----->
    +-----------+-------------+---------------+-------------+---------+ - - +
    | Mesh Type | Mesh Header | SCHC Dispatch | SCHC Header | Payload | pad |
    +-----------+-------------+---------------+-------------+---------+ - - +


   Figure 10: Encapsulated, SCHC-compressed packet, for Mesh-Under
   transmission (without fragmentation).  Padding bits are added if
                               needed.

   The frame format for a SCHC-compressed packet to be sent by means of
   Mesh-Under, which also requires fragmentation, is shown in Figure 11:


   <-------------------- IEEE 802.15.4 frame payload -------------------->

                                              <---- SCHC Packet --->
   +-------+-------+-------+-------+----------+----------+---------+ - - +
   | M Typ | M Hdr | F Typ | F Hdr | SCHC Dsp | SCHC Hdr | Payload | Pad |
   +-------+-------+-------+-------+----------+----------+---------+ - - +


   Figure 11: Encapsulated, SCHC-compressed packet, for Mesh-Under
    transmission (with fragmentation).  Padding bits are added if
                               needed.

   The frame format for a SCHC-compressed packet to be sent by means of
   Mesh-Under, which also requires a broadcast header to support mesh
   broadcast/multicast, is shown in Figure 12:







Gomez, et al.           Expires 11 September 2023              [Page 14]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   <-------------------- IEEE 802.15.4 frame payload -------------------->

                                              <---- SCHC Packet --->
   +-------+-------+-------+-------+----------+----------+---------+ - - +
   | M Typ | M Hdr | B Dsp | B Hdr | SCHC Dsp | SCHC Hdr | Payload | Pad |
   +-------+-------+-------+-------+----------+----------+---------+ - - +


      Figure 12: Encapsulated, SCHC-compressed packet, for mesh
       broadcast/multicast in Mesh-Under transmission (without
   fragmentation).  Padding bits are added if needed.  'B Dsp' and
    'B Hdr' stand for 'Broadcast Dispatch' and 'Broadcast Header',
                            respectively.

   As in RFC 4944, when more than one LoWPAN header is used in the same
   packet, they MUST appear in the following order: Mesh Addressing
   Header, Broadcast Header, Fragmentation Header.

5.  Enabling the transition protocol stack

   In order to enable the transition protocol stack, (i.e., supporting
   SCHC-compressed UDP/CoAP headers over 6LoWPAN-compressed IPv6
   packets), the present document exploits the work that is being done
   by the INTAREA WG, to define a new Internet Protocol Number for SCHC
   [I-D.ietf-intarea-schc-ip-protocol-number].  In this approach, the NH
   field of the RFC 6282-compressed IPv6 header format is set to 0.  The
   Next Header field of the IPv6 header remains an 8-bit (uncompressed)
   field carrying the SCHC Internet Protocol Number.  The resulting
   protocol encapsulation and corresponding format, which is carried as
   IEEE 802.15.4 frame payload, is shown in Figure 13.  Padding is added
   as needed to align the format to an octet boundary.


       <---------------- IEEE 802.15.4 frame payload ------------------>
       +-----------------------+------------------+--------------+ - - +
       | RFC6282-compressed    |                  |              |     |
       |     IPv6 header       | SCHC-compressed  | CoAP Payload | Pad |
       |(NH=0,Next Header=SCHC)| UDP/CoAP headers |              |     |
       +-----------------------+------------------+--------------+- - -+


       Figure 13: Protocol data unit encapsulation and format for the
      transition protocol stack using a SCHC Internet Protocol Number








Gomez, et al.           Expires 11 September 2023              [Page 15]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


6.  SCHC compression for IPv6, UDP, and CoAP headers

   SCHC header compression may be applied to the headers of different
   protocols or sets of protocols.  Some examples include: i) IPv6
   packet headers, ii) joint IPv6 and UDP packet headers, iii) joint
   IPv6, UDP and CoAP packet headers, etc.

   Each Rule defines the set of protocols whose headers are compressed.
   For example, in a given deployment, RuleIDs 1 to 3 may be defined for
   IPv6 header compression only, RuleIDs 4 to 7 may be used for IPv6/UDP
   header compression, and RuleIDs 8 to 15 may be used for IPv6/UDP/CoAP
   header compression.

   This section describes how IPv6, UDP, and CoAP header fields are
   compressed.

6.1.  SCHC compression for IPv6 and UDP headers

   IPv6 and UDP header fields MUST be compressed as per Section 10 of
   RFC 8724.

   IPv6 addresses are split into two 64-bit-long fields; one for the
   prefix and one for the Interface Identifier (IID).

   To allow for a single Rule being used for both directions, RFC 8724
   identifies IPv6 addresses and UDP ports by their role (Dev or App)
   and not by their position in the header (source or destination).
   This optimization can be used as is in some IEEE 802.15.4 networks
   (e.g., an IEEE 802.15.4 star topology where the peripheral devices
   (Devs) send/receive packets to/from a network-side entity (App)).

   However, in some types of 6LoWPAN environments (e.g., when a sender
   and its destination are both peer nodes in a mesh topology network),
   additional functionality is needed to allow use of the Dev and App
   roles for C/D.  In this case, each SCHC C/D entity needs to know its
   role (Dev or App) in addition to the Rule(s), and corresponding
   RuleIDs, for each endpoint it communicates with before such
   communication occurs [I-D.ietf-lpwan-architecture].  In such cases,
   the terms Uplink and Downlink that have been defined in RFC 8724 need
   to be understood in the context of each specific pair of endpoints.

6.1.1.  Compression of IPv6 addresses

   Compression of IPv6 source and destination prefixes MUST be performed
   as per Section 10.7.1 of RFC 8724.  Additional guidance is given in
   the present section.





Gomez, et al.           Expires 11 September 2023              [Page 16]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   Compression of IPv6 source and destination IIDs MUST be performed as
   per Section 10.7.2 of RFC 8724.  One particular consideration when
   SCHC C/D is used in IEEE 802.15.4 networks is that, in contrast with
   some LPWAN technologies, IEEE 802.15.4 data frame headers include
   both source and destination fields.  If the Dev or App IID are based
   on an L2 address, in some cases the IID can be reconstructed with
   information coming from the L2 header.  Therefore, in those cases,
   DevIID and AppIID CDAs can be used.

6.1.2.  UDP checksum field

   RFC 8724 states that "a SCHC compressor MAY elide the UDP checksum
   when another layer guarantees at least equal integrity protection for
   the UDP payload and the pseudo-header".

   IEEE 802.15.4 frames carry a 16-bit Frame Check Sequence (FCS), which
   is computed by means of a 16-bit ITU-T CRC algorithm.  Considering
   the FCS size, the greater error detection capabilities of CRC
   compared with checksum, and the fact that the IEEE 802.15.4 FCS will
   be checked at each hop in an IEEE 802.15.4 multihop network, the UDP
   checksum MUST be elided when using SCHC to compress IPv6/UDP headers.

6.2.  SCHC compression for CoAP headers

   CoAP header fields MUST be compressed as per Sections 4 to 6 of RFC
   8824.  Additional guidance is given in this section.

   For CoAP header compression/decompression, the SCHC Rules description
   uses direction information in order to reduce the number of Rules
   needed to compress headers.

   As stated in 5.1, in some types of 6LoWPAN environments (e.g., when a
   sender and its destination are both peer nodes in a mesh topology
   network), each SCHC C/D entity needs to know its role (Dev or App),
   in addition to the Rule(s), and corresponding RuleIDs, for each
   endpoint it communicates with before such communication occurs
   [I-D.ietf-lpwan-architecture].  Therefore, in such cases, direction
   information will be specific to each pair of endpoints.

7.  Neighbor Discovery

   A number of optimizations have been developed in order to efficiently
   support IPv6 Neighbor Discovery (ND) in 6LoWPAN environments (6LoWPAN
   ND) [RFC 6775][RFC 8505].  SCHC can also be used to compress 6LoWPAN
   ND packets.  At the time of this writing, compression of ICMPv6 or
   ICMPv6-based protocols has not been specified.  Therefore, currently,
   only the IPv6 header of a packet carrying a 6LoWPAN ND message can be
   compressed.  Nevertheless, future specifications may define how



Gomez, et al.           Expires 11 September 2023              [Page 17]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   ICMPv6 and 6LoWPAN ND messages can be compressed.  (Note: at the time
   of this writing, the LPWAN WG is discussing a new charter, which
   includes the development of "ICMPv6-based protocols" over SCHC as a
   potential work item.)

8.  Fragmentation and reassembly

   After applying SCHC header compression to a packet intended for
   transmission, if the size of the resulting SCHC Packet (Section 4)
   exceeds the IEEE 802.15.4 frame payload space available, such SCHC
   Packet MUST be fragmented, carried and reassembled by means of the
   fragmentation and reassembly functionality defined by 6LoWPAN
   [RFC4944] or 6Lo [RFC8930][RFC8931].

   In a Route-Over multihop network, the 6LoWPAN fragment forwarding
   technique called Virtual Reassembly Buffer (VRB) [RFC8930] SHOULD be
   used.  However, VRB might not be the best approach for a particular
   network, e.g., if at least one of the caveats described in Section 6
   of RFC 8930 is unacceptable or cannot be addressed.

9.  IANA Considerations

   This document requests the allocation of the Dispatch Type Field bit
   pattern 01000100 (in Pages 0 and 1) as SCHC Dispatch Type.

10.  Security Considerations

   This document does not define SCHC header compression functionality
   beyond the one defined in RFC 8724.  Therefore, the security
   considerations in section 12.1 of RFC 8724 and in section 9 of RFC
   8824 apply.

   As a safety measure, a SCHC decompressor implementing the present
   specification MUST NOT reconstruct a packet larger than 1500 bytes
   [RFC8724].

   IEEE 802.15.4 networks support link-layer security mechanisms such as
   encryption and authentication.  As in RFC 8824, the use of a
   cryptographic integrity-protection mechanism to protect the SCHC
   headers is REQUIRED.

11.  Acknowledgments

   Ana Minaburo and Laurent Toutain suggested for the first time the use
   of SCHC in environments where 6LoWPAN has traditionally been used.
   Laurent Toutain, Pascal Thubert, Dominique Barthel, Guangpeng Li,
   Carsten Bormann, and Nathan Lecorchet made comments that helped shape
   this document.



Gomez, et al.           Expires 11 September 2023              [Page 18]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   Carles Gomez has been funded in part by the Spanish Government
   through project PID2019-106808RA-I00, and by Secretaria
   d'Universitats i Recerca del Departament d'Empresa i Coneixement de
   la Generalitat de Catalunya 2017 through grant SGR 376.

12.  References

12.1.  Normative References

   [I-D.ietf-intarea-schc-ip-protocol-number]
              Moskowitz, R., Card, S. W., and A. Wiethuechter, "Internet
              Protocol Number for SCHC", Work in Progress, Internet-
              Draft, draft-ietf-intarea-schc-ip-protocol-number-00, 6
              October 2022, <https://datatracker.ietf.org/doc/html/
              draft-ietf-intarea-schc-ip-protocol-number-00>.

   [I-D.ietf-lpwan-architecture]
              Pelov, A., Thubert, P., and A. Minaburo, "LPWAN Static
              Context Header Compression (SCHC) Architecture", Work in
              Progress, Internet-Draft, draft-ietf-lpwan-architecture-
              02, 30 June 2022, <https://datatracker.ietf.org/doc/html/
              draft-ietf-lpwan-architecture-02>.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC4944]  Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler,
              "Transmission of IPv6 Packets over IEEE 802.15.4
              Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007,
              <https://www.rfc-editor.org/info/rfc4944>.

   [RFC6282]  Hui, J., Ed. and P. Thubert, "Compression Format for IPv6
              Datagrams over IEEE 802.15.4-Based Networks", RFC 6282,
              DOI 10.17487/RFC6282, September 2011,
              <https://www.rfc-editor.org/info/rfc6282>.

   [RFC6550]  Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J.,
              Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur,
              JP., and R. Alexander, "RPL: IPv6 Routing Protocol for
              Low-Power and Lossy Networks", RFC 6550,
              DOI 10.17487/RFC6550, March 2012,
              <https://www.rfc-editor.org/info/rfc6550>.







Gomez, et al.           Expires 11 September 2023              [Page 19]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   [RFC6553]  Hui, J. and JP. Vasseur, "The Routing Protocol for Low-
              Power and Lossy Networks (RPL) Option for Carrying RPL
              Information in Data-Plane Datagrams", RFC 6553,
              DOI 10.17487/RFC6553, March 2012,
              <https://www.rfc-editor.org/info/rfc6553>.

   [RFC6554]  Hui, J., Vasseur, JP., Culler, D., and V. Manral, "An IPv6
              Routing Header for Source Routes with the Routing Protocol
              for Low-Power and Lossy Networks (RPL)", RFC 6554,
              DOI 10.17487/RFC6554, March 2012,
              <https://www.rfc-editor.org/info/rfc6554>.

   [RFC6606]  Kim, E., Kaspar, D., Gomez, C., and C. Bormann, "Problem
              Statement and Requirements for IPv6 over Low-Power
              Wireless Personal Area Network (6LoWPAN) Routing",
              RFC 6606, DOI 10.17487/RFC6606, May 2012,
              <https://www.rfc-editor.org/info/rfc6606>.

   [RFC7252]  Shelby, Z., Hartke, K., and C. Bormann, "The Constrained
              Application Protocol (CoAP)", RFC 7252,
              DOI 10.17487/RFC7252, June 2014,
              <https://www.rfc-editor.org/info/rfc7252>.

   [RFC8025]  Thubert, P., Ed. and R. Cragie, "IPv6 over Low-Power
              Wireless Personal Area Network (6LoWPAN) Paging Dispatch",
              RFC 8025, DOI 10.17487/RFC8025, November 2016,
              <https://www.rfc-editor.org/info/rfc8025>.

   [RFC8065]  Thaler, D., "Privacy Considerations for IPv6 Adaptation-
              Layer Mechanisms", RFC 8065, DOI 10.17487/RFC8065,
              February 2017, <https://www.rfc-editor.org/info/rfc8065>.

   [RFC8138]  Thubert, P., Ed., Bormann, C., Toutain, L., and R. Cragie,
              "IPv6 over Low-Power Wireless Personal Area Network
              (6LoWPAN) Routing Header", RFC 8138, DOI 10.17487/RFC8138,
              April 2017, <https://www.rfc-editor.org/info/rfc8138>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC8724]  Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and JC.
              Zuniga, "SCHC: Generic Framework for Static Context Header
              Compression and Fragmentation", RFC 8724,
              DOI 10.17487/RFC8724, April 2020,
              <https://www.rfc-editor.org/info/rfc8724>.





Gomez, et al.           Expires 11 September 2023              [Page 20]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   [RFC8824]  Minaburo, A., Toutain, L., and R. Andreasen, "Static
              Context Header Compression (SCHC) for the Constrained
              Application Protocol (CoAP)", RFC 8824,
              DOI 10.17487/RFC8824, June 2021,
              <https://www.rfc-editor.org/info/rfc8824>.

   [RFC8930]  Watteyne, T., Ed., Thubert, P., Ed., and C. Bormann, "On
              Forwarding 6LoWPAN Fragments over a Multi-Hop IPv6
              Network", RFC 8930, DOI 10.17487/RFC8930, November 2020,
              <https://www.rfc-editor.org/info/rfc8930>.

   [RFC8931]  Thubert, P., Ed., "IPv6 over Low-Power Wireless Personal
              Area Network (6LoWPAN) Selective Fragment Recovery",
              RFC 8931, DOI 10.17487/RFC8931, November 2020,
              <https://www.rfc-editor.org/info/rfc8931>.

   [RFC9008]  Robles, M.I., Richardson, M., and P. Thubert, "Using RPI
              Option Type, Routing Header for Source Routes, and IPv6-
              in-IPv6 Encapsulation in the RPL Data Plane", RFC 9008,
              DOI 10.17487/RFC9008, April 2021,
              <https://www.rfc-editor.org/info/rfc9008>.

12.2.  Informative References

   [RFC9006]  Gomez, C., Crowcroft, J., and M. Scharf, "TCP Usage
              Guidance in the Internet of Things (IoT)", RFC 9006,
              DOI 10.17487/RFC9006, March 2021,
              <https://www.rfc-editor.org/info/rfc9006>.

Appendix A.  Header compression examples

   TO-DO: provide examples for IPv6-only, IPv6/UDP and IPv6/UDP/CoAP.

Authors' Addresses

   Carles Gomez
   UPC
   C/Esteve Terradas, 7
   08860 Castelldefels
   Spain
   Email: carles.gomez@upc.edu


   Ana Minaburo
   Acklio
   1137A avenue des Champs Blancs
   35510 Cesson-Sevigne Cedex
   France



Gomez, et al.           Expires 11 September 2023              [Page 21]


Internet-Draft     SCHC compression over IEEE 802.15.4        March 2023


   Email: ana@ackl.io


   Flavien Moullec
   Acklio
   1137A avenue des Champs Blancs
   35510 Cesson-Sevigne Cedex
   France
   Email: flavien@ackl.io










































Gomez, et al.           Expires 11 September 2023              [Page 22]