6lo Working Group C. Gomez Internet-Draft UPC Intended status: Standards Track A. Minaburo Expires: January 11, 2023 Acklio July 10, 2022 Transmission of SCHC-compressed packets over IEEE 802.15.4 networks draft-gomez-6lo-schc-15dot4-03 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. 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 January 11, 2023. Copyright Notice Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved. 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 Gomez & Minaburo Expires January 11, 2023 [Page 1] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 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. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1. Requirements language . . . . . . . . . . . . . . . . . . 4 2.2. Background on SCHC . . . . . . . . . . . . . . . . . . . 4 3. Architecture . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Network topologies . . . . . . . . . . . . . . . . . . . 4 3.2. Protocol stack . . . . . . . . . . . . . . . . . . . . . 4 4. Frame Format . . . . . . . . . . . . . . . . . . . . . . . . 5 4.1. SCHC Dispatch . . . . . . . . . . . . . . . . . . . . . . 6 4.2. SCHC Header . . . . . . . . . . . . . . . . . . . . . . . 6 4.3. Padding . . . . . . . . . . . . . . . . . . . . . . . . . 6 5. SCHC compression for IPv6, UDP, and CoAP headers . . . . . . 7 5.1. SCHC compression for IPv6 and UDP headers . . . . . . . . 7 5.1.1. Compression of IPv6 addresses . . . . . . . . . . . . 7 5.2. SCHC compression for CoAP headers . . . . . . . . . . . . 8 5.3. Header compression examples . . . . . . . . . . . . . . . 8 6. Multihop communication . . . . . . . . . . . . . . . . . . . 8 6.1. Route-Over . . . . . . . . . . . . . . . . . . . . . . . 8 6.2. Mesh-Under . . . . . . . . . . . . . . . . . . . . . . . 8 7. Fragmentation and reassembly . . . . . . . . . . . . . . . . 9 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 9. Security Considerations . . . . . . . . . . . . . . . . . . . 9 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 9 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 11.1. Normative References . . . . . . . . . . . . . . . . . . 10 11.2. Informative References . . . . . . . . . . . . . . . . . 11 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 1. Introduction RFC 6282 is the main specification for IPv6 over Low power Wireless Personal Area Network (6LoWPAN) IPv6 header compression [RFC6282]. This 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/ Gomez & Minaburo Expires January 11, 2023 [Page 2] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 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 [I-D.toutain-6lo-6lo-and- schc], including IEEE 802.15.4 networks, considering its greater efficiency. If SCHC header compression is added to the panoply of header compression mechanisms used in 6LoWPAN environments, then there is a need to signal when a packet header has been compressed by using SCHC. To this end, the present document specifies a 6LoWPAN Dispatch Type for SCHC header compression [RFC4944]. This document specifies how a SCHC-compressed packet can be carried over IEEE 802.15.4 networks. 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]. TO-DO: indicate here any specific updates of RFC 8724 for use over IEEE 802.15.4. Gomez & Minaburo Expires January 11, 2023 [Page 3] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 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 SCHC The reader is expected to be familiar with the terms and concepts defined in the specification of SCHC (RFC 8724). 3. Architecture 3.1. 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.2. 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. This document defines an alternative approach for packet header compression over IEEE 802.15.4, which leads to a modified protocol Gomez & Minaburo Expires January 11, 2023 [Page 4] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 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. 4. Frame Format This document 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. The format comprises a SCHC Dispatch Type, a SCHC Packet (i.e. a SCHC-compressed packet (RFC 8724), and Padding bits, if any). Figure 2 illustrates the described frame format. Gomez & Minaburo Expires January 11, 2023 [Page 5] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 <---------- IEEE 802.15.4 frame payload ----------> <----- SCHC Packet -----> +---------------+-------------+---------+ - - - - + | SCHC Dispatch | SCHC Header | Payload | Padding | +---------------+-------------+---------+ - - - - + Figure 2: Encapsulated, SCHC-compressed packet. Padding bits are added if needed. 4.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 2, 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.2. SCHC Header SCHC Header (Figure 2) 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. 4.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. Gomez & Minaburo Expires January 11, 2023 [Page 6] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 5. 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. 5.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. 5.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. 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. Gomez & Minaburo Expires January 11, 2023 [Page 7] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 5.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. 5.3. Header compression examples TO-DO: provide examples for IPv6-only, IPv6/UDP and IPv6/UDP/CoAP. 6. 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. 6.1. Route-Over 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. Alternatively, in a Route-Over network that uses the IPv6 Routing Protocol for Low-Power and Lossy Networks (RPL) [RFC6550], the RPL non-storing mode and [RFC8138] MAY be exploited in order to transmit SCHC-compressed packets. In this approach, a network node MUST store the Rules defined for its communication with other endpoints. (Further details TBD.) 6.2. Mesh-Under When SCHC header compression is used 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 Gomez & Minaburo Expires January 11, 2023 [Page 8] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 disjoint pairs of endpoints, at the expense of increased RuleID management and device configuration complexity. 7. 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. 8. IANA Considerations This document requests the allocation of the Dispatch Type Field bit pattern 01000100 (Page 0) as SCHC Dispatch Type. 9. 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. 10. 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, and Carsten Bormann made comments that helped shape this document. Carles Gomez has been funded in part by the Spanish Government through project PID2019-106808RA-I00, and by Secretaria Gomez & Minaburo Expires January 11, 2023 [Page 9] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 d'Universitats i Recerca del Departament d'Empresa i Coneixement de la Generalitat de Catalunya 2017 through grant SGR 376. 11. References 11.1. Normative References [I-D.ietf-lpwan-architecture] Pelov, A., Thubert, P., and A. Minaburo, "LPWAN Static Context Header Compression (SCHC) Architecture", draft- ietf-lpwan-architecture-02 (work in progress), June 2022. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [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, . [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, . [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, . [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, . [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained Application Protocol (CoAP)", RFC 7252, DOI 10.17487/RFC7252, June 2014, . Gomez & Minaburo Expires January 11, 2023 [Page 10] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 [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, . [RFC8065] Thaler, D., "Privacy Considerations for IPv6 Adaptation- Layer Mechanisms", RFC 8065, DOI 10.17487/RFC8065, February 2017, . [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, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [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, . [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, . [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, . [RFC8931] Thubert, P., Ed., "IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Selective Fragment Recovery", RFC 8931, DOI 10.17487/RFC8931, November 2020, . 11.2. Informative References [I-D.toutain-6lo-6lo-and-schc] Minaburo, A. and L. Toutain, "Comparison of 6lo and SCHC", draft-toutain-6lo-6lo-and-schc-00 (work in progress), November 2019. Gomez & Minaburo Expires January 11, 2023 [Page 11] Internet-Draft SCHC compression over IEEE 802.15.4 July 2022 [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, . Authors' Addresses Carles Gomez UPC C/Esteve Terradas, 7 Castelldefels 08860 Spain Email: carlesgo@entel.upc.edu Ana Minaburo Acklio 1137A avenue des Champs Blancs Cesson-Sevigne Cedex 35510 France Email: ana@ackl.io Gomez & Minaburo Expires January 11, 2023 [Page 12]