Internet-Draft SCHC considerations November 2022
Lampin Expires 14 May 2023 [Page]
Workgroup:
lpwan Working Group
Internet-Draft:
draft-lampin-lpwan-schc-considerations-00
Published:
Intended Status:
Informational
Expires:
Author:
Q. Lampin
Orange

SCHC design and implementation considerations

Abstract

Taking the opportunity of a fresh implementation of SCHC by a newcomer to SCHC to reflect on the design principles and the implications on the implication of SCHC.

Topics addressed:

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 14 May 2023.

Table of Contents

1. Introduction

This is a reflexion on SCHC [RFC8724] and its use for LPWANs [RFC8376].

This document captures the author's reflections during its implementation of the SCHC protocol (C/D) in microSCHC. This is a work-in-progress and might contain mistakes or misinterpretations.

2. Terminology

This draft re-uses the Terminology defined in [RFC8724].

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

3. Parser description in RFC8724

SCHC C/D assumes that both ends of a SCHC communication implement a parser alongside the implementation of the rule matching, compression and decompression procedures. This parser, whose specification is out of scope of the RFC, "is able to identify all the fields encountered in the headers to be compressed, and to label them with a Field ID. Rules only describe the compression/decompression behavior for each header field, after it has been identified." (Section 7.1 of [RFC8724]).

Sections 7.1 and 10 and Appendix A provide further insights as to what the parser is expected to output for a field:

where type can be anything: integers, bytes, arrays, etc.

4. What is a packet field?

[RFC8724] does not provide a formal definition of a packet field but the examples provided in Appendix A, figures 26 to 28, suggest the use of the colloquial definition, i.e. a sequence of continuous bits of the frame provided by the underlying layer. For example, the following IPv6 packet would be parsed as 8 fields : IPv6 Version, Traffic Class, etc.

    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |Version| Traffic Class |           Flow Label                  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Payload Length        |  Next Header  |   Hop Limit   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                         Source Address                        +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                                                               |
    +                                                               +
    |                                                               |
    +                      Destination Address                      +
    |                                                               |
    +                                                               +
    |                                                               |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 1: IPv6 header format

Furthermore, parts of the RFC suggest that fields might be seen in a broader sense. Section 7.1 and [RFC8824] refer to the "CoAP URI Path" option as a field and this is further confirmed in [I-D.ietf-lpwan-schc-yang-data-model], where subfields are introduced.

The case of "CoAP URI Path" is an interesting one, as it is not a on-the-wire field but an abstract construct based on the decoding and interpretation of on-the-wire fields, namely "CoAP Option Delta", "CoAP Option Length", "CoAP Option Delta Extended" (if any), "CoAP Option Length Extended" (if any) and "CoAP Option Value", illustrated below Figure 2.


    0   1   2   3   4   5   6   7
    +---------------+---------------+
    |               |               |
    |  Option Delta | Option Length |   1 byte
    |               |               |
    +---------------+---------------+
    |                               |
    |         Option Delta          |   0-2 bytes
    |          (extended)           |
    +-------------------------------+
    |                               |
    |         Option Length         |   0-2 bytes
    |          (extended)           |
    +-------------------------------+
    |                               |
    |                               |
    |                               |
    |         Option Value          |   0 or more bytes
    |                               |
    |                               |
    |                               |
    +-------------------------------+
Figure 2: CoAP option header format

5. Tokenization, Parsing, Decoding, Interpretation?

As illustrated in the previous section, some level of interpretation is expected from the parser which raises the question of its roles and expected capabilities.

Depending on the protocol to parse, the parser might be required to execute:

6. Implication of interpreted fields in the SCHC data model

[I-D.ietf-lpwan-schc-yang-data-model] provides YANG data models to describe the IPv6, UDP and CoAP headers and those models determine the itemization or, practically speaking, the list of fields, their IDs, the type and encoding of the internal representation used by C/D and so forth.

In particular, the CoAP model provided in [I-D.ietf-lpwan-schc-yang-data-model] lists CoAP Options as fields but not the raw fields constituting the CoAP Option header on-the-wire. A SCHC parser implementation must therefore include some level of interpretation.

6.1. Discussion #1: On supporting multiple interpretations of the same on-the-wire header fields

Depending on the characteristics of the packets to be compressed between two SCHC endpoints, one set of fields representations might provide better compression performance than another. This yields the question of the support of multiple interpretations of the same on-the-wire frame and how to enable it. In particular, does it require to list fields representations in the SCHC data model?

6.2. Discussion #2: On supporting new protocols or protocol extensions

Supporting new protocols in SCHC, or extensions of them (e.g. new CoAP Options) requires updating the data model of [I-D.ietf-lpwan-schc-yang-data-model]. Assuming [I-D.ietf-lpwan-schc-yang-data-model] becomes an RFC, it would require updates every now and then. Limiting this need for updates is certainly beneficial.

6.3. Question: Would it be beneficial to include CoAP Options raw fields in the data model?

More specifically, should the data model include: CoAP Option Delta, CoAP Option Length, CoAP Option Delta Extended, CoAP Option Length Extended, CoAP Option Value, CoAP Payload Marker?

A study on the complexity (memory, code, ...) vs compression efficiency of rules on interpreted fields compared to equivalent rules on raw fields would be interesting.

7. Security considerations

N/A

8. IANA Considerations

N/A

9. References

9.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <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, , <https://www.rfc-editor.org/info/rfc8724>.
[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, , <https://www.rfc-editor.org/info/rfc8824>.

9.2. Informative References

[I-D.ietf-lpwan-schc-yang-data-model]
Minaburo, A. and L. Toutain, "Data Model for Static Context Header Compression (SCHC)", Work in Progress, Internet-Draft, draft-ietf-lpwan-schc-yang-data-model-21, , <https://www.ietf.org/archive/id/draft-ietf-lpwan-schc-yang-data-model-21.txt>.
[RFC8376]
Farrell, S., Ed., "Low-Power Wide Area Network (LPWAN) Overview", RFC 8376, DOI 10.17487/RFC8376, , <https://www.rfc-editor.org/info/rfc8376>.

Author's Address

Quentin Lampin
Orange
22 chemin du Vieux Chene
38240 Meylan
France