Internet                                                       A. Lindem
Internet-Draft                                             Cisco Systems
Intended status: Standards Track                                   Y. Qu
Expires: 23 October 2022                                       Futurewei
                                                           21 April 2022


               YANG Data Model for OSPFv3 Segment Routing
                    draft-acee-lsr-ospfv3-sr-yang-07

Abstract

   This document defines a YANG data module augmenting the IETF OSPF
   Segment Routing (SR) YANG model to support OSPFv3 extensions for SR.
   It can be used to configure and manage OSPFv3 Segment Routing in MPLS
   data plane.

Status of This Memo

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

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

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

   This Internet-Draft will expire on 23 October 2022.

Copyright Notice

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

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include 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.




Lindem & Qu              Expires 23 October 2022                [Page 1]


Internet-Draft               OSPFv3 SR YANG                   April 2022


Table of Contents

   1.  Overview  . . . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
   2.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . . . .   2
   3.  OSPFv3 Extensions for Segment Routing . . . . . . . . . . . .   3
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  17
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  18
   6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  18
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  18
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  18
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  20
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  20

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 module augmenting the IETF OSPF SR
   YANG model [I-D.ietf-ospf-sr-yang], and can be used to configure and
   manage OSPFv3 extensions for Segment Routing with the MPLS data
   plane.  [RFC8666].

   The augmentation defined in this document requires support for both
   the OSPF SR model and the OSPF base model[I-D.ietf-ospf-yang].

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

2.  Tree Diagrams

   Tree diagrams used in this document follow the notation defined in
   [RFC8340].








Lindem & Qu              Expires 23 October 2022                [Page 2]


Internet-Draft               OSPFv3 SR YANG                   April 2022


3.  OSPFv3 Extensions for Segment Routing

   This document defines a YANG module for OSPFv3 extensions for Segment
   Routing [RFC8666].  It is an augmentation of the OSPF SR base YANG
   model, where the configuration for both OSPFv2 and OSPFv3 are
   defined.

   [RFC8022] and [RFC8349] are not referenced in the document text but
   within the YANG module itself.

   module: ietf-ospfv3-sr
   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*   uint8
     +--ro sid-range-tlvs
     |  +--ro sid-range-tlv* []
     |     +--ro range-size?    uint24
     |     +--ro sid-sub-tlv
     |        +--ro sid?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?    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*   uint8
     +--ro sid-range-tlvs
     |  +--ro sid-range-tlv* []
     |     +--ro range-size?    uint24
     |     +--ro sid-sub-tlv
     |        +--ro sid?   uint32
     +--ro local-block-tlvs
     |  +--ro local-block-tlv* []
     |     +--ro range-size?    uint24
     |     +--ro sid-sub-tlv
     |        +--ro sid?   uint32
     +--ro srms-preference-tlv



Lindem & Qu              Expires 23 October 2022                [Page 3]


Internet-Draft               OSPFv3 SR YANG                   April 2022


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



Lindem & Qu              Expires 23 October 2022                [Page 4]


Internet-Draft               OSPFv3 SR YANG                   April 2022


     +--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
   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-nssa:
     +--ro ospfv3-extended-prefix-range-tlvs
        +--ro extended-prefix-range-tlv* []
           +--ro prefix-length?         uint8
           +--ro af?                    uint8



Lindem & Qu              Expires 23 October 2022                [Page 5]


Internet-Draft               OSPFv3 SR YANG                   April 2022


           +--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
   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* []



Lindem & Qu              Expires 23 October 2022                [Page 6]


Internet-Draft               OSPFv3 SR YANG                   April 2022


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




Lindem & Qu              Expires 23 October 2022                [Page 7]


Internet-Draft               OSPFv3 SR YANG                   April 2022


   <CODE BEGINS> file "ietf-ospfv3-sr@2021-10-18.yang"
   module ietf-ospfv3-sr {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-ospfv3-sr";

     prefix ospfv3-sr;

     import ietf-inet-types {
       prefix "inet";
     }

     import ietf-yang-types {
       prefix "yang";
     }

     import ietf-routing {
       prefix "rt";
     }

     import ietf-ospf {
       prefix "ospf";
     }

     import ietf-ospfv3-extended-lsa {
       prefix "ospfv3-e-lsa";
     }

     import ietf-ospf-sr {
       prefix "ospf-sr";
     }

     organization
       "IETF LSR - Link State Routing Working Group";

     contact
        "WG Web:   <http://tools.ietf.org/wg/lsr>
         WG List:  <mailto:lsr@ietf.org>

         Author:   Yingzhen Qu
                   <mailto:yqu@futurewei.com>
         Author:   Acee Lindem
                   <mailto:acee@cisco.com>";

     description
       "This YANG module defines the operational state for OSPFv3
        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 OSPFv3



Lindem & Qu              Expires 23 October 2022                [Page 8]


Internet-Draft               OSPFv3 SR YANG                   April 2022


        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) 2021 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 Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).

        This version of this YANG module is part of RFC XXXX;
        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.";

     reference "RFC XXXX";

     revision 2021-10-18 {
       description
         "Initial revision.";
       reference
         "RFC XXXX: A YANG Data Model for OSPFv3 Segment Routing.";
     }

     /* groupings */
     grouping ospfv3-prefix-sid-sub-tlvs {
       description "Prefix Segment ID (SID) sub-TLVs.";
       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.";



Lindem & Qu              Expires 23 October 2022                [Page 9]


Internet-Draft               OSPFv3 SR YANG                   April 2022


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

     grouping ospfv3-extended-prefix-range-tlvs {
       description "Extended prefix range TLV grouping.";

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



Lindem & Qu              Expires 23 October 2022               [Page 10]


Internet-Draft               OSPFv3 SR YANG                   April 2022


       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 ospf-sr:adj-sid-bit;
               }
               description "Adj sid sub-tlv flags list.";
             }
             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.";
       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 ospf-sr: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.";
           }



Lindem & Qu              Expires 23 October 2022               [Page 11]


Internet-Draft               OSPFv3 SR YANG                   April 2022


           leaf sid {
             type uint32;
             description "Segment Identifier (SID) index/label.";
           }
         }
       }
     }

     /* Database */
     /* 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/"
           + "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 ospf-sr:sr-algorithm-tlv;
       uses ospf-sr:sid-range-tlvs;
       uses ospf-sr:local-block-tlvs;
       uses ospf-sr: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 ospf-sr:sr-algorithm-tlv;
       uses ospf-sr:sid-range-tlvs;



Lindem & Qu              Expires 23 October 2022               [Page 12]


Internet-Draft               OSPFv3 SR YANG                   April 2022


       uses ospf-sr:local-block-tlvs;
       uses ospf-sr: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.";
       }

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

       uses ospf-sr:sr-algorithm-tlv;
       uses ospf-sr:sid-range-tlvs;
       uses ospf-sr:local-block-tlvs;
       uses ospf-sr: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/"



Lindem & Qu              Expires 23 October 2022               [Page 13]


Internet-Draft               OSPFv3 SR YANG                   April 2022


       + "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/"
       + "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: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-nssa" {
       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-NSSA LSA.";
     }

     /* Prefix SID Sub-TLV in Intra-Area Prefix TLV */
     augment "/rt:routing/"
       + "rt:control-plane-protocols/rt:control-plane-protocol/"



Lindem & Qu              Expires 23 October 2022               [Page 14]


Internet-Draft               OSPFv3 SR YANG                   April 2022


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

     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'" {



Lindem & Qu              Expires 23 October 2022               [Page 15]


Internet-Draft               OSPFv3 SR YANG                   April 2022


         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/"
       + "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: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-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 AS-Scoped External Prefix TLV.";
     }

     /* Adj-SID sub-TLV */
     augment "/rt:routing/"



Lindem & Qu              Expires 23 October 2022               [Page 16]


Internet-Draft               OSPFv3 SR YANG                   April 2022


       + "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
         "OSPFv3 Area-Scoped Adj-SID Sub-TLV.";
     }
   }
   <CODE ENDS>

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










Lindem & Qu              Expires 23 October 2022               [Page 17]


Internet-Draft               OSPFv3 SR YANG                   April 2022


   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.  The exposure of the Link State
   Database (LSDB) will expose the detailed topology of the network.
   This may be undesirable since both due to the fact that exposure may
   facilitate other attacks.  Additionally, network operators may
   consider their topologies to be sensitive confidential data.

5.  IANA Considerations

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

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

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

      name: ietf-ospfv3-sr
      namespace: urn:ietf:params:xml:ns:yang:ietf-ospfv3-sr
      prefix: ospfv3-sr
      reference: RFC XXXX

6.  Acknowledgements

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

   The YANG model was developed using the suite of YANG tools written
   and maintained by numerous authors.

7.  References

7.1.  Normative References

   [I-D.ietf-ospf-sr-yang]
              Yeung, D., Qu, Y., Zhang, J., Chen, I., and A. Lindem,
              "YANG Data Model for OSPF Segment Routing", Work in
              Progress, Internet-Draft, draft-ietf-ospf-sr-yang-17, 2
              January 2022, <https://www.ietf.org/archive/id/draft-ietf-
              ospf-sr-yang-17.txt>.

   [I-D.ietf-ospf-yang]
              Yeung, D., Qu, Y., Zhang, J., Chen, I., and A. Lindem,
              "YANG Data Model for OSPF Protocol", Work in Progress,



Lindem & Qu              Expires 23 October 2022               [Page 18]


Internet-Draft               OSPFv3 SR YANG                   April 2022


              Internet-Draft, draft-ietf-ospf-yang-29, 17 October 2019,
              <https://www.ietf.org/archive/id/draft-ietf-ospf-yang-
              29.txt>.

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

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

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

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

   [RFC8022]  Lhotka, L. and A. Lindem, "A YANG Data Model for Routing
              Management", RFC 8022, DOI 10.17487/RFC8022, November
              2016, <https://www.rfc-editor.org/info/rfc8022>.

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

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



Lindem & Qu              Expires 23 October 2022               [Page 19]


Internet-Draft               OSPFv3 SR YANG                   April 2022


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

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

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

Authors' Addresses

   Acee Lindem
   Cisco Systems
   301 Midenhall Way
   Cary, NC 27513
   Email: acee@cisco.com


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






















Lindem & Qu              Expires 23 October 2022               [Page 20]