A YANG Data Model for OSPF Segment Routing over the MPLS Data Plane
Extracted elements (26)
The module is designed as an augmentation to the existing OSPF YANG data model (RFC 9129) rather than a standalone module, because SR-MPLS extensions are additions to the base OSPF protocol. This avoids duplication of OSPF configuration and state structures.
For the interface-level Adj-SID configuration on multi-access interfaces (broadcast or NBMA), a neighbor-id leaf (inet:ip-address) is mandatory and SHOULD specify a neighbor reachable via the interface.
The binding policies configured for SR mapping server must not have overlapping prefixes. The YANG module specifies this as a semantic validation requirement on configuration data.
The 'ietf-ospf-sr-mpls' YANG module requires support for the base Segment Routing module (RFC 9020), which defines global SR configuration independent of any specific routing protocol, and the OSPF base model (RFC 9129).
YANG-based management protocols (NETCONF, RESTCONF) accessing the 'ietf-ospf-sr-mpls' module must use a secure transport layer (e.g., SSH, TLS, QUIC) and must use mutual authentication.
Adj-SID Sub-TLV flags are modeled via base identity 'adj-sid-flag' with derived identities: B (Backup), V/I (Value/Index), L/G (Local/Global), G (Group), and P (Persistent), per RFC 8665 Section 6 and RFC 8666 Section 7.
Area-level SR configuration augments each OSPF area with a presence container 'segment-routing'. Its presence enables SR-MPLS on all interfaces in that area and triggers advertisement of SR-MPLS LSAs and TLVs. The augmentation is conditional on SR being enabled at the OSPF instance level.
Instance-level SR configuration augments the OSPF instance with 'segment-routing' container (enabled boolean, bindings with mapping-server policies) imported from the 'sr-control-plane' grouping (RFC 9020), plus an optional per-protocol SRGB (protocol-srgb, guarded by if-feature 'sr-mpls:protocol-srgb').
Prefix-SID Sub-TLV flags are modeled as identity-based leaf-lists using a base identity 'prefix-sid-flag'. Defined flags include: NP (No-PHP), M (Mapping Server), E (Explicit-NULL), V (Value/Index), and L (Local), as defined in RFC 8665 Section 5 and RFC 8666 Section 6.
Remote LFA (RLFA) is augmented with 'use-segment-routing-path' (boolean, default false, guarded by feature 'remote-lfa-sr'), which forces RLFA to use an SR path instead of an LDP path. This leaf is effective only when remote-lfa is enabled, per RFC 8102.
The 'ietf-ospf-sr-mpls' YANG module is a single module covering OSPF Segment Routing MPLS extensions for both OSPFv2 (RFC 8665) and OSPFv3 (RFC 8666). It is structured as an augmentation to the OSPF base YANG model (RFC 9129) and the base Segment Routing YANG module (RFC 9020).
The OSPFv2 Adj-SID Sub-TLV grouping models adj-sid-flags, mt-id (0–127), weight (uint8 for load-balancing), and SID encoding. The LAN Adj-SID Sub-TLV additionally includes neighbor-router-id (rt-types:router-id), per RFC 8665 Section 6.
The OSPFv2 Extended Prefix Range TLV grouping ('ospfv2-extended-prefix-range-tlvs') models prefix-length (uint8), address-family, range-size (uint16), IA-flag, IPv4 prefix, and nested Prefix-SID Sub-TLVs, as specified in RFC 8665 Section 4.
The OSPFv2 Prefix-SID Sub-TLV grouping includes prefix-sid-flags (leaf-list of identityref), mt-id (uint8, range 0–127 for multi-topology per RFC 4915), algorithm (identityref to prefix-sid-algorithm), and the SID encoding choice (label or index), per RFC 8665 Section 5.
The OSPFv3 Extended Prefix Range TLV ('ospfv3-extended-prefix-range-tlvs') differs from OSPFv2 in using inet:ip-prefix (supporting both IPv4 and IPv6) instead of inet:ipv4-prefix, and omits the IA-flag since OSPFv3 advertises separate Inter-Area extended-LSAs, per RFC 8666 Section 5.
The SID Range TLV grouping ('sid-range-tlvs') models the Segment Routing Global Block (SRGB) as a list of TLVs each with range-size (rt-types:uint24; zero value indicates an error) and SID encoding, per RFC 8665 Section 3.2.
The SR-Algorithm TLV grouping ('sr-algorithm-tlv') models the list of SR algorithms the router is currently using, as leaf-list of identityref to prefix-sid-algorithm, per RFC 8665 Section 3.1.
The SR Local Block TLV grouping ('local-block-tlvs') models the SRLB — the range of labels reserved for local SIDs — as a list of TLVs with range-size (uint24; zero indicates error) and SID encoding, per RFC 8665 Section 3.3.
The SRMS Preference TLV grouping models a preference value (uint8, 0–255, where 255 is most preferred) used to select among multiple Segment Routing Mapping Server advertisements, per RFC 8665 Section 3.4.
TI-LFA (Topology Independent LFA) is modeled as an optional feature ('ti-lfa') augmenting the OSPF interface fast-reroute/lfa subtree. It includes an enabled boolean (default false) and selection-tie-breakers: node-protection and srlg-disjoint, each with a configurable priority (uint8, default 128, lower value = more preferred).
This document registers the URI 'urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls' in the IETF XML Registry (RFC 3688), designating it as an XML namespace with the IESG as registrant contact.
This document registers the YANG module 'ietf-ospf-sr-mpls' in the YANG Module Names registry (RFC 6020). Module details: namespace 'urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls', prefix 'ospf-sr-mpls', not IANA-maintained, reference RFC 9903.
Knowledge of advertised SID/Label Range TLVs, SR Local Block TLVs, and SRMS Preference TLVs can facilitate DoS attacks against the advertising node's SR and SRMS functionality. NACM (RFC 8341) should be used to restrict read access to these subtrees.
Read access to Prefix-SID and Adj-SID state data in the LSDB (e.g., extended-prefix-opaque/prefix-sid-sub-tlvs, e-router-tlvs/link-tlv/sub-tlvs) can facilitate targeted attacks on the MPLS data plane by revealing the SR topology and per-prefix segment label assignments.
Several writable data nodes are particularly sensitive: SR enablement (/ospf:ospf/segment-routing/enabled), binding policies, the protocol SRGB size, interface Adj-SID values, and TI-LFA enablement. Unauthorized modification of any of these can cause Denial-of-Service by disrupting traffic or redirecting it via manipulated segment labels.
The SID TLV encoding (grouping 'sid-tlv-encoding') carries either a 20-bit MPLS label (label-value, uint32 range 0–1048575) or a 32-bit SID index (index-value, uint32). Interpretation depends on TLV length (3 octets for label, 4 for index) or V-Flag and L-Flag: V=0,L=0 means 4-octet index; V=1,L=1 means 3-octet local label with 20 rightmost bits as label value.