Signaling Maximum SID Depth (MSD) Using OSPF
Extracted elements (18)
MSD signaling is introduced via OSPF because PCEP may not be configured on all SR tunnel head-ends, and BGP-LS is typically configured only on a small number of nodes. Advertising MSD via OSPF IGP ensures that a centralized controller receiving topology via BGP-LS can learn the MSD of every node and link in the network.
The encoding is designed to support multiple MSD-Types (not just Signaling MSD from RFC 8491), anticipating future types such as Entropy Readable Label Depth (ERLD), SIDs imposed through recirculation, or SIDs associated with the IPv6 data plane.
The Node MSD TLV and Link MSD Sub-TLV are applicable to both OSPFv2 and OSPFv3. The Node MSD TLV is optional and its advertising scope is deployment-specific; MSD advertisements MAY be useful even in non-SR MPLS networks where MSD defines the maximum label depth.
For Node MSD TLV advertisement, area-scoped flooding is RECOMMENDED. The RI LSA may be advertised at link, area, or AS flooding scope.
If a Link MSD sub-TLV is advertised multiple times for the same link, the sub-TLV in the OSPFv2 Extended Link Opaque LSA with the smallest Opaque ID, or in the OSPFv3 E-Router-LSA with the smallest Link State ID, MUST be used by receiving routers. This situation SHOULD be logged as an error.
MSD capabilities SHOULD be advertised by every OSPF router in the network so that BGP-LS can signal MSD for all relevant nodes and links to a centralized controller.
Routers with homogeneous Link MSD values SHOULD advertise only the Node MSD value to increase flooding efficiency.
The correct interpretation of the absence of both Node and Link MSD advertisements for a given MSD-Type MUST be specified when that MSD-Type is defined, per RFC 8491.
The MSD-Value in the Node MSD TLV MUST represent the lowest MSD value supported by any link configured for use by the advertising OSPF instance.
When a Link MSD is present for a given MSD-Type, its value MUST take precedence over the Node MSD. When a Link MSD-Type is not signaled but the Node MSD-Type is, the Node MSD-Type value MUST be used as the MSD value for that link.
When multiple Node MSD TLVs are received from a given router, the receiver MUST use the first occurrence in the RI LSA. If the TLV appears in multiple RI LSAs with different flooding scopes, the area-scoped RI LSA MUST be used; among same-scope duplicates, the RI LSA with the numerically smallest Instance ID MUST be used and others MUST be ignored.
The Link MSD Sub-TLV carries the MSD of the interface associated with a specific link. For OSPFv2, it is an optional sub-TLV of the OSPFv2 Extended Link TLV (type 6); for OSPFv3, it is an optional sub-TLV of the E-Router-LSA TLV (type 9).
The Node MSD TLV (type 12) is carried within the OSPF Router Information (RI) Opaque LSA body and advertises the provisioned SID depth of the originating router. Node MSD is the smallest MSD supported across all interfaces configured for use by the advertising IGP instance.
IANA allocated TLV type 12 ('Node MSD') from the 'OSPF Router Information (RI) TLVs' registry defined in RFC 7770. IANA allocated sub-TLV type 6 ('OSPFv2 Link MSD') from the 'OSPFv2 Extended Link TLV Sub-TLVs' registry. IANA allocated sub-TLV type 9 ('OSPFv3 Link MSD') from the 'OSPFv3 Extended-LSA Sub-TLVs' registry.
Advertisement of an incorrect MSD value may have negative consequences: a value smaller than supported may cause path computation to fail to find a viable path, while a value larger than supported may cause an attempt to instantiate a path that cannot be supported by the head-end. An attacker aware of these conditions could exploit incorrect MSD advertisements.
Implementations MUST ensure that malformed TLVs and sub-TLVs defined in this document are detected and do not provide a vulnerability for crashing the OSPF router or routing process. Reception of malformed TLVs SHOULD be counted and/or logged, and such logging SHOULD be rate-limited to prevent DoS attacks from overloading the OSPF control plane.
The Link MSD Sub-TLV has a 2-octet Type, 2-octet Length (variable), and a Value field of one or more 1-octet MSD-Type / 1-octet MSD-Value pairs. MSD-Value 0 represents inability to impose any MSD stack depth on that link as an outgoing interface.
The Node MSD TLV has a 2-octet Type field (value 12), a 2-octet Length field (variable, multiple of 2 octets), and a Value field consisting of one or more pairs of a 1-octet MSD-Type and 1-octet MSD-Value. MSD-Value is in the range 0–255, where 0 indicates inability to impose any MSD stack.