RFC 8666

OSPFv3 Extensions for Segment Routing

πŸ“… published December 2019, from ietf

RFC 8666: OSPFv3 Extensions for Segment Routing πŸ¦‹

Bestie, this is the one that teaches OSPFv3 how to carry Segment Routing info. πŸ’…

Request for Comments: 8666 (IETF) 🌸 Category: Standards Track ✨ Date: December 2019 πŸ’– ISSN: 2070-1721 Authors: P. Psenak, Ed. and S. Previdi, Ed., Cisco Systems, Inc. πŸ‘‘ Obsoletes/Updates: the title block doesn't list anything this RFC obsoletes or updates. πŸ™ˆ

Abstract ✨

Okay so Segment Routing (SR) lets you describe an end-to-end path through an IGP topology by writing it down as a list of smaller hops called "segments" 🧚. The link-state routing protocols, IS-IS and OSPF, are the ones that advertise these segments. This document lays out the OSPFv3 extensions needed for Segment Routing with the MPLS data plane 🌈.

Status of This Memo

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. πŸ’…

Table of Contents πŸ“

   1.  Introduction
   2.  Terminology
   3.  Segment Routing Identifiers
     3.1.  SID/Label Sub-TLV
   4.  Segment Routing Capabilities
   5.  OSPFv3 Extended Prefix Range TLV
   6.  Prefix-SID Sub-TLV
   7.  Adjacency Segment Identifier (Adj-SID)
     7.1.  Adj-SID Sub-TLV
     7.2.  LAN Adj-SID Sub-TLV
   8.  Elements of Procedure
     8.1.  Intra-area Segment Routing in OSPFv3
     8.2.  Inter-area Segment Routing in OSPFv3
     8.3.  Segment Routing for External Prefixes
     8.4.  Advertisement of Adj-SID
       8.4.1.  Advertisement of Adj-SID on Point-to-Point Links
       8.4.2.  Adjacency SID on Broadcast or NBMA Interfaces
   9.  IANA Considerations
     9.1.  "OSPFv3 Extended-LSA TLVs" Registry
     9.2.  "OSPFv3 Extended-LSA Sub-TLVs" Registry
   10. TLV/Sub-TLV Error Handling
   11. Security Considerations
   12. References
     12.1.  Normative References
     12.2.  Informative References
   Contributors
   Authors' Addresses

1. Introduction πŸ’–

Segment Routing (SR) lets you define end-to-end paths flexibly inside IGP topologies, because a path is just a sequence of topological subpaths called "segments" πŸ¦‹. Those segments get advertised by the link-state routing protocols, IS-IS and OSPF. Prefix segments stand for an ECMP-aware shortest path to a prefix (or a node), following the current state of the IGP topology. Adjacency segments stand for a hop over one specific adjacency between two nodes in the IGP. A prefix segment is usually a multi-hop path, while an adjacency segment is, in most cases, a one-hop path 🌸.

SR's control plane works with both the IPv6 and MPLS data planes, and it doesn't need any extra signaling beyond the IGP extensions 🫢. The IPv6 data plane is out of scope here. The OSPFv3 extension for SR with the IPv6 data plane will be specified in a separate document πŸ™ˆ. In MPLS networks, SR paths don't need any LDP or RSVP-TE signaling. SR can still interoperate with Label Switched Paths (LSPs) set up with RSVP or LDP, though, so no drama there ✨.

This document describes the OSPFv3 extensions required for Segment Routing with the MPLS data plane πŸŽ€.

The Segment Routing architecture is described in [RFC8402] 🧚.

Segment Routing use cases are described in [RFC7855] 🌈.

2. Terminology πŸ“š

This section lists some of the terminology used in this document πŸ’œ:

   ABR:        Area Border Router

   Adj-SID:    Adjacency Segment Identifier

   AS:         Autonomous System

   ASBR:       Autonomous System Boundary Router

   DR:         Designated Router

   IS-IS:      Intermediate System to Intermediate System

   LDP:        Label Distribution Protocol

   LSP:        Label Switched Path

   MPLS:       Multiprotocol Label Switching

   OSPF:       Open Shortest Path First

   SPF:        Shortest Path First

   RSVP:       Resource Reservation Protocol

   SID:        Segment Identifier

   SR:         Segment Routing

   SRGB:       Segment Routing Global Block

   SRLB:       Segment Routing Local Block

   SRMS:       Segment Routing Mapping Server

   TLV:        Type Length Value

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. πŸŽ€ These are the official key words, so only the all-caps versions count. Lowercase words don't have that special meaning. πŸ’…

3. Segment Routing Identifiers πŸŽ€

Segment Routing defines several types of Segment Identifiers (SIDs): Prefix-SID, Adjacency SID, and LAN Adjacency SID 🧚.

3.1. SID/Label Sub-TLV 🌸

The SID/Label sub-TLV shows up in multiple TLVs or sub-TLVs defined later in this document. It's used to advertise the SID or label tied to a prefix or an adjacency. Here's its 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:

  • Type: 7 πŸ¦‹
  • Length: 3 or 4 octets. πŸ’œ
  • SID/Label: If the length is set to 3, then the 20 rightmost bits represent a label. If the length is set to 4, then the value represents a 32-bit SID. ✨

4. Segment Routing Capabilities πŸ‘‘

Segment Routing needs some extra router capabilities advertised to the other routers in the area 🫢.

These SR capabilities are advertised in the OSPFv3 Router Information Opaque LSA (defined in [RFC7770]) and specified in [RFC8665] πŸ¦‹.

5. OSPFv3 Extended Prefix Range TLV 🌈

Sometimes it's handy to advertise attributes for a whole range of prefixes in one go 🧚. The SR Mapping Server, described in [RFC8661], is a good example of a place where SIDs for multiple prefixes get advertised. To make that efficient when a bunch of prefixes come from a contiguous address range, the OSPFv3 Extended Prefix Range TLV was defined πŸ’–.

The OSPFv3 Extended Prefix Range TLV is a top-level TLV of the following LSAs, defined in [RFC8362] πŸŽ€:

  • E-Intra-Area-Prefix-LSA
  • E-Inter-Area-Prefix-LSA
  • E-AS-External-LSA
  • E-Type-7-LSA

Multiple OSPFv3 Extended Prefix Range TLVs MAY be advertised in each LSA mentioned above. The OSPFv3 Extended Prefix Range TLV looks like this 🌸:

    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:

  • Type: 9 πŸ¦‹
  • Length: Variable, in octets, depending on the sub-TLVs. πŸ’œ
  • Prefix Length: Length of prefix in bits. ✨
  • AF: Address family for the prefix. πŸ’…
    • AF: 0 - IPv4 unicast
    • AF: 1 - IPv6 unicast
  • Range Size: 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: πŸ™ˆ
    • Addresses from the IPv4 multicast address range (224.0.0.0/3), if the AF is IPv4 unicast.
    • Addresses other than the IPv6 unicast addresses, if the AF is IPv6 unicast.
  • Flags: Reserved. MUST be zero when sent and are ignored when received. πŸ”₯
  • Reserved: SHOULD be set to 0 on transmission and MUST be ignored on reception. 🫢
  • Address Prefix: For the address family IPv4 unicast, the prefix itself is encoded as a 32-bit value. The default route is represented by a prefix of length 0. 🌈

For the address family IPv6 unicast, the prefix is encoded as an even multiple of 32-bit words and padded with zeroed bits as necessary. This encoding consumes ((PrefixLength + 31) / 32) 32-bit words. 🧚

Prefix encoding for other address families is beyond the scope of this specification. Prefix encoding for other address families can be defined in future Standards Track specifications from the IETF stream. πŸ‘‘

The range covers a contiguous set of prefixes that all have the same prefix length, as set by the Prefix Length field. The set starts at the prefix given in the Address Prefix field, and the number of prefixes in the range equals the Range Size πŸ¦‹.

If OSPFv3 Extended Prefix Range TLVs advertising the exact same range appear in multiple LSAs of the same type, all originated by the same OSPFv3 router, then the LSA with the numerically smallest Instance ID MUST be used, and subsequent instances of the OSPFv3 Extended Prefix Range TLVs MUST be ignored. This is the big rule for duplicates, so don't skip it πŸ˜­πŸ’œ


More parts coming up, bestie. Stay tuned 🫢✨

6. Prefix-SID Sub-TLV ✨

Okay bestie, the Prefix-SID sub-TLV is a sub-TLV that gets tucked inside a few OSPFv3 TLVs πŸ¦‹ Here's where it lives:

  • Intra-Area Prefix TLV
  • Inter-Area Prefix TLV
  • External Prefix TLV
  • OSPFv3 Extended Prefix Range TLV

This is all defined in [RFC8362] and in Section 5 πŸ’… It MAY appear more than once in the parent TLV, and here's the look:

 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)              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Here's the breakdown, where:

  • Type: 4
  • Length: 7 or 8 octets, depending on the V-Flag.
  • Flags: a single-octet field πŸŽ€ The following flags are defined:
 0  1  2  3  4  5  6  7
+--+--+--+--+--+--+--+--+
|  |NP|M |E |V |L |  |  |
+--+--+--+--+--+--+--+--+
  • NP-Flag: No-PHP (Penultimate Hop Popping) Flag. If set, then the penultimate hop MUST NOT pop the Prefix-SID before delivering packets to the node that advertised the Prefix-SID.
  • M-Flag: Mapping Server Flag. If set, the SID was advertised by an SR Mapping Server as described in [RFC8661].
  • E-Flag: Explicit Null Flag. If set, any upstream neighbor of the Prefix-SID originator MUST replace the Prefix-SID with the Explicit NULL label (0 for IPv4, 2 for IPv6) before forwarding the packet.
  • V-Flag: Value/Index Flag. If set, then the Prefix-SID carries an absolute value. If not set, then the Prefix-SID carries an index.
  • L-Flag: Local/Global Flag. If set, then the value/index carried by the Prefix-SID has local significance. If not set, then the value/index carried by this sub-TLV has global significance.
  • Other bits: Reserved. These MUST be zero when sent and are ignored when received.
  • Reserved: SHOULD be set to 0 on transmission and MUST be ignored on reception. πŸ™ˆ
  • Algorithm: a 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, with an algorithm value that the remote node has not advertised in the SR-Algorithm TLV [RFC8665], MUST ignore the Prefix-SID sub-TLV. Not it ignoring it πŸ’€
  • SID/Index/Label: depending on the V-Flag and L-Flag, it contains:
    • V-Flag is set to 0 and L-Flag is set to 0: The SID/Index/Label field is a 4-octet index defining the offset in the SID/Label space advertised by this router.
    • V-Flag is set to 1 and L-Flag is set to 1: The SID/Index/Label field is a 3-octet local label where the 20 rightmost bits are used for encoding the label value.
    • All other combinations of V-Flag and L-Flag are invalid, and any SID Advertisement received with an invalid setting for V- and L-Flags MUST be ignored.

If an OSPFv3 router advertises multiple Prefix-SIDs for the same prefix, topology, and algorithm, all of them MUST be ignored. Yikes, so drama, nobody gets to win 😭

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.

Now the PHP behaviour, which is giving main character energy πŸ‘‘ If the NP-Flag is not set, then:

  • Any upstream neighbor of the Prefix-SID originator MUST pop the Prefix-SID. This is equivalent to the penultimate hop-popping mechanism used in the MPLS data plane.
  • The received E-Flag is ignored.

If the NP-Flag is set and the E-Flag is not set, then:

  • Any upstream neighbor of the Prefix-SID originator MUST keep the Prefix-SID on top of the stack. This is useful when the originator of the Prefix-SID needs to stitch the incoming packet into a continuing MPLS LSP to the final destination. This could occur at an ABR (prefix propagation from one area to another) or at an ASBR (prefix propagation from one domain to another).

If both the NP-Flag and E-Flag are set, then:

  • Any upstream neighbor of the Prefix-SID originator MUST replace the Prefix-SID with an Explicit NULL label. This is useful, e.g., when the originator of the Prefix-SID is the final destination for the related prefix and the originator wishes to receive the packet with the original Traffic Class field [RFC5462]. 🫢

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:

  • The Prefix is intra-area type and the downstream neighbor is the originator of the prefix.
  • The Prefix is inter-area type and the downstream neighbor is an ABR, which is advertising prefix reachability and is setting the LA-bit in the Prefix Options as described in [RFC8362].
  • The Prefix is external type and the downstream neighbor is an ASBR, which is advertising prefix reachability and is setting the LA-bit in the Prefix Options as described in [RFC8362].

When a Prefix-SID is advertised in the OSPFv3 Extended Prefix Range TLV, the value advertised in the Prefix-SID sub-TLV is interpreted as a starting SID/Label value. 🧚

Example 1 is a pretty clean one πŸ“ 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 is the same vibe with bigger numbers 🌸 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.


7. Adjacency Segment Identifier (Adj-SID) 🌈

An Adjacency Segment Identifier (Adj-SID) represents a router adjacency in Segment Routing. Think of it as the ID card for a specific connection between two routers πŸ¦‹

7.1. Adj-SID Sub-TLV

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)                  |
+---------------------------------------------------------------+

Here's the breakdown, where:

  • Type: 5
  • Length: 7 or 8 octets, depending on the V-Flag.
  • Flags: a single-octet field containing the following flags:
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|B|V|L|G|P|     |
+-+-+-+-+-+-+-+-+
  • B-Flag: Backup Flag. If set, the Adj-SID refers to an adjacency that is eligible for protection (e.g., using IP Fast Reroute (IPFRR) or MPLS-FRR (MPLS Fast Reroute)) as described in Section 3.4 of [RFC8402]. πŸ›‘οΈ
  • V-Flag: Value/Index Flag. If set, then the Adj-SID carries an absolute value. If not set, then the Adj-SID carries an index.
  • L-Flag: Local/Global Flag. If set, then the value/index carried by the Adj-SID has local significance. If not set, then the value/index carried by this sub-TLV has global significance.
  • G-Flag: Group Flag. When set, the G-Flag indicates that the Adj-SID refers to a group of adjacencies (and therefore MAY be assigned to other adjacencies as well).
  • P-Flag: Persistent Flag. When set, the P-Flag indicates that the Adj-SID is persistently allocated, i.e., the Adj-SID value remains the same across router restart and/or interface flap. πŸ’œ
  • Other bits: Reserved. These MUST be zero when sent and are ignored when received.
  • Reserved: SHOULD be set to 0 on transmission and MUST be ignored on reception.
  • Weight: weight used for load-balancing purposes. The use of the weight is defined in [RFC8402].
  • SID/Index/Label: as described in Section 6.

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. ✨

7.2. LAN Adj-SID Sub-TLV ✨

Okay bestie, the LAN Adjacency SID is an optional sub-TLV of the Router-Link TLV πŸ’– It MAY show up multiple times in that Router-Link TLV 🌸 It's 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)                 |
+---------------------------------------------------------------+

Here's what each field is giving πŸ’…

  • Type: 6 πŸŽ€
  • Length: 11 or 12 octets, depending on the V-Flag πŸ“
  • Flags: Same as in Section 7.1. 🚩
  • Weight: The weight used for load-balancing purposes. The use of the weight is defined in [RFC8402]. βš–οΈ
  • Reserved: SHOULD be set to 0 on transmission and MUST be ignored on reception. πŸ™ˆ
  • Neighbor ID: The Router ID of the neighbor that the LAN Adjacency SID is advertised for. 🧚
  • SID/Index/Label: As described in Section 6. πŸ“

Persistence is the tea β˜• 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. No cap, that's a whole main character moment πŸ‘‘


8. Elements of Procedure πŸ› οΈ

8.1. Intra-area Segment Routing in OSPFv3 🌈

Okay so an OSPFv3 router that supports Segment Routing MAY advertise Prefix-SIDs for any prefix it's advertising reachability for, like 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, and in that 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 its configuration βš™οΈ Depending on which flooding scope is used, the SR Mapping Server picks the OSPFv3 LSA type that gets used. If 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 implied by the LSA type gets ignored πŸ™ƒ The Prefix-SID is bound to the corresponding prefix no matter what route type it is πŸ’œ

Advertising the Prefix-SID by the Mapping Server with an Inter-Area Prefix TLV, External-Prefix TLV, or Intra-Area-Prefix TLV [RFC8362] does not itself contribute to prefix reachability πŸ™…β€β™€οΈ The NU-bit [RFC5340] MUST be set in the PrefixOptions field of the LSA. The Mapping Server uses that to advertise a SID or SID Range, and it's what stops 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 mixed together in a single OSPFv3 Extended Prefix Range TLV advertised by an SR Mapping Server ✨

Area-scoped OSPFv3 Extended Prefix Range TLVs get propagated between areas, kind of like how prefixes get propagated between areas. The same rules used for propagating prefixes between areas [RFC5340] are used for propagating the prefix ranges πŸ¦‹

8.2. Inter-area Segment Routing in OSPFv3 πŸ’œ

To support SR in a multiarea environment, OSPFv3 MUST propagate Prefix-SID information between areas 🌍 Here's how the propagation goes πŸ‘€

When an OSPFv3 ABR advertises an Inter-Area-Prefix-LSA from an intra-area prefix to all of its connected areas, it also includes the Prefix-SID sub-TLV as described in Section 6. The Prefix-SID value gets set like this:

  • The ABR looks at its best path to the prefix in the source area and finds the advertising router associated with that best path to the prefix. πŸ”
  • The ABR then checks whether this router advertised a Prefix-SID for the prefix, and uses it when advertising the Prefix-SID to other connected areas. βœ…
  • If no Prefix-SID was advertised for the prefix in the source area by the router that contributes to the best path to the prefix, the originating ABR uses the Prefix-SID advertised by any other router when propagating the Prefix-SID for the prefix to other areas. 🫢

When an OSPFv3 ABR advertises an Inter-Area-Prefix-LSA from an inter-area route to all of its connected areas, it also includes the Prefix-SID sub-TLV as described in Section 6. The Prefix-SID value gets set like this:

  • The ABR looks at its best path to the prefix in the backbone area and finds the advertising router associated with that best path to the prefix. πŸ”­
  • The ABR then checks whether this router advertised a Prefix-SID for the prefix, and uses it when advertising the Prefix-SID to other connected areas. πŸ’«
  • If no Prefix-SID was advertised for the prefix in the backbone area by the ABR that contributes to the best path to the prefix, the originating ABR uses the Prefix-SID advertised by any other router when propagating the Prefix-SID for the prefix to other areas. 🌸

8.3. Segment Routing for External Prefixes πŸ›Έ

AS-External-LSAs are flooded domain wide 🌐 When an ASBR that 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 gets 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 figures out its best path to the prefix advertised in the translated E-NSSA-LSA and finds the advertising router associated with that path. If that advertising router has advertised a Prefix-SID for the prefix, 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 🫧

8.4. Advertisement of Adj-SID πŸ”—

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, the Adj-SID for that adjacency MAY be removed from the area. If the adjacency transitions to a state lower than 2-Way, the Adj-SID Advertisement MUST be withdrawn from the area 😭

8.4.2. Adjacency SID on Broadcast or NBMA Interfaces πŸŒ€

Broadcast, NBMA, or hybrid [RFC6845] networks in OSPFv3 are represented by a star topology, where the DR is the central point that all the other routers on the broadcast, NBMA, or hybrid network connect to 🌟 So routers on that network only advertise their adjacency to the DR. Routers that don't act as DR don't 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 🧩


9. IANA Considerations πŸ—‚οΈ

This specification updates two existing OSPFv3 registries πŸ“

9.1. "OSPFv3 Extended-LSA TLVs" Registry πŸ“‹

The following values have been allocated:

+-------+----------------------------------+---------------+
| Value | Description                      | Reference     |
+=======+==================================+===============+
| 9     | OSPFv3 Extended Prefix Range TLV | This document |
+-------+----------------------------------+---------------+

             Table 1: OSPFv3 Extended-LSA TLVs

9.2. "OSPFv3 Extended-LSA Sub-TLVs" Registry πŸ“‹

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 |
+-------+---------------------+---------------+

     Table 2: OSPFv3 Extended-LSA Sub-TLVs

10. TLV/Sub-TLV Error Handling 🚨

For any new TLVs/sub-TLVs defined in this document, if the length is invalid, the LSA in which they're advertised is considered malformed and MUST be ignored. Errors SHOULD be logged, subject to rate limiting 🫣


11. Security Considerations πŸ”πŸ’€

This one is serious, bestie, so read it carefully πŸ₯Ί 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 also 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 don't 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 🚫πŸ’₯


12. References πŸ“š

12.1. Normative References ✨

okay so these are the docs this one needs to read first πŸ“š if you skip them the whole spec gets confusing, no cap. each entry is a full citation, so I've kept them in code blocks (no formatting fudging, promise πŸ’…)

[ALGOREG]  IANA, "Interior Gateway Protocol (IGP) Parameters",
           <https://www.iana.org/assignments/igp-parameters>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[RFC3031]  Rosen, E., Viswanathan, A., and R. Callon, "Multiprotocol
           Label Switching Architecture", RFC 3031,
           DOI 10.17487/RFC3031, January 2001,
           <https://www.rfc-editor.org/info/rfc3031>.

[RFC3101]  Murphy, P., "The OSPF Not-So-Stubby Area (NSSA) Option",
           RFC 3101, DOI 10.17487/RFC3101, January 2003,
           <https://www.rfc-editor.org/info/rfc3101>.

[RFC5036]  Andersson, L., Ed., Minei, I., Ed., and B. Thomas, Ed.,
           "LDP Specification", RFC 5036, DOI 10.17487/RFC5036,
           October 2007, <https://www.rfc-editor.org/info/rfc5036>.

[RFC5340]  Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF
           for IPv6", RFC 5340, DOI 10.17487/RFC5340, July 2008,
           <https://www.rfc-editor.org/info/rfc5340>.

[RFC5462]  Andersson, L. and R. Asati, "Multiprotocol Label Switching
           (MPLS) Label Stack Entry: "EXP" Field Renamed to "Traffic
           Class" Field", RFC 5462, DOI 10.17487/RFC5462, February
           2009, <https://www.rfc-editor.org/info/rfc5462>.

[RFC6845]  Sheth, N., Wang, L., and J. Zhang, "OSPF Hybrid Broadcast
           and Point-to-Multipoint Interface Type", RFC 6845,
           DOI 10.17487/RFC6845, January 2013,
           <https://www.rfc-editor.org/info/rfc6845>.

[RFC7770]  Lindem, A., Ed., Shen, N., Vasseur, JP., Aggarwal, R., and
           S. Shaffer, "Extensions to OSPF for Advertising Optional
           Router Capabilities", RFC 7770, DOI 10.17487/RFC7770,
           February 2016, <https://www.rfc-editor.org/info/rfc7770>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8362]  Lindem, A., Roy, A., Goethals, D., Reddy Vallem, V., and
           F. Baker, "OSPFv3 Link State Advertisement (LSA)
           Extensibility", RFC 8362, DOI 10.17487/RFC8362, April
           2018, <https://www.rfc-editor.org/info/rfc8362>.

[RFC8402]  Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L.,
           Decraene, B., Litkowski, S., and R. Shakir, "Segment
           Routing Architecture", RFC 8402, DOI 10.17487/RFC8402,
           July 2018, <https://www.rfc-editor.org/info/rfc8402>.

[RFC8661]  Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S.,
           Decraene, B., and S. Litkowski, "Segment Routing MPLS
           Interworking with LDP", RFC 8661, DOI 10.17487/RFC8661,
           December 2019, <https://www.rfc-editor.org/info/rfc8661>.

[RFC8665]  Psenak, P., Ed., Previdi, S., Ed., Filfils, C., Gredler,
           H., Shakir, R., Henderickx, W., and J. Tantsura, "OSPF
           Extensions for Segment Routing", RFC 8665,
           DOI 10.17487/RFC8665, December 2019,
           <https://www.rfc-editor.org/info/rfc8665>.

12.2. Informative References πŸ¦‹

these ones are extra reading, good for the background vibes 🌸 they're listed below exactly as the spec has them

[RFC4552]  Gupta, M. and N. Melam, "Authentication/Confidentiality
           for OSPFv3", RFC 4552, DOI 10.17487/RFC4552, June 2006,
           <https://www.rfc-editor.org/info/rfc4552>.

[RFC7166]  Bhatia, M., Manral, V., and A. Lindem, "Supporting
           Authentication Trailer for OSPFv3", RFC 7166,
           DOI 10.17487/RFC7166, March 2014,
           <https://www.rfc-editor.org/info/rfc7166>.

[RFC7855]  Previdi, S., Ed., Filsfils, C., Ed., Decraene, B.,
           Litkowski, S., Horneffer, M., and R. Shakir, "Source
           Packet Routing in Networking (SPRING) Problem Statement
           and Requirements", RFC 7855, DOI 10.17487/RFC7855, May
           2016, <https://www.rfc-editor.org/info/rfc7855>.

Contributors πŸ’–

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: cfilsfil@cisco.com


Hannes Gredler
RtBrick Inc.
Austria

Email: hannes@rtbrick.com


Rob Shakir
Google, Inc.
United States of America

Email: robjs@google.com


Wim Henderickx
Nokia
Belgium

Email: wim.henderickx@nokia.com


Jeff Tantsura
Apstra, Inc.
United States of America

Email: jefftant.ietf@gmail.com

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. πŸŽ€


Authors' Addresses 🌷

the people who wrote this one, with their contact details πŸ’…

Peter Psenak (editor)
Cisco Systems, Inc.
Eurovea Centre, Central 3, Pribinova Street 10
81109 Bratislava
Slovakia

Email: ppsenak@cisco.com


Stefano Previdi (editor)
Cisco Systems, Inc.

Email: stefano@previdi.net
πŸ“¦ where this page comes from