OSPFv3 Extensions for Segment Routing
Extracted elements (30)
SR with MPLS does not require any LDP or RSVP-TE signaling, reducing protocol complexity. Paths are encoded directly as segment sequences advertised by the IGP, eliminating the need for a separate label distribution protocol.
The LAN Adj-SID sub-TLV is necessary because OSPFv3 broadcast/NBMA networks use a star topology through the DR, meaning non-DR routers do not form or advertise adjacencies with each other. The LAN Adj-SID allows SR-capable routers to advertise direct adjacency SIDs to specific neighbors (BDR, DR-OTHER) that are reachable but not represented by the standard Adj-SID to the DR.
The OSPFv3 Extended Prefix Range TLV was defined to optimize Mapping Server advertisements: rather than advertising individual Prefix-SIDs for each prefix, a single TLV covers a contiguous range with a starting SID value, significantly reducing LSA size and flooding overhead.
SR can interoperate in the presence of Label Switched Paths established with RSVP or LDP. The IPv6 data plane is explicitly out of scope for this specification; OSPFv3 SR extensions for the IPv6 data plane will be specified in a separate document.
A router receiving a Prefix-SID with an Algorithm value that the remote node has not advertised in its SR-Algorithm TLV MUST ignore the Prefix-SID sub-TLV.
An SR Mapping Server MUST use the OSPFv3 Extended Prefix Range TLVs when advertising SIDs for prefixes, and the NU-bit MUST be set in the PrefixOptions of the LSA used for such advertisement to prevent it from contributing to prefix reachability.
Any combination of V-Flag and L-Flag other than (0,0) for index or (1,1) for local label is invalid; any Prefix-SID Advertisement received with an invalid V- and L-Flag setting MUST be ignored.
For any TLV or sub-TLV defined in this document, if the length field is invalid the containing LSA MUST be considered malformed and ignored. Errors SHOULD be logged subject to rate limiting.
If an adjacency on a P2P link transitions to a state lower than 2-Way, the Adj-SID Advertisement MUST be withdrawn from the area.
If an OSPFv3 router advertises multiple Prefix-SIDs for the same prefix, topology, and algorithm, all of them MUST be ignored.
In order to support SR in a multiarea environment, OSPFv3 MUST propagate Prefix-SID information between areas via the inter-area ABR procedure defined in Section 8.2.
Multiple Mapping Servers advertising Prefix-SIDs for the same prefix MUST advertise the same Prefix-SID value to ensure consistency across the domain.
The NP-Flag MUST be set and the E-Flag MUST be clear for Prefix-SIDs allocated to prefixes propagated between areas by an ABR, or to redistributed prefixes, unless the prefix is directly attached to the ABR or ASBR respectively.
The Range Size in the OSPFv3 Extended Prefix Range TLV MUST NOT exceed the number of prefixes satisfiable by the given Prefix Length, excluding IPv4 multicast (224.0.0.0/3) for AF=IPv4 and non-IPv6-unicast addresses for AF=IPv6.
When NP-Flag is not set, any upstream neighbor MUST pop the Prefix-SID (penultimate hop popping). When NP-Flag is set and E-Flag is clear, the upstream neighbor MUST keep the Prefix-SID on top of the stack. When both NP-Flag and E-Flag are set, the upstream neighbor MUST replace the Prefix-SID with an Explicit NULL label.
When OSPFv3 Extended Prefix Range TLVs advertising the exact same range appear in multiple LSAs of the same type from the same router, the LSA with the numerically smallest Instance ID MUST be used and subsequent instances MUST be ignored.
When the P-Flag is set in an Adj-SID or LAN Adj-SID sub-TLV, the Adj-SID value MUST be persistent across router restart and interface flap.
For inter-area SR, when an ABR propagates a Prefix-SID to connected areas it uses the Prefix-SID from the router on the best path to the prefix in the source area; if none is found on the best-path router, it falls back to any other router advertising a Prefix-SID for that prefix.
In an intra-area context, an OSPFv3 router MAY advertise Prefix-SIDs for any prefix it advertises reachability for. The SR Mapping Server may advertise Prefix-SIDs for remote prefixes using either area flooding scope (E-Intra-Area-Prefix-LSA) or AS flooding scope (E-AS-External-LSA).
SR capabilities (SRGB, SRLB, SR-Algorithm) are advertised in the OSPFv3 Router Information Opaque LSA as defined in RFC 7770, using TLVs specified in RFC 8665. These capabilities must be present before a router can participate in SR.
This document allocates value 9 in the 'OSPFv3 Extended-LSA TLVs' registry for the OSPFv3 Extended Prefix Range TLV.
This document allocates values 4 (Prefix-SID sub-TLV), 5 (Adj-SID sub-TLV), 6 (LAN Adj-SID sub-TLV), and 7 (SID/Label sub-TLV) in the 'OSPFv3 Extended-LSA Sub-TLVs' registry.
Implementations MUST ensure malformed TLVs and sub-TLVs do not cause router crashes. Reception of malformed TLVs SHOULD be counted and/or logged, and logging SHOULD be rate limited to prevent DoS attacks from overloading the OSPFv3 control plane.
In deployments where potential attackers have access to OSPFv3 routing domain networks, stronger authentication mechanisms such as those in RFC 4552 (IPsec for OSPFv3) or RFC 7166 (OSPFv3 Authentication Trailer) SHOULD be used.
OSPFv3 with SR extensions now directly programs the MPLS data plane without requiring LDP or RSVP-TE. Attacks on the OSPF control plane can therefore result in MPLS traffic misrouting, which can be more difficult to detect and isolate than IP misrouting.
The Adj-SID sub-TLV (Type 5) contains a Flags octet with B (Backup), V (Value/Index), L (Local/Global), G (Group), and P (Persistent) bits; a Weight octet; Reserved (16 bits); and a 3- or 4-octet SID/Label/Index field. Length is 7 or 8 octets.
The LAN Adj-SID sub-TLV (Type 6) extends the Adj-SID format by adding a 4-octet Neighbor ID (Router ID) field identifying the specific neighbor for which the LAN adjacency SID is advertised. Length is 11 or 12 octets depending on the V-Flag.
The OSPFv3 Extended Prefix Range TLV (Type 9) encodes a contiguous block of prefixes with fields: Prefix Length (8 bits), AF (8 bits, 0=IPv4 unicast, 1=IPv6 unicast), Range Size (16 bits), Flags (8 bits reserved), Address Prefix (variable), and Sub-TLVs. It appears in E-Intra-Area-Prefix-LSA, E-Inter-Area-Prefix-LSA, E-AS-External-LSA, and E-Type-7-LSA.
The Prefix-SID sub-TLV (Type 4) has a Flags octet with NP (No-PHP), M (Mapping Server), E (Explicit Null), V (Value/Index), and L (Local/Global) bits; an Algorithm octet; and a 3- or 4-octet SID/Index/Label field depending on the V-Flag. Length is 7 or 8 octets.
The SID/Label sub-TLV (Type 7) carries the SID or label associated with a prefix or adjacency. Length is 3 octets for a 20-bit label value (rightmost bits) or 4 octets for a 32-bit SID.