Data Model for Static Context Header Compression (SCHC)Acklio1137A avenue des Champs Blancs35510 Cesson-Sevigne CedexFranceana@ackl.ioInstitut MINES TELECOM; IMT Atlantique2 rue de la ChataigneraieCS 1760735576 Cesson-Sevigne CedexFranceLaurent.Toutain@imt-atlantique.frlpwan Working GroupThis document describes a YANG data model for the SCHC (Static Context Header Compression)
compression and fragmentation rules.SCHC is a compression and fragmentation mechanism for constrained networks defined in .
It is based on a static context shared by two entities at the boundary of the constrained network.
provides a non formal representation of the rules used either for compression/decompression (or C/D)
or fragmentation/reassembly (or F/R). The goal of this document is to formalize the description of the rules to offer:the same definition on both ends, even if the internal representation is different.an update of the other end to set up some specific values (e.g. IPv6 prefix, Destination address,…)… illustrates the exchange of rules using the YANG Data Model.This document defines a YANG module to represent both compression and fragmentation rules, which leads to common representation for values for all the rules elements.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 Ò.SCHC is a compression and fragmentation mechanism for constrained networks defined in .
It is based on a static context shared by two entities at the boundary of the constrained network.
provides a non formal representation of the rules used either for compression/decompression (or C/D)
or fragmentation/reassembly (or F/R). The goal of this document is to formalize the description of the rules to offer:the same definition on both ends, even if the internal representation is different.an update of the other end to set up some specific values (e.g. IPv6 prefix, Destination address,…)…This document defines a YANG module to represent both compression and fragmentation rules, which leads to common representation for values for all the rules elements.SCHC compression is generic, the main mechanism does not refer
to a specific protocol. Any header field is abstracted through an ID, a position, a direction, and a value that can be a numerical
value or a string. and specify fields for IPv6, UDP, CoAP and OSCORE.SCHC fragmentation requires a set of common parameters that are included in a rule. These parameters are defined in .The YANG model allows to select the compression or the fragmentation using the feature command. proposes a non formal representation of the compression rule.
A compression context for a device is composed of a set of rules. Each rule contains information to
describe a specific field in the header to be compressed.Identifier used in the SCHC YANG Data Model are from the identityref statement to ensure to be globally unique and be easily augmented if needed. The principle to define a new type based on a group of identityref is the following:define a main identity ending with the keyword base-type.derive all the identities used in the Data Model from this base type.create a typedef from this base type.The example () shows how an identityref is created for RCS algorithms used during SCHC fragmentation.In the process of compression, the headers of the original packet are first parsed to create a list of fields. This list of fields is matched against the rules to find the appropriate rule and apply compression. does not state how the field ID value is constructed.
In examples, identification is done through a string indexed by the protocol name (e.g. IPv6.version, CoAP.version,…).The current YANG Data Model includes fields definitions found in , .Using the YANG model, each field MUST be identified through a global YANG identityref.
A YANG field ID for the protocol always derives from the fid-base-type. Then an identity
for each protocol is specified using the naming convention fid-<<protocol name»-base-type.
All possible fields for this protocol MUST derive from the protocol identity. The naming
convention is “fid” followed by the protocol name and the field name. If a field has
to be divided into sub-fields, the field identity serves as a base.The full field-id definition is found in . The example
gives the first field ID definitions. A type is defined for IPv6 protocol, and each
field is based on it. Note that the DiffServ bits derives from the Traffic Class identity.The type associated to this identity is fid-type (cf. )Field length is either an integer giving the size of a field in bits or a specific function. defines the
“var” function which allows variable length fields (whose length is expressed in bytes) and defines the “tkl” function for managing the CoAP
Token length field.The naming convention is “fl” followed by the function name.The field length function can be defined as an identityref as shown in .Therefore, the type for field length is a union between an integer giving in bits the size of the length and the identityref (cf. ).Field position is a positive integer which gives the position of a field, the default value is 1, and incremented at each repetition.
value 0 indicates that the position is not important and is not considered during the rule selection process.Field position is a positive integer. The type is an uint8.The Direction Indicator (di) is used to tell if a field appears in both direction (Bi) or only uplink (Up) or Downlink (Dw). gives the identityref for Direction Indicators. The naming convention is “di” followed by the Direction Indicator name.The type is “di-type” (cf. ).The Target Value is a list of binary sequences of any length, aligned to the left. shows the definition of a single element of a Target Value. In the rule, the structure will be used as a list, with index as a key. The highest index value is used to compute the size of the index sent in residue for the match-mapping CDA. The index allows to specify several values:For Equal and LSB, Target Value contains a single element. Therefore, the index is set to 0.For match-mapping, Target Value can contain several elements. Index values MUST start from 0 and MUST be contiguous.Matching Operator (MO) is a function applied between a field value provided by the parsed header and the target value. defines 4 MO as listed in .The naming convention is “mo” followed by the MO name.The type is “mo-type” (cf. )They are viewed as a list, built with a tv-struct (see chapter ).Compression Decompression Action (CDA) identifies the function to use for compression or decompression.
defines 6 CDA. shows some CDA definition, the full definition is in .The naming convention is “cda” followed by the CDA name.Currently no CDA requires arguments, but in the future some CDA may require one or several arguments.
They are viewed as a list, of target-value type.Fragmentation is optional in the data model and depends on the presence of the “fragmentation” feature.Most of the fragmentation parameters are listed in Annex D of .Since fragmentation rules work for a specific direction, they MUST contain a mandatory direction indicator.
The type is the same as the one used in compression entries, but bidirectional MUST NOT be used. defines 3 fragmentation modes:No Ack: this mode is unidirectionnal, no acknowledgment is sent back.Ack Always: each fragmentation window must be explicitly acknowledged before going to the next.Ack on Error: A window is acknowledged only when the receiver detects some missing fragments. shows the definition for identifiers from these three modes.The naming convention is “fragmentation-mode” followed by the fragmentation mode name.A data fragment header, starting with the rule ID can be sent on the fragmentation direction.
The SCHC header may be composed of (cf. ):a Datagram Tag (Dtag) identifying the datagram being fragmented if the fragmentation applies concurrently on several datagrams. This field in optional and its length is defined by the rule.a Window (W) used in Ack-Always and Ack-on-Error modes. In Ack-Always, its size is 1. In Ack-on-Error, it depends on the rule. This field is not needed in No-Ack mode.a Fragment Compressed Number (FCN) indicating the fragment/tile position within the window. This field is mandatory on all modes defined in , its size is defined by the rule.The last fragment of a datagram is sent with an RCS (Reassembly Check Sequence) field to detect residual
transmission error and possible losses in the last window. defines a single algorithm based on Ethernet
CRC computation. The identity of the RCS algorithm is shown in .The naming convention is “rcs” followed by the algorithm name.For Ack-on-Error mode, the All-1 fragment may just contain the RCS or can include a tile. The parameters defined in allows to define the
behavior:all1-data-no: the last fragment contains no data, just the RCSall1-data-yes: the last fragment includes a single tile and the RCSall1-data-sender-choice: the last fragment may or may not contain a single tile. The receiver can detect if a tile is present.The naming convention is “all1-data” followed by the behavior identifier.The acknowledgment fragment header goes in the opposite direction of data. The header is composed of (see ):a Dtag (if present).a mandatory window as in the data fragment.a C bit giving the status of RCS validation. In case of failure, a bitmap follows, indicating the received tile.For Ack-on-Error, SCHC defines when an acknowledgment can be sent. This can be at any time defined by the layer 2, at the end of a window (FCN All-0)
or as a response to receiving the last fragment (FCN All-1). The following identifiers (cf. ) define the acknowledgment behavior.The naming convention is “ack-behavior” followed by the algorithm name.The state machine requires some common values to handle fragmentation:retransmission-timer expresses, in seconds, the duration before sending an ack request (cf. section 8.2.2.4. of ). If specified, value must be higher or equal to 1.inactivity-timer expresses, in seconds, the duration before aborting a fragmentation session (cf. section 8.2.2.4. of ). The value 0 explicitly indicates that this timer is disabled.max-ack-requests expresses the number of attempts before aborting (cf. section 8.2.2.4. of ).maximum-packet-size rexpresses, in bytes, the larger packet size that can be reassembled.They are defined as unsigned integers, see .The data model includes two parameters needed for fragmentation:l2-word-size: base fragmentation on a layer 2 word which can be of any length. The default value is 8 and correspond
to the default value for byte aligned layer 2. A value of 1 will indicate that there is no alignment and no need for padding.maximum-packet-size: defines the maximum size of a uncompressed datagram. By default, the value is set to 1280 bytes.They are defined as unsigned integer, see .A rule is idenfied by a unique rule identifier (rule ID) comprising both a Rule ID value and a Rule ID length.
The YANG grouping rule-id-type defines the structure used to represent a rule ID. A length of 0 is allowed to represent an implicit rule.Three types of rules are defined in :Compression: a compression rule is associated with the rule ID.No compression: this identifies the default rule used to send a packet in extenso when no compression rule was found (see section 6).Fragmentation: fragmentation parameters are associated with the rule ID. Fragmentation is optional and feature “fragmentation” should be set.To access a specific rule, the rule ID length and value are used as a key. The rule is either
a compression or a fragmentation rule.A compression rule is composed of entries describing its processing (cf. ). An entry contains all the information defined in with the types defined above.The compression rule described is defined by compression-content. It defines a list of
compression-rule-entry, indexed by their field id, position and direction. The compression-rule-entry
element represent a line of the table . Their type reflects the identifier types defined in
Some checks are performed on the values:target value must be present for MO different from ignore.when MSB MO is specified, the matching-operator-value must be presentA Fragmentation rule is composed of entries describing the protocol behavior. Some on them are numerical entries,
others are identifiers defined in .The definition of a Fragmentation rule is divided into three sub-parts (cf. ):parameters such as the fragmentation-mode, the l2-word-size and the direction. Since Fragmentation rules are always defined for a specific direction, the value must be either di-up or di-down (di-bidirectional is not allowed).parameters defining the Fragmentation header format (dtag-size, w-size, fcn-size and rcs-algorithm).Protocol parameters for timers (inactivity-timer, retransmission-timer). do not specified any range for these timers. recommends a duration of 12 hours. In fact, the value range sould be between milli-seconds for real time systems to several days. shows the two parameters defined for timers:
the duration of a tick is computed through this formula 2^tick-duration/10^6. When tick-duration is set to 0, the unit is the micro-second. The default value of 20 leads to a unit of about 1.05 second. A value of 32 leads to a tick duration of about 1.19 hours.the number of ticks in the predefined unit. With the default tick-duration value of 20, the timers can cover a range between 1.0 sec and 19 hours covering recommandation.Protocol behavior (maximum-packet-size, max-interleaved-frames, max-ack-requests). If these parameters are specific to a single fragmentation mode, they are grouped in a structure dedicated to that Fragmentation mode. If some parameters can be found in several modes, typically ACK-Always and ACK-on-Error, they are defined in a common part and a when statement indicates which modes are allowed.This section records the status of known implementations of the
protocol defined by this specification at the time of posting of
this Internet-Draft, and is based on a proposal described in
. The description of implementations in this section is
intended to assist the IETF in its decision processes in
progressing drafts to RFCs. Please note that the listing of any
individual implementation here does not imply endorsement by the
IETF. Furthermore, no effort has been spent to verify the
information presented here that was supplied by IETF contributors.
This is not intended as, and must not be construed to be, a
catalog of available implementations or their features. Readers
are advised to note that other implementations may exist.According to , “this will allow reviewers and working
groups to assign due consideration to documents that have the
benefit of running code, which may serve as evidence of valuable
experimentation and feedback that have made the implemented
protocols more mature. It is up to the individual working groups
to use this information as they see fit”.Openschc is implementing the conversion between the local rule
representation and the representation conform to the Data Model
in JSON and CBOR (following -08 draft).This document has no request to IANA.This document does not have any more Security consideration than the ones already raised in and .The authors would like to thank Dominique Barthel, Carsten Bormann, Alexander Pelov for their careful reading and valuable inputs. A special thanks for
Carl Moberg for his patience and wise advices when building the model.SCHC: Generic Framework for Static Context Header Compression and FragmentationThis 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.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.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.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.Static Context Header Compression (SCHC) for the Constrained Application Protocol (CoAP)This document defines how to compress Constrained Application Protocol (CoAP) headers using the Static Context Header Compression and fragmentation (SCHC) framework. SCHC defines a header compression mechanism adapted for Constrained Devices. SCHC uses a static description of the header to reduce the header's redundancy and size. While RFC 8724 describes the SCHC compression and fragmentation framework, and its application for IPv6/UDP headers, this document applies SCHC to CoAP headers. The CoAP header structure differs from IPv6 and UDP, since CoAP uses a flexible header with a variable number of options, themselves of variable length. The CoAP message format is asymmetric: the request messages have a header format different from the format in the response messages. This specification gives guidance on applying SCHC to flexible headers and how to leverage the asymmetry for more efficient compression Rules.Key words for use in RFCs to Indicate Requirement LevelsIn 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.Improving Awareness of Running Code: The Implementation Status SectionThis document describes a simple process that allows authors of Internet-Drafts to record the status of known implementations by including an Implementation Status section. This will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature.This process is not mandatory. Authors of Internet-Drafts are encouraged to consider using the process for their documents, and working groups are invited to think about applying the process to all of their protocol specifications. This document obsoletes RFC 6982, advancing it to a Best Current Practice.The YANG 1.1 Data Modeling LanguageYANG is a data modeling language used to model configuration data, state data, Remote Procedure Calls, and notifications for network management protocols. This document describes the syntax and semantics of version 1.1 of the YANG language. YANG version 1.1 is a maintenance release of the YANG language, addressing ambiguities and defects in the original specification. There are a small number of backward incompatibilities from YANG version 1. This document also specifies the YANG mappings to the Network Configuration Protocol (NETCONF).Static Context Header Compression and Fragmentation (SCHC) over LoRaWANThe 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.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.LPWAN Static Context Header Compression (SCHC) ArchitectureAcklioCisco SystemsAcklio This document defines the LPWAN SCHC architecture.