OSPFv3 Extensions for Segment Routing over IPv6 (SRv6)
Extracted elements (29)
A new SRv6 Locator LSA (function code 42) is introduced instead of reusing Extended Prefix LSAs to provide a clear distinction between base OSPFv3 prefix reachability advertisements and SRv6 Locator reachability advertisements.
The SRv6 SID Structure sub-TLV is intended for informational use by control and management planes only — for example, validating SRv6 SID instantiation conformance via BGP-LS controllers or automating domain boundary filtering. It MUST NOT be used at transit nodes for forwarding decisions.
Locators associated with algorithms 0 and 1 SHOULD also be advertised using Extended LSA types so that routers not supporting SRv6 will still install forwarding entries for SRv6 traffic. When operating in Extended LSA sparse-mode, these locators SHOULD also be advertised using Legacy LSAs.
All End.X and LAN End.X SIDs MUST be subsumed by the subnet of a locator with the matching algorithm advertised by the same OSPFv3 router in an SRv6 Locator TLV. End.X SIDs that do not meet this requirement MUST be ignored.
All nodes advertising the same anycast SRv6 Locator MUST instantiate the exact same set of SIDs under that anycast locator. Failure to do so may result in traffic being dropped or misrouted.
Locators associated with Flexible Algorithms SHOULD NOT be advertised in the base OSPFv3 prefix reachability advertisements, because doing so would make the locator available for non-Flexible Algorithm (algorithm 0) forwarding.
SRv6 Locators MUST be advertised within an SRv6 Locator TLV using an SRv6 Locator LSA. Forwarding entries for advertised locators MUST be installed in the forwarding plane of receiving SRv6-capable routers when the associated algorithm is supported by the receiving router.
SRv6 SIDs received from other OSPFv3 routers MUST NOT be installed directly in the forwarding plane; reachability depends on the existence of a covering locator. If the locator is the longest prefix match for those SIDs, correct forwarding is ensured.
The AC-bit (0x80) in OSPFv3 PrefixOptions MUST be set when a prefix or SRv6 Locator is configured as anycast and MUST be preserved when re-advertising across areas. The AC-bit and N-bit MUST NOT both be set; if both are set, receivers MUST ignore the N-bit.
The SRv6 Capabilities TLV MUST be advertised by every SRv6-enabled router exactly once in the Router Information LSA; area-scoped flooding is REQUIRED. When multiple instances exist, the area-scoped one takes precedence; among same-scope instances, the one with the numerically smallest Link State ID MUST be used.
The SRv6 End SID MUST be allocated from its associated locator; End SIDs not allocated from the associated locator MUST be ignored. Every SRv6-enabled OSPFv3 router SHOULD advertise at least one End SID for itself.
The SRv6 Locator TLV MUST be ignored on receipt if the Route Type field contains any value other than 1 (Intra-Area), 2 (Inter-Area), 3 (AS External Type 1), 4 (AS External Type 2), 5 (NSSA External Type 1), or 6 (NSSA External Type 2).
The SRv6 SID Structure sub-TLV MUST NOT appear more than once in its parent sub-TLV; if it does, the parent sub-TLV MUST be ignored. If the sum of the four length fields exceeds 128 bits, the parent TLV/sub-TLV MUST be ignored.
When a locator advertisement is received both in a prefix reachability advertisement (Legacy or Extended LSA) and in an SRv6 Locator TLV, the prefix reachability advertisement MUST be preferred for installing forwarding plane entries to prevent inconsistent forwarding between SRv6-capable and SRv6-incapable routers.
Four SRv6-specific MSD types are defined for OSPFv3, shared with IS-IS via the 'IGP MSD-Types' IANA registry: Maximum Segments Left (max value of SRH Segments Left before applying Endpoint behavior), Maximum End Pop (max SIDs for PSP/USP), Maximum H.Encaps (max SIDs addable via H.Encaps), and Maximum End D (max SIDs in SRH during decapsulation).
OSPFv3 supports a defined mapping of SRv6 Endpoint behaviors (from RFC 8986) to advertisement sub-TLVs: End variants (code points 1-4, 28-31) appear only in End SID sub-TLV; End.X/End.DX6/End.DX4 variants appear in End.X and LAN End.X sub-TLVs; End.DT6/DT4/DT64 appear only in End SID sub-TLV.
The SRv6 Capabilities TLV (Type=20) is an optional top-level TLV of the OSPFv3 Router Information LSA used to advertise a router's support for SR Segment Endpoint Node functionality and SRv6-related capabilities. It contains a 2-octet Flags field and an optional O-flag indicating support for the O-flag in the SRH as specified in RFC 9259.
A new 'OSPFv3 SRv6 Locator LSA Sub-TLVs' registry was created with initial entries: SRv6 End SID (1), IPv6-Forwarding-Address (2), Route-Tag (3), Prefix Source OSPF Router-ID (4), Prefix Source Router Address (5), and SRv6 SID Structure (10). Types 0-32767 require IETF Review/IESG Approval; 32768-33023 reserved for experiments.
Four new OSPFv3 subregistries were created: 'OSPFv3 SRv6 Capabilities TLV Flags' (O-flag at bit 1), 'OSPFv3 SRv6 End SID Sub-TLV Flags' (no initial assignments), 'OSPFv3 SRv6 Adjacency SID Sub-TLV Flags' (B-flag=0, S-flag=1, P-flag=2), and 'OSPFv3 SRv6 Locator LSA TLVs' (SRv6 Locator=1). All use 'Standards Action' registration procedure.
IANA allocated code point 20 in the 'OSPF Router Information (RI) TLVs' registry for the SRv6 Capabilities TLV, and code point 42 in the 'OSPFv3 LSA Function Codes' registry for the SRv6 Locator LSA. Code point 0x80 in 'OSPFv3 Prefix Options' is allocated for the AC-bit.
Three code points were allocated in 'OSPFv3 Extended-LSA Sub-TLVs': SRv6 SID Structure (30, L2BM=Y), SRv6 End.X SID (31, L2BM=Y), and SRv6 LAN End.X SID (32, L2BM=Y). A cross-reference note was added requiring evaluation for applicability in the complementary SRv6 Locator LSA Sub-TLVs registry.
OSPFv3 deployment SHOULD use authentication per RFC 7166. Reception of malformed TLVs or sub-TLVs SHOULD be counted and/or logged in a rate-limited manner. Security considerations from RFC 8402 (SR architecture), RFC 8986 (SRv6 network programming), RFC 8476 (MSD), RFC 9259 (O-flag), and RFC 9350 (Flexible Algorithms) also apply.
The SRv6 Capabilities TLV encodes: Type (2 octets, value=20), Length (2 octets), Flags (2 octets, O-flag at bit 1), Reserved (2 octets, must be zero). The Flags field O-flag indicates the router supports the O-flag in the SRH.
The SRv6 End SID sub-TLV (Type=1 within SRv6 Locator TLV) encodes: Flags (1 octet, currently all reserved/zero), Reserved (1 octet), Endpoint Behavior (2 octets), SID (16 octets, the 128-bit SRv6 SID), followed by optional sub-TLVs.
The SRv6 End.X SID sub-TLV (Type=31 in Extended-LSA sub-TLVs) encodes: Endpoint Behavior (2 octets), Flags (1 octet: B-flag backup, S-flag set, P-flag persistent), Reserved1 (1 octet), Algorithm (1 octet), Weight (1 octet), Reserved2 (2 octets), SID (16 octets), and optional sub-TLVs.
The SRv6 LAN End.X SID sub-TLV (Type=32) extends the End.X SID format with a 4-octet Neighbor Router-ID field identifying the OSPFv3 Router-ID of the specific neighbor, enabling per-neighbor SID advertisement on broadcast/NBMA links.
The SRv6 Locator LSA uses OSPFv3 function code 42 with the U-bit set (flood even if not understood). It carries a variable TLV section using RFC 3630 TLV encoding: 2-octet Type, 2-octet Length, variable Value padded to 4-octet alignment (padding not included in Length).
The SRv6 Locator TLV (Type=1 within Locator LSA) encodes: Route Type (1 octet, values 1-6), Algorithm (1 octet), Locator Length (1 octet, 1-128 bits), PrefixOptions (1 octet), Metric (4 octets, 0xFFFFFFFF=unreachable), Locator prefix (1-16 octets), followed by sub-TLVs.
The SRv6 SID Structure sub-TLV (Type=30, Length=4) encodes four 1-octet fields: LB Length (Locator Block bits), LN Length (Locator Node bits), Function Length (Function bits), and Argument Length (Argument bits). The sum of all four MUST be ≤ 128.