Internet                                                           Y. Qu
Internet-Draft                                    Futurewei Technologies
Intended status: Standards Track                               A. Lindem
Expires: 10 November 2025                        LabN Consulting, L.L.C.
                                                                J. Zhang
                                                        Juniper Networks
                                                                 I. Chen
                                                   The MITRE Corporation
                                                              9 May 2025


  A YANG Data Model for OSPF Segment Routing over the MPLS Data Plane
                       draft-ietf-ospf-sr-yang-50

Abstract

   This document defines a YANG data model that can be used to manage
   OSPF Extensions for Segment Routing over the MPLS data plane.

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 10 November 2025.

Copyright Notice

   Copyright (c) 2025 IETF Trust and the persons identified as the
   document authors.  All rights reserved.











Qu, et al.              Expires 10 November 2025                [Page 1]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   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 Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
     1.2.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .   3
   2.  OSPF Segment Routing over MPLS YANG Data Model Scope  . . . .   3
   3.  OSPF Segment Routing over MPLS YANG Module  . . . . . . . . .   4
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  33
   5.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  35
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  35
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  35
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  35
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  38
   Appendix A.  A Configuration Example  . . . . . . . . . . . . . .  39
   Appendix B.  Full Tree Diagram  . . . . . . . . . . . . . . . . .  42
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  52

1.  Overview

   This document defines a YANG data model [RFC7950] that can be used to
   manage OSPFv2 extensions for Segment Routing [RFC8665] and OSPFv3
   extensions for Segment Routing [RFC8666] over the MPLS data plane.
   The defined YANG data model is an augmentation to the OSPF YANG data
   model [RFC9129].

   The YANG data model in this document conforms to the Network
   Management Datastore Architecture (NMDA) [RFC8342].

1.1.  Requirements Language

   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.







Qu, et al.              Expires 10 November 2025                [Page 2]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


1.2.  Tree Diagrams

   This document uses the graphical representation of data model defined
   in [RFC8340].

2.  OSPF Segment Routing over MPLS YANG Data Model Scope

   The YANG data model in this document consists of a single YANG
   module, ietf-ospf-sr-mpls.  The ietf-ospf-sr-mpls YANG module
   includes OSPF Segment Routing Extensions for the MPLS data plane for
   both OSPFv2 [RFC8665] and OSPFv3 [RFC8666].

   The ietf-ospf-sr-mpls YANG module requires support for the base
   segment routing module [RFC9020], which defines the global segment
   routing configuration independent of any specific routing protocol
   configuration, and support of OSPF base model [RFC9129] which defines
   basic OSPF configuration and state.

   The ietf-ospf-sr-mpls module defines both the data nodes to configure
   OSPF segment routing MPLS extensions and the additions to the OSPF
   Link State Advertisements (LSAs) necessary to support SR-MPLS.  The
   OSPF configuration includes:

   *  OSPF instance level configuration imported from the ietf-segment-
      routing-mpls YANG module including the mapping server bindings and
      the per-protocol Segment Routing Global Block (SRGB) (refer to the
      sr-protocol grouping [RFC9020]).

   *  OSPF area level configuration which enables segment routing over
      MPLS on all interfaces as wall as advertisement of segment routing
      over MPLS information in Link State Advertisements (LSAs).

   *  OSPF interface level configuration for adjacency SIDs
      corresponding to specific neighbors on multi-access interfaces
      (OSPF interface type broadcast or Non-Broadcast Multi-Access
      (NBMA)).  The adjacency-sid definitions are imported from tht
      ietf-segment-routing-mpls YANG module (refer to the igp-interface
      grouping [RFC9020]).

   *  OSPF interface level configuration for Topology-Independent Loop-
      Free Alternative (TI-LFA) using the MPLS data plane.  TI-LFA is
      described in [I-D.ietf-rtgwg-segment-routing-ti-lfa].

   The operational state (read-only) additions to specifc to OSPFv2 LSA
   include:

   *  OSPFv2 extended range TLV encodings [RFC8665] in the OSPF
      Extended-Prefix Opaque LSA [RFC7684].



Qu, et al.              Expires 10 November 2025                [Page 3]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   *  OSPFv2 Prefix SID Sub-TLV encodings [RFC8665] included the OSPF
      Extended Prefix TLV which is advertised in the OSPF Extended
      Prefix Opaque LSA [RFC7684].

   *  OSPFv2 Prefix SID Sub-TLV encodings [RFC8665] included the OSPF
      Extended Prefix TLV which is advertised in the OSPF Extended
      Prefix Opaque LSA [RFC7684].

   *  OSPFv2 SR-Algorithm, SID/Label Range TLVs, SR Local Block TLVs,
      Segment Routing Mapping Server (SRMS) preference TLV [RFC8665]
      advertised in the OSPFv2 Router Information Opaque LSA [RFC7770].

   The operational state (read-only) additions to specifc to OSPFv3 LSA
   include:

   *  OSPFv3 extended range TLV encodings [RFC8666] in the OSPFv3 E-
      Intra-Area-Prefix-LSA, E-Inter-Area-Prefix-LSA, E-AS-External-LSA,
      and E-Type-7-LSA [RFC8362].

   *  OSPFv3 extended range TLV encodings [RFC8666] in the OSPFv3 E-
      Intra-Area-Prefix-LSA, E-Inter-Area-Prefix-LSA, E-AS-External-LSA,
      and E-Type-7-LSA [RFC8362].

   *  OSPFv3 Prefix-SID Sub-TLV encodings [RFC8666] in the OSPFv3 Intra-
      Area Prefix TLV, Inter-Area Prefix TLV, External Prefix TLV, and
      OSPFv3 Extended Prefix Range TLV [RFC8362].

   *  OSPFv3 Adj-SID Sub-TLV [RFC8666] in the OSPFv3 Router-Link TLV
      [RFC8362].

   *  OSPFv3 Adj-SID Sub-TLV [RFC8666] in the OSPFv3 Router-Link TLV
      [RFC8362].

   *  OSPFv3 LAN Adj-SID Sub-TLV [RFC8666] in the OSPFv3 Router-Link TLV
      [RFC8362].

   *  OSPFv3 SR-Algorithm, SID/Label Range TLVs, SR Local Block TLVs,
      Segment Routing Mapping Server (SRMS) preference TLV [RFC8666]
      advertised in the OSPFv3 Router Information LSA [RFC7770].

3.  OSPF Segment Routing over MPLS YANG Module

   [RFC2328], [RFC4915], [RFC5340], [RFC6991], [RFC8102], [RFC8294],
   [RFC8349], [RFC9587], and [I-D.ietf-rtgwg-segment-routing-ti-lfa] are
   referenced in the YANG module.






Qu, et al.              Expires 10 November 2025                [Page 4]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   <CODE BEGINS> file "ietf-ospf-sr-mpls@2025-05-09.yang"
   module ietf-ospf-sr-mpls {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls";
     prefix ospf-sr-mpls;

     import ietf-inet-types {
       prefix inet;
       reference
         "RFC 6991: Common YANG Data Types";
     }
     import ietf-routing-types {
       prefix rt-types;
       reference
         "RFC 8294: Common YANG Data Types for the Routing Area";
     }
     import iana-routing-types {
       prefix iana-rt-types;
       reference
         "RFC 8294: Common YANG Data Types for the Routing Area";
     }
     import ietf-routing {
       prefix rt;
       reference
         "RFC 8349: A YANG Data Model for Routing
                    Management (NMDA Version)";
     }
     import ietf-segment-routing-common {
       prefix sr-cmn;
       reference
         "RFC 9020: YANG Data Model for Segment Routing";
     }
     import ietf-segment-routing-mpls {
       prefix sr-mpls;
       reference
         "RFC 9020: YANG Data Model for Segment Routing";
     }
     import ietf-ospf {
       prefix ospf;
       reference
         "RFC 9129: YANG Data Model for the OSPF Protocol";
     }
     import ietf-ospfv3-extended-lsa {
       prefix ospfv3-e-lsa;
       reference
         "RFC 9587: YANG Data Model for OSPFv3 Extended LSAs";
     }




Qu, et al.              Expires 10 November 2025                [Page 5]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     organization
       "IETF LSR - Link State Routing Working Group";
     contact
       "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
        WG List:  <mailto:lsr@ietf.org>

        Author:   Yingzhen Qu
                  <mailto:yingzhen.ietf@gmail.com>
        Author:   Acee Lindem
                  <mailto:acee.ietf@gmail.com>
        Author:   Derek Yeung
                  <mailto:derek@arrcus.com>
        Author:   Jeffrey Zhang
                  <mailto:zzhang@juniper.net>
        Author:   Ing-Wher Chen
                  <mailto:ingwherchen@mitre.org>";
     description
       "This YANG module defines the generic configuration
        and operational state for OSPF Segment Routing (SR).

        Copyright (c) 2025 IETF Trust and the persons
        identified as authors of the code.  All rights reserved.

        Redistribution and use in source and binary forms, with or
        without modification, is permitted pursuant to, and subject
        to the license terms contained in, the Revised BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (https://trustee.ietf.org/license-info).

        All revisions of IETF and IANA published modules can be found
        at the YANG Parameters registry
        (https://www.iana.org/assignments/yang-parameters).

        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 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.

         This version of this YANG module is part of RFC XXXX; see
        the RFC itself for full legal notices.";

     // RFC Ed.: Replace XXXX with actual RFC number and remove
     // this note

     revision 2025-05-09 {
       description



Qu, et al.              Expires 10 November 2025                [Page 6]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "Initial revision.";
       reference
         "RFC XXXX: A YANG Data Model for OSPF Segment Routing for
          over MPLS Data Plane";
     }

     // RFC Ed.: Replace XXXX with actual RFC number.
     // Also, replace '2025-04-14' with the module publication date
     // in the format (YYYY-MM-DD) and remove this note.

     feature remote-lfa-sr {
       description
         "Enhance rLFA to use SR path.";
       reference
         "RFC 8102: Remote-LFA Node Protection and Manageability";
     }

     feature ti-lfa {
       description
         "Topology-Independent Loop-Free Alternate (TI-LFA)
          computation using segment routing.";
       reference
         "draft-ietf-rtgwg-segment-routing-ti-lfa:
          Topology-Independent Fast Reroute using Segment Routing";
     }

     identity prefix-sid-flag {
       description
         "Base identity for prefix SID sub-TLV flags.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity np-flag {
       base prefix-sid-flag;
       description
         "No-PHP flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity m-flag {
       base prefix-sid-flag;
       description
         "Mapping server flag.";
       reference



Qu, et al.              Expires 10 November 2025                [Page 7]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity e-flag {
       base prefix-sid-flag;
       description
         "Explicit-NULL flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity v-flag {
       base prefix-sid-flag;
       description
         "Value/Index flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity l-flag {
       base prefix-sid-flag;
       description
         "Local flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 6";
     }

     identity extended-prefix-range-flag {
       description
         "Base identity for extended prefix range TLV flags.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 4
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 5";
     }

     identity ia-flag {
       base extended-prefix-range-flag;
       description
         "Inter-Area flag. Note that this is only applicable to OSPFv2
          since OSPFv3 advertises separate Inter-Area extended-LSA.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 4";
     }




Qu, et al.              Expires 10 November 2025                [Page 8]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     identity adj-sid-flag {
       description
         "Base identity for Adj-SID sub-TLV flags.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     identity b-flag {
       base adj-sid-flag;
       description
         "Backup flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     identity vi-flag {
       base adj-sid-flag;
       description
         "Value/Index flag - corresponds to V-Flag in references.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     identity lg-flag {
       base adj-sid-flag;
       description
         "Local/Global flag - corresponds to L-flag in references.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     identity g-flag {
       base adj-sid-flag;
       description
         "Group flag.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     identity p-flag {
       base adj-sid-flag;
       description
         "Persistent flag.";



Qu, et al.              Expires 10 November 2025                [Page 9]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 6
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 7";
     }

     /* Groupings */

     grouping sid-tlv-encoding {
       description
         "SID TLV Encoding -  20-bit label or 32-bit SID index whose
          interpretation is dependent on the TLV length (3 for an
          MPLS label or 4 for a 32-bit value)  or the TLV V-Flag and
          L-Flag settings:

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

           If V-Flag is set to 1 and L-Flag is set to 1: The
           ID/Index/Label field is a 3-octet local label where the
           20 rightmost bits are used for encoding the label value.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing, Section 2.1
          RFC 8665: OSPF Extensions for Segment Routing, Section 5
          RFC 8666: OSPFv3 Extensions for Segment Routing, Section 3";
       choice sid {
         case sid-label {
           leaf label-value {
             type uint32 {
               range "0 .. 1048575";
             }
             description
               "A 20-bit MPLS Label";
           }
         }
         case sid-index {
           leaf index-value {
             type uint32;
             description
               "Index into a label space advertised by this router.";
           }
         }
         description
           "Choice of either a 20-bit MPLS label or 32-bit index into
            an advertised label space.";
       }
     }



Qu, et al.              Expires 10 November 2025               [Page 10]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     grouping ospfv2-prefix-sid-sub-tlvs {
       description
         "OSPFv2 Prefix Segment ID (SID) sub-TLVs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 5)";
       container prefix-sid-sub-tlvs {
         description
           "Prefix SID sub-TLV.";
         list prefix-sid-sub-tlv {
           description
             "Prefix SID sub-TLV.";
           container prefix-sid-flags {
             leaf-list flag {
               type identityref {
                 base prefix-sid-flag;
               }
               description
                 "Prefix SID Sub-TLV flags.";
             }
             description
               "Segment Identifier (SID) Flags.";
           }
           leaf mt-id {
             type uint8 {
               range "0 .. 127";
             }
             description
               "Multi-topology ID.";
             reference
               "RFC 4915: Multi-Topology (MT) Routing in OSPF";
           }
           leaf algorithm {
             type identityref {
               base sr-cmn:prefix-sid-algorithm;
             }
             description
               "Algorithm associated with the prefix-SID.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping ospfv2-extended-prefix-range-tlvs {
       description
         "OSPFv2 Extended prefix range TLV grouping.";
       reference



Qu, et al.              Expires 10 November 2025               [Page 11]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 4)";
       container extended-prefix-range-tlvs {
         description
           "List of range of prefixes.";
         list extended-prefix-range-tlv {
           description
             "Range of prefixes.";
           leaf prefix-length {
             type uint8;
             description
               "Length of prefix in bits.";
           }
           leaf af {
             type iana-rt-types:address-family;
             description
               "Address family for the prefix.";
           }
           leaf range-size {
             type uint16;
             description
               "Number of prefixes covered by the
                advertisement.";
           }
           container extended-prefix-range-flags {
             leaf-list flag {
               type identityref {
                 base extended-prefix-range-flag;
               }
               description
                 "Extended prefix range TLV flags.";
             }
             description
               "Extended Prefix Range TLV flags.";
           }
           leaf prefix {
             type inet:ipv4-prefix;
             description
               "IPv4 prefix.";
           }
           uses ospfv2-prefix-sid-sub-tlvs;
           uses ospf:unknown-tlvs;
         }
       }
     }

     grouping ospfv2-adj-sid-sub-tlvs {
       description



Qu, et al.              Expires 10 November 2025               [Page 12]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "OSPFv2 Adj-SID sub-TLV grouping.";
       container adj-sid-sub-tlvs {
         description
           "Adj-SID optional sub-TLVs.";
         list adj-sid-sub-tlv {
           description
             "List of Adj-SID sub-TLVs.";
           container adj-sid-flags {
             leaf-list flag {
               type identityref {
                 base adj-sid-flag;
               }
               description
                 "Adj-SID sub-TLV flags.";
             }
             description
               "Adj-SID sub-TLV flags.";
           }
           leaf mt-id {
             type uint8 {
               range "0 .. 127";
             }
             description
               "Multi-topology ID. Topologies range from 0-127 and
                return of any other value would indicate an error.";
             reference
               "RFC 4915: Multi-Topology (MT) Routing in OSPF";
           }
           leaf weight {
             type uint8;
             description
               "Weight used for load-balancing.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping ospfv2-lan-adj-sid-sub-tlvs {
       description
         "OSPFv2 LAN Adj-SID sub-TLV grouping.";
       container lan-adj-sid-sub-tlvs {
         description
           "LAN Adj-SID optional sub-TLVs.";
         reference
           "RFC 8665: OSPF Extensions for Segment Routing
            (Section 6)";
         list lan-adj-sid-sub-tlv {



Qu, et al.              Expires 10 November 2025               [Page 13]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           description
             "List of LAN Adj-SID sub-TLVs.";
           container lan-adj-sid-flags {
             leaf-list flag {
               type identityref {
                 base adj-sid-flag;
               }
               description
                 "LAN Adj-SID sub-TLV flags.";
             }
             description
               "LAN Adj-SID sub-TLV flags.";
           }
           leaf mt-id {
             type uint8 {
               range "0 .. 127";
             }
             description
               "Multi-topology ID. Topologies range from 0-127 and
                return of any other value would indicate an error.";
             reference
               "RFC 4915: Multi-Topology (MT) Routing in OSPF";
           }
           leaf weight {
             type uint8;
             description
               "Weight used for load-balancing.";
           }
           leaf neighbor-router-id {
             type rt-types:router-id;
             description
               "Neighbor router ID.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping sr-algorithm-tlv {
       description
         "SR algorithm TLV grouping.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 3.1)";
       container sr-algorithm-tlv {
         description
           "All SR algorithm TLVs.";
         leaf-list sr-algorithm {



Qu, et al.              Expires 10 November 2025               [Page 14]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           type identityref {
             base sr-cmn:prefix-sid-algorithm;
           }
           description
             "Segment Routing (SR) algorithms that the router is
              currently using.";
         }
       }
     }

     grouping sid-range-tlvs {
       description
         "SID Range TLV grouping.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 3.2)";
       container sid-range-tlvs {
         description
           "List of SID range TLVs.";
         list sid-range-tlv {
           description
             "SID range TLV.";
           leaf range-size {
             type rt-types:uint24;
             description
               "SID range.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping local-block-tlvs {
       description
         "The SR local block TLV contains the
          range of labels reserved for local SIDs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 3.3)";
       container local-block-tlvs {
         description
           "List of SRLB TLVs.";
         list local-block-tlv {
           description
             "SRLB TLV.";
           leaf range-size {
             type rt-types:uint24;
             description



Qu, et al.              Expires 10 November 2025               [Page 15]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


               "SID range. The return of a zero value would indicate
                an error.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping srms-preference-tlv {
       description
         "The SR Mapping Server (SRMS) preference TLV is
          used to advertise a preference associated with
          the node that acts as an SR Mapping Server. SR
          Mapping Server advertisements with a higher
          preference value are preferred over those with
          a lower preference value.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 3.4)";
       container srms-preference-tlv {
         description
           "SRMS Preference TLV.";
         leaf preference {
           type uint8;
           description
             "SRMS preference TLV, value from 0 to 255 with
              255 being the most preferred.";
         }
       }
     }

     grouping ospfv3-prefix-sid-sub-tlvs {
       description
         "OSPFv3 Prefix Segment ID (SID) sub-TLVs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       container prefix-sid-sub-tlvs {
         description
           "Prefix SID sub-TLV.";
         list prefix-sid-sub-tlv {
           description
             "Prefix SID sub-TLV.";
           container ospfv3-prefix-sid-flags {
             leaf-list flag {
               type identityref {
                 base prefix-sid-flag;
               }



Qu, et al.              Expires 10 November 2025               [Page 16]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


               description
                 "Prefix SID sub-TLV flags.";
             }
             description
               "Segment Identifier (SID) Flags.";
           }
           leaf algorithm {
             type identityref {
               base sr-cmn:prefix-sid-algorithm;
             }
             description
               "Algorithm associated with the prefix-SID.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping ospfv3-extended-prefix-range-tlvs {
       description
         "OSPFv3 Extended prefix range TLV grouping.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 5)";
       container ospfv3-extended-prefix-range-tlvs {
         description
           "List of extended prefix range TLVs.";
         list extended-prefix-range-tlv {
           description
             "Range of prefixes.";
           leaf prefix-length {
             type uint8;
             description
               "Length of prefix in bits.";
           }
           leaf af {
             type iana-rt-types:address-family;
             description
               "Address family for the prefix.";
           }
           leaf range-size {
             type uint16;
             description
               "Number of prefixes covered by the advertisement.
                The return of a value of zero would indicate an error.";
           }
           leaf prefix {
             type inet:ip-prefix;



Qu, et al.              Expires 10 November 2025               [Page 17]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


             description
               "IPv4 or IPv6 prefix.";
           }
           uses ospfv3-prefix-sid-sub-tlvs;
           uses ospf:unknown-tlvs;
         }
       }
     }

     grouping ospfv3-adj-sid-sub-tlvs {
       description
         "OSPFv3 Adj-SID sub-TLV grouping.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 7)";
       container adj-sid-sub-tlvs {
         description
           "Adj-SID optional sub-TLVs.";
         list adj-sid-sub-tlv {
           description
             "List of Adj-SID sub-TLVs.";
           container adj-sid-flags {
             leaf-list flag {
               type identityref {
                 base adj-sid-flag;
               }
               description
                 "Adj-SID sub-tlv flags.";
             }
             description
               "Adj-sid sub-tlv flags.";
           }
           leaf weight {
             type uint8;
             description
               "Weight used for load-balancing.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     grouping ospfv3-lan-adj-sid-sub-tlvs {
       description
         "OSPFv3 LAN Adj-SID sub-TLV grouping.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 7)";



Qu, et al.              Expires 10 November 2025               [Page 18]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


       container lan-adj-sid-sub-tlvs {
         description
           "LAN Adj-SID optional sub-TLVs.";
         list lan-adj-sid-sub-tlv {
           description
             "List of LAN Adj-SID sub-TLVs.";
           container lan-adj-sid-flags {
             leaf-list flag {
               type identityref {
                 base adj-sid-flag;
               }
               description
                 "LAN Adj-SID sub-TLV flags.";
             }
             description
               "LAN Adj-SID sub-TLV flags.";
           }
           leaf weight {
             type uint8;
             description
               "Weight used for load-balancing.";
           }
           leaf neighbor-router-id {
             type rt-types:router-id;
             description
               "Neighbor router ID.";
           }
           uses sid-tlv-encoding;
         }
       }
     }

     /*
      * Augmentations for OSPF SR MPLS Configuration (read-write)
      * data nodes.
      */

     augment "/rt:routing/rt:control-plane-protocols"
           + "/rt:control-plane-protocol/ospf:ospf" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol when used.";
       }
       description
         "This augments the OSPF protocol configuration with segment
          routing over the MPLS data plane. The following semantic
          validation be performed for the configuration data:



Qu, et al.              Expires 10 November 2025               [Page 19]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           - Assure the binding policies prefixes do not overlapp.";
       reference
         "RFC 9020 - YANG Data Model for Segment Routing";
       uses sr-mpls:sr-control-plane;
       container protocol-srgb {
         if-feature "sr-mpls:protocol-srgb";
         uses sr-cmn:srgb;
         description
           "Per-protocol SRGB.";
       }
     }

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf') and "
          + "/rt:routing/rt:control-plane-protocols"
          + "/rt:control-plane-protocol/ospf:ospf"
          + "/ospf-sr-mpls:segment-routing/"
          + "ospf-sr-mpls:enabled = 'true'" {
         description
           "This augments the OSPF area configuration when segment
            routing is enabled at the OSPF instance level.";
       }
       container segment-routing {
         presence "When present segment routing over MPLS is enabled
                   for the area.";
         description
           "OSPF area level segment routing configuration. Enable
            segment routing over MPLS on all interfaces and enables
            advertisement of Link State Advertisements (LSAs) and TLVs
            supporting segment routing over MPLS";
       }
       description
         "This augments the OSPF protocol area configuration with
          segment routing.";
     }

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf') and "
          + "/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/ospf:ospf/"
          + "ospf:areas/ospf:area/ospf-sr-mpls:segment-routing" {
         description



Qu, et al.              Expires 10 November 2025               [Page 20]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           "This augments the OSPF interface configuration when used.";
       }
       description
         "This augments the OSPF protocol interface
          configuration with segment routing.";
       reference
         "RFC 9020 - YANG Data Model for Segment Routing";
       uses sr-mpls:igp-interface {
         augment "segment-routing/adjacency-sid/adj-sids" {
           when "((../../../ospf:interface-type = 'broadcast') or
                 (../../../ospf:interface-type = 'non-broadcast'))" {
             description
               "This augments broadcast and non-broadcast multi-access
                interface segment routing interface configuration.";
           }
           description
             "This augments LAN interface adj-sid with neighbor-id.";
           leaf neighbor-id {
             type inet:ip-address;
             mandatory true;
             description
               "Neighbor's Router ID, IPv4 address, or IPv6 address.
                Specification is optional and, if specified, SHOULD
                specify a neighbor reachable via the interface.";
           }
         }
       }
     }

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface/"
           + "ospf:fast-reroute/ospf:lfa" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol when used.";
       }
       description
         "This augments the OSPF protocol IP-FRR with TI-LFA.";
       container ti-lfa {
         if-feature "ti-lfa";
         description
           "Topology-Independent Loop Free Alternate
            (TI-LFA) support.";
         reference
           "draft-ietf-rtgwg-segment-routing-ti-lfa:
            Topology-Independent Fast Reroute using Segment Routing";



Qu, et al.              Expires 10 November 2025               [Page 21]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         leaf enabled {
           type boolean;
           default "false";
           description
             "Enable TI-LFA computation.";
         }
         container selection-tie-breakers {
           container node-protection {
             presence "Presence of container enables the node
                       protection tie-breaker.";
             leaf priority {
               type uint8;
               default "128";
               description
                 "Priority for node protection tie-breaker with
                  a lower priority being more preferred. By default,
                  the priority is in the middle of the priority range.";
             }
             description
               "Enable node protection as a TI-LFA path
                selection tie-breaker. A path providing node
                protection will be selected over one that
                doesn't provide node protection.";
           }
           container srlg-disjoint {
             presence "Presence of container enables the SRLG
                       disjoint tie-breaker";
             leaf priority {
               type uint8;
               default "128";
               description
                 "Priority for SRLG disjoint tie-breaker with
                  a lower priority being more preferred. By default,
                  the priority is in the middle of the priority range.";
             }
             description
               "Enable SRLG (Sharsed Resource Link Group)
                disjoint as a TI-LFA path selection tie-breaker.
                A path providing node a disjoint path for SRLG
                links from the primary path will be selected over
                one that doesn't provide an SRLG disjoint path.";
           }
           description
             "Configure path selection tie-breakers and their
              respective priorities for the TI-LFA computation.
              multiple tie-breakers and priorities configured may
              be configured.";
         }



Qu, et al.              Expires 10 November 2025               [Page 22]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


       }
     }

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface/"
           + "ospf:fast-reroute/ospf:lfa/ospf:remote-lfa" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol when used.";
       }
       description
         "This augments the OSPF protocol IP-FRR with remote LFA.";
       reference
         "draft-ietf-rtgwg-segment-routing-ti-lfa:
          Topology-Independent Fast Reroute using Segment Routing";
       leaf use-segment-routing-path {
         if-feature "remote-lfa-sr";
         type boolean;
         default "false";
         description
           "Force remote LFA to use segment routing path instead of LDP
            path. The value of this leaf is in effect only when
            remote-lfa is enabled.";
       }
     }

     /* Operational states */

     augment "/rt:routing/rt:control-plane-protocols/"
           + "rt:control-plane-protocol/ospf:ospf/"
           + "ospf:areas/ospf:area/ospf:interfaces/ospf:interface/"
           + "ospf:neighbors/ospf:neighbor" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospf')" {
         description
           "This augments the OSPF routing protocol when used.";
       }
       description
         "This augments OSPF interface adjancency-sid state.";
       list adjacency-sid {
         description
           "List of adjacency Segment IDs.";
         leaf value {
           type uint32;
           description
             "Value of the Adj-SID.";



Qu, et al.              Expires 10 November 2025               [Page 23]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         }
         leaf weight {
           type uint8;
           description
             "Weight associated with the adjacency SID.";
         }
         leaf protection-requested {
           type boolean;
           description
             "Describe if the adjacency SID is protected.";
         }
       }
     }

     /*
      * Augmentations for read-only data nodes corresponding to Segment
      * Routing encodings in OSPFv2 and OSPFv3 Link State Advertisements
      * (LSAs) in OSPF Link State Databases (LSDBs) at the instance,
      * area, and interface level.
      */
     /* Augmentations for OSPFv2 LSAs. */

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/"
           + "ospf:extended-prefix-opaque" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR Extended Prefix Range TLV in OSPFv2 Type 10 (area-scoped)
          Extended Prefix Opaque LSAs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 4)";
       uses ospfv2-extended-prefix-range-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"



Qu, et al.              Expires 10 November 2025               [Page 24]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/"
           + "ospf:extended-prefix-opaque" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR Extended Prefix Range TLV in OSPFv2 Type 11 (AS-scoped)
          Extended Prefix Opaque LSAs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
          (Section 4)";
       uses ospfv2-extended-prefix-range-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/"
           + "ospf:extended-prefix-opaque/ospf:extended-prefix-tlv" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR Prefix-SID sub-TLVs for OSPFv2 Extended Prefix TLVs
          in OSPFv2 Type 10 (area-scoped) Extended Prefix Opaque LSAs.";
       uses ospfv2-prefix-sid-sub-tlvs;
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 5)";
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/"
           + "ospf:extended-prefix-opaque/ospf:extended-prefix-tlv" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {



Qu, et al.              Expires 10 November 2025               [Page 25]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR Prefix-SID sub-TLVs for OSPFv2 Extended Prefix TLVs
          in OSPFv2 Type 11 (AS-scoped) Extended Prefix Opaque LSAs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 5)";
       uses ospfv2-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/"
           + "ospf:extended-link-opaque/ospf:extended-link-tlv" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR TLVs for OSPFv2 Extended Link TLV in OSPFv2 Type 10
          (area-scoped) Extended Link Opaque LSAs.";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 6)";
       uses ospfv2-adj-sid-sub-tlvs;
       uses ospfv2-lan-adj-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/ospf:ri-opaque" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description



Qu, et al.              Expires 10 November 2025               [Page 26]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "SR TLVs for OSPFv2 Router Information Type 10 (area-scoped)
          Opaque LSAs";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 3)";
       uses sr-algorithm-tlv;
       uses sid-range-tlvs;
       uses local-block-tlvs;
       uses srms-preference-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv2/"
           + "ospf:ospfv2/ospf:body/ospf:opaque/ospf:ri-opaque" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv2')" {
         description
           "This augmentation is only valid for OSPFv2.";
       }
       description
         "SR TLVs for OSPFv2 Router Information Type 11 (AS-scoped)
          Opaque LSAs";
       reference
         "RFC 8665: OSPF Extensions for Segment Routing
           (Section 3)";
       uses sr-algorithm-tlv;
       uses sid-range-tlvs;
       uses local-block-tlvs;
       uses srms-preference-tlv;
     }

     /* Augmentations for OSPFv3 LSAs. */

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospf:router-information" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description



Qu, et al.              Expires 10 November 2025               [Page 27]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "SR-specific TLVs for OSPFv3 Router Information LSA
          (area-scoped).";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 4)";
       uses sr-algorithm-tlv;
       uses sid-range-tlvs;
       uses local-block-tlvs;
       uses srms-preference-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/"
           + "ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospf:router-information" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR-specific TLVs for OSPFv3 Router Information LSA
          (AS-scoped).";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 4)";
       uses sr-algorithm-tlv;
       uses sid-range-tlvs;
       uses local-block-tlvs;
       uses srms-preference-tlv;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-intra-area-prefix" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       uses ospfv3-extended-prefix-range-tlvs;
       description



Qu, et al.              Expires 10 November 2025               [Page 28]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         "SR Extended Prefix Range TLVs in OSPFv3
          E-Intra-Area-Prefix LSAs.";
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-inter-area-prefix" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Extended Prefix Range TLVs in OSPFv3
          E-Inter-Area-Prefix LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 5)";
       uses ospfv3-extended-prefix-range-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-as-external" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Extended Prefix Range TLVs in OSPFv3 E-AS-External LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 5)";
       uses ospfv3-extended-prefix-range-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"



Qu, et al.              Expires 10 November 2025               [Page 29]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Extended Prefix Range TLVs in OSPFv3 E-NSSA LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 5)";
       uses ospfv3-extended-prefix-range-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/"
           + "ospf:interface/"
           + "ospf:database/ospf:link-scope-lsa-type/"
           + "ospf:link-scope-lsas/ospf:link-scope-lsa/"
           + "ospf:version/ospf:ospfv3/ospf:ospfv3/"
           + "ospf:body/ospfv3-e-lsa:e-link/"
           + "ospfv3-e-lsa:e-link-tlvs/ospfv3-e-lsa:intra-prefix-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Prefix-SID Sub-TLV in OSPFv3 Intra-Area
          Prefix TLV for OSPFv3 E-Link LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       uses ospfv3-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-intra-area-prefix/"
           + "ospfv3-e-lsa:e-intra-prefix-tlvs/"
           + "ospfv3-e-lsa:intra-prefix-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"



Qu, et al.              Expires 10 November 2025               [Page 30]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3
            E-Router LSAs";
       }
       description
         "SR Prefix-SID Sub-TLV in OSPFv3 Intra-Area
          Prefix TLV for OSPFv3 E-Intra-Area-Prefix LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       uses ospfv3-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-inter-area-prefix/"
           + "ospfv3-e-lsa:e-inter-prefix-tlvs/"
           + "ospfv3-e-lsa:inter-prefix-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Prefix-SID Sub-TLV in OSPFv3 Link-Scoped Intra-Area
          Prefix TLV for OSPFv3 E-Inter-Area-Prefix LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       uses ospfv3-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:database/"
           + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/"
           + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-as-external/"
           + "ospfv3-e-lsa:e-external-tlvs/"
           + "ospfv3-e-lsa:external-prefix-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {



Qu, et al.              Expires 10 November 2025               [Page 31]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Prefix-SID Sub-TLV in OSPFv3 External Prefix TLV
          for OSPFv3 E-AS-External LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       uses ospfv3-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa/"
           + "ospfv3-e-lsa:e-external-tlvs/"
           + "ospfv3-e-lsa:external-prefix-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3.";
       }
       description
         "SR Prefix-SID Sub-TLV in OSPFv3 External Prefix TLV
          for OSPFv3 E-NSSA LSAs.";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 6)";
       uses ospfv3-prefix-sid-sub-tlvs;
     }

     augment "/rt:routing/"
           + "rt:control-plane-protocols/rt:control-plane-protocol/"
           + "ospf:ospf/ospf:areas/ospf:area/ospf:database/"
           + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/"
           + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/"
           + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router/"
           + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv/"
           + "ospfv3-e-lsa:sub-tlvs" {
       when "derived-from(/rt:routing/rt:control-plane-protocols/"
          + "rt:control-plane-protocol/rt:type, 'ospf:ospfv3')" {
         description
           "This augmentation is only valid for OSPFv3
            E-Router LSAs";



Qu, et al.              Expires 10 November 2025               [Page 32]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


       }
       description
         "SR Sub-TLVs in OSPFv3 link-tlv for OSPFv3 E-Router LSAs";
       reference
         "RFC 8666: OSPFv3 Extensions for Segment Routing
          (Section 7)";
       uses ospfv3-adj-sid-sub-tlvs;
       uses ospfv3-lan-adj-sid-sub-tlvs;
     }
   }
   <CODE ENDS>

                                  Figure 1

4.  Security Considerations

   The ietf-ospf-sr-mpls YANG module defines a data model that is
   designed to be accessed via YANG-based management protocols, such as
   NETCONF [RFC6241] and RESTCONF [RFC8040].  These protocols have to
   use a secure transport layer (e.g., SSH [RFC4252], TLS [RFC8446], and
   QUIC [RFC9000]) and have to use mutual authentication.

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., "config true", which is the
   default).  All writable data nodes are likely to be reasonably
   sensitive or vulnerable in some network environments.  Write
   operations (e.g., edit-config) and delete operations to these data
   nodes without proper protection or authentication can have a negative
   effect on network operations.  The following subtrees and data nodes
   have particular sensitivities/vulnerabilities:

      /ospf:ospf/segment-routing/enabled - Modification to the
      enablement for SR could result in a Denial-of-Service (DoS)
      attack.  If an attacker disables SR, it will cause traffic
      disruption.

      /ospf:ospf/segment-routing/bindings - Modification to the local
      bindings could result in a Denial-of-Service (DoS) attack.

      /ospf:ospf/protocol-srgb - Modification of the protocol SRGB could
      be used to mount a DoS attack.  For example, if the protocol SRBG
      size is reduced to a very small value, a lot of existing segments
      could no longer be installed leading to a traffic disruption.



Qu, et al.              Expires 10 November 2025               [Page 33]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


      /ospf:interfaces/ospf:interface/segment-routing - Modification of
      the Adjacency Segment Identifier (Adj-SID) could be used to mount
      a DoS attack.  Change of an Adj-SID could be used to redirect
      traffic.

      /ospf:interfaces/ospf:interface/ospf:fast-reroute/ti-lfa -
      Modification of the TI-LFA enablement could lead to traffic
      disruption.

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  Specifically, the following
   subtrees and data nodes have particular sensitivities/
   vulnerabilities:

      The module ietf-ospf-sr-mpls augments base OSPF module Link State
      Database (LSDB) with various TLVs.  Knowledge of these data nodes
      can be used to attack other routers in the OSPF domain.  These
      attacks are documented in [RFC9129].

      Knowledge of the Prefix and Adjacency SIDs advertised in LSAs
      could facilitate a targeted attack on the data-plane by knowing
      the topology and path for MPLS segment-routed packets.  Examples
      include the OSPFv2 extended-prefix-opaque-LSA/prefix-sid-sub-tlvs
      and OSPFv3 e-router-tlvs/link-tlv/sub-tlvs/ospfv3-lan-adj-sid-sub-
      tlvs.

      Knowledge of Prefix and Adjaceny SIDs may also divulge a view of
      the segment routing network topology architecture which may be
      considered a proprietary asset.

      Knowledge of the advertised SID/Label Range TLVs, SR Local Block
      TLVs and Segment Routing Mapping Server (SRMS) TLVs may facilitate
      a Denial of Service (DoS) attack on the advertising node's SR and
      SRMS functionality.  Examples include augmentations to the OSPFv2
      ri-opaque/sid-range-tlvs and OSPFv3 router-information/local-
      block-tlvs.

   This YANG module uses groupings from other YANG modules that define
   nodes that may be considered sensitive or vulnerable in network
   environments.  Refer to the Security Considerations of [RFC9020] for
   information as to which nodes may be considered sensitive or
   vulnerable in network environments.







Qu, et al.              Expires 10 November 2025               [Page 34]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


5.  Acknowledgements

   The authors wish to thank Dean Bogdanovic and Kiran Koushik Agrahara
   Sreenivasa for their YANG module discussions.

   The authors wish to thank Yi Yang, Alexander Clemm, Gaurav Gupta,
   Ladislav Lhotka, Stephane Litkowski, Greg Hankins, Manish Gupta, Alan
   Davey, Divakaran Baskaran, Reshad Rahman, Tom Petch, and Corey
   Bonnell for their thorough reviews and helpful comments.

   The authors wish to thank Julien Meuric for a very meticulous Routing
   Directorate review.

   The authors wish to thank Mohamed Boucadair and Ketan Talaulikar for
   extensive AD reviews for the IESG Telechat.  Thanks to Eric Vyncke
   and Mahesh Jethanandani for review comments.

   Author affiliation with The MITRE Corporation is provided for
   identification purposes only, and is not intended to convey or imply
   MITRE's concurrence with, or support for, the positions, opinions or
   viewpoints expressed.  MITRE has agreed to this document for Public
   Release, Distribution Unlimited, with Public Release Case Number
   18-3281.  This approval allows the MITRE employee to release
   contributions externally and does not assert authority to publish.

6.  IANA Considerations

   This document registers a URI in the IETF XML registry [RFC3688].
   Following the format in [RFC3688], the following registration is
   requested to be made:

         URI: urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls
         Registrant Contact: The IESG.
         XML: N/A, the requested URI is an XML namespace.

   This document registers a YANG module in the YANG Module Names
   registry [RFC6020].

         name: ietf-ospf-sr-mpls
         namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls
         prefix: ospf-sr-mpls
         maintained by IANA? N
         reference: RFC XXXX

7.  References

7.1.  Normative References




Qu, et al.              Expires 10 November 2025               [Page 35]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   [I-D.ietf-rtgwg-segment-routing-ti-lfa]
              Bashandy, A., Litkowski, S., Filsfils, C., Francois, P.,
              Decraene, B., and D. Voyer, "Topology Independent Fast
              Reroute using Segment Routing", Work in Progress,
              Internet-Draft, draft-ietf-rtgwg-segment-routing-ti-lfa-
              21, 12 February 2025,
              <https://datatracker.ietf.org/doc/html/draft-ietf-rtgwg-
              segment-routing-ti-lfa-21>.

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

   [RFC2328]  Moy, J., "OSPF Version 2", STD 54, RFC 2328,
              DOI 10.17487/RFC2328, April 1998,
              <https://www.rfc-editor.org/info/rfc2328>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC4915]  Psenak, P., Mirtorabi, S., Roy, A., Nguyen, L., and P.
              Pillay-Esnault, "Multi-Topology (MT) Routing in OSPF",
              RFC 4915, DOI 10.17487/RFC4915, June 2007,
              <https://www.rfc-editor.org/info/rfc4915>.

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

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <https://www.rfc-editor.org/info/rfc6020>.

   [RFC6991]  Schoenwaelder, J., Ed., "Common YANG Data Types",
              RFC 6991, DOI 10.17487/RFC6991, July 2013,
              <https://www.rfc-editor.org/info/rfc6991>.

   [RFC7684]  Psenak, P., Gredler, H., Shakir, R., Henderickx, W.,
              Tantsura, J., and A. Lindem, "OSPFv2 Prefix/Link Attribute
              Advertisement", RFC 7684, DOI 10.17487/RFC7684, November
              2015, <https://www.rfc-editor.org/info/rfc7684>.







Qu, et al.              Expires 10 November 2025               [Page 36]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


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

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

   [RFC8102]  Sarkar, P., Ed., Hegde, S., Bowers, C., Gredler, H., and
              S. Litkowski, "Remote-LFA Node Protection and
              Manageability", RFC 8102, DOI 10.17487/RFC8102, March
              2017, <https://www.rfc-editor.org/info/rfc8102>.

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

   [RFC8294]  Liu, X., Qu, Y., Lindem, A., Hopps, C., and L. Berger,
              "Common YANG Data Types for the Routing Area", RFC 8294,
              DOI 10.17487/RFC8294, December 2017,
              <https://www.rfc-editor.org/info/rfc8294>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8349]  Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
              Routing Management (NMDA Version)", RFC 8349,
              DOI 10.17487/RFC8349, March 2018,
              <https://www.rfc-editor.org/info/rfc8349>.

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

   [RFC8665]  Psenak, P., Ed., Previdi, S., Ed., Filsfils, 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>.

   [RFC8666]  Psenak, P., Ed. and S. Previdi, Ed., "OSPFv3 Extensions
              for Segment Routing", RFC 8666, DOI 10.17487/RFC8666,
              December 2019, <https://www.rfc-editor.org/info/rfc8666>.




Qu, et al.              Expires 10 November 2025               [Page 37]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   [RFC9020]  Litkowski, S., Qu, Y., Lindem, A., Sarkar, P., and J.
              Tantsura, "YANG Data Model for Segment Routing", RFC 9020,
              DOI 10.17487/RFC9020, May 2021,
              <https://www.rfc-editor.org/info/rfc9020>.

   [RFC9129]  Yeung, D., Qu, Y., Zhang, Z., Chen, I., and A. Lindem,
              "YANG Data Model for the OSPF Protocol", RFC 9129,
              DOI 10.17487/RFC9129, October 2022,
              <https://www.rfc-editor.org/info/rfc9129>.

   [RFC9587]  Lindem, A., Palani, S., and Y. Qu, "YANG Data Model for
              OSPFv3 Extended Link State Advertisements (LSAs)",
              RFC 9587, DOI 10.17487/RFC9587, June 2024,
              <https://www.rfc-editor.org/info/rfc9587>.

7.2.  Informative References

   [RFC4252]  Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
              Authentication Protocol", RFC 4252, DOI 10.17487/RFC4252,
              January 2006, <https://www.rfc-editor.org/info/rfc4252>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC8342]  Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
              and R. Wilton, "Network Management Datastore Architecture
              (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018,
              <https://www.rfc-editor.org/info/rfc8342>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8792]  Watsen, K., Auerswald, E., Farrel, A., and Q. Wu,
              "Handling Long Lines in Content of Internet-Drafts and
              RFCs", RFC 8792, DOI 10.17487/RFC8792, June 2020,
              <https://www.rfc-editor.org/info/rfc8792>.




Qu, et al.              Expires 10 November 2025               [Page 38]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   [RFC9000]  Iyengar, J., Ed. and M. Thomson, Ed., "QUIC: A UDP-Based
              Multiplexed and Secure Transport", RFC 9000,
              DOI 10.17487/RFC9000, May 2021,
              <https://www.rfc-editor.org/info/rfc9000>.

Appendix A.  A Configuration Example

   The following is an XML example using the ietf-ospf-sr-mpls YANG
   module, and RFC 9020.

   Note: '\' line wrapping per [RFC8792].








































Qu, et al.              Expires 10 November 2025               [Page 39]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   <?xml version='1.0' encoding='UTF-8'?>
     <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
       <router-id>1.1.1.1</router-id>
       <control-plane-protocols>
         <control-plane-protocol>
           <type xmlns:ospf="urn:ietf:params:xml:ns:yang:ietf-ospf">\
             ospf:ospfv2</type>
           <name>OSPFv2</name>
           <ospf xmlns="urn:ietf:params:xml:ns:yang:ietf-ospf">
             <areas>
               <area>
                 <area-id>0.0.0.0</area-id>
                 <segment-routing xmlns="urn:ietf:params:xml:ns:yang:\
                   ietf-ospf-sr-mpls"></segment-routing>
                 <interfaces>
                   <interface>
                     <name>eth0</name>
                     <segment-routing xmlns="urn:ietf:params:xml:ns:\
                       yang:ietf-ospf-sr-mpls">
                       <adjacency-sid>
                         <adj-sids>
                           <value>3888</value>
                         </adj-sids>
                       </adjacency-sid>
                     </segment-routing>
                   </interface>
                 </interfaces>
               </area>
             </areas>
             <segment-routing xmlns="urn:ietf:params:xml:ns:yang:\
               ietf-ospf-sr-mpls">
               <enabled>true</enabled>
             </segment-routing>
             <protocol-srgb xmlns="urn:ietf:params:xml:ns:yang:\
               ietf-ospf-sr-mpls">
               <srgb>
                 <lower-bound>4000</lower-bound>
                 <upper-bound>5000</upper-bound>
               </srgb>
             </protocol-srgb>
           </ospf>
         </control-plane-protocol>
       </control-plane-protocols>
     </routing>

   The following is the same example using JSON format.





Qu, et al.              Expires 10 November 2025               [Page 40]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   {
     "ietf-routing:routing": {
       "router-id": "1.1.1.1",
       "control-plane-protocols": {
         "control-plane-protocol": [
           {
             "type": "ietf-ospf:ospfv2",
             "name": "OSPFv2",
             "ietf-ospf:ospf": {
               "areas": {
                 "area": [
                   {
                     "area-id": "0.0.0.0",
                     "interfaces": {
                       "interface": [
                         {
                           "name": "eth0",
                           "ietf-ospf-sr-mpls:segment-routing": {
                             "adjacency-sid": {
                               "adj-sids": [
                                 {
                                   "value": 3888
                                 }
                               ]
                             }
                           }
                         }
                       ]
                     },
                     "ietf-ospf-sr-mpls:segment-routing": {}
                   }
                 ]
               },
               "ietf-ospf-sr-mpls:segment-routing": {
                 "enabled": true
               },
               "ietf-ospf-sr-mpls:protocol-srgb": {
                 "srgb": [
                   {
                     "lower-bound": 4000,
                     "upper-bound": 5000
                   }
                 ]
               }
             }
           }
         ]
       }



Qu, et al.              Expires 10 November 2025               [Page 41]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     }
   }

Appendix B.  Full Tree Diagram

   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf:
     +--rw segment-routing
     |  +--rw enabled?    boolean
     |  +--rw bindings {mapping-server}?
     |     +--rw advertise
     |     |  +--rw policies*   leafref
     |     +--rw receive?     boolean
     +--rw protocol-srgb {sr-mpls:protocol-srgb}?
        +--rw srgb* [lower-bound upper-bound]
           +--rw lower-bound    uint32
           +--rw upper-bound    uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area:
     +--rw segment-routing!
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:interfaces/ospf:interface:
     +--rw segment-routing
        +--rw adjacency-sid
           +--rw adj-sids* [value]
           |  +--rw value-type?    enumeration
           |  +--rw value          uint32
           |  +--rw protected?     boolean
           |  +--rw weight?        uint8
           |  +--rw neighbor-id    inet:ip-address
           +--rw advertise-adj-group-sid* [group-id]
           |  +--rw group-id    uint32
           +--rw advertise-protection?      enumeration
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:interfaces/ospf:interface
             /ospf:fast-reroute/ospf:lfa:
     +--rw ti-lfa {ti-lfa}?
        +--rw enabled?                  boolean
        +--rw selection-tie-breakers
           +--rw node-protection!
           |  +--rw priority?   uint8
           +--rw srlg-disjoint!
              +--rw priority?   uint8
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas



Qu, et al.              Expires 10 November 2025               [Page 42]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


             /ospf:area/ospf:interfaces/ospf:interface
             /ospf:fast-reroute/ospf:lfa/ospf:remote-lfa:
     +--rw use-segment-routing-path?   boolean {remote-lfa-sr}?
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:interfaces/ospf:interface/ospf:neighbors
             /ospf:neighbor:
     +--ro adjacency-sid* []
        +--ro value?                  uint32
        +--ro weight?                 uint8
        +--ro protection-requested?   boolean
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque
             /ospf:extended-prefix-opaque:
     +--ro extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?                 uint8
           +--ro af?
           |       iana-rt-types:address-family
           +--ro range-size?                    uint16
           +--ro extended-prefix-range-flags
           |  +--ro flag*   identityref
           +--ro prefix?                        inet:ipv4-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro mt-id?               uint8
           |     +--ro algorithm?           identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?   uint32
           |        +--:(sid-index)
           |           +--ro index-value?   uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2
             /ospf:body/ospf:opaque/ospf:extended-prefix-opaque:
     +--ro extended-prefix-range-tlvs



Qu, et al.              Expires 10 November 2025               [Page 43]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?                 uint8
           +--ro af?
           |       iana-rt-types:address-family
           +--ro range-size?                    uint16
           +--ro extended-prefix-range-flags
           |  +--ro flag*   identityref
           +--ro prefix?                        inet:ipv4-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro mt-id?               uint8
           |     +--ro algorithm?           identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?   uint32
           |        +--:(sid-index)
           |           +--ro index-value?   uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque
             /ospf:extended-prefix-opaque/ospf:extended-prefix-tlv:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro mt-id?               uint8
           +--ro algorithm?           identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?   uint32
              +--:(sid-index)
                 +--ro index-value?   uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2
             /ospf:body/ospf:opaque/ospf:extended-prefix-opaque
             /ospf:extended-prefix-tlv:
     +--ro prefix-sid-sub-tlvs



Qu, et al.              Expires 10 November 2025               [Page 44]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


        +--ro prefix-sid-sub-tlv* []
           +--ro prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro mt-id?               uint8
           +--ro algorithm?           identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?   uint32
              +--:(sid-index)
                 +--ro index-value?   uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque
             /ospf:extended-link-opaque/ospf:extended-link-tlv:
     +--ro adj-sid-sub-tlvs
     |  +--ro adj-sid-sub-tlv* []
     |     +--ro adj-sid-flags
     |     |  +--ro flag*   identityref
     |     +--ro mt-id?               uint8
     |     +--ro weight?              uint8
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro lan-adj-sid-sub-tlvs
        +--ro lan-adj-sid-sub-tlv* []
           +--ro lan-adj-sid-flags
           |  +--ro flag*   identityref
           +--ro mt-id?                uint8
           +--ro weight?               uint8
           +--ro neighbor-router-id?   rt-types:router-id
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?    uint32
              +--:(sid-index)
                 +--ro index-value?    uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv2/ospf:ospfv2/ospf:body/ospf:opaque
             /ospf:ri-opaque:
     +--ro sr-algorithm-tlv
     |  +--ro sr-algorithm*   identityref
     +--ro sid-range-tlvs



Qu, et al.              Expires 10 November 2025               [Page 45]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     |  +--ro sid-range-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro srms-preference-tlv
        +--ro preference?   uint8
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv2/ospf:ospfv2
             /ospf:body/ospf:opaque/ospf:ri-opaque:
     +--ro sr-algorithm-tlv
     |  +--ro sr-algorithm*   identityref
     +--ro sid-range-tlvs
     |  +--ro sid-range-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro srms-preference-tlv
        +--ro preference?   uint8
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
             /ospf:body/ospf:router-information:
     +--ro sr-algorithm-tlv



Qu, et al.              Expires 10 November 2025               [Page 46]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


     |  +--ro sr-algorithm*   identityref
     +--ro sid-range-tlvs
     |  +--ro sid-range-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro srms-preference-tlv
        +--ro preference?   uint8
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body
             /ospf:router-information:
     +--ro sr-algorithm-tlv
     |  +--ro sr-algorithm*   identityref
     +--ro sid-range-tlvs
     |  +--ro sid-range-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?          rt-types:uint24
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro srms-preference-tlv
        +--ro preference?   uint8
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type



Qu, et al.              Expires 10 November 2025               [Page 47]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body
             /ospfv3-e-lsa:e-intra-area-prefix:
     +--ro ospfv3-extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?         uint8
           +--ro af?                    iana-rt-types:address-family
           +--ro range-size?            uint16
           +--ro prefix?                inet:ip-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro ospfv3-prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro algorithm?                 identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?         uint32
           |        +--:(sid-index)
           |           +--ro index-value?         uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body
             /ospfv3-e-lsa:e-inter-area-prefix:
     +--ro ospfv3-extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?         uint8
           +--ro af?                    iana-rt-types:address-family
           +--ro range-size?            uint16
           +--ro prefix?                inet:ip-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro ospfv3-prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro algorithm?                 identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?         uint32
           |        +--:(sid-index)
           |           +--ro index-value?         uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []



Qu, et al.              Expires 10 November 2025               [Page 48]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
             /ospf:body/ospfv3-e-lsa:e-as-external:
     +--ro ospfv3-extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?         uint8
           +--ro af?                    iana-rt-types:address-family
           +--ro range-size?            uint16
           +--ro prefix?                inet:ip-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro ospfv3-prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro algorithm?                 identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?         uint32
           |        +--:(sid-index)
           |           +--ro index-value?         uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa:
     +--ro ospfv3-extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?         uint8
           +--ro af?                    iana-rt-types:address-family
           +--ro range-size?            uint16
           +--ro prefix?                inet:ip-prefix
           +--ro prefix-sid-sub-tlvs
           |  +--ro prefix-sid-sub-tlv* []
           |     +--ro ospfv3-prefix-sid-flags
           |     |  +--ro flag*   identityref
           |     +--ro algorithm?                 identityref
           |     +--ro (sid)?
           |        +--:(sid-label)
           |        |  +--ro label-value?         uint32



Qu, et al.              Expires 10 November 2025               [Page 49]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


           |        +--:(sid-index)
           |           +--ro index-value?         uint32
           +--ro unknown-tlvs
              +--ro unknown-tlv* []
                 +--ro type?     uint16
                 +--ro length?   uint16
                 +--ro value?    yang:hex-string
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:interfaces/ospf:interface/ospf:database
             /ospf:link-scope-lsa-type/ospf:link-scope-lsas
             /ospf:link-scope-lsa/ospf:version/ospf:ospfv3
             /ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-link
             /ospfv3-e-lsa:e-link-tlvs/ospfv3-e-lsa:intra-prefix-tlv
             /ospfv3-e-lsa:sub-tlvs:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro ospfv3-prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro algorithm?                 identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?         uint32
              +--:(sid-index)
                 +--ro index-value?         uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body
             /ospfv3-e-lsa:e-intra-area-prefix
             /ospfv3-e-lsa:e-intra-prefix-tlvs
             /ospfv3-e-lsa:intra-prefix-tlv/ospfv3-e-lsa:sub-tlvs:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro ospfv3-prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro algorithm?                 identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?         uint32
              +--:(sid-index)
                 +--ro index-value?         uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body



Qu, et al.              Expires 10 November 2025               [Page 50]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


             /ospfv3-e-lsa:e-inter-area-prefix
             /ospfv3-e-lsa:e-inter-prefix-tlvs
             /ospfv3-e-lsa:inter-prefix-tlv/ospfv3-e-lsa:sub-tlvs:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro ospfv3-prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro algorithm?                 identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?         uint32
              +--:(sid-index)
                 +--ro index-value?         uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:database
             /ospf:as-scope-lsa-type/ospf:as-scope-lsas
             /ospf:as-scope-lsa/ospf:version/ospf:ospfv3/ospf:ospfv3
             /ospf:body/ospfv3-e-lsa:e-as-external
             /ospfv3-e-lsa:e-external-tlvs
             /ospfv3-e-lsa:external-prefix-tlv/ospfv3-e-lsa:sub-tlvs:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro ospfv3-prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro algorithm?                 identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?         uint32
              +--:(sid-index)
                 +--ro index-value?         uint32
   augment /rt:routing/rt:control-plane-protocols
             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-nssa
             /ospfv3-e-lsa:e-external-tlvs
             /ospfv3-e-lsa:external-prefix-tlv/ospfv3-e-lsa:sub-tlvs:
     +--ro prefix-sid-sub-tlvs
        +--ro prefix-sid-sub-tlv* []
           +--ro ospfv3-prefix-sid-flags
           |  +--ro flag*   identityref
           +--ro algorithm?                 identityref
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?         uint32
              +--:(sid-index)
                 +--ro index-value?         uint32
   augment /rt:routing/rt:control-plane-protocols



Qu, et al.              Expires 10 November 2025               [Page 51]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


             /rt:control-plane-protocol/ospf:ospf/ospf:areas
             /ospf:area/ospf:database/ospf:area-scope-lsa-type
             /ospf:area-scope-lsas/ospf:area-scope-lsa/ospf:version
             /ospf:ospfv3/ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-router
             /ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv
             /ospfv3-e-lsa:sub-tlvs:
     +--ro adj-sid-sub-tlvs
     |  +--ro adj-sid-sub-tlv* []
     |     +--ro adj-sid-flags
     |     |  +--ro flag*   identityref
     |     +--ro weight?              uint8
     |     +--ro (sid)?
     |        +--:(sid-label)
     |        |  +--ro label-value?   uint32
     |        +--:(sid-index)
     |           +--ro index-value?   uint32
     +--ro lan-adj-sid-sub-tlvs
        +--ro lan-adj-sid-sub-tlv* []
           +--ro lan-adj-sid-flags
           |  +--ro flag*   identityref
           +--ro weight?               uint8
           +--ro neighbor-router-id?   rt-types:router-id
           +--ro (sid)?
              +--:(sid-label)
              |  +--ro label-value?    uint32
              +--:(sid-index)
                 +--ro index-value?    uint32

Authors' Addresses

   Yingzhen Qu
   Futurewei Technologies
   Email: yingzhen.ietf@gmail.com


   Acee Lindem
   LabN Consulting, L.L.C.
   301 Midenhall Way
   Cary, NC 27513
   Email: acee.ietf@gmail.com


   Jeffrey Zhang
   Juniper Networks
   10 Technology Park Drive
   Westford, MA 01886
   United States of America
   Email: zzhang@juniper.net



Qu, et al.              Expires 10 November 2025               [Page 52]

Internet-Draft              OSPF SR MPLS YANG                   May 2025


   Ing-Wher Chen
   The MITRE Corporation
   Email: ingwherchen@mitre.org
















































Qu, et al.              Expires 10 November 2025               [Page 53]