rfc-9647

A YANG Data Model for Babel

M. Jethanandani, B. Stark
date2024-10 streamIETF areartg wgbabel statusPROPOSED STANDARD pages39 canonicalhttps://www.rfc-editor.org/rfc/rfc9647 doi10.17487/RFC9647
This document defines a data model for the Babel routing protocol. The data model is defined using the YANG data modeling language.

Extracted elements (30)

design-rationale §2.3

A Babel router can auto-detect wired (eth0) vs. wireless (wlan0) interface parameters: wired defaults to two-out-of-three metric algorithm and split-horizon true, while wireless defaults to etx and split-horizon false. Tunnel interfaces require explicit configuration. This allows minimal YANG configuration for common cases.

yang, routing

design-rationale §2.3

The 'default-apply' boolean on both mac-key-set and dtls objects enables automatic propagation of security credentials to newly created interfaces, reducing the risk of an interface being inadvertently left unsecured when added to a router already using MAC or DTLS.

yang, security

design-rationale §2.1

The information model (RFC 9046) mandates certain read-only attributes (e.g., babel-implementation-version, babel-self-router-id), but YANG has no mechanism to mandate that a config-false leaf be present; implementations must ensure these attributes are present when the protocol is enabled.

yang, routing

design-rationale §2.3

The statistics reset action is scoped to individual interface statistics containers rather than being system-wide (as in the RFC 9046 information model) because YANG associates actions with their enclosing container. Implementations wanting system-wide reset must call the action for every interface instance.

yang, routing

design-rationale §2.3

The YANG module augments ietf-routing (RFC 8349) rather than defining a standalone module, providing a common building block for routes and RIBs. This approach allows Babel to share infrastructure with other routing protocol YANG models.

yang, routing, netconf

interoperability-note §2.3

The dtls-cached-info boolean enables the cached_info TLS extension for inclusion in ClientHello and ServerHello messages; this corresponds to behavior defined in RFC 8968 (Babel over DTLS) Appendix A. The dtls-cert-prefer list populates TLS certificate type extensions during handshaking.

yang, tls, security

interoperability-note §1

The YANG module is defined using YANG 1.1 (RFC 7950) and is compatible with the Network Management Datastore Architecture (NMDA, RFC 8342). It is based on the Babel information model (RFC 9046) and only includes data nodes useful for managing Babel over IPv6.

yang, netconf, routing

normative-requirement §2.3 MUST

At least one of calculated-metric or received-metric MUST be non-NULL for each route object.

yang, routing

normative-requirement §2.3 MUST

For HMAC-based MAC algorithms, the key value length MUST be between 0 and an upper limit at least the size of the output length (32 octets for HMAC-SHA256). For BLAKE2s-128, the length MUST be between 0 and 32 bytes inclusive.

yang, crypto, security

normative-requirement §2.3 MUST

The certificate name value MUST NOT be empty and can only be provided when the instance is created (not subsequently writable). The certificate type value MUST be one of the identities listed with base 'dtls-cert-types'.

yang, security, pkix

normative-requirement §2.3 MUST

The exp-mcast-hello-seqno leaf MUST be NULL if multicast Hello packets are not expected or processing of multicast packets is not enabled. Similarly, exp-ucast-hello-seqno and ucast-hello-seqno MUST be NULL if unicast Hellos are not expected or not being sent.

yang, routing

normative-requirement §2.3 MUST

The metric-algorithm leaf on each interface is mandatory and its value MUST be one of the identities derived from metric-comp-algorithms.

yang, routing

normative-requirement §2.3 SHOULD

The packet-log leaf SHOULD support the libpcap file format with .pcap file extension for packet log files.

yang, routing

protocol-element §2.3

A 'test' action on each MAC key object accepts a test-string (binary) and mac (binary) as input and returns an indication (boolean) of whether the MAC computed by the implementation over the test-string matches the provided mac.

yang, security, crypto

protocol-element §2.3

The 'constants' container under the babel container holds udp-port (default 6696, type inet:port-number) and mcast-group (default ff02::1:6, type inet:ip-address), defining the UDP port and IPv6 multicast group for Babel message exchange.

yang, routing

protocol-element §2.3

The 'dtls-cert-prefer' leaf-list (ordered-by user) on each interface holds leafrefs to ../../dtls/certs/type; it populates the server_certificate_type extension in ClientHello, while entries with a non-empty private key populate the client_certificate_type extension.

yang, security, tls

protocol-element §2.3

The 'dtls' list (keyed by name) contains a 'certs' sub-list with mandatory fields value (PEM-format string, nacm:default-deny-write), type (identityref from dtls-cert-types), private-key (binary, nacm:default-deny-all), and algorithm (identityref). The 'default-apply' boolean is mandatory.

yang, security, pkix

protocol-element §2.2

The ietf-babel YANG module augments /rt:routing/rt:control-plane-protocols/rt:control-plane-protocol with a 'babel' presence container. The top-level container holds version (read-only string), enable (mandatory boolean), router-id (read-only 8-octet binary), seqno (read-only uint16), and statistics-enabled (boolean).

yang, routing, netconf

protocol-element §2.3

The 'interfaces' list (keyed by 'reference', an if:interface-ref) configures per-interface Babel behavior including metric-algorithm (mandatory identityref from metric-comp-algorithms), split-horizon, mcast-hello-interval, update-interval (both in centiseconds), and enable/disable flags for MAC and DTLS security.

yang, routing

protocol-element §2.3

The 'mac-key-set' list (keyed by name) contains a 'keys' sub-list with mandatory fields use-send, use-verify, value (binary, nacm:default-deny-all), and algorithm (identityref from mac-algorithms). The 'default-apply' boolean controls whether the key set is automatically applied to new interfaces.

yang, security, crypto

protocol-element §2.3

The module defines feature guards: two-out-of-three-supported, etx-supported, mac-supported, dtls-supported, hmac-sha256-supported, blake2s-supported, x-509-supported, and raw-public-key-supported. Identities metric-comp-algorithms (base for two-out-of-three and etx), mac-algorithms (base for hmac-sha256 and blake2s), and dtls-cert-types (base for x-509 and raw-public-key) are defined.

yang, routing, crypto

protocol-element §2.3

The 'neighbor-objects' list (config false, keyed by neighbor-address) within each interface entry tracks per-neighbor state: hello-mcast-history, hello-ucast-history (hex strings), txcost (int32), exp-mcast-hello-seqno, exp-ucast-hello-seqno, ucast-hello-seqno (all union of null enum and uint16), ucast-hello-interval (centiseconds), rxcost (uint16), and cost (int32).

yang, routing

protocol-element §2.3

The 'routes' grouping (config false) provides a list keyed by ip-prefix with fields: router-id (8-byte binary), neighbor (leafref), received-metric (union of null enum and uint16), calculated-metric (union of null enum and uint16), seqno (uint16), next-hop (union of null enum and ip-address), feasible (boolean), and selected (boolean).

yang, routing

protocol-element §2.3

The 'statistics' container (config false) under each interface includes counter32 leaves for sent-mcast-hello, sent-mcast-update, sent-ucast-hello, sent-ucast-update, sent-ihu, and received-packets, plus a mandatory discontinuity-time (date-and-time) and a 'reset' action that takes reset-at (date-and-time) and returns reset-finished-at.

yang, routing

registry §3.1

IANA has registered the URI 'urn:ietf:params:xml:ns:yang:ietf-babel' in the 'ns' registry of the IETF XML Registry (RFC 3688).

registry, yang

registry §3.2

IANA has registered the YANG module name 'ietf-babel' with namespace 'urn:ietf:params:xml:ns:yang:ietf-babel' and prefix 'babel' in the YANG Module Names registry (RFC 6020).

registry, yang

security-consideration §4 SHOULD

Implementations SHOULD use a constant-time comparison between the input MAC and the locally generated MAC value in the 'test' action to avoid side-channel leakage that could reveal the MAC key to an attacker who does not know it.

yang, security, crypto

security-consideration §4

Read access to config-false 'babel' nodes can disclose the network topology, and the routes used by a device may enable subsequent attacks on traffic. Access to these nodes must be controlled via NACM (RFC 8341) through NETCONF or RESTCONF with mandatory secure transport (SSH, TLS, or QUIC).

yang, security, routing

security-consideration §4

The MAC key value leaf carries nacm:default-deny-all and the DTLS private-key leaf also carries nacm:default-deny-all, making these sensitive credentials unreadable via NETCONF/RESTCONF by default. The 'babel/hmac' and 'babel/dtls' subtrees influence whether incoming and outgoing packets are trusted.

yang, security, crypto

security-consideration §4

Writable nodes under 'babel', 'babel/constants', and 'babel/interfaces' can disrupt network operations if misconfigured without proper access control. Enabling packet logging without controlling access to log files gives attackers detailed network topology knowledge.

yang, security, routing