rfc-9127

YANG Data Model for Bidirectional Forwarding Detection (BFD)

R. Rahman (Editor), L. Zheng (Editor), M. Jethanandani (Editor), S. Pallagatti, G. Mirsky
date2021-10 streamIETF areartg wgbfd statusPROPOSED STANDARD pages64 canonicalhttps://www.rfc-editor.org/rfc/rfc9127 doi10.17487/RFC9127
This document defines a YANG data model that can be used to configure and manage Bidirectional Forwarding Detection (BFD). The YANG modules in this document conform to the Network Management Datastore Architecture (NMDA) (RFC 8342).

updated by

Extracted elements (27)

design-rationale §2.1.5

BFD-over-LAG parameters are placed under a 'lag' data node within the BFD top-level container rather than augmenting a LAG YANG module, because no standard LAG YANG data model existed at the time that could be augmented.

yang, netconf

design-rationale §2

The BFD YANG data model is split into multiple modules, each corresponding to one type of forwarding path, because there is no uniform key to identify a BFD session across all path types. The main difference between modules is how a BFD session is uniquely identified (i.e., the key for the session list).

yang, netconf

design-rationale §2.1

The 'client-cfg-parms' grouping is defined to allow BFD clients such as IGPs to configure BFD for auto-discovered peers (multiplier and intervals only), since IGPs do not pre-configure peer addresses and discover them dynamically. Authentication parameters for client-created sessions are still specified in BFD directly.

yang, netconf

interoperability-note §2.10

BFD packet transmission and reception on an interface depends on enabling flags from other YANG modules: /if:interfaces/if:interface/if:enabled (ietf-interfaces), /ip:ipv4/ip:enabled and /ip:ipv4/ip:forwarding (ietf-ip), and /mpls:mpls-enabled (ietf-mpls). Setting any of these to false prevents BFD packets on that interface.

yang, netconf

interoperability-note §2.1.2

RFC 5880 and RFC 5881 do not specify whether the Echo function operates continuously or on demand; the mechanism to start/stop it is implementation-specific and should be done by augmentation — either via configuration (for continuous operation) or via RPC (for on-demand). An example is provided in Appendix A.

yang, netconf

interoperability-note §1

The YANG modules conform to NMDA (RFC 8342), meaning configuration and operational state data are not separated into distinct top-level or sibling containers. The same nodes carry both 'rw' (config) and 'ro' (state) leaves.

yang, netconf

normative-requirement §2.14 MAY

Implementations MAY rate-limit BFD state-change notifications, for example when a session is continuously changing state.

yang, netconf

protocol-element §2

A new control-plane protocol identity 'bfdv1' is defined, and a 'bfd' container is created under 'control-plane-protocol' as specified in RFC 8349. Path-specific modules (ietf-bfd-ip-sh, ietf-bfd-ip-mh, ietf-bfd-lag, ietf-bfd-mpls) augment this 'bfd' container with their respective containers.

yang, netconf

protocol-element §2.12

BFD authentication configuration uses the 'auth-parms' grouping with a 'key-chain' leaf (reference to RFC 8177 key-chain model) and a 'meticulous' boolean leaf. The authentication container is guarded by the 'authentication' feature and uses presence semantics to enable authentication.

yang, netconf, security

protocol-element §2.1.3

BFD IP multihop sessions (ietf-bfd-ip-mh) are grouped into 'session-group' entries keyed by source-addr and dest-addr. Multiple BFD sessions may exist per group to test ECMP paths; in the operational state model the local discriminator is used as a further key.

yang, netconf

protocol-element §2.1.2

BFD IP single-hop sessions (ietf-bfd-ip-sh) are uniquely identified by the composite key of interface and destination address. The 'ip-sh' container also holds a list of interfaces used to specify per-interface authentication parameters for sessions created by BFD clients.

yang, netconf

protocol-element §2.1.5

BFD-over-LAG sessions (ietf-bfd-lag) consist of micro-BFD sessions on each LAG member link. Configuration is per LAG (keyed by lag-name); destination IP addresses for micro-BFD are configured per address family (IPv4 and IPv6) per LAG. Operational state is per member-link under each LAG session.

yang, netconf

protocol-element §2.1.4

BFD-over-MPLS sessions (ietf-bfd-mpls) are organized as 'session-group' entries keyed by mpls-fec (inet:ip-prefix). Multiple BFD sessions per FEC are supported for ECMP. An 'egress' container holds BFD parameters for the egress node; since LSPs are unidirectional, there is no LSP configuration on the egress node beyond this.

yang, netconf, mpls

protocol-element §2.1.1

Common BFD configuration parameters are: local-multiplier (detection time multiplier, default 3), desired-min-tx-interval (in microseconds, default 1000000), and required-min-rx-interval (in microseconds, default 1000000). An implementation may optionally support a single min-interval used for both tx and rx via the 'single-minimum-interval' feature.

yang, netconf

protocol-element §2.1.3

For BFD IP multihop, 'tx-ttl' (hop count of outgoing BFD control packets, default 255, type uint8 range 1–255) and 'rx-ttl' (mandatory minimum allowed hop count of incoming packets; packets below this are dropped) are configurable per session-group.

yang, netconf

protocol-element §2.12

Four YANG features gate optional BFD capabilities: 'single-minimum-interval' (one interval value for both tx and rx), 'authentication' (BFD authentication per RFC 5880 Section 6.7), 'demand-mode' (BFD Demand mode per RFC 5880 Section 6.6), and 'echo-mode' (BFD Echo mode per RFC 5880 Section 6.4).

yang, netconf

protocol-element §2.3

Four YANG notifications are defined, one per path type: singlehop-notification, multihop-notification, lag-notification, and mpls-notification. All carry common parameters (local-discr, remote-discr, new-state, state-change-reason, time-of-last-state-change, dest-addr, source-addr, session-index, path-type) from the 'notification-parms' grouping.

yang, netconf

protocol-element §2.2

Per-session statistics in the 'session-statistics' container include: create-time, last-down-time, last-up-time, down-count (counter32), admin-down-count (counter32), receive-packet-count (counter64), send-packet-count (counter64), receive-invalid-packet-count (counter64), and send-failed-packet-count (counter64).

yang, netconf

protocol-element §2.5

Session summary statistics (number-of-sessions, number-of-sessions-up, number-of-sessions-down, number-of-sessions-admin-down, all gauge32) are exposed at two levels: globally under the top-level 'bfd' container and per path-type container (ip-sh, ip-mh, mpls, and separately for micro-BFD IPv4/IPv6 in lag).

yang, netconf

protocol-element §2.12

The 'discriminator' typedef is uint32 representing the BFD discriminator as per RFC 5880. The 'multiplier' typedef is uint8 with range 1–255. The 'hops' typedef is uint8 with range 1–255, representing TTL for IPv4 or hop limit for IPv6.

yang, netconf

protocol-element §2.11

The 'iana-bfd-types' YANG module defines the 'auth-type' typedef enumerating BFD authentication types (0–255): reserved, simple-password, keyed-md5, meticulous-keyed-md5, keyed-sha1, meticulous-keyed-sha1. Values are maintained in the IANA 'BFD Authentication Types' registry.

yang, netconf, registry, security

protocol-element §2.17

The ietf-bfd-mpls module defines two additional encapsulation type identities: 'encap-gach' (BFD with G-ACh encapsulation per RFC 5586) and 'encap-ip-gach' (BFD with IP and G-ACh encapsulation), extending the base 'encap-type' identity from ietf-bfd-types.

yang, netconf, mpls

protocol-element §2.2

The 'session-running' container captures live operational state per session: local-state, remote-state, local-diagnostic, remote-diagnostic, remote-authenticated, remote-authentication-type, detection-mode (async-with-echo, async-without-echo, demand-with-echo, demand-without-echo), negotiated-tx-interval, negotiated-rx-interval, detection-time, and echo-tx-interval-in-use.

yang, netconf

registry §5.1

The 'iana-bfd-types' YANG module is IANA-maintained and reflects two IANA registries: 'BFD Diagnostic Codes' and 'BFD Authentication Types', both defined in RFC 5880. The module namespace is 'urn:ietf:params:xml:ns:yang:iana-bfd-types'.

yang, netconf, registry

security-consideration §4

The BFD YANG modules define writable nodes that, if accessed by an unauthorized user, could disrupt BFD sessions and consequently affect network convergence for routing protocols and other BFD clients. Access to these nodes should be controlled using NETCONF access control (NACM, RFC 8341).

yang, netconf, security

security-consideration §4

The 'key-chain' reference in BFD authentication configuration is sensitive; unauthorized read access could expose cryptographic keys used to authenticate BFD control packets. Implementations should restrict read access to authentication configuration nodes.

yang, netconf, security, crypto

state-machine §2.12

BFD session states as defined in RFC 5880 and modeled in the 'state' typedef: adminDown (0), down (1), init (2), up (3). State changes trigger notifications carrying the new-state and a diagnostic code explaining the reason.

yang, netconf