RFC 8666 | OSPFv3 Extensions for Segment Routing | December 2019 |
Psenak & Previdi | Standards Track | [Page] |
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 OSPFv3 extensions required for Segment Routing with the MPLS data plane.¶
This is an Internet Standards Track document.¶
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 7841.¶
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at https://www.rfc-editor.org/info/rfc8666.¶
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
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). Prefix segments represent an ECMP-aware shortest path to a prefix (or a node) as per the state of the IGP topology. Adjacency segments represent a hop over a specific adjacency between two nodes in the IGP. A prefix segment is typically a multi-hop path while an adjacency segment, in most cases, is a one-hop path. SR's control plane can be applied to both IPv6 and MPLS data planes, and it does not require any additional signaling (other than IGP extensions). The IPv6 data plane is out of the scope of this specification; the OSPFv3 extension for SR with the IPv6 data plane will be specified in a separate document. When used in MPLS networks, SR paths do not require any LDP or RSVP-TE signaling. However, SR can interoperate in the presence of Label Switched Paths (LSPs) established with RSVP or LDP.¶
This document describes the OSPFv3 extensions required for Segment Routing with the MPLS data plane.¶
This section lists some of the terminology used in this document:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
Segment Routing defines various types of Segment Identifiers (SIDs): Prefix-SID, Adjacency SID, and LAN Adjacency SID.¶
The SID/Label sub-TLV appears in multiple TLVs or sub-TLVs defined later in this document. It is used to advertise the SID or label associated with a prefix or adjacency. The SID/Label sub-TLV has the following format:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SID/Label (variable) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
where:¶
Segment Routing requires some additional router capabilities to be advertised to other routers in the area.¶
These SR capabilities are advertised in the OSPFv3 Router Information Opaque LSA (defined in [RFC7770]) and specified in [RFC8665].¶
In some cases, it is useful to advertise attributes for a range of prefixes in a single advertisement. The SR Mapping Server, which is described in [RFC8661], is an example of where SIDs for multiple prefixes can be advertised. To optimize such advertisement in case of multiple prefixes from a contiguous address range, OSPFv3 Extended Prefix Range TLV is defined.¶
The OSPFv3 Extended Prefix Range TLV is a top-level TLV of the following LSAs defined in [RFC8362]:¶
Multiple OSPFv3 Extended Prefix Range TLVs MAY be advertised in each LSA mentioned above. The OSPFv3 Extended Prefix Range TLV has the following format:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Prefix Length | AF | Range Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flags | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Address Prefix (variable) | | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sub-TLVs (variable) | +- -+ | |¶
where:¶
Address family for the prefix.¶
Represents the number of prefixes that are covered by the advertisement. The Range Size MUST NOT exceed the number of prefixes that could be satisfied by the Prefix Length without including:¶
The range represents the contiguous set of prefixes with the same prefix length as specified by the Prefix Length field. The set starts with the prefix that is specified by the Address Prefix field. The number of prefixes in the range is equal to the Range Size.¶
If the OSPFv3 Extended Prefix Range TLVs advertising the exact same range appears in multiple LSAs of the same type, originated by the same OSPFv3 router, the LSA with the numerically smallest Instance ID MUST be used, and subsequent instances of the OSPFv3 Extended Prefix Range TLVs MUST be ignored.¶
The Prefix-SID sub-TLV is a sub-TLV of the following OSPFv3 TLVs as defined in [RFC8362] and in Section 5:¶
It MAY appear more than once in the parent TLV and has the following format:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flags | Algorithm | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SID/Index/Label (variable) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+¶
where:¶
Single-octet field. The following flags are defined:¶
0 1 2 3 4 5 6 7 +--+--+--+--+--+--+--+--+ | |NP|M |E |V |L | | | +--+--+--+--+--+--+--+--+¶
where:¶
Single octet identifying the algorithm the Prefix-SID is associated with as defined in the IGP Algorithm Types registry [ALGOREG].¶
A router receiving a Prefix-SID from a remote node and with an algorithm value that the remote node has not advertised in the SR-Algorithm TLV [RFC8665] MUST ignore the Prefix-SID sub-TLV.¶
According to the V-Flag and L-Flag, it contains:¶
If an OSPFv3 router advertises multiple Prefix-SIDs for the same prefix, topology, and algorithm, all of them MUST be ignored.¶
When calculating the outgoing label for the prefix, the router MUST take into account, as described below, the E-, NP-, and M-Flags advertised by the next-hop router if that router advertised the SID for the prefix. This MUST be done regardless of whether the next-hop router contributes to the best path to the prefix.¶
The NP-Flag (No-PHP) MUST be set and the E-Flag MUST be clear for Prefix-SIDs allocated to prefixes that are propagated between areas by an ABR based on intra-area or inter-area reachability, unless the advertised prefix is directly attached to such ABR.¶
The NP-Flag (No-PHP) MUST be set and the E-Flag MUST be clear for Prefix-SIDs allocated to redistributed prefixes, unless the redistributed prefix is directly attached to the advertising ASBR.¶
If the NP-Flag is not set, then:¶
If the NP-Flag is set and the E-Flag is not set, then:¶
If both the NP-Flag and E-Flag are set, then:¶
When the M-Flag is set, the NP-Flag and the E-Flag MUST be ignored on reception.¶
As the Mapping Server does not specify the originator of a prefix advertisement, it is not possible to determine PHP behavior solely based on the Mapping Server Advertisement. However, PHP behavior SHOULD be done in the following cases:¶
When a Prefix-SID is advertised in the OSPFv3 Extended Prefix Range TLV, then the value advertised in the Prefix-SID sub-TLV is interpreted as a starting SID/Label value.¶
Example 1: If the following router addresses (loopback addresses) need to be mapped into the corresponding Prefix-SID indexes:¶
Router-A: 2001:DB8::1/128, Prefix-SID: Index 1 Router-B: 2001:DB8::2/128, Prefix-SID: Index 2 Router-C: 2001:DB8::3/128, Prefix-SID: Index 3 Router-D: 2001:DB8::4/128, Prefix-SID: Index 4¶
then the Address Prefix field in the OSPFv3 Extended Prefix Range TLV would be set to 2001:DB8::1, the Prefix Length would be set to 128, the Range Size would be set to 4, and the Index value in the Prefix-SID sub-TLV would be set to 1.¶
Example 2: If the following prefixes need to be mapped into the corresponding Prefix-SID indexes:¶
2001:DB8:1::0/120, Prefix-SID: Index 51 2001:DB8:1::100/120, Prefix-SID: Index 52 2001:DB8:1::200/120, Prefix-SID: Index 53 2001:DB8:1::300/120, Prefix-SID: Index 54 2001:DB8:1::400/120, Prefix-SID: Index 55 2001:DB8:1::500/120, Prefix-SID: Index 56 2001:DB8:1::600/120, Prefix-SID: Index 57¶
then the Prefix field in the OSPFv3 Extended Prefix Range TLV would be set to 2001:DB8:1::0, the Prefix Length would be set to 120, the Range Size would be set to 7, and the Index value in the Prefix-SID sub-TLV would be set to 51.¶
An Adjacency Segment Identifier (Adj-SID) represents a router adjacency in Segment Routing.¶
The Adj-SID sub-TLV is an optional sub-TLV of the Router-Link TLV as defined in [RFC8362]. It MAY appear multiple times in the Router-Link TLV. The Adj-SID sub-TLV has the following format:¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flags | Weight | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SID/Label/Index (variable) | +---------------------------------------------------------------+¶
where:¶
Single-octet field containing the following flags:¶
0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ |B|V|L|G|P| | +-+-+-+-+-+-+-+-+¶
where:¶
An SR-capable router MAY allocate an Adj-SID for each of its adjacencies and set the B-Flag when the adjacency is eligible for protection by an FRR mechanism (IP or MPLS) as described in [RFC8402].¶
An SR-capable router MAY allocate more than one Adj-SID to an adjacency.¶
An SR-capable router MAY allocate the same Adj-SID to different adjacencies.¶
When the P-Flag is not set, the Adj-SID MAY be persistent. When the P-Flag is set, the Adj-SID MUST be persistent.¶
The LAN Adjacency SID is an optional sub-TLV of the Router-Link TLV. It MAY appear multiple times in the Router-Link TLV. It is used to advertise a SID/Label for an adjacency to a non-DR router on a broadcast, Non-Broadcast Multi-Access (NBMA), or hybrid [RFC6845] network.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Flags | Weight | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SID/Label/Index (variable) | +---------------------------------------------------------------+¶
where:¶
When the P-Flag is not set, the LAN Adjacency SID MAY be persistent. When the P-Flag is set, the LAN Adjacency SID MUST be persistent.¶
An OSPFv3 router that supports Segment Routing MAY advertise Prefix- SIDs for any prefix to which it is advertising reachability (e.g., a loopback IP address as described in Section 6).¶
A Prefix-SID can also be advertised by SR Mapping Servers (as described in [RFC8661]). A Mapping Server advertises Prefix-SIDs for remote prefixes that exist in the OSPFv3 routing domain. Multiple Mapping Servers can advertise Prefix-SIDs for the same prefix, in which case the same Prefix-SID MUST be advertised by all of them. The SR Mapping Server could use either area flooding scope or autonomous system flooding scope when advertising Prefix-SIDs for prefixes, based on the configuration of the SR Mapping Server. Depending on the flooding scope used, the SR Mapping Server chooses the OSPFv3 LSA type that will be used. If the area flooding scope is needed, an E-Intra-Area-Prefix-LSA [RFC8362] is used. If autonomous system flooding scope is needed, an E-AS-External-LSA [RFC8362] is used.¶
When a Prefix-SID is advertised by the Mapping Server, which is indicated by the M-Flag in the Prefix-SID sub-TLV (Section 6), the route type as implied by the LSA type is ignored and the Prefix-SID is bound to the corresponding prefix independent of the route type.¶
Advertisement of the Prefix-SID by the Mapping Server using an Inter-Area Prefix TLV, External-Prefix TLV, or Intra-Area-Prefix TLV [RFC8362] does not itself contribute to the prefix reachability. The NU-bit [RFC5340] MUST be set in the PrefixOptions field of the LSA, which is used by the Mapping Server to advertise SID or SID Range, which prevents the advertisement from contributing to prefix reachability.¶
An SR Mapping Server MUST use the OSPFv3 Extended Prefix Range TLVs when advertising SIDs for prefixes. Prefixes of different route types can be combined in a single OSPFv3 Extended Prefix Range TLV advertised by an SR Mapping Server.¶
Area-scoped OSPFv3 Extended Prefix Range TLVs are propagated between areas, similar to propagation of prefixes between areas. Same rules that are used for propagating prefixes between areas [RFC5340] are used for the propagation of the prefix ranges.¶
In order to support SR in a multiarea environment, OSPFv3 MUST propagate Prefix-SID information between areas. The following procedure is used to propagate Prefix-SIDs between areas.¶
When an OSPFv3 ABR advertises an Inter-Area-Prefix-LSA from an intra-area prefix to all its connected areas, it will also include the Prefix-SID sub-TLV as described in Section 6. The Prefix-SID value will be set as follows:¶
When an OSPFv3 ABR advertises an Inter-Area-Prefix-LSA from an inter-area route to all its connected areas, it will also include the Prefix-SID sub-TLV as described in Section 6. The Prefix-SID value will be set as follows:¶
AS-External-LSAs are flooded domain wide. When an ASBR, which supports SR, originates an E-AS-External-LSA, it SHOULD also include a Prefix-SID sub-TLV as described in Section 6. The Prefix-SID value will be set to the SID that has been reserved for that prefix.¶
When a Not-So-Stubby Area (NSSA) [RFC3101] ABR translates an E-NSSA-LSA into an E-AS-External-LSA, it SHOULD also advertise the Prefix-SID for the prefix. The NSSA ABR determines its best path to the prefix advertised in the translated E-NSSA-LSA and finds the advertising router associated with that path. If the advertising router has advertised a Prefix-SID for the prefix, then the NSSA ABR uses it when advertising the Prefix-SID for the E-AS-External-LSA. Otherwise, the Prefix-SID advertised by any other router will be used.¶
The Adjacency Segment Routing Identifier (Adj-SID) is advertised using the Adj-SID sub-TLV as described in Section 7.¶
An Adj-SID MAY be advertised for any adjacency on a point-to-point (P2P) link that is in neighbor state 2-Way or higher. If the adjacency on a P2P link transitions from the FULL state, then the Adj-SID for that adjacency MAY be removed from the area. If the adjacency transitions to a state lower than 2-Way, then the Adj-SID Advertisement MUST be withdrawn from the area.¶
Broadcast, NBMA, or hybrid [RFC6845] networks in OSPFv3 are represented by a star topology where the DR is the central point to which all other routers on the broadcast, NBMA, or hybrid network connect. As a result, routers on the broadcast, NBMA, or hybrid network advertise only their adjacency to the DR. Routers that do not act as DR do not form or advertise adjacencies with each other. They do, however, maintain 2-Way adjacency state with each other and are directly reachable.¶
When Segment Routing is used, each router on the broadcast, NBMA, or hybrid network MAY advertise the Adj-SID for its adjacency to the DR using the Adj-SID sub-TLV as described in Section 7.1.¶
SR-capable routers MAY also advertise a LAN Adjacency SID for other neighbors (e.g., Backup Designated Router (BDR), DR-OTHER, etc.) on the broadcast, NBMA, or hybrid network using the LAN Adj-SID sub-TLV as described in Section 7.2.¶
This specification updates two existing OSPFv3 registries.¶
The following values have been allocated:¶
Value | Description | Reference |
---|---|---|
9 | OSPFv3 Extended Prefix Range TLV | This document |
The following values have been allocated:¶
Value | Description | Reference |
---|---|---|
4 | Prefix-SID sub-TLV | This document |
5 | Adj-SID sub-TLV | This document |
6 | LAN Adj-SID sub-TLV | This document |
7 | SID/Label sub-TLV | This document |
For any new TLVs/sub-TLVs defined in this document, if the length is invalid, the LSA in which it is advertised is considered malformed and MUST be ignored. Errors SHOULD be logged subject to rate limiting.¶
With the OSPFv3 Segment Routing extensions defined herein, OSPFv3 will now program the MPLS data plane [RFC3031]. Previously, LDP [RFC5036] or another label distribution mechanism was required to advertise MPLS labels and program the MPLS data plane.¶
In general, the same types of attacks that can be carried out on the IP control plane can be carried out on the MPLS control plane resulting in traffic being misrouted in the respective data planes. However, the latter can be more difficult to detect and isolate.¶
Existing security extensions, as described in [RFC5340] and [RFC8362], apply to these Segment Routing extensions. While OSPFv3 is under a single administrative domain, there can be deployments where potential attackers have access to one or more networks in the OSPFv3 routing domain. In these deployments, stronger authentication mechanisms, such as those specified in [RFC4552] or [RFC7166], SHOULD be used.¶
Implementations MUST ensure that malformed TLVs and sub-TLVs defined in this document are detected and that they do not provide a vulnerability for attackers to crash the OSPFv3 router or routing process. Reception of a malformed TLV or sub-TLV SHOULD be counted and/or logged for further analysis. Logging of malformed TLVs and sub-TLVs SHOULD be rate limited to prevent a Denial-of-Service (DoS) attack (distributed or otherwise) from overloading the OSPFv3 control plane.¶
The following people gave a substantial contribution to the content of this document and should be considered coauthors:¶
Clarence Filsfils Cisco Systems, Inc. Brussels Belgium Email: [email protected]¶
Hannes Gredler RtBrick Inc. Austria Email: [email protected]¶
Rob Shakir Google, Inc. United States of America Email: [email protected]¶
Wim Henderickx Nokia Belgium Email: [email protected]¶
Jeff Tantsura Apstra, Inc. United States of America Email: [email protected]¶
Thanks to Acee Lindem for his substantial contribution to the content of this document.¶
We would like to thank Anton Smirnov for his contribution as well.¶