<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE rfc [
<!ENTITY nbsp    "&#160;">
<!ENTITY zwsp   "&#8203;">
<!ENTITY nbhy   "&#8209;">
<!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-ospf-sr-yang-50"
number="9903" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true"
symRefs="true" sortRefs="true" consensus="true" version="3">

<front>
  <title abbrev="OSPF SR-MPLS YANG" >
    A YANG Data Model for OSPF Segment Routing over the MPLS Data Plane
  </title>
  <seriesInfo name="RFC" value="9903"/>
  <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
    <organization>Futurewei Technologies</organization>
    <address>
      <email>yingzhen.ietf@gmail.com</email>
    </address>
  </author>
  <author fullname="Acee Lindem" initials="A." surname="Lindem">
    <organization>LabN Consulting, L.L.C.</organization>
    <address>
      <postal>
        <street>301 Midenhall Way</street>
        <city>Cary</city><region>NC</region><code>27513</code>
	<country>United States of America</country>
      </postal>
      <email>acee.ietf@gmail.com</email>
    </address>
  </author>
  <author fullname="Jeffrey Zhang" initials="J" surname="Zhang">
    <organization>Juniper Networks</organization>
    <address>
      <postal>
        <street>10 Technology Park Drive</street>
        <city>Westford</city>
        <region>MA</region>
        <code>01886</code>
        <country>United States of America</country>
      </postal>
      <email>zzhang@juniper.net</email>
    </address>
  </author>
  <author fullname="Ing-Wher Chen" initials="I." surname="Chen">
    <organization>Red Hat, Inc.</organization>
    <address>
      <email>ichen@redhat.com</email>
    </address>
  </author>
  <date month="December" year="2025"/>
  <area>RTG</area>
  <workgroup>lsr</workgroup>
  <abstract>
    <t>
      This document defines a YANG data model that can be
      used to manage OSPF extensions for Segment Routing over the MPLS data plane.
    </t>
  </abstract>
</front>
<middle>
  <section numbered="true" toc="default">
    <name>Overview</name>
    <t>
      This document defines a YANG data model <xref target="RFC7950" format="default"/> that can be used
      to manage OSPFv2 extensions for Segment Routing <xref target="RFC2328" format="default"/> <xref target="RFC8665" format="default"/>
      and OSPFv3 extensions for Segment Routing <xref target="RFC5340" format="default"/> <xref target="RFC8666" format="default"/>
      over the MPLS data plane.
      The defined YANG data model is an augmentation to the OSPF YANG data
      model <xref target="RFC9129" format="default"/>.
    </t>
    <section numbered="true" toc="default">
      <name>Requirements Language</name>
        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
    </section>
    <section numbered="true" toc="default">
      <name>Tree Diagrams</name>
      <t>This document uses the graphical representation of a data model as
      defined in <xref target="RFC8340" format="default"/>.</t>
    </section>
  </section>
  <section numbered="true" toc="default"> <name>Design of the YANG Module for OSPF MPLS Segment Routing</name>
    <t>
      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 <xref target="RFC8665" format="default"/> and
      OSPFv3 <xref target="RFC8666" format="default"/>.
    </t>
    <t>
      The "ietf-ospf-sr-mpls" YANG module requires support for the base Segment
      Routing module <xref target="RFC9020" format="default"/>,
      which defines the global Segment Routing configuration independent
      of any specific routing protocol configuration, and support of the OSPF base
      model <xref target="RFC9129" format="default"/>, which defines the basic
      OSPF configuration and state.
    </t>
    <t>
      The "ietf-ospf-sr-mpls" module defines both the data nodes to configure OSPF
      Segment Routing MPLS extensions and the additions to OSPF Link State Advertisements (LSAs) necessary
      to support Segment Routing over MPLS (SR-MPLS). The OSPF configuration includes:
    </t>
    <ul spacing="normal">
      <li>
        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-control-plane" grouping <xref target="RFC9020"/>).
      </li>
      <li>
        OSPF area level configuration, which enables SR-MPLS on all interfaces
        as well as advertisement of SR-MPLS information in
        Link State Advertisements (LSAs).
      </li>
      <li>
        OSPF interface level configuration for Adjacency Segment Identifiers (Adj-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 the "ietf-segment-routing-mpls"
        YANG module (refer to the "igp-interface" grouping <xref target="RFC9020"/>).
      </li>
      <li>
        OSPF interface level configuration for Topology Independent Loop-Free Alternative (TI-LFA) using
        the MPLS data plane. TI-LFA is described in <xref target="RFC9855"/>.
      </li>
    </ul>
    <t>
     The operational state (read-only) additions specific to OSPFv2 LSA include:
    </t>
        <ul>
      <li>
        OSPFv2 Extended Prefix Range TLV encodings <xref target="RFC8665"/> in the OSPF
        Extended Prefix Opaque LSA <xref target="RFC7684"/>.
      </li>
      <li>
        OSPFv2 Prefix-SID Sub-TLV encodings <xref target="RFC8665"/>, including
        the OSPF Extended Prefix TLV, which is advertised in the OSPF Extended Prefix Opaque LSA
        <xref target="RFC7684"/>.
      </li>
      <li>
        OSPFv2 SR-Algorithm, SID/Label Range TLV, SR Local Block TLV, and Segment Routing Mapping Server (SRMS)
        Preference TLV <xref target="RFC8665"/> advertised in the OSPFv2 Router Information Opaque LSA
        <xref target="RFC7770"/>.
      </li>
    </ul>
    <t>
      The operational state (read-only) additions specific to OSPFv3 LSA include:
    </t>
    <ul>
      <li>
        OSPFv3 Extended Prefix Range TLV encodings <xref target="RFC8666"/> in the OSPFv3
        E-Intra-Area-Prefix-LSA, E-Inter-Area-Prefix-LSA, E-AS-External-LSA, and E-Type-7-LSA
        <xref target="RFC8362"/>.
      </li>
      <li>
        OSPFv3 Prefix-SID Sub-TLV encodings <xref target="RFC8666"/> in the OSPFv3
        Intra-Area-Prefix TLV, Inter-Area-Prefix TLV, External-Prefix TLV <xref target="RFC8362"/>, and
        OSPFv3 Extended Prefix Range TLV <xref target="RFC8666"/>.
      </li>
      <li>
        OSPFv3 Adj-SID Sub-TLV <xref target="RFC8666"/> in the
        OSPFv3 Router-Link TLV <xref target="RFC8362"/>.
      </li>
      <li>
        OSPFv3 LAN Adj-SID Sub-TLV <xref target="RFC8666"/> in the
        OSPFv3 Router-Link TLV <xref target="RFC8362"/>.
      </li>
      <li>
        OSPFv3 SR-Algorithm, SID/Label Range TLV, SR Local Block TLV, and SRMS
        Preference TLV <xref target="RFC8666"/> advertised in the OSPFv3 Router Information LSA
        <xref target="RFC7770"/>.
      </li>
    </ul>
  </section>

<section numbered="true" toc="default">
  <name>OSPF Segment Routing over MPLS YANG Module</name>
  <t>
    <xref target="RFC4915"/>, <xref target="RFC6991"/>,
    <xref target="RFC8102"/>, <xref target="RFC8294"/>,
    <xref target="RFC8349"/>, <xref target="RFC8665"/>,
    <xref target="RFC8666"/>, <xref target="RFC9020"/>,
    <xref target="RFC9129"/>, <xref target="RFC9587"/>, and
    <xref target="RFC9855"/>
    are referenced in the YANG module.
  </t>
  <figure>
    <sourcecode name="ietf-ospf-sr-mpls@2025-12-09.yang" type="yang" markers="true"><![CDATA[
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";
  }

  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:   Jeffrey Zhang
               <mailto:zzhang@juniper.net>
     Author:   Ing-Wher Chen
               <mailto:ichen@redhat.com>";
  description
    "This YANG module defines the generic configuration
     and operational state for OSPF Segment Routing (SR).

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

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

  revision 2025-12-09 {
    description
      "Initial revision.";
    reference
      "RFC 9903: A YANG Data Model for OSPF Segment Routing
       over the MPLS Data Plane";
  }

  feature remote-lfa-sr {
    description
      "Enhance Remote Loop-Free Alternate (RLFA) to use an 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
      "RFC 9855: 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 (No Penultimate Hop-Popping) 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
      "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-LSAs.";
    reference
      "RFC 8665: OSPF Extensions for Segment Routing, Section 4";
  }

  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.";
    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 the V-Flag is set to 1 and L-Flag is set to 1: 
        The SID/Index/Label field is a 3-octet local label where the
        20 rightmost bits are used for encoding the label value.";
    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.";
    }
  }

  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
            "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
      "RFC 8665: OSPF Extensions for Segment Routing, Section 4";
    container extended-prefix-range-tlvs {
      description
        "List of prefix ranges.";
      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
      "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 {
        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 {
        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.  The return of a zero value would indicate
             an error.";
        }
        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 Segment Routing Local Block (SRLB) TLVs.";
      list local-block-tlv {
        description
          "SRLB TLV.";
        leaf range-size {
          type rt-types:uint24;
          description
            "SID range.  The return of a zero value would indicate
             an error.";
        }
        uses sid-tlv-encoding;
      }
    }
  }

  grouping srms-preference-tlv {
    description
      "The Segment Routing Mapping Server (SRMS) Preference TLV is
       used to advertise a preference associated with the node that
       acts as an SRMS.  SRMS 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-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;
            }
            description
              "Prefix-SID Sub-TLV flags.";
          }
          description
            "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;
          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";
    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 is to be performed for the configuration data:
        - Assure prefixes specified in binding policies do not
          overlap.";
    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, SR-MPLS is enabled
                for the area.";
      description
        "OSPF area level Segment Routing configuration.  Enables
         SR-MPLS on all interfaces, and enables advertisement of
         Link State Advertisements (LSAs) and TLVs supporting
         SR-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
        "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 with Segment Routing interface
             configuration.";
        }
        description
          "This augments multi-access interface adj-sids with a
           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 Fast Reroute (IP-FRR) with
       TI-LFA.";
    container ti-lfa {
      if-feature "ti-lfa";
      description
        "Topology Independent Loop Free Alternate
         (TI-LFA) support.";
      reference
        "RFC 9855: Topology Independent Fast Reroute Using Segment 
         Routing";
      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 Shared Risk Link Group (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 disjoint as a TI-LFA path selection
             tie-breaker.  A path providing a node with a disjoint
             path for SRLG links from the primary path will be
             selected over a path 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 may be configured.";
      }
    }
  }

  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 RLFA.";
    reference
      "RFC 9855: Topology Independent Fast Reroute Using Segment
       Routing";
    leaf use-segment-routing-path {
      if-feature "remote-lfa-sr";
      type boolean;
      default "false";
      description
        "Force RLFA to use a Segment Routing path instead of an 
         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 the OSPF interface adjacency-sid state.";
    list adjacency-sid {
      description
        "List of Adj-SIDs.";
      leaf value {
        type uint32;
        description
          "Value of the Adj-SID.";
      }
      leaf weight {
        type uint8;
        description
          "Weight associated with the Adj-SID.";
      }
      leaf protection-requested {
        type boolean;
        description
          "Indicate if the Adj-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/"
        + "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')" {
      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
      "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
      "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
      "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/"
        + "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/"
       + "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 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')" {
      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.";
    }
    description
      "SR Sub-TLVs in OSPFv3 Router-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;
  }
}
]]></sourcecode>
</figure>
</section>

<section anchor="Security" numbered="true" toc="default">  <name>Security Considerations</name>
<t>This section is modeled after the template described in <xref target="I-D.ietf-netmod-rfc8407bis" section="3.7" sectionFormat="of"/>.</t>

<t>
   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 <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>.
   These YANG-based management protocols (1) have to use a secure transport layer (e.g., SSH
   <xref target="RFC4252"/>, TLS <xref target="RFC8446"/>, and
   QUIC <xref target="RFC9000"/>) and (2) have to use mutual authentication.
 </t>
 <t>
    The Network Configuration Access Control Model (NACM) <xref target="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.
 </t>
 <t>
   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 
   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:
 </t>
 <ul spacing="normal">
   <li>/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.</li>
     <li>/ospf:ospf/segment-routing/bindings - Modification to the local
     bindings could result in a DoS attack.</li>
     <li>/ospf:ospf/protocol-srgb - Modification of the protocol SRGB
     could be used to mount a DoS attack. For example, if the protocol
     SRGB size is reduced to a very small value, a lot of existing
     segments could no longer be installed, leading to a traffic disruption.</li>
     <li>/ospf:interfaces/ospf:interface/segment-routing - Modification of the
     Adj-SID could be used to mount a
     DoS attack. Change of an Adj-SID could be used to redirect traffic.</li>
     <li>/ospf:interfaces/ospf:interface/ospf:fast-reroute/ti-lfa - Modification
     of the TI-LFA enablement could lead to traffic disruption.</li>
 </ul>
  <t>
    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:
  </t>
 <ul spacing="normal">
   <li>
     The "ietf-ospf-sr-mpls" module augments the 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 <xref target="RFC9129"/>.
   </li>
   <li>
     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.
   </li>
   <li>
     Knowledge of Prefix and Adjacency SIDs may also divulge a view of the Segment
     Routing network topology architecture, which may be considered a proprietary
     asset.
   </li>
   <li>
     Knowledge of the advertised SID/Label Range TLVs,
     SR Local Block TLVs, and SRMS TLVs may facilitate
     a 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.
   </li>
 </ul>
 <t>There are no particularly sensitive RPC or action operations.</t>
 <t>
   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 <xref target="RFC9020"/> for information as to which nodes may
   be considered sensitive or vulnerable in network environments.
 </t>
</section>
    <section anchor="IANA" toc="default" numbered="true">
      <name>IANA Considerations</name>
      <t>
        This document registers a URI in the "IETF XML Registry"
        <xref target="RFC3688" format="default"/>.  Following the format in <xref
        target="RFC3688" format="default"/>,
        the following registration has been made:
      </t>
      <dl spacing="compact" newline="false">
      <dt>URI:</dt><dd>urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls</dd>
      <dt>Registrant Contact:</dt><dd>The IESG.</dd>
      <dt>XML:</dt><dd>N/A; the requested URI is an XML namespace.</dd>
      </dl>
      <t>
        This document registers a YANG module in the "YANG Module Names"
        registry <xref target="RFC6020" format="default"/>.
      </t>
      <dl spacing="compact" newline="false">
      <dt>Name:</dt><dd>ietf-ospf-sr-mpls</dd>
      <dt>Maintained by IANA?:</dt><dd>N</dd>	
      <dt>Namespace:</dt><dd>urn:ietf:params:xml:ns:yang:ietf-ospf-sr-mpls</dd>
      <dt>Prefix:</dt><dd>ospf-sr-mpls</dd>
      <dt>Reference:</dt><dd>RFC 9903</dd>
      </dl>
    </section>
  </middle>

  <back>
    <displayreference target="I-D.ietf-netmod-rfc8407bis" to="YANG-GUIDE"/>
    <references>
      <name>References</name>
      <references>
      <name>Normative References</name>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2328.xml"/>      
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4915.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5340.xml"/>	
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7770.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7684.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8102.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8294.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8362.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8665.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8666.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9020.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9129.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9587.xml"/>
         <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9855.xml"/>
	
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8792.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
	
<xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-rfc8407bis.xml"/>	
	
      </references>
    </references>
    <section numbered="true" toc="default">
        <name>A Configuration Example</name>
        <t>The following is an XML example using the "ietf-ospf-sr-mpls" YANG module
           and <xref target="RFC9020"/>.</t>
        <t>Note: '\' line wrapping per <xref target="RFC8792" format="default"/>. </t>
        <sourcecode type="xml"><![CDATA[
<?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>
  ]]></sourcecode>
      <t>The following is the same example using JSON format.</t>
      <sourcecode type="json"><![CDATA[
{
  "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
                }
              ]
            }
          }
        }
      ]
    }
  }
}
  ]]></sourcecode>
    </section>

<section numbered="true" toc="default"> <name>Full Tree Diagram</name>
<sourcecode type="yangtree"><![CDATA[
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
          /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
     +--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
     +--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
  |  +--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
  |  +--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
          /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* []
              +--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
        |        +--:(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
          /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
          /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
]]></sourcecode>
    </section>
    <section anchor="Acknowledgements" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
        The authors wish to thank <contact fullname="Dean Bogdanovic"/>, <contact fullname="Kiran Koushik Agrahara Sreenivasa"/>, and <contact fullname="Derek Yeung"/>
        for their YANG module discussions.
      </t>
      <t>
        The authors wish to thank <contact fullname="Yi Yang"/>, <contact fullname="Alexander Clemm"/>,
        <contact fullname="Gaurav Gupta"/>, <contact fullname="Ladislav Lhotka"/>, <contact fullname="Stephane Litkowski"/>,
        <contact fullname="Greg Hankins"/>, <contact fullname="Manish Gupta"/>, <contact fullname="Alan Davey"/>, <contact fullname="Divakaran Baskaran"/>, <contact fullname="Reshad Rahman"/>, <contact fullname="Tom Petch"/>,
        and <contact fullname="Corey Bonnell"/> for their thorough reviews and helpful comments.
      </t>
      <t>
        The authors wish to thank <contact fullname="Julien Meuric"/> for a very meticulous Routing Directorate review.
      </t>
      <t>
        The authors wish to thank <contact fullname="Mohamed Boucadair"/> and <contact fullname="Ketan Talaulikar"/>
        for extensive AD reviews for the IESG Telechat. Thanks to <contact fullname="Éric Vyncke"/> and <contact fullname="Mahesh
        Jethanandani"/> for review comments.
      </t>
    </section>
  </back>  
</rfc>
