Open Shortest Path First IGP                              P. Psenak, Ed.
Internet-Draft                                           S. Previdi, Ed.                                               C. Filsfils
Intended status: Standards Track                             C. Filsfils
Expires: March 9, 2018                     Cisco Systems, Inc.
Expires: July 30, 2018                                   S. Previdi, Ed.
                                                              Individual
                                                              H. Gredler
                                                            RtBrick Inc.
                                                               R. Shakir
                                                            Google, Inc.
                                                           W. Henderickx
                                                                   Nokia
                                                             J. Tantsura
                                                              Individual
                                                       September 5, 2017
                                                          Nuage Networks
                                                        January 26, 2018

                 OSPFv3 Extensions for Segment Routing
          draft-ietf-ospf-ospfv3-segment-routing-extensions-10
          draft-ietf-ospf-ospfv3-segment-routing-extensions-11

Abstract

   Segment Routing (SR) allows for a flexible definition of end-to-end paths
   within IGP topologies by encoding paths as sequences of topological
   sub-paths, called "segments".  These segments are advertised by the
   link-state routing protocols (IS-IS and OSPF).

   This draft describes the OSPFv3 extensions that are required for Segment
   Routing.

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on March 9, July 30, 2018.

Copyright Notice

   Copyright (c) 2017 2018 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  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Segment Routing Identifiers . . . . . . . . . . . . . . . . .   3
     2.1.  SID/Label Sub-TLV . . . . . . . . . . . . . . . . . . . .   3
   3.  Segment Routing Capabilities  . . . . . . . . . . . . . . . .   4
     3.1.  SR-Algorithm TLV  . . . . . . . . . . . . . . . . . . . .   4
     3.2.  SID/Label Range TLV . . . . . . . . . . . . . . . . . . .   6
     3.3.  SR Local Block Sub-TLV TLV  . . . . . . . . . . . . . . . . .   7 . .   8
     3.4.  SRMS Preference Sub-TLV . . . . . . . . . . . . . TLV . . . .   9
     3.5.  SR-Forwarding Capabilities . . . . . . . . . . . . . . .  10
   4.  OSPFv3 Extended Prefix Range TLV  . . . . . . . . . . . . . .  10  11
   5.  Prefix SID Sub-TLV  . . . . . . . . . . . . . . . . . . . . .  12  14
   6.  SID/Label Binding Sub-TLV . . . . . . . . . . . . . . . . . .  16
     6.1.  ERO Metric Sub-TLV  . . . . . . . . . . . . . . . . . . .  18
     6.2.  ERO Sub-TLVs  . . . . . . . . . . . . . . . . . . . . . .  19
       6.2.1.  IPv4 ERO Sub-TLV  . . . . . . . . . . . . . . . . . .  19
       6.2.2.  IPv6 ERO Sub-TLV  . . . . . . . . . . . . . . . . . .  20
       6.2.3.  Unnumbered Interface ID ERO Sub-TLV . . . . . . . . .  21
       6.2.4.  IPv4 Backup ERO Sub-TLV . . . . . . . . . . . . . . .  22
       6.2.5.  IPv6 Backup ERO Sub-TLV . . . . . . . . . . . . . . .  23
       6.2.6.  Unnumbered Interface ID Backup ERO Sub-TLV  . . . . .  24
   7.  Adjacency Segment Identifier (Adj-SID)  . . . . . . . . . . .  25
     7.1.  17
     6.1.  Adj-SID Sub-TLV . . . . . . . . . . . . . . . . . . . . .  25
     7.2.  17
     6.2.  LAN Adj-SID Sub-TLV . . . . . . . . . . . . . . . . . . .  27
   8.  19
   7.  Elements of Procedure . . . . . . . . . . . . . . . . . . . .  29
     8.1.  20
     7.1.  Intra-area Segment routing in OSPFv3  . . . . . . . . . .  29
     8.2.  20
     7.2.  Inter-area Segment routing in OSPFv3  . . . . . . . . . .  30
     8.3.  SID  22
     7.3.  Segment Routing for External Prefixes . . . . . . . . . . . . . . . .  31
     8.4.  23
     7.4.  Advertisement of Adj-SID  . . . . . . . . . . . . . . . .  32
       8.4.1.  23
       7.4.1.  Advertisement of Adj-SID on Point-to-Point Links  . .  32
       8.4.2.  23
       7.4.2.  Adjacency SID on Broadcast or NBMA Interfaces . . . .  32
   9.  23
   8.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  32
     9.1.  OSPF Router Information (RI) TLVs  24
     8.1.  OSPFv3 Extend-LSA TLV Registry  . . . . . . .  32
     9.2. . . . . . .  24
     8.2.  OSPFv3 Extend-LSA TLV Registry Sub-TLV registry  . . . . . . . . . . .  24
   9.  Security Considerations . . . . . . .  33
     9.3.  OSPFv3 Extend-LSA Sub-TLV registry . . . . . . . . . . .  33 .  24
   10. Security Considerations Contributors  . . . . . . . . . . . . . . . . . . . . . . .  33 .  25
   11. Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  33  25
   12. References  . . . . . . . . . . . . . . . . . . . . . . . . .  34  25
     12.1.  Normative References . . . . . . . . . . . . . . . . . .  34  25
     12.2.  Informative References . . . . . . . . . . . . . . . . .  34  26
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  35  27

1.  Introduction

   Segment Routing (SR) allows for a flexible definition of end-to-end paths
   within IGP topologies by encoding paths as sequences of topological
   sub-paths, called "segments".  These segments are advertised by the
   link-state routing protocols (IS-IS and OSPF).  Prefix segments
   represent an ecmp-aware 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 of the cases, is a one-hop path.  SR's control-plane can be applied to
   both IPv6 and MPLS data-planes, and does not require any additional signaling
   signalling (other than IGP extensions).  The IPv6 data plane is out
   of the regular
   IGP).  For example, when scope of this specification - OSPFv3 extension for SR with
   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.  Still,
   signalling.  However, SR can interoperate in the presence of LSPs
   established with RSVP or LDP.

   There are additional segment types, e.g., Binding SID defined in
   [I-D.ietf-spring-segment-routing].

   This draft describes the OSPFv3 extensions required for segment
   routing. Segment
   Routing with MPLS data plane.

   Segment Routing architecture is described in
   [I-D.ietf-spring-segment-routing].

   Segment Routing use cases are described in
   [I-D.filsfils-spring-segment-routing-use-cases]. [RFC7855].

2.  Segment Routing Identifiers

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

2.1.  SID/Label Sub-TLV

   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 TLV Sub-TLV has
   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:

      Type: TBD, suggested value 3 7

      Length: variable, Variable, 3 or 4 bytes octets

      SID/Label: if If length is set to 3, then the 20 rightmost bits
      represent a label.  If length is set to 4, then the value
      represents a 32 bit 32-bit SID.

      The receiving router MUST ignore the SID/Label Sub-TLV if the
      length is other then 3 or 4.

3.  Segment Routing Capabilities

   Segment Routing requires some additional capabilities of the 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 [RFC4970]). [RFC7770]).

3.1.  SR-Algorithm TLV

   The SR-Algorithm TLV is a top-level TLV of the OSPFv3 Router
   Information Opaque LSA (defined in [RFC4970]). [RFC7770]).

   The SR-Algorithm TLV is optional.  It MAY SHOULD only be advertised once
   in the OSPFv3 Router Information Opaque LSA.  If the SID/Label Range TLV, as
   defined in Section 3.2, is advertised, then the SR-Algorithm TLV MUST
   also be advertised.  If the SR-Algorithm TLV
   is not advertised by the node, such node is considered as not being
   segment routing capable.

   An OSPFv3 SR router may can use various algorithms when calculating reachability
   to other nodes in area OSPFv3 routers or to prefixes attached to these
   nodes. in an OSPFv3 area.  Examples of these
   algorithms are metric based Shortest Path First (SPF), various sorts
   flavors of Constrained SPF, etc.  The SR-Algorithm TLV allows a
   router to advertise the algorithms that currently used by the router is
   currently using to
   other routers in an OSPFv3 area.  The SR-Algorithm TLV has following structure:
   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             |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Algorithm 1  |  Algorithm... |  Algorithm n |                |
   +-                                                             -+
   |                                                               |
   +                                                               +

   where:

      Type: TBD, suggested value 8

      Length: variable Variable, in octets, dependent on number of algorithms
      advertised.

      Algorithm: Single octet identifying the algorithm.  The following
      value has been defined:
      values are defined by this document:

         0: Shortest Path First (SPF) algorithm based on link metric.
         This is the standard shortest path algorithm as computed by the
         OSPF
         OSPFv3 protocol.  Consistent with the deployed practice for link-
         state
         link-state protocols, Algorithm 0 permits any node to overwrite
         the SPF path with a different path based on its local policy.
         If the SR-Algorithm Sub-TLV TLV is advertised, Algorithm 0 MUST be
         included.

         1: Strict Shortest Path First (SPF) algorithm based on link
         metric.  The algorithm is identical to Algorithm 0 but
         Algorithm 1 requires that all nodes along the path will honor
         the SPF routing decision.  Local policy at the node claiming
         the
         support of for Algorithm 1 MUST NOT alter the forwarding
         decision SPF paths computed
         by Algorithm 1.

   When multiple SR-Algorithm sub-TLVs TLVs are received from a given router router, the
   receiver SHOULD MUST use the first occurrence of the sub-TLV TLV in the
   OSPFv3 OSPFV3
   Router Information Opaque LSA.  If the SR-Algorithm sub-TLV TLV appears in
   multiple OSPFv3 Router Information Opaque LSAs that have different
   flooding scopes, the SR-Algorithm sub-TLV TLV in the OSPFv3 Router
   Information Opaque LSA with the lowest area-scoped flooding scope SHOULD MUST be
   used.  If the SR-Algorithm sub-TLV TLV appears in multiple OSPFv3 Router
   Information Opaque LSAs that have the same flooding scope, the SR-Algorithm
   sub-TLV SR-
   Algorithm TLV in the OSPFv3 Router Information Opaque LSA with the
   numerically smallest Instance ID SHOULD MUST be used and subsequent
   instances of the SR-Algorithm sub-TLV SHOULD TLV MUST be ignored.

   The RI OSPFv3 Router Information Opaque LSA can be advertised at any of
   the defined opaque flooding scopes (link, area, or autonomous system Autonomous System
   (AS)).  For the purpose of the SR-
   Algorithm SR-Algorithm TLV propagation, area scope advertisement, area-
   scoped flooding is required. REQUIRED.

3.2.  SID/Label Range TLV

   Prefix SIDs MAY be advertised in a form of an index as described in
   Section 5.  Such index defines the offset in the SID/Label space
   advertised by the router.  The SID/Label Range TLV is used to
   advertise such SID/Label space.

   The SID/Label Range TLV is a top-level TLV of the OSPFv3 Router
   Information Opaque LSA (defined in [RFC4970]). [RFC7770]).

   The SID/Label Sub-TLV Range TLV MAY appear multiple times 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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Range Size               |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Sub-TLVs (variable)                       |
   +-                                                             -+
   |                                                               |
   +                                                               +

   where:

      Type: TBD, suggested value 9

      Length: variable Variable, in octets, dependent on Sub-TLVs.

      Range Size: 3 octets of 3-octet SID/label range size (i.e., the number of SIDs
      or labels in the range including the first SID/label).  It MUST be
      greater than 0.

      Reserved: SHOULD be set to 0 on transmission and MUST be ignored
      on reception.

   Initially, the only supported Sub-TLV is the SID/Label TLV Sub-TLV as
   defined in Section 2.1.  The SID/Label Sub-TLV MUST be included in
   the SID/Label Range TLV.  The SID/Label advertised in the SID/Label TLV
   Sub-TLV represents the first SID/Label in the advertised range.

   Only a single SID/Label Sub-TLV MAY be advertised in SID/Label Range
   TLV.  If more then one SID/Label Sub-TLVs are present, the SID/Label
   Range TLV MUST be ignored.

   Multiple occurrence occurrences of the SID/Label Range TLV MAY be advertised, in
   order to advertise multiple ranges.  In such case:

   o  The originating router MUST encode each range into a different
      SID/Label Range TLV.

   o  The originating router decides the order in which the set of SID/
      Label Range TLVs are advertised in inside the OSPFv3 Router Information
      Opaque LSA.  The originating router MUST ensure the order is the
      same after a graceful restart (using checkpointing, non-volatile storage
      storage, or any other mechanism) in order to assure the SID/label
      range and SID index correspondence is preserved across graceful
      restarts.

   o  The receiving router must MUST adhere to the order in which the ranges
      are advertised when calculating a SID/label from the a SID index.

   o  A  The originating router not supporting MUST NOT advertise overlapping ranges.

   o  When a router receives multiple occurrences of the SID/Label
      Range TLV overlapping ranges, it MUST use first advertised SID/Label Range TLV.
      conform to the procedures defined in
      [I-D.ietf-spring-conflict-resolution].

   The following example illustrates the advertisement of multiple
   ranges:

      The originating router advertises the following ranges:

         Range 1: [100, 199] Range 2: [1000, 1099] Size: 100   SID/Label Sub-TLV: 100
         Range 3: [500, 599] 1: Range Size: 100   SID/Label Sub-TLV: 1000
         Range 1: Range Size: 100   SID/Label Sub-TLV: 500

      The receiving routers concatenate the ranges and build the Segment
      Routing Global Block (SRGB) is as follows:

      SRGB = [100, 199]
             [1000, 1099]
             [500, 599]

      The indexes span multiple ranges:

         index=0 means label 100
         ...
         index 99 means label 199
         index 100 means label 1000
         index 199 means label 1099
         ...
         index 200 means label 500
         ...

   The RI OSPFv3 Router Information Opaque LSA can be advertised at any of
   the defined flooding scopes (link, area, or autonomous system (AS)).
   For the purpose of the SID/
   Label SID/Label Range TLV propagation, area scope advertisement, area-scoped
   flooding is required. REQUIRED.

3.3.  SR Local Block Sub-TLV TLV

   The SR Local Block (SRLB) Sub-TLV TLV (SRLB TLV) contains the range of labels the
   node has reserved for local SIDs.  Local  SIDs are used, e.g., from the SRLB MAY be used for
   Adjacency-SIDs, and may but also be allocated by other components other than
   OSPF the OSPFv3
   protocol.  As an example, an application or a controller may can instruct
   the router to allocate a specific local SID.  Therefore, in
   order for such applications or  Some controllers or
   applications can use the control plane to know what are discover the available set
   of local SIDs available in on a particular router.  In such cases, the router, it SRLB is required that
   advertised in the router
   advertises its SRLB. control plane.  The requirement to advertise the
   SRLB is further described in [I-D.ietf-spring-segment-routing-mpls].
   The SRLB Sub-TLV TLV is used for that purpose. to advertise the SRLB.

   The SR Local Block (SRLB) Sub-TLV SRLB TLV is a top-level TLV of the OSPFv3 Router Information
   Opaque LSA (defined in [RFC7770]).

   The SR Local Block Sub-TLV SRLB TLV MAY appear multiple times in the OSPFv3 Router
   Information Opaque LSA 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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    Range Size                 |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Sub-TLVs (variable)                    |
   +-                                                             -+
   |                                                               |
   +                                                               +

   where:

      Type: TBD, suggested value 12 14

      Length: variable Variable, in octets, dependent on Sub-TLVs.

      Range Size: 3 octets 3-octet SID/label range size (i.e., the number of SIDs
      or labels in the SID/label range. range including the first SID/label).  It MUST be higher then
      greater than 0.

      Reserved: SHOULD be set to 0 on transmission and MUST be ignored
      on reception.

   Initially, the only supported Sub-TLV is the SID/Label TLV Sub-TLV as
   defined in Section 2.1.  The SID/Label Sub-TLV MUST be included in
   the SRLB TLV.  The SID/Label advertised in the SID/Label TLV Sub-TLV
   represents the first SID/Label in the advertised range.

   When multiple SRLB sub-TLVs are received from

   Only a given router single SID/Label Sub-TLV MAY be advertised in the
   behavior of SRLB TLV.
   If more then one SID/Label Sub-TLVs are present, the receiving system is undefined. SRLB TLV MUST be
   ignored.

   The originating router MUST NOT advertise overlapping ranges.

   Each time a SID from the SRLB is allocated, it SHOULD also be
   reported to all components (e.g.: (e.g., controller or applications) in
   order for these components to have an up-to-date view of the current
   SRLB allocation.  This is required to avoid collision collisions between
   allocation instructions.

   Within the context of OSPFv3, the reporting of local SIDs is done
   through OSPF OSPFv3 Sub-TLVs such as the Adjacency-SID (Section 7). 6).
   However, the reporting of allocated local SIDs may can also be done
   through other means and protocols which mechanisms are outside the scope of this
   document.

   A router advertising the SRLB TLV may MAY also have other label ranges,
   outside of the SRLB, used for its local allocation purposes which are
   NOT
   not advertised in the SRLB. SRLB TLV.  For example, it is possible that an
   Adjacency-SID is allocated using a local label that is not part of
   the SRLB.

   The OSPFv3 RI Router Information Opaque LSA can be advertised at any of
   the defined flooding scopes (link, area, or autonomous system (AS)).
   For the purpose of
   SR Local Block Sub-TLV SRLB TLV advertisement, area scope area-scoped flooding is
   required.
   REQUIRED.

3.4.  SRMS Preference Sub-TLV TLV

   The Segment Routing Mapping Server (SRMS) Preference sub-TLV TLV (SRMS Preference
   TLV) is used to advertise a preference associated with the node that
   acts as a an SR Mapping Server.  The role of an SRMS is described in
   [I-D.ietf-spring-segment-routing-ldp-interop].  SRMS preference is
   defined in [I-D.ietf-spring-conflict-resolution].

   The SRMS Preference Sub-TLV TLV is a top-level TLV of the OSPFv3 Router
   Information Opaque LSA (defined in [RFC7770]).

   The SRMS Preference Sub-TLV TLV MAY only be advertised once in the OSPFv3
   Router Information Opaque LSA 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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Preference    |                 Reserved                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   where:

      Type: TBD, suggested value 13 15

      Length: 4 octets

      Preference: 1 octet.  SRMS preference value from 0 to 255.

      Reserved: SHOULD be set to 0 on transmission and MUST be ignored
      on reception.

   When multiple SRMS Preference sub-TLVs TLVs are received from a given
   router router,
   the receiver SHOULD MUST use the first occurrence of the sub-TLV TLV in the OSPFv3
   Router Information Opaque LSA.  If the SRMS Preference sub-TLV TLV appears in
   multiple OSPFv3 Router Information Opaque LSAs that have different
   flooding scopes, the SRLB sub-TLV SRMS Preference TLV in the OSPFv3 Router
   Information Opaque LSA with the lowest narrowest flooding scope SHOULD MUST be
   used.  If the SRMS Preference sub-TLV TLV appears in multiple OSPFv3 Router
   Information Opaque LSAs that have the same flooding scope, the SRMS
   Preference sub-TLV TLV in the OSPFv3 Router Information Opaque LSA with the
   numerically smallest Instance ID SHOULD MUST be used and subsequent
   instances of the SRMS Preference sub-TLV SHOULD TLV MUST be ignored.

   The OSPFv3 RI Router Information Opaque LSA can be advertised at any of
   the defined flooding scopes (link, area, or autonomous system (AS)).
   For the purpose of the SRMS Preference Sub-TLV TLV advertisement, AS scope AS-scoped
   flooding SHOULD be used.  This is
   required. because SRMS servers can be located
   in a different area then consumers of the SRMS advertisements.  If
   the SRMS advertisements from the SRMS server are only used inside the area to which the
   SRMS server is attached, area scope server's area, area-scoped flooding may MAY be used.

3.5.  SR-Forwarding Capabilities

   OSPFv3 router supporting Segment Routing needs to advertise its SR
   data-plane capabilities.  Data-plane capabilities are advertised in
   OSPF Router Informational Capabilities TLV, which is defined in
   section 2.3 of RFC 4970 [RFC4970].

   Two new bits are allocated in the OSPF Router Informational
   Capability Bits as follows:

      Bit-6 - MPLS IPv6 flag.  If set, then the router is capable of
      processing SR MPLS encapsulated IPv6 packets on all interfaces.

      Bit-7 - If set, then the router is capable of processing the IPv6
      Segment Routing Header on all interfaces as defined in
      [I-D.previdi-6man-segment-routing-header].

   For the purpose of the SR-Forwarding Capabilities propagation, area
   scope flooding is required.

4.  OSPFv3 Extended Prefix Range TLV

   In some cases it is useful to advertise attributes for a range of
   prefixes.  The Segment Routing Mapping Server, which is described in
   [I-D.filsfils-spring-segment-routing-ldp-interop],
   [I-D.ietf-spring-segment-routing-ldp-interop], is an example where we
   need a single advertisement to advertise SIDs for multiple prefixes
   from a contiguous address range.

   The OSPFv3 Extended Prefix Range TLV TLV, is defined for this purpose.

   The OSPFv3 Extended Prefix Range TLV is a new top level TLV of the
   following LSAs defined in [I-D.ietf-ospf-ospfv3-lsa-extend]:

      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 these
   extended LSAs. 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:

      Type: TBD, suggested value 9. 9

      Length: variable Variable, in octets, dependent on Sub-TLVs.

      Prefix length: length Length of the prefix in bits.

      AF: Address family for the prefix.

         AF: 0 - IPv4 unicast

         AF: 1 - IPv6 unicast

      Range size: represents 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
      including:

         IPv4 multicast address range (224.0.0.0/3), if the AF is IPv4
         unicast

         addresses from other than the IPv6 unicast address
      class. class, if
         the AF is IPv6 unicast

      Flags: 1 Single octet field.  The following flags are defined:

     0  1  2  3  4  5  6  7
   +--+--+--+--+--+--+--+--+
   |IA|  |  |  |  |  |  |  |
   +--+--+--+--+--+--+--+--+

   where:

         IA-Flag: Inter-Area flag.  If set, advertisement is of inter-
         area type.  An ABR that is advertising the OSPF OSPFv3 Extended
         Prefix Range TLV between areas MUST set this bit.

         This bit is used to prevent redundant flooding of Prefix Range
         TLVs between areas as follows:

            An ABR always prefers intra-area Prefix Range advertisement
            over inter-area one.

            An ABR does not consider inter-area Prefix Range
            advertisements coming from non backbone area.

            An ABR only propagates an inter-area Prefix Range
            advertisement from the backbone area to connected non non-
            backbone areas only if such the advertisement is considered to be the
            best one.  The following rules are used to select the best
            range from the set of advertisements for the same Prefix
            Range:

               An ABR always prefers intra-area Prefix Range
               advertisements over inter-area advertisements.

               An ABR does not consider inter-area Prefix Range
               advertisements coming from non-backbone areas.

      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, encoded as an
         even multiple of 32-bit words, padded with zeroed bits as
         necessary.  This encoding consumes ((PrefixLength + 31) / 32)
         32-bit words.  The Address

         Prefix represents the first prefix in encoding for other address families is beyond the prefix range. scope
         of this specification.

5.  Prefix SID Sub-TLV

   The Prefix SID Sub-TLV is a Sub-TLV of the following OSPFv3 TLVs as
   defined in [I-D.ietf-ospf-ospfv3-lsa-extend] and in Section 4:

      Intra-Area Prefix TLV

      Inter-Area Prefix TLV

      External Prefix TLV

      OSPFv3 Extended Prefix Range TLV

   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:

      Type: TBD, suggested value 4. 4

      Length: variable 7 or 8 octets, dependent on the V-flag

      Flags: 1 Single octet field.  The following flags are defined:

     0  1  2  3  4  5  6  7
   +--+--+--+--+--+--+--+--+
   |  |NP|M |E |V |L |  |  |
   +--+--+--+--+--+--+--+--+
   where:

         NP-Flag: No-PHP flag.  If set, then the penultimate hop MUST
         NOT pop the Prefix-SID before delivering the packet packets to the node
         that advertised the Prefix-SID.

         M-Flag: Mapping Server Flag.  If set, the SID is was advertised
         from the by
         a Segment Routing Mapping Server functionality as described in [I-D.filsfils-spring-segment-routing-ldp-interop].
         [I-D.ietf-spring-segment-routing-ldp-interop].

         E-Flag: Explicit-Null Flag.  If set, any upstream neighbor of
         the Prefix-SID originator MUST replace the Prefix-SID with a
         Prefix-SID having an the
         Explicit-NULL value label (0 for IPv4) IPv4, 2 for IPv6) before forwarding
         the packet.

         The

         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.

         The

         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: one Single octet identifying the algorithm the Prefix-SID
      is associated with as defined in Section 3.1.

      A router receiving a Prefix-SID from a remote node and with an
      algorithm value that such remote node has not advertised in the
      SR-Algorithm sub-TLV Sub-TLV (Section 3.1) MUST ignore the Prefix-SID sub- Sub-
      TLV.

      SID/Index/Label: label or index value depending on According to the V-bit
      setting.

         Examples: V and L flags, it contains
      either:

         A 32 bit global 32-bit index defining the offset in the SID/Label space
         advertised by this router - in this case the V and L
            flags MUST NOT be set. router.

         A 24 bit local 24-bit label where the 20 rightmost bits are used for
         encoding the label value - in this case the V and L
            flags MUST be set. value.

   If an OSPFv3 router advertises multiple Prefix-SIDs are advertised for the same
   prefix, the
   receiving router MUST use the first encoded SID topology and MAY use the
   subsequent SIDs.

   When propagating Prefix-SIDs between areas, if multiple prefix-SIDs
   are advertised for a prefix, an implementation SHOULD preserve the
   original order when advertising prefix-SIDs to other areas.  This
   allows implementations that only support a single Prefix-SID to have
   a consistent view across areas. algorithm, all of them MUST be ignored.

   When calculating the outgoing label for the prefix, the router MUST
   take into account E account, as described below, the E, NP and P M flags
   advertised by the next-hop router, router if
   next-hop 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 inter-
   area inter-area prefixes that are originated by
   the ABR based on intra-area or inter-area reachability between areas.  When areas,
   unless the inter-area prefix is
   generated based on a advertised prefix which is directly attached to the ABR,
   NP-Flag SHOULD NOT be set ABR.

   The NP-Flag (No-PHP) MUST be set on and the E-flag MUST be clear for
   Prefix-SIDs allocated to redistributed prefixes, unless the
   redistributed prefix is directly attached to ASBR, in which case the NP-Flag SHOULD NOT be set. ASBR.

   If the NP-Flag is not set 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 dataplane.  In
   such case, MPLS EXP bits of the Prefix-SID are not preserved for the
   final destination (the Prefix-SID being removed).  If the NP-Flag
   NP-flag is
   clear not set, then the received E-flag is ignored.

   If the NP-Flag NP-flag is set then:

      If the E-flag is not set set, then any upstream neighbor of the Prefix-
      SID
      Prefix-SID originator MUST keep the Prefix-SID on top of the
      stack.  This is useful when the originator of the Prefix-SID must need
      to stitch the incoming packet into a continuing MPLS LSP to the
      final destination.  This could occur at an inter-area border router Area Border Router
      (prefix propagation from one area to another) or at an inter-
      domain border router AS Boundary
      Router (prefix propagation from one domain to another).

      If the E-flag is set set, then any upstream neighbor of the Prefix-SID
      originator MUST replace the Prefix-SID with a Prefix-SID having an Explicit-NULL value.
      label.  This is useful, e.g., when the originator of the Prefix-SID Prefix-
      SID is the final destination for the related prefix and the
      originator wishes to receive the packet with the original EXP
      bits.

   When the M-Flag is set, the NP-flag and the E-flag MUST be ignored at
   reception.

   As the Mapping Server does not specify the originator of a prefix
   advertisement
   advertisement, it is not possible to determine PHP behavior solely
   based on the Mapping Server advertisement.  However, PHP behavior may
   safely
   SHOULD be done in following cases:

      The Prefix is of intra-area type and the downstream neighbor is the
      originator of the prefix.

      The Prefix is of inter-area type and downstream neighbor is an ABR,
      which is advertising the prefix reachability and is setting LA-bit in
      the Prefix Options as described in section 3.1 of
      [I-D.ietf-ospf-ospfv3-lsa-extend].

      The Prefix is of external type and downstream neighbor is an ASBR,
      which is advertising the prefix reachability and is setting LA-bit in
      the Prefix Options as described in section 3.1 of
      [I-D.ietf-ospf-ospfv3-lsa-extend].

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

   Example 1: if If the following router addresses (loopback addresses)
   need to be mapped into the corresponding Prefix SID indexes:

             Router-A: 192::1/128, 2001:DB8::1/128, Prefix-SID: Index 1
             Router-B: 192::2/128, 2001:DB8::2/128, Prefix-SID: Index 2
             Router-C: 192::3/128, 2001:DB8::3/128, Prefix-SID: Index 3
             Router-D: 192::4/128, 2001:DB8::4/128, Prefix-SID: Index 4

   then the Address Prefix field in the OSPFv3 Extended Prefix Range TLV
   is
   would be set to 192::1, 2001:DB8::1, Prefix Length would be set to 128, Range
   Size would be set to 4 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:

             10:1:1::0/120,

             2001:DB8:1::0/120,   Prefix-SID: Index 51
             10:1:1::100/120,
             2001:DB8:1::100/120, Prefix-SID: Index 52
             10:1:1::200/120,
             2001:DB8:1::200/120, Prefix-SID: Index 53
             10:1:1::300/120,
             2001:DB8:1::300/120, Prefix-SID: Index 54
             10:1:1::400/120,
             2001:DB8:1::400/120, Prefix-SID: Index 55
             10:1:1::500/120,
             2001:DB8:1::500/120, Prefix-SID: Index 56
             10:1:1::600/120,
             2001:DB8:1::600/120, Prefix-SID: Index 57

   then the Address Prefix field in the OSPFv3 Extended Prefix Range TLV
   is would
   be set to 10:1:1::0, 2001:DB8:1::0, Prefix Length would be set to 120, Range
   Size would be set to 7 7, and the Index value in the Prefix-SID Sub-TLV
   would be set to 51.

6.  SID/Label Binding Sub-TLV

   The SID/Label Binding Sub-TLV is used to advertise SID/Label mapping
   for a path to the prefix.

   The SID/Label Binding Sub-TLV MAY be originated by any router in an
   OSPFv3 domain.  The router may advertise a SID/Label binding to a FEC
   along with at least a single 'nexthop style' anchor.  The protocol
   supports more than one 'nexthop style' anchor to be attached to a
   SID/Label binding, which results into a simple path description
   language.  In analogy to RSVP the terminology for this is called an
   'Explicit Route Object' (ERO).  Since ERO style path notation allows
   anchoring SID/label bindings to both link and node IP addresses, any
   Label Switched Path (LSP) can be described.  Furthermore, SID/Label
   Bindings from external protocols can also be re-advertised.

   The SID/Label Binding Sub-TLV may be used for advertising SID/Label
   Bindings and their associated Primary and Backup paths.  In one
   single TLV, either a primary ERO Path, backup ERO Path, or both are
   advertised.  If a router wants to advertise multiple parallel paths,
   then it can generate several TLVs for the same Prefix/FEC.  Each
   occurrence of a Binding TLV for a given FEC Prefix will add a new
   path.

   SID/Label Binding Sub-TLV is a Sub-TLV of the following OSPFv3 TLVs,
   as defined in [I-D.ietf-ospf-ospfv3-lsa-extend] and in Section 4:

      Intra-Area Prefix TLV

      Inter-Area Prefix TLV

      External Prefix TLV

      OSPFv3 Extended Prefix Range TLV

   Multiple SID/Label Binding Sub-TLVs can be present in these TLVs.
   The SID/Label Binding Sub-TLV has 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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                       Sub-TLVs (variable)                     |
   +-                                                             -+
   |                                                               |

   where:

      Type: TBD, suggested value 7

      Length: variable

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |M|             |
   +-+-+-+-+-+-+-+-+

      where:

         M-bit - When the bit is set the binding represents the
         mirroring context as defined in
         [I-D.minto-rsvp-lsp-egress-fast-protection].

      Weight: weight used for load-balancing purposes.  The use of the
      weight is defined in section 3.5.1 of
      [I-D.ietf-spring-segment-routing].

   SID/Label Binding Sub-TLV currently supports following Sub-TLVs:

      SID/Label Sub-TLV as described in Section 2.1.  This Sub-TLV MUST
      appear in the SID/Label Binding Sub-TLV and it MUST only appear
      once.

      ERO Metric Sub-TLV as defined in Section 6.1.

      ERO Sub-TLVs as defined in Section 6.2.

6.1.  ERO Metric Sub-TLV

   The ERO Metric Sub-TLV is a Sub-TLV of the SID/Label Binding Sub-TLV.

   The ERO Metric Sub-TLV advertises the cost of an ERO path.  It is
   used to compare the cost of a given source/destination path.  A
   router SHOULD advertise the ERO Metric Sub-TLV in an advertised ERO
   TLV.  The cost of the ERO Metric Sub-TLV SHOULD be set to the
   cumulative IGP or TE path cost of the advertised ERO.  Since
   manipulation of the Metric field may attract or repel traffic to and
   from the advertised segment, it MAY be manually overridden.

    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            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Metric (4 octets)                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         ERO Metric Sub-TLV format

   where:

      Type: TBD, suggested value 8

      Length: Always 4

      Metric: A 4 octet metric representing the aggregate IGP or TE path
      cost.

6.2.  ERO Sub-TLVs

   All 'ERO' information represents an ordered set which describes the
   segments of a path.  The first ERO Sub-TLV describes the first
   segment of a path.  Similiarly, the last ERO Sub-TLV describes the
   segment closest to the egress point.  If a router extends or stitches
   a path, it MUST prepend the new segment's path information to the ERO
   list.  This applies equally to advertised backup EROs.

   All ERO Sub-TLVs must immediately follow the (SID)/Label Sub-TLV.

   All Backup ERO Sub-TLVs must immediately follow the last ERO Sub-TLV.

6.2.1.  IPv4 ERO Sub-TLV

   IPv4 ERO Sub-TLV is a Sub-TLV of the SID/Label Binding Sub-TLV.

   The IPv4 ERO Sub-TLV describes a path segment using IPv4 Address
   style of encoding.  Its semantics have been borrowed from [RFC3209].

    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      |                   Reserved                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        IPv4 Address (4 octets)                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          IPv4 ERO Sub-TLV format

   where:

      Type: TBD, suggested value 9

      Length: 8 bytes

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

      where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.

      IPv4 Address - the address of the explicit route hop.

6.2.2.  IPv6 ERO Sub-TLV

   IPv6 ERO Sub-TLV is a Sub-TLV of the SID/Label Binding Sub-TLV.

   The IPv6 ERO Sub-TLV (Type TBA) describes a path segment using IPv6
   Address style of encoding.  Its semantics have been borrowed from
   [RFC3209].

       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      |                   Reserved                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +-                                                             -+
      |                                                               |
      +-                         IPv6 Address                        -+
      |                                                               |
      +-                                                             -+
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          IPv6 ERO Sub-TLV format

   where:

      Type: TBD, suggested value 10

      Length: 8 bytes

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

      where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.

      IPv6 Address - the address of the explicit route hop.

6.2.3.  Unnumbered Interface ID ERO Sub-TLV

   The Unnumbered Interface ID ERO Sub-TLV is a Sub-TLV of the SID/Label
   Binding Sub-TLV.

   The appearance and semantics of the 'Unnumbered Interface ID' have
   been borrowed from [RFC3477].

   The Unnumbered Interface-ID ERO Sub-TLV describes a path segment that
   spans over an unnumbered interface.  Unnumbered interfaces are
   referenced using the interface index.  Interface indices are assigned
   local to the router and therefore not unique within a domain.  All
   elements in an ERO path need to be unique within a domain and hence
   need to be disambiguated using a domain unique Router-ID.

    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     |                  Reserved                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                            Router ID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Interface ID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   where:

                Unnumbered Interface ID ERO Sub-TLV format

      Type: TBD, suggested value 11

      Length: 12 bytes

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

   where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.

      Router-ID: Router-ID of the next-hop.

      Interface ID: is the identifier assigned to the link by the router
      specified by the Router-ID.

6.2.4.  IPv4 Backup ERO Sub-TLV

   IPv4 Prefix Backup ERO Sub-TLV is a Sub-TLV of the SID/Label Binding
   Sub-TLV.

   The IPv4 Backup ERO Sub-TLV describes a path segment using IPv4
   Address style of encoding.  Its semantics have been borrowed from
   [RFC3209].

    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         |                     Reserved                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    IPv4 Address (4 octets)                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      IPv4 Backup ERO Sub-TLV format

   where:

      Type: TBD, suggested value 12

      Length: 8 bytes

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

      where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.'

      IPv4 Address - the address of the explicit route hop.

6.2.5.  IPv6 Backup ERO Sub-TLV

   The IPv6 ERO Sub-TLV is a Sub-TLV of the SID/Label Binding Sub-TLV.

   The IPv6 Backup ERO Sub-TLV describes a Backup path segment using
   IPv6 Address style of encoding.  Its appearance and semantics have
   been borrowed from [RFC3209].

   The 'L' bit in the Flags is a one-bit attribute.  If the L bit is
   set, then the value of the attribute is 'loose.'  Otherwise, the
   value of the attribute is 'strict.'

       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      |                   Reserved                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      +-                                                             -+
      |                                                               |
      +-                         IPv6 Address                        -+
      |                                                               |
      +-                                                             -+
      |                                                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      IPv6 Backup ERO Sub-TLV format

   where:

      Type: TBD, suggested value 13

      Length: 8 bytes
      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

      where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.

      IPv6 Address - the address of the explicit route hop.

6.2.6.  Unnumbered Interface ID Backup ERO Sub-TLV

   The Unnumbered Interface ID Backup Sub-TLV is a Sub-TLV of the SID/
   Label Binding Sub-TLV.

   The appearance and semantics of the 'Unnumbered Interface ID' have
   been borrowed from [RFC3477].

   The Unnumbered Interface-ID Backup ERO Sub-TLV describes a path
   segment that spans over an unnumbered interface.  Unnumbered
   interfaces are referenced using the interface index.  Interface
   indices are assigned local to the router and are therefore not unique
   within a domain.  All elements in an ERO path need to be unique
   within a domain and hence need to be disambiguated with specification
   of the unique Router-ID.

    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    |                   Reserved                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                            Router ID                          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Interface ID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

             Unnumbered Interface ID Backup ERO Sub-TLV format

   where:

      Type: TBD, suggested value 14
      Length: 12 bytes

      Flags: 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |L|             |
   +-+-+-+-+-+-+-+-+

      where:

         L-bit - If the L-bit is set, then the segment path is
         designated as 'loose'.  Otherwise, the segment path is
         designated as 'strict'.

      Router-ID: Router-ID of the next-hop.

      Interface ID: is the identifier assigned to the link by the router
      specified by the Router-ID.

7.  Adjacency Segment Identifier (Adj-SID)

   An Adjacency Segment Identifier (Adj-SID) represents a router
   adjacency in Segment Routing.

7.1.

6.1.  Adj-SID Sub-TLV

   The extended OSPFv3 LSAs, as defined in
   [I-D.ietf-ospf-ospfv3-lsa-extend], are used to advertise prefix SID
   in OSPFv3

   The

   Adj-SID Sub-TLV is an optional Sub-TLV of the Router-Link TLV as defined in
   [I-D.ietf-ospf-ospfv3-lsa-extend].  It MAY appear multiple times in
   the Router-Link TLV.  Examples where more than one Adj-SID may
   be used per neighbor are described in section 4 of
   [I-D.filsfils-spring-segment-routing-use-cases].  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:

      Type: TBD, suggested value 5. 5

      Length: variable.

      Flags. 1 7 or 8 octets, dependent on the V flag.

      Flags: Single octet field of containing the following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |B|V|L|G|P|     |
   +-+-+-+-+-+-+-+-+

   where:

         B-Flag: Backup-flag. Backup Flag.  If set, the Adj-SID refers to an
         adjacency that is eligible for protection (e.g.: (e.g., using IPFRR or
         MPLS-FRR) as described in section 3.5 of
         [I-D.ietf-spring-segment-routing].

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

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

         The G-Flag. G-Flag: Group Flag.  When set, the G-Flag indicates that
         the Adj-SID refers to a set 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 consistent 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 Weight used for load-balancing purposes.  The use of the
      weight is defined in section 3.5.1 of [I-D.ietf-spring-segment-routing].

      SID/Index/Label: label or index value depending on According to the V-bit
      setting.

         Examples: V and L flags, it contains
      either:

         A 32 bit global 32-bit index defining the offset in the SID/Label space
         advertised by this router - in this case the V and L
            flags MUST NOT be set. router.

         A 24 bit local 24-bit label where the 20 rightmost bits are used for
         encoding the label value - in this case the V and L
            flags MUST be set.

            16 octet IPv6 address - in this case the V-flag MUST be set.
            The L-flag MUST NOT be set if the IPv6 address is globally
            unique. value.

   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 section
   3.5 of
   [I-D.ietf-spring-segment-routing].

   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.

6.2.  LAN Adj-SID Sub-TLV

   The

   LAN Adj-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 neighbor router on a
   broadcast
   broadcast, NBMA, or NBMA 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:

      Type: TBD, suggested value 6.

      Length: variable.

      Flags. 1 octet field of following flags:

    0 1 2 3 4 5 6 7
   +-+-+-+-+-+-+-+-+
   |B|V|L|G|P|     |
   +-+-+-+-+-+-+-+-+

   where:

         B-Flag: Backup-flag: set if the LAN-Adj-SID refer to an
         adjacency that is eligible for protection (e.g.: using IPFRR

      Length: 11 or
         MPLS-FRR) 12 octets, dependent on V-flag.

      Flags: same as described in section 3.1 of
         [I-D.filsfils-spring-segment-routing-use-cases].

         The V-Flag: Value/Index Flag.  If set, then the LAN Adj-SID
         carries an absolute value.  If not set, then the LAN Adj-SID
         carries an index.

         The L-Flag: Local/Global Flag.  If set, then the value/index
         carried by the LAN Adj-SID has local significance.  If not set,
         then the value/index carried by this subTLV has global
         significance.

         The G-Flag.  Group Flag.  When set, the G-Flag indicates that
         the LAN Adj-SID refers to a set 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 consistent across router restart and/or interface flap.

         Other bits: Reserved.  These MUST be zero when sent and are
         ignored when received. Section 6.1

      Weight: weight Weight used for load-balancing purposes.  The use of the
      weight is defined in section 3.5.1 of [I-D.ietf-spring-segment-routing].

      Reserved: SHOULD be set to 0 on transmission and MUST be ignored
      on reception.

      Neighbor ID: The Router ID of the neighbor for which the Adj-SID LAN-Adj-
      SID is advertised.

      SID/Index/Label: label or index value depending on According to the V-bit
      setting.

         Examples: V and L flags, it contains
      either:

         A 32 bit global 32-bit index defining the offset in the SID/Label space
         advertised by this router - in this case the V and L
            flags MUST NOT be set. router.

         A 24 bit local 24-bit label where the 20 rightmost bits are used for
         encoding the label value - in this case the V and L
            flags MUST be set.

            16 octet IPv6 address - in this case the V-flag MUST be set.
            The L-flag MUST NOT be set if the IPv6 address is globally
            unique. value.

      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.

8.

7.  Elements of Procedure

8.1.

7.1.  Intra-area Segment routing in OSPFv3

   An OSPFv3 router that supports segment routing MAY advertise Prefix-
   SIDs for any prefix that to which it is advertising reachability for (e.g., a
   loopback IP address) address as described in Section 5.

   If multiple routers advertise a Prefix-SID for the same prefix, then
   the Prefix-SID MUST be the same.  This is required in order to allow
   traffic load-balancing when multiple equal cost paths to the
   destination exist in the network.

   The 5).

   A Prefix-SID can also be advertised by the SR Mapping Servers (as
   described in [I-D.filsfils-spring-segment-routing-ldp-interop]).  The [I-D.ietf-spring-segment-routing-ldp-interop]).  A
   Mapping Server advertises Prefix-SID Prefix-SIDs for remote prefixes that exist
   in the network. OSPFv3 routing domain.  Multiple Mapping Servers can advertise Prefix-SID
   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 scope or autonomous system flooding scope when
   advertising Prefix SID 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, E-Intra-Area-Prefix-LSA
   ([I-D.ietf-ospf-ospfv3-lsa-extend]) is used.  If autonomous system
   flooding scope is needed, E-AS-
   External-LSA E-AS-External-LSA
   ([I-D.ietf-ospf-ospfv3-lsa-extend]) 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 5), 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 Inter-
   Area Prefix TLV, External-Prefix TLV or Intra-Area-Prefix TLV
   ([I-D.ietf-ospf-ospfv3-lsa-extend]) does not itself contribute to the
   prefix reachability.  The NU-bit MUST be set in the PrefixOptions
   field of the LSA which is used by the Mapping Server to advertise SID
   or SID range, Range, which prevents the advertisement to contribute to the
   prefix reachability.

   An SR Mapping Server MUST use OSPF the OSPFv3 Extended Prefix Range TLV TLVs
   when advertising SIDs for prefixes.  Prefixes of different route-types route-
   types can be combined in a single OSPF OSPFv3 Extended Prefix Range TLV
   advertised by
   the an SR Mapping Server.

   Area scoped OSPF

   Area-scoped OSPFv3 Extended Prefix Range TLV TLVs are propagated between
   areas.  Similar to propagation of prefixes between areas, an ABR only
   propagates the OSPF OSPFv3 Extended Prefix Range TLV that it considers to
   be the best from the set it received.  The rules used to pick the
   best
   OSPF OSPFv3 Extended Prefix Range TLV is are described in Section 4.

   When propagating OSPF an OSPFv3 Extended Prefix Range TLV between areas, ABR
   ABRs MUST set the IA-Flag, that is used to prevent redundant flooding
   of the OSPF OSPFv3 Extended Prefix Range TLV between areas as described in
   Section 4.

8.2.

7.2.  Inter-area Segment routing in OSPFv3

   In order to support SR in a multi-area environment, OSPFv3 must MUST
   propagate Prefix-SID information between areas.  The following
   procedure is used in order to propagate Prefix SIDs between areas.

   When an OSPFv3 ABR advertises a Inter-Area-Prefix-LSA from an intra-
   area prefix to all its connected areas, it will also include Prefix-
   SID Sub-TLV, as described in Section 5.  The Prefix-SID value will be
   set as follows:

      The ABR will look at its best path to the prefix in the source
      area and find out the advertising router associated with the best path
      to that prefix.

      The ABR will then determine if such router advertised a Prefix-SID
      for the prefix and use 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 will use the Prefix-SID advertised by any other
      router when propagating the Prefix-SID for the prefix to other
      areas.

   When an OSPFv3 ABR advertises Inter-Area-Prefix-LSA LSAs from an
   inter-area route to all its connected areas areas, it will also include
   Prefix-SID Sub-TLV, as described in Section 5.  The Prefix-SID value
   will be set as follows:

      The ABR will look at its best path to the prefix in the source backbone
      area and find out the advertising router associated with the best path
      to that prefix.

      The ABR will then look determine if such router advertised a Prefix-SID
      for the prefix and use it when advertising the Prefix-SID to other
      connected areas.

      If no Prefix-SID was advertised for the prefix in the source backbone
      area by the ABR that contributes to the best path to the prefix,
      the originating ABR will use the Prefix-SID advertised by any
      other router when propagating the Prefix-SID for the prefix to
      other areas.

8.3.  SID

7.3.  Segment Routing for External Prefixes

   AS-External-LSAs are flooded domain wide.  When an ASBR, which
   supports SR, generates E-AS-External-LSA, it should SHOULD also include
   Prefix-SID Sub-TLV, as described in Section 5.  The Prefix-SID value
   will be set to the SID that has been reserved for that prefix.

   When an NSSA ASBR [RFC3101] ABR translates an E-NSSA-LSA into an E-AS-External-LSA, E-AS-
   External-LSA, it should 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 Prefix-
   SID for the prefix, then the NSSA ABR uses it when advertising the
   Prefix-SID in for the E-AS-External-LSA.  Otherwise  Otherwise, the Prefix-SID
   advertised by any other router will be used.

8.4.

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

8.4.1. 6.

7.4.1.  Advertisement of Adj-SID on Point-to-Point Links

   An Adj-SID MAY be advertised for any adjacency on p2p a P2P link that is
   in
   a neighbor state 2-Way or higher.  If the adjacency on a p2p 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 then 2-Way, then the Adj-SID advertisement MUST be removed
   withdrawn from the area.

8.4.2.

7.4.2.  Adjacency SID on Broadcast or NBMA Interfaces

   Broadcast

   Broadcast, NBMA, or NBMA hybrid [RFC6845] networks in OSPFv3 are
   represented by a star topology where the Designated Router (DR) is
   the central point to which all other routers on the broadcast broadcast, NBMA,
   or NBMA hybrid network connect.  As a result, routers on the broadcast broadcast,
   NBMA, or NBMA 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
   a 2-Way adjacency state
   with each other and are directly reachable.

   When Segment Routing is used, each router on the broadcast broadcast, NBMA, or NBMA
   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. 6.1.

   SR capable routers MAY also advertise an Adj-SID a LAN-Adj-SID for other
   neighbors
   (e.g. (e.g., BDR, DR-OTHER) on the broadcast broadcast, NBMA, or NBMA hybrid
   network using the LAN
   ADJ-SID LAN-Adj-SID Sub-TLV as described in Section 7.2.

9. 6.2.

8.  IANA Considerations

   This specification updates several existing OSPF OSPFv3 registries.

9.1.  OSPF Router Information (RI) TLVs Registry

   o 8 (IANA Preallocated) - SR-Algorithm TLV

   o 9 (IANA Preallocated) - SID/Label Range TLV

   o 12 - SR Local Block Sub-TLV

   o 13 - SRMS Preference Sub-TLV

9.2.

8.1.  OSPFv3 Extend-LSA TLV Registry

   Following values are allocated:

   o suggested value 9 - OSPF OSPFv3 Extended Prefix Range TLV

9.3.

8.2.  OSPFv3 Extend-LSA Sub-TLV registry

   o suggested value 3 - SID/Label Sub-TLV

   o suggested value 4 - Prefix SID Sub-TLV

   o suggested value 5 - Adj-SID Sub-TLV

   o suggested value 6 - LAN Adj-SID Sub-TLV

   o suggested value 7 - SID/Label Binding Sub-TLV

   o suggested value 8 - ERO Metric Sub-TLV

   o suggested value 9 - IPv4 ERO Sub-TLV

   o suggested value 10 - IPv6 ERO Sub-TLV

   o suggested value 11 - Unnumbered Interface ID ERO Sub-TLV

   o suggested value 12 - IPv4 Backup ERO Sub-TLV

   o suggested value 13 - IPv6 Backup ERO Sub-TLV

   o suggested value 14 - Unnumbered Interface ID Backup ERO Sub-TLV

10.

9.  Security Considerations

   With the OSPFv3 segment routing extensions defined herein, OSPFv3
   will now program the MPLS data plane [RFC3031] in addition to the IP
   data plane.  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
   [I-D.ietf-ospf-ospfv3-lsa-extend] 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] SHOULD be used.

   Implementations must MUST assure that malformed permutations of the newly TLV and Sub-TLV defined sub-TLvs in
   this document are detected and do not result in errors which cause hard provide a vulnerability for
   attackers to crash the OSPFv3
   failures.

11.  Acknowledgements

   Thanks router or routing process.  Reception
   of 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.

10.  Contributors

   Acee Lindem for the detail review of gave a substantial contribution to the draft,
   corrections, as well as discussion about details content of the encoding. this
   document.

11.  Acknowledgements

   We would like to thank Anton Smirnov for his contribution.

   Many thanks to Yakov Rekhter, John Drake and Shraddha Hedge for their
   contribution on earlier definition of the "Binding / MPLS Label TLV".

12.  References

12.1.  Normative References

   [I-D.ietf-ospf-ospfv3-lsa-extend]
              Lindem, A., Roy, A., Goethals, D., Vallem, V., and F.
              Baker, "OSPFv3 LSA Extendibility", draft-ietf-ospf-ospfv3-
              lsa-extend-23 (work in progress), January 2018.

   [I-D.ietf-spring-conflict-resolution]
              Ginsberg, L., Psenak, P., Previdi, S., and M. Pilka,
              "Segment Routing MPLS Conflict Resolution", draft-ietf-
              spring-conflict-resolution-05 (work in progress), July
              2017.

   [I-D.ietf-spring-segment-routing]
              Filsfils, C., Previdi, S., Ginsberg, L., Decraene, B.,
              Litkowski, S., and R. Shakir, "Segment Routing
              Architecture", draft-ietf-spring-segment-routing-15 (work
              in progress), January 2018.

   [I-D.ietf-spring-segment-routing-ldp-interop]
              Filsfils, C., Previdi, S., Bashandy, A., Decraene, B., and
              S. Litkowski, "Segment Routing interworking with LDP",
              draft-ietf-spring-segment-routing-ldp-interop-09 (work in
              progress), September 2017.

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

   [RFC3209]  Awduche, D., Berger, L., Gan, D., Li, T., Srinivasan, V.,

   [RFC3031]  Rosen, E., Viswanathan, A., and G. Swallow, "RSVP-TE: Extensions to RSVP for LSP
              Tunnels", R. Callon, "Multiprotocol
              Label Switching Architecture", RFC 3209, 3031,
              DOI 10.17487/RFC3209, December 10.17487/RFC3031, January 2001,
              <https://www.rfc-editor.org/info/rfc3209>.

   [RFC3477]  Kompella, K. and Y. Rekhter, "Signalling Unnumbered Links
              in Resource ReSerVation Protocol - Traffic Engineering
              (RSVP-TE)",
              <https://www.rfc-editor.org/info/rfc3031>.

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

   [RFC4970]  Lindem, A.,
              <https://www.rfc-editor.org/info/rfc3101>.

   [RFC5036]  Andersson, L., Ed., Shen, N., Vasseur, JP., Aggarwal, 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
              S. Shaffer, "Extensions to OSPF A. Lindem, "OSPF
              for Advertising Optional
              Router Capabilities", IPv6", RFC 4970, 5340, DOI 10.17487/RFC4970, 10.17487/RFC5340, July
              2007, <https://www.rfc-editor.org/info/rfc4970>. 2008,
              <https://www.rfc-editor.org/info/rfc5340>.

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

   [RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
              Writing an IANA Considerations Section in RFCs", BCP 26,
              RFC 8126, DOI 10.17487/RFC8126, June 2017,
              <https://www.rfc-editor.org/info/rfc8126>.

12.2.  Informative References

   [I-D.filsfils-spring-segment-routing-ldp-interop]

   [I-D.ietf-spring-segment-routing-mpls]
              Filsfils, C., Previdi, S., Bashandy, A., Decraene, B.,
              Litkowski, S., Horneffer, M., Milojevic, I., Shakir, R.,
              Ytti, S., Henderickx, W., Tantsura, J., and E. Crabbe,
              "Segment Routing interoperability with LDP", draft-
              filsfils-spring-segment-routing-ldp-interop-02 (work in
              progress), September 2014.

   [I-D.filsfils-spring-segment-routing-use-cases]
              Filsfils, C., Francois, P., Previdi, S., Decraene, B.,
              Litkowski, S., Horneffer, M., Milojevic, I., R. Shakir, R.,
              Ytti, S., Henderickx, W., Tantsura, J., Kini, S., and E.
              Crabbe, "Segment Routing Use Cases", draft-filsfils-
              spring-segment-routing-use-cases-01 with MPLS
              data plane", draft-ietf-spring-segment-routing-mpls-11
              (work in progress), October 2014.

   [I-D.ietf-ospf-ospfv3-lsa-extend]
              Lindem, A., Roy, A., Goethals, D., Vallem, V., and F.
              Baker, "OSPFv3 LSA Extendibility", draft-ietf-ospf-ospfv3-
              lsa-extend-14 (work in progress), April 2017.

   [I-D.ietf-spring-conflict-resolution]
              Ginsberg, L., Psenak, P., Previdi, S., and

   [RFC4552]  Gupta, M. Pilka,
              "Segment Routing Conflict Resolution", draft-ietf-spring-
              conflict-resolution-01 (work in progress), and N. Melam, "Authentication/Confidentiality
              for OSPFv3", RFC 4552, DOI 10.17487/RFC4552, June 2016.

   [I-D.ietf-spring-segment-routing]
              Filsfils, C., 2006,
              <https://www.rfc-editor.org/info/rfc4552>.

   [RFC7855]  Previdi, S., Bashandy, A., Ed., Filsfils, C., Ed., Decraene, B.,
              Litkowski, S., Horneffer, M., Shakir, R., Tantsura, J., and E. Crabbe, "Segment R. Shakir, "Source
              Packet Routing Architecture", draft-ietf-
              spring-segment-routing-01 (work in progress), February
              2015.

   [I-D.minto-rsvp-lsp-egress-fast-protection]
              Jeganathan, J., Gredler, H., and Y. Shen, "RSVP-TE LSP
              egress fast-protection", draft-minto-rsvp-lsp-egress-fast-
              protection-03 (work in progress), November 2013.

   [I-D.previdi-6man-segment-routing-header]
              Previdi, S., Filsfils, C., Field, B., Leung, I., Linkova,
              J., Kosugi, T., Vyncke, E., Networking (SPRING) Problem Statement
              and D. Lebrun, "IPv6 Segment
              Routing Header (SRH)", draft-previdi-6man-segment-routing-
              header-08 (work in progress), October 2015. Requirements", RFC 7855, DOI 10.17487/RFC7855, May
              2016, <https://www.rfc-editor.org/info/rfc7855>.

Authors' Addresses

   Peter Psenak (editor)
   Cisco Systems, Inc.
   Apollo Business Center
   Mlynske nivy 43
   Eurovea Centre, Central 3
   Pribinova Street 10
   Bratislava  821 09  81109
   Slovakia

   Email: ppsenak@cisco.com

   Stefano Previdi (editor)
   Cisco Systems, Inc.
   Via Del Serafico, 200
   Rome  00142
   Italy

   Email: sprevidi@cisco.com

   Clarence Filsfils
   Cisco Systems, Inc.
   Brussels
   Belgium

   Email: cfilsfil@cisco.com

   Stefano Previdi (editor)
   Individual

   Email: stefano.previdi@net

   Hannes Gredler
   RtBrick Inc.
   Austria

   Email: hannes@rtbrick.com

   Rob Shakir
   Google, Inc.
   1600 Amphitheatre Parkway
   Mountain View, CA  94043
   US

   Email: robjs@google.com
   Wim Henderickx
   Nokia
   Copernicuslaan 50
   Antwerp  2018
   BE

   Email: wim.henderickx@nokia.com

   Jeff Tantsura
   Individual
   Nuage Networks
   US

   Email: jefftant.ietf@gmail.com