Border Gateway Protocol - Link State (BGP-LS) Extensions for Segment Routing
updated by
- rfc-9356 — Advertising Layer 2 Bundle Member Link Attributes in OSPF
Extracted elements (28)
IGP link-state flooding is scoped to a single IGP area, so the contents of an LSDB/TED cannot cross area or AS boundaries alone. BGP-LS was therefore defined to carry link-state information — including SR SID advertisements — across IGP areas and ASes to enable end-to-end path construction by external controllers.
Semantic and content checking of BGP-LS SR TLVs is deliberately left to the consumer (e.g., an SR PCE or controller) rather than to the BGP protocol itself. The BGP-LS protocol only performs syntactic validation; a malformed BGP-LS Attribute results in it being discarded with an error log.
Without the LAN Adjacency SID TLV, a separate BGP-LS Link NLRI would need to be originated for each additional LAN neighbor adjacency in order to carry the per-neighbor SR TLVs. The LAN Adjacency SID TLV bundles all per-neighbor adjacency SIDs into a single Link NLRI, reducing the number of NLRI instances required.
A Prefix NLRI associated with a Range TLV is treated as a normal routing prefix (providing reachability) only when an IGP metric TLV (TLV 1095) is also present; otherwise it represents only the first prefix in the SRMS mapping range and is not used for route computation.
The Flags and SID/Index/Label fields of the Adjacency SID, LAN Adjacency SID, and Prefix-SID TLVs carry protocol-specific bit definitions. Implementors MUST use the BGP-LS NLRI Protocol-ID to select the correct IS-IS, OSPFv2, or OSPFv3 specification for parsing these fields.
The L2 Bundle Member Attributes TLV is derived from IS-IS (RFC 8668) only; equivalent functionality has not yet been specified for OSPF. Implementations carrying OSPF-sourced Link NLRIs cannot use this TLV.
This document defines the BGP-LS equivalent mappings for all IS-IS SR TLVs/sub-TLVs (RFC 8667), OSPFv2 SR TLVs/sub-TLVs (RFC 8665), and OSPFv3 SR TLVs/sub-TLVs (RFC 8666), enabling consumers to correlate BGP-LS advertisements back to their IGP origin.
For the SR Capabilities TLV, the Flags field is defined only for IS-IS. The flags are not currently defined for OSPFv2 and OSPFv3 and MUST be set to 0 and ignored on receipt.
For the SR Local Block TLV, Flags are defined only for IS-IS. They are not currently defined for OSPFv2 and OSPFv3 and MUST be set to 0 and ignored on receipt.
Link Attribute TLVs (Adjacency SID, LAN Adjacency SID, L2 Bundle Member Attributes) should only be added to the BGP-LS Attribute associated with the Link NLRI of the IGP node originating the corresponding IGP TLV/sub-TLV.
Node Attribute TLVs defined in this document (SR Capabilities, SR Algorithm, SR Local Block, SRMS Preference, SID/Label) should only be added to the BGP-LS Attribute associated with the Node NLRI of the IGP node originating the corresponding IGP TLV/sub-TLV.
The LAN Adjacency SID TLV (Type 1100) allows a node to advertise adjacency SIDs to all neighbors on a LAN within a single BGP-LS Link NLRI instance, avoiding the need to originate a separate Link NLRI for each per-neighbor adjacency. The Neighbor ID field is 6 octets for IS-IS (System ID) and 4 octets for OSPF (Router-ID).
The SID/Label TLV (Type 1161) is used as a sub-TLV by SR Capabilities and SR Local Block TLVs. Its length is either 3 octets (20-bit label, 4 leftmost bits set to 0) or 4 octets (32-bit SID index), making the total TLV size 7 or 8 octets respectively.
IANA registered 13 new code points in the 'BGP-LS Node Descriptor, Link Descriptor, Prefix Descriptor, and Attribute TLVs' registry: 1034 (SR Capabilities), 1035 (SR Algorithm), 1036 (SR Local Block), 1037 (SRMS Preference), 1099 (Adjacency SID), 1100 (LAN Adjacency SID), 1158 (Prefix-SID), 1159 (Range), 1161 (SID/Label), 1170 (Prefix Attribute Flags), 1171 (Source Router Identifier), 1172 (L2 Bundle Member Attributes), 1174 (Source OSPF Router-ID).
Isolation of BGP-LS peering sessions is recommended to prevent BGP-LS topology information (including newly added SR TLVs) from leaking to external BGP peers outside the SR domain. BGP peering sessions for other address families may be established to routers outside the SR domain.
SR operates within a trusted domain, and SR traffic engineering policies using SIDs advertised via BGP-LS are expected to remain entirely within that trusted SR domain. Operators must take precautions to ensure BGP-LS SR information is not advertised to external BGP peering sessions outside the SR domain.
The IGP instances originating SR TLVs propagated via BGP-LS are assumed to support all required security and authentication mechanisms (per RFC 8665, RFC 8666, RFC 8667). BGP-LS SR extensions themselves do not alter the BGP-LS security model defined in RFC 7752.
The Adjacency SID TLV (Type 1099) has variable length (7 or 8 octets): 1-octet Flags, 1-octet Weight, 2-octet Reserved (MUST be 0), and a variable SID/Index/Label field. Flags and SID fields are interpreted per the Protocol-ID (IS-IS, OSPFv2, or OSPFv3).
The L2 Bundle Member Attributes TLV (Type 1172) carries a 4-octet L2 Bundle Member Descriptor (link-local identifier per RFC 4202) followed by variable-length Link Attribute sub-TLVs describing the bundle member's attributes.
The Prefix Attribute Flags TLV (Type 1170) carries a variable-length Flags field whose bit definitions are protocol-specific: IS-IS IPv4/IPv6 Extended Reachability Attribute Flags (RFC 7794), OSPFv2 Extended Prefix TLV Flags (RFC 7684), or OSPFv3 Prefix Options (RFC 5340/8362).
The Prefix-SID TLV (Type 1158, 7 or 8 octets) encodes a 1-octet Flags field, 1-octet Algorithm, 2-octet Reserved (MUST be 0), and a variable SID/Index/Label. The Protocol-ID of the BGP-LS Prefix NLRI determines whether IS-IS, OSPFv2, or OSPFv3 flag/SID semantics apply.
The Range TLV (Type 1159, 11 or 12 octets) carries a 1-octet Flags, 1-octet Reserved (MUST be 0), 2-octet Range Size (number of prefixes covered), and sub-TLVs including the Prefix-SID TLV to advertise SRMS prefix-to-SID mapping ranges.
The Source OSPF Router-ID TLV (Type 1174, Length 4 octets) is OSPF-only and carries the 4-octet OSPF Router-ID of the node originating the prefix; derived from the Prefix Source OSPF Router-ID Sub-TLV defined in RFC 9084.
The Source Router Identifier TLV (Type 1171) carries either a 4-octet IPv4 or 16-octet IPv6 Router-ID (for IS-IS) or Router Address (for OSPF) identifying the originator of the prefix.
The SR-Algorithm TLV (Type 1035) carries one or more 1-octet Algorithm fields (minimum length 1, maximum 256 octets) identifying the SR algorithms supported by the originating node.
The SR Capabilities TLV (Type 1034, minimum 12 octets) encodes a 1-octet Flags field, 1-octet Reserved, and one or more (Range Size: 3 octets, SID/Label sub-TLV) entries advertising the node's Segment Routing Global Block (SRGB) ranges.
The SR Local Block TLV (Type 1036, minimum 12 octets) encodes a 1-octet Flags field, 1-octet Reserved, and one or more (Sub-Range Size: 3 octets, SID/Label sub-TLV) entries advertising the node's locally reserved SID label ranges (SRLB).
The SRMS Preference TLV (Type 1037, Length 1 octet) carries a single 1-octet unsigned Preference value used to rank competing SRMS mapping advertisements from different sources.