Skip to main content

OSPF SR (Segment Routing) YANG Data Model
draft-ietf-ospf-sr-yang-21

The information below is for an old version of the document.
Document Type
This is an older version of an Internet-Draft whose latest revision state is "Active".
Authors Yingzhen Qu , Acee Lindem , Zhaohui (Jeffrey) Zhang , Ing-Wher (Helen) Chen
Last updated 2023-07-09 (Latest revision 2023-02-24)
RFC stream Internet Engineering Task Force (IETF)
Formats
Reviews
Additional resources Mailing list discussion
Stream WG state WG Document
Document shepherd Christian Hopps
IESG IESG state I-D Exists
Consensus boilerplate Yes
Telechat date (None)
Responsible AD (None)
Send notices to Christian Hopps <chopps@chopps.org>
draft-ietf-ospf-sr-yang-21
Internet                                                           Y. Qu
Internet-Draft                                                 Futurewei
Intended status: Standards Track                               A. Lindem
Expires: 10 January 2024                                            LabN
                                                                J. Zhang
                                                        Juniper Networks
                                                                 I. Chen
                                                   The MITRE Corporation
                                                             9 July 2023

               OSPF SR (Segment Routing) YANG Data Model
                       draft-ietf-ospf-sr-yang-21

Abstract

   This document defines a YANG data module that can be used to
   configure and manage OSPF Extensions for Segment Routing.

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

Copyright Notice

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

Qu, et al.               Expires 10 January 2024                [Page 1]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   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 . . . . . . . . . . . . . . . . . .   3
     1.2.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .   3
   2.  OSPF Segment Routing  . . . . . . . . . . . . . . . . . . . .   3
     2.1.  OSPF Segment Routing YANG Module  . . . . . . . . . . . .  13
   3.  Security Considerations . . . . . . . . . . . . . . . . . . .  37
   4.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  38
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  38
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  38
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  39
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  41
   Appendix A.  A Configuration Example  . . . . . . . . . . . . . .  41
   Appendix B.  Contributors' Addreses . . . . . . . . . . . . . . .  43
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  44

1.  Overview

   YANG [RFC7950] is a data definition language used to define the
   contents of a conceptual data store that allows networked devices to
   be managed using NETCONF [RFC6241].  YANG is proving relevant beyond
   its initial confines, as bindings to other interfaces (e.g., ReST)
   and encodings other than XML (e.g., JSON) are being defined.
   Furthermore, YANG data models can be used as the basis for
   implementation of other interfaces, such as CLI and programmatic
   APIs.

   This document defines a YANG data model that can be used to configure
   and manage OSPFv2 extensions for Segment Routing [RFC8665] and OSPFv3
   extensions for Segment Routing [RFC8666].  It is an augmentation to
   the OSPF YANG data model [RFC9129].

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

Qu, et al.               Expires 10 January 2024                [Page 2]
Internet-Draft           OSPF SR YANG Data Model               July 2023

1.1.  Requirements Language

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

1.2.  Tree Diagrams

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

2.  OSPF Segment Routing

   This document defines a model for OSPF Segment Routing Extensions for
   both OSPFv2 [RFC8665] and OSPFv3 [RFC8666].  It is an augmentation of
   the OSPF base model.

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

  module: ietf-ospf-sr
    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*   -> /rt:routing/sr:segment-routing
      |     |                       /sr-mpls:sr-mpls/bindings
      |     |                       /mapping-server/policy/name
      |     +--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
            /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

Qu, et al.               Expires 10 January 2024                [Page 3]
Internet-Draft           OSPF SR YANG Data Model               July 2023

            +--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 enable?                   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:database
            /ospf:link-scope-lsa-type/ospf:link-scope-lsas
            /ospf:link-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?                            uint8
            +--ro range-size?                    uint16
            +--ro extended-prefix-range-flags
            |  +--ro bits*   identityref
            +--ro prefix?                        inet:ip-prefix
            +--ro prefix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro mt-id?              uint8
            |     +--ro algorithm?          identityref
            |     +--ro sid?                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

Qu, et al.               Expires 10 January 2024                [Page 4]
Internet-Draft           OSPF SR YANG Data Model               July 2023

            /ospf:body/ospf:opaque/ospf:extended-prefix-opaque:
      +--ro extended-prefix-range-tlvs
         +--ro extended-prefix-range-tlv* []
            +--ro prefix-length?                 uint8
            +--ro af?                            uint8
            +--ro range-size?                    uint16
            +--ro extended-prefix-range-flags
            |  +--ro bits*   identityref
            +--ro prefix?                        inet:ip-prefix
            +--ro prefix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro mt-id?              uint8
            |     +--ro algorithm?          identityref
            |     +--ro sid?                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?                            uint8
            +--ro range-size?                    uint16
            +--ro extended-prefix-range-flags
            |  +--ro bits*   identityref
            +--ro prefix?                        inet:ip-prefix
            +--ro prefix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro mt-id?              uint8
            |     +--ro algorithm?          identityref
            |     +--ro sid?                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

Qu, et al.               Expires 10 January 2024                [Page 5]
Internet-Draft           OSPF SR YANG Data Model               July 2023

            /ospf:interfaces/ospf:interface/ospf:database
            /ospf:link-scope-lsa-type/ospf:link-scope-lsas
            /ospf:link-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 bits*   identityref
            +--ro mt-id?              uint8
            +--ro algorithm?          identityref
            +--ro sid?                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-prefix-opaque
            /ospf:extended-prefix-tlv:
      +--ro prefix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro mt-id?              uint8
            +--ro algorithm?          identityref
            +--ro sid?                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 bits*   identityref
            +--ro mt-id?              uint8
            +--ro algorithm?          identityref
            +--ro sid?                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 bits*   identityref
      |     +--ro mt-id?           uint8

Qu, et al.               Expires 10 January 2024                [Page 6]
Internet-Draft           OSPF SR YANG Data Model               July 2023

      |     +--ro weight?          uint8
      |     +--ro sid?             uint32
      +--ro lan-adj-sid-sub-tlvs
         +--ro lan-adj-sid-sub-tlv* []
            +--ro lan-adj-sid-flags
            |  +--ro bits*   identityref
            +--ro mt-id?                uint8
            +--ro weight?               uint8
            +--ro neighbor-router-id?   yang:dotted-quad
            +--ro sid?                  uint32
    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: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-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   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: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-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   uint32
      +--ro srms-preference-tlv

Qu, et al.               Expires 10 January 2024                [Page 7]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         +--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-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   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-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   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* []

Qu, et al.               Expires 10 January 2024                [Page 8]
Internet-Draft           OSPF SR YANG Data Model               July 2023

      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   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: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/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-sub-tlv
      |        +--ro sid?   uint32
      +--ro local-block-tlvs
      |  +--ro local-block-tlv* []
      |     +--ro range-size?    rt-types:uint24
      |     +--ro sid-sub-tlv
      |        +--ro sid?   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?                    uint8
            +--ro range-size?            uint16
            +--ro prefix?                inet:ip-prefix
            +--ro perfix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro ospfv3-prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro algorithm?                 uint8
            |     +--ro sid?                       uint32
            +--ro unknown-tlvs

Qu, et al.               Expires 10 January 2024                [Page 9]
Internet-Draft           OSPF SR YANG Data Model               July 2023

               +--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?                    uint8
            +--ro range-size?            uint16
            +--ro prefix?                inet:ip-prefix
            +--ro perfix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro ospfv3-prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro algorithm?                 uint8
            |     +--ro sid?                       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?                    uint8
            +--ro range-size?            uint16
            +--ro prefix?                inet:ip-prefix
            +--ro perfix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro ospfv3-prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro algorithm?                 uint8
            |     +--ro sid?                       uint32
            +--ro unknown-tlvs
               +--ro unknown-tlv* []
                  +--ro type?     uint16
                  +--ro length?   uint16
                  +--ro value?    yang:hex-string

Qu, et al.               Expires 10 January 2024               [Page 10]
Internet-Draft           OSPF SR YANG Data Model               July 2023

    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?                    uint8
            +--ro range-size?            uint16
            +--ro prefix?                inet:ip-prefix
            +--ro perfix-sid-sub-tlvs
            |  +--ro prefix-sid-sub-tlv* []
            |     +--ro ospfv3-prefix-sid-flags
            |     |  +--ro bits*   identityref
            |     +--ro algorithm?                 uint8
            |     +--ro sid?                       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:
      +--ro perfix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro ospfv3-prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro algorithm?                 uint8
            +--ro sid?                       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:
      +--ro perfix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro ospfv3-prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro algorithm?                 uint8
            +--ro sid?                       uint32

Qu, et al.               Expires 10 January 2024               [Page 11]
Internet-Draft           OSPF SR YANG Data Model               July 2023

    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:
      +--ro perfix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro ospfv3-prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro algorithm?                 uint8
            +--ro sid?                       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:
      +--ro perfix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro ospfv3-prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro algorithm?                 uint8
            +--ro sid?                       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:
      +--ro perfix-sid-sub-tlvs
         +--ro prefix-sid-sub-tlv* []
            +--ro ospfv3-prefix-sid-flags
            |  +--ro bits*   identityref
            +--ro algorithm?                 uint8
            +--ro sid?                       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:
      +--ro adj-sid-sub-tlvs
      |  +--ro adj-sid-sub-tlv* []
      |     +--ro adj-sid-flags
      |     |  +--ro bits*   identityref
      |     +--ro weight?          uint8

Qu, et al.               Expires 10 January 2024               [Page 12]
Internet-Draft           OSPF SR YANG Data Model               July 2023

      |     +--ro sid?             uint32
      +--ro lan-adj-sid-sub-tlvs
         +--ro lan-adj-sid-sub-tlv* []
            +--ro lan-adj-sid-flags
            |  +--ro bits*   identityref
            +--ro weight?               uint8
            +--ro neighbor-router-id?   yang:dotted-quad
            +--ro sid?                  uint32

2.1.  OSPF Segment Routing YANG Module

   [RFC2328], [RFC4750], [RFC5340], [RFC5643], [RFC5838], [RFC8343],
   [RFC8476] and [RFC8349] are referenced in the YANG model.

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

   prefix ospf-sr;

   import ietf-inet-types {
     prefix "inet";
     reference "RFC 6991 - Common YANG Data Types";
   }

   import ietf-yang-types {
     prefix "yang";
     reference "RFC 6991 - Common YANG Data Types";
   }

   import ietf-routing-types {
     prefix "rt-types";
     reference "RFC 8249 - 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";
   }

Qu, et al.               Expires 10 January 2024               [Page 13]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   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";
   }

   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.qu@futurewei.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, which is
      common across all of the vendor implementations. It is
      intended that the module will be extended by vendors to
      define vendor-specific OSPF Segment Routing configuration
      and operational parameters and policies.

      This YANG model conforms to the Network Management
      Datastore Architecture (NMDA) as described in RFC 8342.

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

Qu, et al.               Expires 10 January 2024               [Page 14]
Internet-Draft           OSPF SR YANG Data Model               July 2023

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

      This version of this YANG module is part of RFC XXXX
      (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
      for full legal notices.

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

   reference "RFC XXXX";

   revision 2023-07-09 {
     description
       "Initial revision.";
     reference
       "RFC XXXX: A YANG Data Model for OSPF Segment Routing.";
   }

   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-bit {
     description

Qu, et al.               Expires 10 January 2024               [Page 15]
Internet-Draft           OSPF SR YANG Data Model               July 2023

       "Base identity for prefix sid sub-tlv bits.";
     reference
       "RFC 8665: OSPF Extensions for Segment Routing
        RFC 8666: OSPFv3 Extensions for Segment Routing";
   }

   identity np-bit {
     base prefix-sid-bit;
     description
       "No-PHP flag.";
   }

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

   identity e-bit {
     base prefix-sid-bit;
     description
       "Explicit-NULL flag.";
   }

   identity v-bit {
     base prefix-sid-bit;
     description
       "Value/Index flag.";
   }

   identity l-bit {
     base prefix-sid-bit;
     description
       "Local flag.";
   }

   identity extended-prefix-range-bit {
     description
       "Base identity for extended prefix range TLV bits.";
   }

   identity ia-bit {
     base extended-prefix-range-bit;
     description
       "Inter-Area flag. If set, advertisement is of
        inter-area type.";
     reference
       "RFC 8665: OSPF Extensions for Segment Routing";

Qu, et al.               Expires 10 January 2024               [Page 16]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   }

   identity adj-sid-bit {
     description
       "Base identity for adj sid sub-tlv bits.";
     reference
       "RFC 8665: OSPF Extensions for Segment Routing
        RFC 8666: OSPFv3 Extensions for Segment Routing";
   }

   identity  b-bit {
     base adj-sid-bit;
     description
       "Backup flag.";
   }

   identity vi-bit {
     base adj-sid-bit;
     description
       "Value/Index flag.";
   }

   identity lo-bit {
     base adj-sid-bit;
     description
       "Local/Global flag.";
   }

   identity g-bit {
     base adj-sid-bit;
     description
       "Group flag.";
   }

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

   /* Groupings */
   grouping sid-sub-tlv {
     description "SID/Label sub-TLV grouping.";
     reference
       "RFC 8665: OSPF Extensions for Segment Routing
        (Section 6)";
     container sid-sub-tlv {
       description

Qu, et al.               Expires 10 January 2024               [Page 17]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         "Used to advertise the SID/Label associated with a
          prefix or adjacency.";
       leaf sid {
         type uint32;
         description
           "Segment Identifier (SID) - A 20 bit label or
            32 bit SID.";
       }
     }
   }

   grouping ospfv2-prefix-sid-sub-tlvs {
     description "Prefix Segment ID (SID) sub-TLVs.";
     reference
       "RFC 8665: OSPF 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 prefix-sid-flags {
           leaf-list bits {
             type identityref {
               base prefix-sid-bit;
             }
             description
               "Prefix SID Sub-TLV flag bits list.";
           }
           description "Segment Identifier (SID) Flags.";
         }
         leaf mt-id {
           type uint8;
           description "Multi-topology ID.";
         }
         leaf algorithm {
           type identityref {
             base sr-cmn:prefix-sid-algorithm;
           }
           description
             "The algorithm associated with the prefix-SID.";
         }
         leaf sid {
           type uint32;
           description "An index or label.";
         }
       }
     }
   }

Qu, et al.               Expires 10 January 2024               [Page 18]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   grouping ospfv2-extended-prefix-range-tlvs {
     description "Extended prefix range TLV grouping.";
     reference
       "RFC 8665: OSPF Extensions for Segment Routing
        (Section 4)";
     container extended-prefix-range-tlvs {
       description "The list of range of prefixes.";
       list extended-prefix-range-tlv {
         description "The range of prefixes.";
         leaf prefix-length {
           type uint8;
           description "Length of prefix in bits.";
         }
         leaf af {
           type uint8;
           description "Address family for the prefix.";
         }
         leaf range-size {
           type uint16;
           description "The number of prefixes covered by the
                        advertisement.";
         }
         container extended-prefix-range-flags {
           leaf-list bits {
             type identityref {
               base extended-prefix-range-bit;
             }
             description "Extended prefix range TLV flags list.";
           }
           description "Extended Prefix Range TLV flags.";
         }
         leaf prefix {
           type inet:ip-prefix;
           description "Address prefix.";
         }
         uses ospfv2-prefix-sid-sub-tlvs;
         uses ospf:unknown-tlvs;
       }
     }
   }

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

Qu, et al.               Expires 10 January 2024               [Page 19]
Internet-Draft           OSPF SR YANG Data Model               July 2023

       leaf-list sr-algorithm {
         type identityref {
           base sr-cmn:prefix-sid-algorithm;
         }
        description
           "The 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 "The SID range.";
         }
         uses sid-sub-tlv;
       }
     }
   }

   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 "The SID range.";
         }
         uses sid-sub-tlv;
       }
     }
   }

Qu, et al.               Expires 10 January 2024               [Page 20]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   grouping srms-preference-tlv {
     description "The SRMS preference TLV is used to advertise
                  a preference associated with the node that acts
                  as an SR Mapping Server.";
     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.";
       }
     }
   }

   grouping ospfv3-prefix-sid-sub-tlvs {
     description "Prefix Segment ID (SID) sub-TLVs.";
     reference
       "RFC 8666: OSPFv3 Extensions for Segment Routing
        (Section 6)";
     container perfix-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 bits {
             type identityref {
               base ospf-sr:prefix-sid-bit;
             }
             description
               "Prefix SID Sub-TLV flag bits list.";
           }
           description "Segment Identifier (SID) Flags.";
         }
         leaf algorithm {
           type uint8;
           description
             "The algorithm associated with the prefix-SID.";
         }
         leaf sid {
           type uint32;
           description "An index or label.";
         }
       }
     }
   }

Qu, et al.               Expires 10 January 2024               [Page 21]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   grouping ospfv3-extended-prefix-range-tlvs {
     description "Extended prefix range TLV grouping.";
     reference
       "RFC 8666: OSPFv3 Extensions for Segment Routing
        (Section 5)";
     container ospfv3-extended-prefix-range-tlvs {
       description "The list of extended prefix range TLVs.";
       list extended-prefix-range-tlv {
         description "The range of prefixes.";
         leaf prefix-length {
           type uint8;
           description "Length of prefix in bits.";
         }
         leaf af {
           type uint8;
           description "Address family for the prefix.";
         }
         leaf range-size {
           type uint16;
           description "The number of prefixes covered by the
                        advertisement.";
         }
         leaf prefix {
           type inet:ip-prefix;
           description "Address prefix.";
         }
         uses ospfv3-prefix-sid-sub-tlvs;
         uses ospf:unknown-tlvs;
       }
     }
   }

   grouping ospfv3-adj-sid-sub-tlvs {
     description "Adjacency SID sub TLV grouping.";
     reference
       "RFC 8666: OSPFv3 Extensions for Segment Routing
        (Section 7)";
     container adj-sid-sub-tlvs {
       description "Adjacency SID optional sub-TLVs.";
       list adj-sid-sub-tlv {
         description "List of Adjacency SID sub-TLVs.";
         container adj-sid-flags {
           leaf-list bits {
             type identityref {
               base adj-sid-bit;
             }
             description "Adj sid sub-tlv flags list.";
           }

Qu, et al.               Expires 10 January 2024               [Page 22]
Internet-Draft           OSPF SR YANG Data Model               July 2023

           description "Adj-sid sub-tlv flags.";
         }
         leaf weight {
           type uint8;
           description "Weight used for load-balancing.";
         }
         leaf sid {
           type uint32;
           description "Segment Identifier (SID) index/label.";
         }
       }
     }
   }

   grouping ospfv3-lan-adj-sid-sub-tlvs {
     description "LAN adj-sid sub TLV grouping.";
     reference
       "RFC 8666: OSPFv3 Extensions for Segment Routing
        (Section 7)";
     container lan-adj-sid-sub-tlvs {
       description "LAN Adjacency SID optional sub-TLVs.";
       list lan-adj-sid-sub-tlv {
         description "List of LAN adjacency SID sub-TLVs.";
         container lan-adj-sid-flags {
           leaf-list bits {
             type identityref {
               base adj-sid-bit;
             }
             description "LAN adj sid sub-tlv flags list.";
           }
           description "LAN adj-sid sub-tlv flags.";
         }
         leaf weight {
           type uint8;
           description "Weight used for load-balancing.";
         }
         leaf neighbor-router-id {
           type yang:dotted-quad;
           description "Neighbor router ID.";
         }
         leaf sid {
           type uint32;
           description "Segment Identifier (SID) index/label.";
         }
       }
     }
   }

Qu, et al.               Expires 10 January 2024               [Page 23]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   /* Configuration */
   augment "/rt:routing/rt:control-plane-protocols"
         + "/rt:control-plane-protocol/ospf:ospf" {
     when "../rt:type = 'ospf:ospfv2' or "
        + "../rt:type = 'ospf:ospfv3'" {
       description
         "This augments the OSPF routing protocol when used.";
     }
     description
       "This augments the OSPF protocol configuration
        with 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/ospf:interfaces/ospf:interface" {
     when "../../../../../rt:type = 'ospf:ospfv2' or "
        + "../../../../../rt:type = 'ospf:ospfv3'" {
       description
         "This augments the OSPF interface configuration
          when used.";
     }
     description
       "This augments the OSPF protocol interface
        configuration with segment routing.";

     uses sr-mpls:igp-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 "../../../../../../../rt:type = 'ospf:ospfv2' or "
        + "../../../../../../../rt:type = 'ospf:ospfv3'" {
       description
         "This augments the OSPF routing protocol when used.";
     }
     description
       "This augments the OSPF protocol IP-FRR with TI-LFA.";

Qu, et al.               Expires 10 January 2024               [Page 24]
Internet-Draft           OSPF SR YANG Data Model               July 2023

     container ti-lfa {
       if-feature ti-lfa;
       leaf enable {
         type boolean;
         description
          "Enables 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.";
           }
           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.";
           }
           description
             "Enable SRLG (Shared 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.";
       }
       description
         "Topology Independent Loop Free Alternate
          (TI-LFA) support.";

Qu, et al.               Expires 10 January 2024               [Page 25]
Internet-Draft           OSPF SR YANG Data Model               July 2023

     }
   }

   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 "../../../../../../../../rt:type = 'ospf:ospfv2' or "
        + "../../../../../../../../rt:type = 'ospf:ospfv3'" {
       description
         "This augments the OSPF routing protocol when used.";
     }
     description
      "This augments the OSPF protocol IP-FRR with remote LFA.";
     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.";
     }
   }

   /* Database */
   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:ospfv2/"
         + "ospf:ospfv2/ospf:body/ospf:opaque/"
         + "ospf:extended-prefix-opaque" {
     when "../../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix LSA
        in type 9 opaque LSA.";

     uses ospfv2-extended-prefix-range-tlvs;
   }

     augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"

Qu, et al.               Expires 10 January 2024               [Page 26]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         + "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 "../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix LSA
        in type 10 opaque LSA.";

     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 "../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix LSA
        in type 11 opaque LSA.";

     uses ospfv2-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:ospfv2/"
         + "ospf:ospfv2/ospf:body/ospf:opaque/"
         + "ospf:extended-prefix-opaque/ospf:extended-prefix-tlv" {
     when "../../../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description

Qu, et al.               Expires 10 January 2024               [Page 27]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix TLV
        in type 9 opaque LSA.";
     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-prefix-opaque/ospf:extended-prefix-tlv" {
     when "../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix TLV
        in type 10 opaque LSA.";
     uses ospfv2-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:ospfv2/"
         + "ospf:ospfv2/ospf:body/ospf:opaque/"
         + "ospf:extended-prefix-opaque/ospf:extended-prefix-tlv" {
     when "../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended prefix TLV
        in type 11 opaque LSA.";
     uses ospfv2-prefix-sid-sub-tlvs;
   }

   augment "/rt:routing/"
         + "rt:control-plane-protocols/rt:control-plane-protocol/"
         + "ospf:ospf/ospf:areas/"

Qu, et al.               Expires 10 January 2024               [Page 28]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         + "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 "../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 extended link TLV
        in type 10 opaque LSA.";

     container adj-sid-sub-tlvs {
       description "Adjacency SID optional sub-TLVs.";
       list adj-sid-sub-tlv {
         description "List of Adjacency SID sub-TLVs.";
         container adj-sid-flags {
           leaf-list bits {
             type identityref {
               base adj-sid-bit;
             }
             description "Adj sid sub-tlv flags list.";
           }
           description "Adj-sid sub-tlv flags.";
         }
         leaf mt-id {
           type uint8;
           description "Multi-topology ID.";
         }
         leaf weight {
           type uint8;
           description "Weight used for load-balancing.";
         }
         leaf sid {
           type uint32;
           description "Segment Identifier (SID) index/label.";
         }
       }
     }

     container lan-adj-sid-sub-tlvs {
       description "LAN Adjacency SID optional sub-TLVs.";
       list lan-adj-sid-sub-tlv {
         description "List of LAN adjacency SID sub-TLVs.";
         container lan-adj-sid-flags {
           leaf-list bits {

Qu, et al.               Expires 10 January 2024               [Page 29]
Internet-Draft           OSPF SR YANG Data Model               July 2023

             type identityref {
               base adj-sid-bit;
             }
             description "LAN adj sid sub-tlv flags list.";
           }
           description "LAN adj-sid sub-tlv flags.";
         }
         leaf mt-id {
           type uint8;
           description "Multi-topology ID.";
         }
         leaf weight {
           type uint8;
           description "Weight used for load-balancing.";
         }
         leaf neighbor-router-id {
           type yang:dotted-quad;
           description "Neighbor router ID.";
         }
         leaf sid {
           type uint32;
           description "Segment Identifier (SID) index/label.";
         }
       }
     }
   }

   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:ospfv2/"
         + "ospf:ospfv2/ospf:body/ospf:opaque/ospf:ri-opaque" {
     when "../../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

     description
       "SR specific TLVs for OSPFv2 type 9 opaque LSA.";

     uses sr-algorithm-tlv;
     uses sid-range-tlvs;
     uses local-block-tlvs;
     uses srms-preference-tlv;
   }

Qu, et al.               Expires 10 January 2024               [Page 30]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   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 "../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }

     description
       "SR specific TLVs for OSPFv2 type 10 opaque LSA.";

     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 "../../../../../../../../../"
        + "rt:type = 'ospf:ospfv2'" {
       description
         "This augmentation is only valid for OSPFv2.";
     }
     description
       "SR specific TLVs for OSPFv2 type 11 opaque LSA.";

     uses sr-algorithm-tlv;
     uses sid-range-tlvs;
     uses local-block-tlvs;
     uses srms-preference-tlv;
   }

   /* Segment Routing Capabilities */
   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/"

Qu, et al.               Expires 10 January 2024               [Page 31]
Internet-Draft           OSPF SR YANG Data Model               July 2023

         + "ospf:ospfv3/ospf:body/ospf:router-information" {
     when "../../../../../../../../"
        + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     description
       "SR specific TLVs for OSPFv3 Router Information
        opaque LSA.";
     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 "../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }

     description
       "SR specific TLVs for OSPFv3 Router Information LSA.";

     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: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/ospf:router-information" {
     when "../../../../../../../../../../../../"
        + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";

Qu, et al.               Expires 10 January 2024               [Page 32]
Internet-Draft           OSPF SR YANG Data Model               July 2023

     }

     description
       "SR specific TLVs for OSPFv3 Router Information LSA.";

     uses sr-algorithm-tlv;
     uses sid-range-tlvs;
     uses local-block-tlvs;
     uses srms-preference-tlv;
   }

   /* OSPFv3 Extended Prefix Range 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 "../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-extended-prefix-range-tlvs;
     description
       "OSPFv3 Area-Scoped E-Intra-Area-Prefix LSA.";
   }

   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 "../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-extended-prefix-range-tlvs;
     description
       "OSPFv3 Area-Scoped E-Inter-Area-Prefix LSA.";
   }

   augment "/rt:routing/"
     + "rt:control-plane-protocols/rt:control-plane-protocol/"

Qu, et al.               Expires 10 January 2024               [Page 33]
Internet-Draft           OSPF SR YANG Data Model               July 2023

     + "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 "'ospf:../../../../../../../../../"
       + "rt:type' = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     uses ospfv3-extended-prefix-range-tlvs;
     description
       "OSPFv3 AS-Scoped E-AS-External LSA.";
   }

   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 "'ospf:../../../../../../../../../"
       + "rt:type' = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     uses ospfv3-extended-prefix-range-tlvs;
     description
       "OSPFv3 Area-Scoped E-NSSA LSA.";
   }

   /* Prefix SID Sub-TLV in Intra-Area Prefix TLV */
   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" {
     when "../../../../../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-prefix-sid-sub-tlvs;
     description
       "OSPFv3 Link-Scoped Intra-Area Prefix TLV.";

Qu, et al.               Expires 10 January 2024               [Page 34]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   }

   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" {
     when "../../../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-prefix-sid-sub-tlvs;
     description
       "OSPFv3 Area-Scoped Intra-Area Prefix TLV.";
   }

   /* Prefix SID Sub-TLV in Inter-Area Prefix 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-inter-area-prefix/"
     + "ospfv3-e-lsa:e-inter-prefix-tlvs/"
     + "ospfv3-e-lsa:inter-prefix-tlv" {
     when "../../../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-prefix-sid-sub-tlvs;
     description
       "OSPFv3 Area-Scoped Inter-Area Prefix TLV.";
   }

   /* Prefix SID Sub-TLV in External Prefix 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:ospfv3/"

Qu, et al.               Expires 10 January 2024               [Page 35]
Internet-Draft           OSPF SR YANG Data Model               July 2023

     + "ospf:ospfv3/ospf:body/ospfv3-e-lsa:e-as-external/"
     + "ospfv3-e-lsa:e-external-tlvs/"
     + "ospfv3-e-lsa:external-prefix-tlv" {
     when "'ospf:../../../../../../../../../"
       + "rt:type' = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     uses ospfv3-prefix-sid-sub-tlvs;
     description
       "OSPFv3 AS-Scoped External Prefix 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-nssa/"
     + "ospfv3-e-lsa:e-external-tlvs/"
     + "ospfv3-e-lsa:external-prefix-tlv" {
     when "'ospf:../../../../../../../../../"
       + "rt:type' = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3.";
     }
     uses ospfv3-prefix-sid-sub-tlvs;
     description
       "OSPFv3 Area-Scoped External Prefix TLV.";
   }

   /* Adj-SID sub-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-router/"
     + "ospfv3-e-lsa:e-router-tlvs/ospfv3-e-lsa:link-tlv" {
     when "../../../../../../../../../../../../"
       + "rt:type = 'ospf:ospfv3'" {
       description
         "This augmentation is only valid for OSPFv3
          E-Router LSAs";
     }
     uses ospfv3-adj-sid-sub-tlvs;
     uses ospfv3-lan-adj-sid-sub-tlvs;
     description

Qu, et al.               Expires 10 January 2024               [Page 36]
Internet-Draft           OSPF SR YANG Data Model               July 2023

       "OSPFv3 Area-Scoped Adj-SID Sub-TLV.";
   }
 }
 <CODE ENDS>

                                Figure 1

3.  Security Considerations

   The YANG modules specified in this document define a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

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

   There are a number of data nodes defined in the modules that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., edit-config)
   to these data nodes without proper protection can have a negative
   effect on network operations.  These are the subtrees and data nodes
   and their sensitivity/vulnerability:

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

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

Qu, et al.               Expires 10 January 2024               [Page 37]
Internet-Draft           OSPF SR YANG Data Model               July 2023

      /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 the modules 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.

   Module ietf-ospf-sr augments base OSPF module data base with various
   TLVs.  Knowledge of these data nodes can be used to attack other
   routers in the OSPF domain.

4.  Acknowledgements

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

   This document was produced using Marshall Rose's xml2rfc tool.

   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 approved this document for Public
   Release, Distribution Unlimited, with Public Release Case Number
   18-3281.

5.  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
         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
         namespace: urn:ietf:params:xml:ns:yang:ietf-ospf-sr
         prefix: ospf-sr
         reference: RFC XXXX

6.  References

Qu, et al.               Expires 10 January 2024               [Page 38]
Internet-Draft           OSPF SR YANG Data Model               July 2023

6.1.  Normative References

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

   [RFC4750]  Joyal, D., Ed., Galecki, P., Ed., Giacalone, S., Ed.,
              Coltun, R., and F. Baker, "OSPF Version 2 Management
              Information Base", RFC 4750, DOI 10.17487/RFC4750,
              December 2006, <https://www.rfc-editor.org/info/rfc4750>.

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

   [RFC5643]  Joyal, D., Ed. and V. Manral, Ed., "Management Information
              Base for OSPFv3", RFC 5643, DOI 10.17487/RFC5643, August
              2009, <https://www.rfc-editor.org/info/rfc5643>.

   [RFC5838]  Lindem, A., Ed., Mirtorabi, S., Roy, A., Barnes, M., and
              R. Aggarwal, "Support of Address Families in OSPFv3",
              RFC 5838, DOI 10.17487/RFC5838, April 2010,
              <https://www.rfc-editor.org/info/rfc5838>.

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

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

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

Qu, et al.               Expires 10 January 2024               [Page 39]
Internet-Draft           OSPF SR YANG Data Model               July 2023

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

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

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

   [RFC8343]  Bjorklund, M., "A YANG Data Model for Interface
              Management", RFC 8343, DOI 10.17487/RFC8343, March 2018,
              <https://www.rfc-editor.org/info/rfc8343>.

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

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

   [RFC8476]  Tantsura, J., Chunduri, U., Aldrin, S., and P. Psenak,
              "Signaling Maximum SID Depth (MSD) Using OSPF", RFC 8476,
              DOI 10.17487/RFC8476, December 2018,
              <https://www.rfc-editor.org/info/rfc8476>.

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

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

Qu, et al.               Expires 10 January 2024               [Page 40]
Internet-Draft           OSPF SR YANG Data Model               July 2023

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

6.2.  Informative References

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

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

Appendix A.  A Configuration Example

   The following is an XML example using the OSPF SR YANG module, and
   RFC 9020.

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

Qu, et al.               Expires 10 January 2024               [Page 41]
Internet-Draft           OSPF SR YANG Data Model               July 2023

 <?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>
               <interfaces>
                 <interface>
                   <name>eth0</name>
                   <segment-routing xmlns="urn:ietf:params:xml:ns:yang:\
                     ietf-ospf-sr">
                     <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">
             <enabled>true</enabled>
           </segment-routing>
           <protocol-srgb xmlns="urn:ietf:params:xml:ns:yang:\
             ietf-ospf-sr">
             <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 January 2024               [Page 42]
Internet-Draft           OSPF SR YANG Data Model               July 2023

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

Appendix B.  Contributors' Addreses

Qu, et al.               Expires 10 January 2024               [Page 43]
Internet-Draft           OSPF SR YANG Data Model               July 2023

   Dean Bogdanovic
   Alef

   EMail: ivandean@gmail.com

   Kiran Koushik Agrahara Sreenivasa
   Verizon Wireless
   Austin, TX  78681
   USA

   EMail: KiranKoushik.AgraharaSreenivasa@verisonwireless.com

Authors' Addresses

   Yingzhen Qu
   Futurewei
   2330 Central Expressway
   Santa Clara, CA 95050
   United States of America
   Email: yingzhen.qu@futurewei.com

   Acee Lindem
   LabN
   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

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

Qu, et al.               Expires 10 January 2024               [Page 44]