rfc-8665

OSPF Extensions for Segment Routing

P. Psenak (Editor), S. Previdi (Editor), C. Filsfils, H. Gredler, R. Shakir, W. Henderickx, J. Tantsura
date2019-12 streamIETF areartg wgospf statusPROPOSED STANDARD pages25 canonicalhttps://www.rfc-editor.org/rfc/rfc8665 doi10.17487/RFC8665 errataview
Segment Routing (SR) allows a flexible definition of end-to-end paths within IGP topologies by encoding paths as sequences of topological subpaths called "segments". These segments are advertised by the link-state routing protocols (IS-IS and OSPF). This document describes the OSPFv2 extensions required for Segment Routing.

Extracted elements (31)

design-rationale §1

SR's control plane uses only IGP extensions (OSPFv2 in this document) to program the MPLS data plane, eliminating the need for LDP or RSVP-TE signaling. This simplification is a primary motivation for SR; it can still interoperate with LDP- or RSVP-established LSPs when required.

routing, mpls

interoperability-note §3

The SR-Algorithm TLV and SID/Label Range TLV semantics are applicable to both OSPFv2 and OSPFv3; the OSPFv3-specific extensions are defined separately in RFC 8666. The IPv6 data plane is out of scope for this document, which only applies to OSPFv2 and the IPv4 address family.

routing, mpls

normative-requirement §4 MUST

An ABR advertising the OSPF Extended Prefix Range TLV between areas MUST set the IA-Flag. An ABR only propagates an inter-area Prefix Range advertisement from the backbone to nonbackbone areas if it is the best one, preferring intra-area over inter-area advertisements.

routing

normative-requirement §7.4.1 MUST

An Adj-SID for a P2P adjacency MAY be advertised when in state 2-Way or higher. If the adjacency transitions to a state lower than 2-Way, the Adj-SID advertisement MUST be withdrawn from the area.

routing, mpls

normative-requirement §9 MUST

For any TLV or sub-TLV defined in this document, if the length is invalid the LSA containing it MUST be ignored. An error SHOULD be logged subject to rate limiting.

routing, security

normative-requirement §3.1 REQUIRED

For SR-Algorithm TLV advertisement, area-scoped flooding is REQUIRED. The same requirement applies to the SID/Label Range TLV and the SR Local Block TLV.

routing, mpls

normative-requirement §5 MUST

If an OSPF router advertises multiple Prefix-SIDs for the same prefix, topology, and algorithm, all of them MUST be ignored. A Prefix-SID with an algorithm value not advertised in the SR-Algorithm TLV by the remote node MUST also be ignored.

routing, mpls

normative-requirement §3.1 MUST

If the SR-Algorithm TLV is advertised, Algorithm 0 (SPF) MUST be included. Algorithm 1 (Strict SPF) MUST NOT allow local policy to alter its computed paths.

routing, mpls

normative-requirement §5 MUST

NP-Flag and E-Flag semantics: if NP is not set, upstream neighbors MUST pop the Prefix-SID (PHP). If NP is set and E is not set, upstream neighbors MUST keep the SID on the stack. If both NP and E are set, upstream neighbors MUST replace the Prefix-SID with Explicit NULL (label 0 for IPv4). When M-Flag is set, NP and E flags MUST be ignored.

routing, mpls

normative-requirement §5 MUST

The NP-Flag MUST be set and E-Flag MUST be clear for Prefix-SIDs allocated to inter-area prefixes originated by an ABR (unless the prefix is directly attached) and for redistributed external prefixes (unless directly attached to the ASBR).

routing, mpls

normative-requirement §3.2 MUST

The originating router MUST NOT advertise overlapping SID/Label ranges. It MUST preserve the advertisement order across graceful restarts (via checkpointing or nonvolatile storage). Receiving routers MUST adhere to the advertised order when computing SID/label from an index.

routing, mpls

normative-requirement §3.1 MUST

When multiple SR-Algorithm TLVs are received from a router, the receiver MUST use the first occurrence. If TLVs appear in LSAs with different flooding scopes, the area-scoped one MUST be used. For same scope, the TLV in the LSA with the numerically smallest Instance ID MUST be used.

routing

normative-requirement §3.4 MUST

When multiple SRMS Preference TLVs are received, the receiver MUST use the first occurrence; if flooding scopes differ, the narrowest scope MUST be used; within the same scope, the smallest Instance ID MUST be used. AS-scoped flooding SHOULD be used for SRMS Preference TLV.

routing, mpls

normative-requirement §6.1 MUST

When the P-Flag is set in an Adj-SID or LAN Adj-SID sub-TLV, the Adj-SID MUST be persistently allocated — its value must remain consistent across router restart and interface flap.

routing, mpls

protocol-element §7.3

For external prefixes, an ASBR that supports SR SHOULD originate an AS-wide OSPF Extended Prefix Opaque LSA alongside its Type-5 LSA. When an NSSA ABR translates Type-7 to Type-5 LSAs, it SHOULD also carry the Prefix-SID from the Type-7 advertising router.

routing, mpls

protocol-element §7.2

For inter-area SR, when an ABR advertises a Type-3 Summary LSA it MUST also originate an area-scoped OSPF Extended Prefix Opaque LSA carrying the Prefix-SID. The ABR selects the Prefix-SID from the best-path advertising router in the source area; if none, it uses any other advertised Prefix-SID.

routing, mpls

registry §8.1

This document allocates four values in the OSPF Router Information (RI) TLVs registry: 8 (SR-Algorithm TLV), 9 (SID/Label Range TLV), 14 (SR Local Block TLV), and 15 (SRMS Preference TLV).

registry, routing

registry §8.2

This document allocates Type 2 (OSPF Extended Prefix Range TLV) in the OSPFv2 Extended Prefix Opaque LSA TLVs registry, and Types 1 (SID/Label Sub-TLV) and 2 (Prefix-SID Sub-TLV) in the OSPFv2 Extended Prefix TLV Sub-TLVs registry.

registry, routing

registry §8.4

This document allocates Types 1 (SID/Label Sub-TLV), 2 (Adj-SID Sub-TLV), and 3 (LAN Adj-SID/Label Sub-TLV) in the OSPFv2 Extended Link TLV Sub-TLVs registry.

registry, routing

registry §8.5

This document creates the IGP Algorithm Types registry (range 0–255, Standards Action policy) under the IGP Parameters registry, with initial values 0 (SPF based on link metric) and 1 (Strict SPF based on link metric).

registry, routing

security-consideration §10 MUST

Implementations MUST ensure malformed TLVs and sub-TLVs are detected and do not allow attackers to crash the OSPFv2 router. Reception of malformed TLVs SHOULD be counted and/or logged. Logging SHOULD be rate-limited to prevent DoS attacks from overloading the OSPF control plane.

security, routing

security-consideration §10 SHOULD

SR extensions cause OSPFv2 to program the MPLS data plane in addition to the IP data plane. Attacks on the OSPF control plane can now misdirect MPLS-forwarded traffic, which can be harder to detect and isolate than IP misrouting. Existing OSPFv2 security extensions (RFC 2328, RFC 7684) apply, and stronger authentication (RFC 7474) SHOULD be used in deployments where attackers may have access to the routing domain.

security, routing, mpls

wire-format §6.1

The Adj-SID Sub-TLV (Type 2, 7 or 8 octets) is a sub-TLV of the Extended Link TLV and contains Flags (B, V, L, G, P bits), Reserved, MT-ID, Weight, and SID/Label/Index. Multiple instances MAY appear per Extended Link TLV.

routing, mpls

wire-format §6.2

The LAN Adj-SID Sub-TLV (Type 3, 11 or 12 octets) extends the Adj-SID Sub-TLV with a 4-octet Neighbor ID (Router ID) field, used on broadcast/NBMA/hybrid networks to advertise SIDs for adjacencies to non-DR routers.

routing, mpls

wire-format §4

The OSPF Extended Prefix Range TLV (Type 2) carries Prefix Length (1 octet), AF (1 octet, 0 = IPv4 unicast), Range Size (2 octets), Flags (1 octet including IA-Flag), Reserved (3 octets), Address Prefix (variable), and sub-TLVs, enabling a single advertisement to assign SIDs for a contiguous prefix range.

routing, mpls

wire-format §5

The Prefix-SID Sub-TLV (Type 2, 7 or 8 octets depending on V-Flag) contains Flags (NP, M, E, V, L bits), Reserved, MT-ID, Algorithm, and SID/Index/Label. When V=0 and L=0, the field is a 4-octet global index; when V=1 and L=1, it is a 3-octet local label.

routing, mpls

wire-format §3.2

The SID/Label Range TLV (Type 9) contains a 3-octet Range Size field (number of SIDs in the range, MUST be > 0) followed by sub-TLVs; the mandatory SID/Label Sub-TLV identifies the first SID/label in the range. Multiple instances MAY be advertised for multiple ranges.

routing, mpls

wire-format §2.1

The SID/Label Sub-TLV (Type 1) carries a SID or MPLS label associated with a prefix or adjacency. Length is 3 octets for a 20-bit label value or 4 octets for a 32-bit SID value.

routing, mpls

wire-format §3.1

The SR-Algorithm TLV (Type 8, variable length) is a top-level Router Information Opaque LSA TLV advertising one or more single-octet algorithm identifiers (0 = SPF, 1 = Strict SPF). Absence of this TLV means the node is not SR-capable.

routing, mpls

wire-format §3.3

The SR Local Block TLV (SRLB TLV, Type 14) advertises the range of labels reserved for Local SIDs, using the same format as the SID/Label Range TLV. It MAY appear multiple times; only a single SID/Label Sub-TLV MAY be present per instance.

routing, mpls

wire-format §3.4

The SRMS Preference TLV (Type 15, 4-octet length) contains a 1-octet Preference field (0–255) followed by 3 reserved octets, and is advertised in the Router Information Opaque LSA to indicate SR Mapping Server preference.

routing, mpls