rfc-9363

A YANG Data Model for Static Context Header Compression (SCHC)

A. Minaburo, L. Toutain
date2023-03 streamIETF areaint wglpwan statusPROPOSED STANDARD pages47 canonicalhttps://www.rfc-editor.org/rfc/rfc9363 doi10.17487/RFC9363
This document describes a YANG data model for the Static Context Header Compression (SCHC) compression and fragmentation Rules. This document formalizes the description of the Rules for better interoperability between SCHC instances either to exchange a set of Rules or to modify the parameters of some Rules.

updated by

Extracted elements (27)

design-rationale §4.2

All identifiers in the SCHC YANG data model use the identityref statement rather than enumerations or strings. This ensures global uniqueness and allows easy augmentation by third parties without modifying the base module.

yang

design-rationale §1

RFC 8724 provides only an informal representation of SCHC Rules; this document formalizes them as a YANG data model to ensure the same definition on both ends of a constrained network link and to enable one SCHC instance to update specific values (e.g., IPv6 prefix, destination address) in the other.

yang, netconf

design-rationale §4.10.5

Timer values use a two-parameter encoding (tick-duration and tick-numbers) where the tick unit is 2^(tick-duration)/10^6 seconds. This design supports a range from microseconds (real-time systems) to multiple days (worse-than-best-effort systems) without requiring a large integer type.

yang

interoperability-note §5.3

The YANG data model described in RFC 9363 conforms to the Network Management Datastore Architecture (NMDA) defined in RFC 8342. Implementations accessing the ietf-schc module must support NMDA-compliant datastores.

yang, netconf

normative-requirement §4.3 MUST

Each header field used in a compression Rule MUST be identified through a global YANG identityref. Protocol-level Field IDs MUST derive from fid-base-type, and all fields for a specific protocol MUST derive from that protocol's base identity (e.g., fid-ipv6-base-type).

yang, ip

normative-requirement §4.7 MUST

For match-mapping Matching Operator Target Values, index values MUST start from 0 and MUST be contiguous. The highest index value is used to compute the size of the index sent in the compression residue.

yang

normative-requirement §4.10 MUST NOT

Fragmentation Rules MUST contain a mandatory Direction Indicator (up or down). Bidirectional MUST NOT be used for fragmentation Rules because fragmentation works for a specific direction only.

yang

normative-requirement §4.10.5 MUST

If the Retransmission Timer is specified, its ticks-numbers value MUST be strictly positive (range 1..max). The Inactivity Timer uses 0 to explicitly indicate that the timer is disabled.

yang

normative-requirement §5.1 MUST

In a compression-rule-entry, matching-operator values other than mo-ignore MUST have a target-value present; mo-msb additionally requires a matching-operator-value argument specifying the number of most significant bits to match. These constraints are enforced via YANG 'must' statements.

yang

normative-requirement §4.10.7 MUST NOT

More than max-interleaved-frames DTag values MUST NOT be active simultaneously during fragmentation. The maximum value of max-interleaved-frames is 2^dtag-size.

yang

protocol-element §5.1

A compression Rule entry (compression-rule-entry) contains seven elements: Field ID (fid-type), Field Length (union of uint8 or fl-type function), Field Position (uint8), Direction Indicator (di-type), Target Value list (indexed binary), Matching Operator (mo-type), and Compression/Decompression Action (cda-type). The entry is keyed by field-id, field-position, and direction-indicator.

yang, ip

protocol-element §4.10.4

The ack-behavior-type identity (ACK-on-Error mode only) specifies when an ACK can be sent: ack-behavior-after-all-0 (after sending an All-0 fragment), ack-behavior-after-all-1 (after the last fragment), or ack-behavior-by-layer2 (Layer 2 determines timing).

yang

protocol-element §4.10.3

The last fragment of a datagram carries a Reassembly Check Sequence (RCS); the default algorithm is CRC32 (4 bytes, identity rcs-crc32). For ACK-on-Error, the All-1 fragment behavior is configurable as: all-1-data-no (RCS only), all-1-data-yes (one tile plus RCS), or all-1-data-sender-choice (sender decides).

yang

protocol-element §4.10.4

The SCHC ACK header contains RuleID, optional DTag, mandatory window W, and a C bit indicating RCS validation success. On failure (C=0), a Compressed Bitmap follows indicating which tiles were received.

yang

protocol-element §4.10.2

The SCHC data fragment header starts with RuleID followed by optional DTag (T bits), optional Window W (M bits, absent in No-ACK mode), and mandatory FCN (N bits). DTag identifies concurrent datagrams; FCN indicates fragment position within the window.

yang

protocol-element §6

The YANG module declares two optional features: 'compression' (SCHC compression capabilities) and 'fragmentation' (SCHC fragmentation capabilities). Implementations can advertise which capabilities are supported, and the data model uses if-feature guards to make the corresponding rule types conditional.

yang, netconf

protocol-element §4.10.1

Three fragmentation modes are defined: No-ACK (unidirectional, no acknowledgment sent back), ACK-Always (each fragmentation window must be explicitly acknowledged before proceeding), and ACK-on-Error (a window is acknowledged only when the receiver detects missing fragments).

yang

protocol-element §5

Three Rule natures are defined: nature-compression (a compression Rule associated with a RuleID), nature-no-compression (the default passthrough Rule when no compression Rule matches), and nature-fragmentation (fragmentation parameters associated with a RuleID). A Rule must have exactly one nature.

yang

registry §7.2

IANA registered the YANG module 'ietf-schc' in the YANG Module Names registry (RFC 6020) with namespace 'urn:ietf:params:xml:ns:yang:ietf-schc', prefix 'schc', and reference RFC 9363.

registry, yang, netconf

registry §7.1

IANA registered URI 'urn:ietf:params:xml:ns:yang:ietf-schc' in the IETF XML Registry (RFC 3688). This URI serves as the XML namespace for the ietf-schc YANG module.

registry, yang

security-consideration §8

Access to the ietf-schc YANG module via NETCONF requires mandatory-to-implement secure transport using SSH (RFC 6242); via RESTCONF it requires HTTPS with TLS (RFC 8446). The NACM model (RFC 8341) provides access control for NETCONF/RESTCONF users.

security, netconf, tls

security-consideration §8

Read access to SCHC Rules (e.g., via NETCONF get or get-config) must be controlled because an attacker reading the module can infer traffic patterns, application addresses, and REST API structure of constrained devices. Access control on readable data nodes is therefore important.

security, netconf, privacy

security-consideration §8

The /schc data tree contains sensitive writable nodes, notably application IPv6 addresses. An attacker modifying another device's Rules could redirect traffic or enable eavesdropping. Therefore, a device MUST be allowed to modify only its own rules, with requester identity validated through certificates or access lists.

security, netconf, ip

wire-format §5

A RuleID is composed of rule-id-value (uint32) and rule-id-length (uint8, range 0..32 bits). The pair serves as a list key in the YANG model. A rule-id-length of 0 represents an implicit Rule.

yang

wire-format §4.4

Field Length (fl-type) is a union of uint8 (fixed size in bits) and identityref (function-based length). Defined functions include fl-variable (variable-length field, length in bytes as defined for CoAP) and fl-token-length (CoAP Token Length field).

yang

wire-format §4.10.2

Fragmentation header field sizes are expressed in bits: dtag-size (uint8, default 0), w-size (uint8, present only in ACK-Always and ACK-on-Error modes), fcn-size (uint8, mandatory). Layer 2 Word size is l2-word-size (uint8, default 8 bits = byte-aligned; value 1 means bit-oriented with no padding).

yang

wire-format §4.7

Target Value entries use a tv-struct with an index (uint16) and value (binary). For equal and MSB operators, a single element at index 0 is used; for match-mapping, multiple consecutive entries starting at index 0 are used, and the highest index determines residue index bit-width.

yang