Skip to main content

YANG Data Model for SR and SR TE Topologies on MPLS Data Plane
draft-ietf-teas-yang-sr-te-topo-13

Document Type Active Internet-Draft (teas WG)
Authors Xufeng Liu , Igor Bryskin , Vishnu Pavan Beeram , Tarek Saad , Himanshu C. Shah , Stephane Litkowski
Last updated 2022-03-01
Replaces draft-liu-teas-yang-sr-te-topo
Stream Internet Engineering Task Force (IETF)
Intended RFC status (None)
Formats plain text htmlized pdfized bibtex
Yang Validation 0 errors, 5 warnings
Reviews
Additional resources Yang catalog entry for ietf-sr-mpls-topology-state@2020-11-01.yang
Yang catalog entry for ietf-sr-mpls-topology@2020-11-01.yang
Yang impact analysis for draft-ietf-teas-yang-sr-te-topo
Mailing list discussion
Stream WG state WG Document
Document shepherd (None)
IESG IESG state I-D Exists
Consensus boilerplate Unknown
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ietf-teas-yang-sr-te-topo-13
Network Working Group                                             X. Liu
Internet-Draft                                           IBM Corporation
Intended status: Standards Track                              I. Bryskin
Expires: September 2, 2022                                    Individual
                                                               V. Beeram
                                                                 T. Saad
                                                        Juniper Networks
                                                                 H. Shah
                                                                   Ciena
                                                            S. Litkowski
                                                                   Cisco
                                                           March 1, 2022

     YANG Data Model for SR and SR TE Topologies on MPLS Data Plane
                   draft-ietf-teas-yang-sr-te-topo-13

Abstract

   This document defines a YANG data model for Segment Routing (SR)
   topology and Segment Routing (SR) traffic engineering (TE) topology,
   using 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 September 2, 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

Liu, et al.             Expires September 2, 2022               [Page 1]
Internet-Draft            YANG SR MPLS Topology               March 2022

   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Terminology . . . . . . . . . . . . . . . . . . . . . . .   3
     1.2.  Tree Diagrams . . . . . . . . . . . . . . . . . . . . . .   3
     1.3.  Prefixes in Data Node Names . . . . . . . . . . . . . . .   3
   2.  Modeling Considerations . . . . . . . . . . . . . . . . . . .   4
     2.1.  Segment Routing (SR) MPLS Topology  . . . . . . . . . . .   4
     2.2.  Segment Routing (SR) MPLS TE Topology . . . . . . . . . .   4
     2.3.  Relations to ietf-segment-routing . . . . . . . . . . . .   7
     2.4.  Topology Type Modeling  . . . . . . . . . . . . . . . . .   7
     2.5.  Topology Attributes . . . . . . . . . . . . . . . . . . .   7
     2.6.  Node Attributes . . . . . . . . . . . . . . . . . . . . .   7
     2.7.  Link Attributes . . . . . . . . . . . . . . . . . . . . .   9
   3.  Model Structure . . . . . . . . . . . . . . . . . . . . . . .  10
   4.  YANG Module . . . . . . . . . . . . . . . . . . . . . . . . .  11
   5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  20
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  21
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  23
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  23
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  25
   Appendix A.  Companion YANG Model for Non-NMDA Compliant
                Implementations  . . . . . . . . . . . . . . . . . .  26
     A.1.  SR MPLS Topology State Module . . . . . . . . . . . . . .  26
   Appendix B.  Data Tree Example  . . . . . . . . . . . . . . . . .  29
     B.1.  SR MPLS Topology with TE Not Enabled  . . . . . . . . . .  30
     B.2.  SR MPLS Topology with TE Enabled  . . . . . . . . . . . .  37
   Appendix C.  Contributors . . . . . . . . . . . . . . . . . . . .  52
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  52

1.  Introduction

   This document defines a YANG [RFC7950] data model for describing the
   presentations of Segment Routing (SR) topology and Segment Routing
   (SR) traffic engineering (TE) topology.  The version of the model
   limits the transport type to an MPLS dataplane.

Liu, et al.             Expires September 2, 2022               [Page 2]
Internet-Draft            YANG SR MPLS Topology               March 2022

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

   The following terms are defined in [RFC7950] and are not redefined
   here:

   o  augment

   o  data model

   o  data node

1.2.  Tree Diagrams

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

1.3.  Prefixes in Data Node Names

   In this document, names of data nodes, actions, and other data model
   objects are often used without a prefix, as long as it is clear from
   the context in which YANG module each name is defined.  Otherwise,
   names are prefixed using the standard prefix associated with the
   corresponding YANG module, as shown in Table 1.

   +--------+--------------------------+-------------------------------+
   | Prefix | YANG module              | Reference                     |
   +--------+--------------------------+-------------------------------+
   | nw     | ietf-network             | [RFC8345]                     |
   | nt     | ietf-network-topology    | [RFC8345]                     |
   | l3t    | ietf-l3-unicast-topology | [RFC8346]                     |
   | sr-cmn | ietf-segment-routing-    | [RFC9020]                     |
   |        | common                   |                               |
   | tet    | ietf-te-topology         | [RFC8795]                     |
   | tet-   | ietf-te-topology-packet  | [I-D.ietf-teas-yang-l3-te-top |
   | pkt    |                          | o]                            |
   +--------+--------------------------+-------------------------------+

             Table 1: Prefixes and Corresponding YANG Modules

Liu, et al.             Expires September 2, 2022               [Page 3]
Internet-Draft            YANG SR MPLS Topology               March 2022

2.  Modeling Considerations

2.1.  Segment Routing (SR) MPLS Topology

   The Layer 3 network topology model is discussed in [RFC8346].  The
   Segment Routing (SR) MPLS topology model proposed in this document
   augments and uses the ietf-l3-unicast-topology module defined in
   [RFC8346].  SR MPLS related attributes are covered in the ietf-sr-
   mpls-topology module.

               +------------------------------+
               |   Layer 3 Network Topology   |
               |   ietf-l3-unicast-topology   |
               +---------------^--------------+
                               |
                               |
                               |
                               |
                  +------------^-----------+
                  |    SR MPLS Topology    |
                  | ietf-sr-mpls-topology  |
                  +------------------------+

                  Figure 1: SR MPLS Topology Augmentation

2.2.  Segment Routing (SR) MPLS TE Topology

   A Segment Routing (SR) MPLS TE topology is an instance of SR MPLS
   topology with TE enabled.  In order to instantiate an SR MPLS TE
   topology, the ietf-sr-mpls-topology module defined in this document
   can be used together with the ietf-te-topology module defined in
   [RFC8795] and the ietf-te-topology-packet module defined in
   [I-D.ietf-teas-yang-l3-te-topo].  All these modules directly or
   indirectly augment the ietf-network-topology module defind in
   [RFC8345], as shown in Figure 2.

Liu, et al.             Expires September 2, 2022               [Page 4]
Internet-Draft            YANG SR MPLS Topology               March 2022

                        +---------------------------+
                        |    Network Topology       |
                        |  ietf-network-topology    |
                        +-^-----------------------^-+
                         /                         \
                        /                           \
                       /                             \
                      /                               \
        +-------------^-------------+   +-------------^-------------+
        | Layer 3 Unicast Topology  |   |        TE Topology        |
        | ietf-l3-unicast-topology  |   |      ietf-te-topology     |
        +-------------^-------------+   +-------------^-------------+
                      |                               |
                      |                               |
                      |                               |
                      |                               |
        +-------------^-------------+   +-------------^-------------+
        |     SR MPLS Topology      |   |     TE Packet Topology    |
        |   ietf-sr-mpls-topology   |   |  ietf-te-topology-packet  |
        +---------------------------+   +---------------------------+

          Figure 2: SR TE Topology Instance Inheritance Relations

   Figure 3 shows the data structure of an SR TE topology instance.
   Because of the augmentation relationships shown in Figure 2, a data
   instance of an SR MPLS TE topology contains the capabilities from all
   these modules, so that the data includes the attributes from ietf-
   network-topology, ietf-l3-unicast-topology, ietf-sr-mpls-topology,
   ietf-te-topology, and ietf-te-topology-packet.

Liu, et al.             Expires September 2, 2022               [Page 5]
Internet-Draft            YANG SR MPLS Topology               March 2022

       +--------------------------------------------------------+
       | ietf-network-topology:                                 |
       |   network-id (key)                                     |
       |   network-types: {                                     |
       |     l3-unicast-topology: {                             |
       |       sr-mpls{}                                        |
       |     }                                                  |
       |     te-topology: {                                     |
       |       packet{}                                         |
       |     }                                                  |
       |   }                                                    |
       |   <other network topology attributes>                  |
       +-----------------------------+--------------------------+
       | ietf-l3-unicast-topology:   | ietf-te-topology:        |
       |   <L3 unicast attributes>   |   <TE attributes>        |
       +-----------------------------+--------------------------+
       | ietf-sr-mpls-topology:      | ietf-te-topology-packet: |
       |   <SR MPLS attributes>      |   <TE packet attributes> |
       +-----------------------------+--------------------------+

             Figure 3: SR TE topology instance data structure

   Each type of topology is indicated by a YANG presence container which
   augments "network-types" as defined in [RFC8345].2 For the five types
   of topologies above, the data representations are:

   Base network topology [RFC8345]:

   /nw:networks/nw:network/nw:network-types

   Layer 3 Unicast Topology [RFC8346]:

   /nw:networks/nw:network/nw:network-types/l3t:l3-unicast-topology

   SR MPLS Topology (defined in this document):

   /nw:networks/nw:network/nw:network-types/l3t:l3-unicast-topology/
   srmt:sr-mpls

   TE Topology [RFC8795]:

   /nw:networks/nw:network/nw:network-types/tet:te-topology

   TE Packet Topology [I-D.ietf-teas-yang-l3-te-topo]:

   /nw:networks/nw:network/nw:network-types/tet:te-topology/tet-
   pkt:packet

Liu, et al.             Expires September 2, 2022               [Page 6]
Internet-Draft            YANG SR MPLS Topology               March 2022

2.3.  Relations to ietf-segment-routing

   [RFC9020] defines ietf-segment-routing that is a model intended to be
   used on network elements to configure or operate segment routing;
   ietf-sr-mpls-topology defined in this document is intended to be used
   on a controller for the network-wide operations such as path
   computation.

   SR MPLS topology model shares many modeling constructs defined in
   ietf-segment-routing.  The module ietf-sr-mpls-topology uses the
   types and groupings defined in ietf-segment-routing.

2.4.  Topology Type Modeling

   A new topology type is defined in this document, to indicate a
   topology that is a Segment Routing (SR) topology on an MPLS
   dataplane.

   augment /nw:networks/nw:network/nw:network-types
             /l3t:l3-unicast-topology:
     +--rw sr-mpls!

   Section 4.4.8 of RFC 8345 describes how network types are represented
   using nested presence container.  In this document, the presence
   container sr-mpls is used for such a purpose.

2.5.  Topology Attributes

   The Segment Routing attributes with topology-wide impacts are modeled
   by augmenting the container "l3-topology-attributes" in the L3
   topology model [RFC8346].  SRGB (Segment Routing Global Block) is
   covered in this augmentation.  A SR domain is mapped to a topology in
   this model.

   augment /nw:networks/nw:network/l3t:l3-topology-attributes:
     +--rw sr-mpls
        +--rw srgb* [lower-bound upper-bound]
           +--rw lower-bound    uint32
           +--rw upper-bound    uint32

2.6.  Node Attributes

   The Segment Routing attributes within the node scope are modeled by
   augmenting the sub tree /nw:networks/nw:network/nw:node/ in the L3
   topology model [RFC8346].

   The SR attributes that have node-scope impact are modeled by
   augmenting the container "l3-node-attributes" in the L3 topology

Liu, et al.             Expires September 2, 2022               [Page 7]
Internet-Draft            YANG SR MPLS Topology               March 2022

   model, including the SR capabilities, SRGB (Segment Routing Global
   Block), and SRLB (Segment Routing Local Block) specified on this
   mode.  This model also provides the information about how these SR
   attributes are learned:

   The presence container sr-mpls is used to indicate that SR MPLS is
   enabled on this node when the container is present.

   augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes:
     +--rw sr-mpls!
        +--rw srgb* [lower-bound upper-bound]
        |  +--rw lower-bound    uint32
        |  +--rw upper-bound    uint32
        +--rw srlb* [lower-bound upper-bound]
        |  +--rw lower-bound    uint32
        |  +--rw upper-bound    uint32
        +--rw msds {msd}?
        |  +--rw node-msd* [msd-type]
        |     +--rw msd-type     identityref
        |     +--rw msd-value?   uint8
        +--ro information-source?            enumeration
        +--ro information-source-instance?   string
        +--ro information-source-state
           +--ro credibility-preference?   uint16

   The SR attributes that are related to a IGP-Prefix segment are
   modeled by augmenting the list entry "prefix" in the L3 topology
   model:

   augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes
             /l3t:prefix:
     +--rw sr-mpls!
        +--rw sids
           +--rw sid* [algorithm]
              +--rw value-type?          enumeration
              +--rw start-sid            uint32
              +--rw range?               uint32
              +--rw algorithm            identityref
              +--rw last-hop-behavior?   enumeration
              |       {sid-last-hop-behavior}?
              +--rw is-local?            boolean
              +--rw is-node?             boolean
              +--ro is-readvertisment?   boolean

Liu, et al.             Expires September 2, 2022               [Page 8]
Internet-Draft            YANG SR MPLS Topology               March 2022

2.7.  Link Attributes

   A link in the topology model connects the termination point on the
   source node to the termination point on the destination node.  When
   such a link is instantiated, the bindings between the nodes and the
   corresponding Adj-SIDs are formed, and the resulting FIB entries are
   installed.

   A link in the topology model is mapped to an SR Adjacency Segment,
   formed by a pair of interfaces on two respective adjacent nodes.  The
   SR Adjacency Segment attributes are modeled by augmenting the link
   attributes of the L3 topology model [RFC8346].  The modeling
   structure is as follows:

   augment /nw:networks/nw:network/nt:link/l3t:l3-link-attributes:
     +--rw sr-mpls!
        +--rw msds {msd}?
        |  +--rw link-msd* [msd-type]
        |     +--rw msd-type     identityref
        |     +--rw msd-value?   uint8
        +--rw sids
        |  +--rw sid* [value-type sid]
        |     +--rw value-type                    enumeration
        |     +--rw sid                           uint32
        |     +--rw address-family?               enumeration
        |     +--rw is-eligible-for-protection?   boolean
        |     +--rw is-local?                     boolean
        |     +--rw is-part-of-set?               boolean
        |     +--rw is-persistent?                boolean
        |     +--rw is-on-lan?                    boolean
        |     +--rw weight?                       uint8
        +--ro information-source?            enumeration
        +--ro information-source-instance?   string
        +--ro information-source-state
           +--ro credibility-preference?   uint16

   IGPs [RFC8665] [RFC8666] [RFC8667] and BGP-LS [RFC7752]
   [I-D.ietf-idr-bgp-ls-segment-routing-ext] can be supported by the
   model, the leaf "information-source" is used to indicate where the
   information is from.

   The bundling capability of the Adjacency Segemnt is achieved by re-
   using the existing modeling construct (i.e. "bundle-stack-level")
   under /nw:networks/nw:network/nt:link/tet:te [RFC8795]

   The presence container sr-mpls is used to indicate that SR SMPL is
   enabled on this link when the container is present.

Liu, et al.             Expires September 2, 2022               [Page 9]
Internet-Draft            YANG SR MPLS Topology               March 2022

3.  Model Structure

   The model tree structure of the Segment Routing (SR) topology module
   is as shown below:

   module: ietf-sr-mpls-topology
     augment /nw:networks/nw:network/nw:network-types
               /l3t:l3-unicast-topology:
       +--rw sr-mpls!
     augment /nw:networks/nw:network/l3t:l3-topology-attributes:
       +--rw sr-mpls
          +--rw srgb* [lower-bound upper-bound]
             +--rw lower-bound    uint32
             +--rw upper-bound    uint32
     augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes:
       +--rw sr-mpls!
          +--rw srgb* [lower-bound upper-bound]
          |  +--rw lower-bound    uint32
          |  +--rw upper-bound    uint32
          +--rw srlb* [lower-bound upper-bound]
          |  +--rw lower-bound    uint32
          |  +--rw upper-bound    uint32
          +--rw msds {msd}?
          |  +--rw node-msd* [msd-type]
          |     +--rw msd-type     identityref
          |     +--rw msd-value?   uint8
          +--ro information-source?            enumeration
          +--ro information-source-instance?   string
          +--ro information-source-state
             +--ro credibility-preference?   uint16
     augment /nw:networks/nw:network/nw:node/l3t:l3-node-attributes
               /l3t:prefix:
       +--rw sr-mpls!
          +--rw sids
             +--rw sid* [algorithm]
                +--rw value-type?          enumeration
                +--rw start-sid            uint32
                +--rw range?               uint32
                +--rw algorithm            identityref
                +--rw last-hop-behavior?   enumeration
                |       {sid-last-hop-behavior}?
                +--rw is-local?            boolean
                +--rw is-node?             boolean
                +--ro is-readvertisment?   boolean
     augment /nw:networks/nw:network/nt:link/l3t:l3-link-attributes:
       +--rw sr-mpls!
          +--rw msds {msd}?

Liu, et al.             Expires September 2, 2022              [Page 10]
Internet-Draft            YANG SR MPLS Topology               March 2022

          |  +--rw link-msd* [msd-type]
          |     +--rw msd-type     identityref
          |     +--rw msd-value?   uint8
          +--rw sids
          |  +--rw sid* [value-type sid]
          |     +--rw value-type                    enumeration
          |     +--rw sid                           uint32
          |     +--rw address-family?               enumeration
          |     +--rw is-eligible-for-protection?   boolean
          |     +--rw is-local?                     boolean
          |     +--rw is-part-of-set?               boolean
          |     +--rw is-persistent?                boolean
          |     +--rw is-on-lan?                    boolean
          |     +--rw weight?                       uint8
          +--ro information-source?            enumeration
          +--ro information-source-instance?   string
          +--ro information-source-state
             +--ro credibility-preference?   uint16

4.  YANG Module

   This module references [RFC7752], [RFC8345], [RFC8346], [RFC8476],
   [RFC8491], [RFC8665], [RFC8666], [RFC8667], [RFC8814], [RFC9020], and
   [I-D.ietf-idr-bgp-ls-segment-routing-ext].

   <CODE BEGINS> file "ietf-sr-mpls-topology@2021-10-23.yang"
   module ietf-sr-mpls-topology {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology";
     prefix "srmt";

     import ietf-network {
       prefix "nw";
       reference "RFC 8345: A YANG Data Model for Network Topologies";
     }
     import ietf-network-topology {
       prefix "nt";
       reference "RFC 8345: A YANG Data Model for Network Topologies";
     }
     import ietf-l3-unicast-topology {
       prefix "l3t";
       reference "RFC 8346: A YANG Data Model for Layer 3 Topologies";
     }
     import ietf-segment-routing-common {
       prefix "sr-cmn";
       reference "RFC 9020: YANG Data Model for Segment Routing";

Liu, et al.             Expires September 2, 2022              [Page 11]
Internet-Draft            YANG SR MPLS Topology               March 2022

     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

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

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu.ietf@gmail.com>

        Editor:   Igor Bryskin
                  <mailto:Igor.Bryskin@huawei.com>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@cisco.com>

        Editor:   Himanshu Shah
                  <mailto:hshah@ciena.com>

        Editor:   Stephane Litkowski
                  <mailto:stephane.litkowski@orange.com>";

     description
       "YANG data model for representing and manipulating Segment
        Routing Topologies on MPLS Data Plane.

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

     revision 2021-10-23 {
       description "Initial revision";
       reference

Liu, et al.             Expires September 2, 2022              [Page 12]
Internet-Draft            YANG SR MPLS Topology               March 2022

         "RFC XXXX: YANG Data Model for SR and SR TE Topologies on MPLS
          Data Plane";
     }

     identity msd-base-type {
       description
         "Base identity for MSD Type";
     }

     identity base-mpls-msd {
       base msd-base-type;
       description
         "Base MPLS Imposition MSD.";
       reference
         "RFC 8491: Signaling Maximum SID Depth (MSD) Using IS-IS";
     }

     identity erld-msd {
       base msd-base-type;
       description
         "ERLD-MSD is defined to advertise the ERLD.";
       reference
         "RFC 8662: Entropy Label for Source Packet Routing in
          Networking (SPRING) Tunnels";
     }

     feature msd {
       description
         "Support of signaling MSD (Maximum SID Depth) in IGP.";
       reference
         "RFC 8476: Signaling Maximum SID Depth (MSD) Using OSPF.
          RFC 8491: Signaling Maximum SID Depth (MSD) Using IS-IS.
          RFC 8814: Signaling Maximum SID Depth (MSD) Using the Border
          Gateway Protocol - Link State.";
     }

     grouping sr-mpls-topology-type {
       description
         "Identifies the SR-MPLS topology type. This type of network
          topologies use Segment Routing (SR) technology over the MPLS
          data plane";
       container sr-mpls {
         presence "Indicates SR-MPLS topology";
         description
           "Its presence identifies the SR MPLS topology type.";
       }
     }

Liu, et al.             Expires September 2, 2022              [Page 13]
Internet-Draft            YANG SR MPLS Topology               March 2022

     augment "/nw:networks/nw:network/nw:network-types/"
       + "l3t:l3-unicast-topology" {
       description
         "Defines the SR MPLS topology type.";
       uses sr-mpls-topology-type;
     }

     augment "/nw:networks/nw:network/l3t:l3-topology-attributes" {
       when "../nw:network-types/l3t:l3-unicast-topology/srmt:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment topology configuration";
       uses sr-mpls-topology-attributes;
     }

     augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes" {
       when "../../nw:network-types/l3t:l3-unicast-topology/"
         + "srmt:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment node configuration.";
       uses sr-node-attributes;
     }

     augment "/nw:networks/nw:network/nw:node/l3t:l3-node-attributes"
       + "/l3t:prefix" {
       when "../../../nw:network-types/l3t:l3-unicast-topology/"
         + "srmt:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment node prefix.";
       uses sr-node-prefix-attributes;
     }

     augment "/nw:networks/nw:network/nt:link/l3t:l3-link-attributes" {
       when "../../nw:network-types/l3t:l3-unicast-topology/"
         + "srmt:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment link configuration";
       uses sr-link-attributes;
     }

     grouping sr-mpls-topology-attributes {
       description "SR MPLS topology scope attributes.";
       container sr-mpls {
         description
           "Containing SR attributes.";

Liu, et al.             Expires September 2, 2022              [Page 14]
Internet-Draft            YANG SR MPLS Topology               March 2022

         uses sr-cmn:srgb;
       } // sr
     } // sr-mpls-topology-attributes

     grouping information-source-attributes {
       description
         "The attributes identifying source that has provided the
          related information, and the source credibility.";
       leaf information-source {
         type enumeration {
           enum "unknown" {
             description "The source is unknown.";
           }
           enum "locally-configured" {
             description "Configured entity.";
           }
           enum "ospfv2" {
             description "OSPFv2.";
             reference
               "RFC 8665: OSPF Extensions for Segment Routing.";
           }
           enum "ospfv3" {
             description "OSPFv3.";
             reference
               "RFC 8666: OSPFv3 Extensions for Segment Routing.";
           }
           enum "isis" {
             description "ISIS.";
             reference
               "RFC 8667: IS-IS Extensions for Segment Routing.";
           }
           enum "bgp-ls" {
             description "BGP-LS.";
             reference
               "RFC 7752: North-Bound Distribution of Link-State and
                Traffic Engineering (TE) Information Using BGP.
                I-D.ietf-idr-bgp-ls-segment-routing-ext:
                BGP Link-State extensions for Segment Routing.";
           }
           enum "system-processed" {
             description "System processed entity.";
           }
           enum "other" {
             description "Other source.";
           }
         }
         config false;
         description

Liu, et al.             Expires September 2, 2022              [Page 15]
Internet-Draft            YANG SR MPLS Topology               March 2022

           "Indicates the type of the information source.";
       }
       leaf information-source-instance {
         type string;
         config false;
         description
           "The name indicating the instance of the information
            source.";
       }
       container information-source-state {
         config false;
         description
           "The container contains state attributes related to
            the information source.";
         leaf credibility-preference {
           type uint16;
           description
             "The preference value to calculate the traffic
              engineering database credibility value used for
              tie-break selection between different
              information-source values.
              Higher value is more preferable.";
         }
       }
     } // information-source-attributes

     grouping sr-node-attributes {
       description "SR node scope attributes.";
       container sr-mpls {
         presence "Presence indicates SR is enabled.";
         description
           "Containing SR attributes.";
         uses sr-cmn:srgb;
         uses sr-cmn:srlb;
         container msds {
           if-feature "msd";
           description
             "MSDs on the node.";
           list node-msd {
             key "msd-type";
             leaf msd-type {
               type identityref {
                 base msd-base-type;
               }
               description
                 "MSD Type.";
             }
             leaf msd-value {

Liu, et al.             Expires September 2, 2022              [Page 16]
Internet-Draft            YANG SR MPLS Topology               March 2022

               type uint8;
               description
                 "MSD value, in the range of 0-255. Node MSD is the
                  lowest MSD supported by the node.";
             }
             description
               "List of node MSDs. A node may have a list of MSD values,
                with at most one value for each msd-type.";
             reference
               "RFC 8491: Signaling Maximum SID Depth (MSD) Using
                IS-IS";
           }
         }
         // Operational state data
         uses information-source-attributes;
       } // sr
     } // sr-node-attributes

     grouping sr-node-prefix-attributes {
       description "Containing SR attributes for a prefix.";
       container sr-mpls {
         presence "Presence indicates SR is enabled.";
         description
           "Containing SR attributes for a prefix.";
         container sids {
           description
             "Containing Prefix SIDs assigned to this prefix.";
           list sid {
             key "algorithm";
             description
               "A list of SIDs with their properties.";
             uses sr-cmn:prefix-sid-attributes;
             uses sr-cmn:last-hop-behavior;
             leaf is-local {
               type boolean;
               default false;
               description
                 "'true' if the SID is local.";
             }
             leaf is-node {
               type boolean;
               default false;
               description
                 "'true' if the Prefix-SID refers to the router
                  identified by the prefix.  Typically, the leaf
                  'is-node' (N-Flag) is set on Prefix-SIDs attached to a
                  router loopback address.";
             }

Liu, et al.             Expires September 2, 2022              [Page 17]
Internet-Draft            YANG SR MPLS Topology               March 2022

             leaf is-readvertisment {
               type boolean;
               config false;
               description
                 "'true' if the prefix to which this Prefix-SID is
                   attached, has been propagated by the router from
                   another topology by redistribution.";
               reference
                 "RFC 8667: IS-IS Extensions for Segment Routing.
                  Sec 2.1.";
             }
           }
         }
       } // sr
     } // sr-node-prefix-attributes

     grouping sr-link-attributes {
       description "SR link scope attributes";
       container sr-mpls {
         presence "Presence indicates SR is enabled.";
         description
           "Containing SR attributes.";

         container msds {
           if-feature "msd";
           description
             "MSDs on the link.";
           list link-msd {
             key "msd-type";
             leaf msd-type {
               type identityref {
                 base msd-base-type;
               }
               description
                 "MSD Type.";
             }
             leaf msd-value {
               type uint8;
               description
                 "MSD value, in the range of 0-255.";
             }
             description
               "List of link MSDs. A link may have a list of MSD values,
                with at most one value for each msd-type.";
             reference
               "RFC 8491: Signaling Maximum SID Depth (MSD) Using
                IS-IS";
           }

Liu, et al.             Expires September 2, 2022              [Page 18]
Internet-Draft            YANG SR MPLS Topology               March 2022

         }
         container sids {
           description
             "Containing Adjacency SIDs assigned to this link.";
           list sid {
             key "value-type sid";
             description
               "A list of SIDs with their properties.";
             uses sr-cmn:sid-value-type;
             leaf sid {
               type uint32;
               mandatory true;
               description
                 "Adjacency SID, which can be either IGP-Adjacency SID
                  or BGP PeerAdj SID, depending on the context.";
             }
             leaf address-family {
               type enumeration {
                 enum "ipv4" {
                   description
                     "The Adj-SID refers to an adjacency with outgoing
                      IPv4 encapsulation.";
                 }
                 enum "ipv6" {
                   description
                     "The Adj-SID refers to an adjacency with outgoing
                      IPv6 encapsulation.";
                 }
               }
               default "ipv4";
               description
                 "This leaf defines the F-Flag (Address-Family flag) of
                  the SID.";
             }
             leaf is-eligible-for-protection {
               type boolean;
               default false;
               description
                 "'true' if the SID is is eligible for protection.";
               reference
                 "RFC 8402: Segment Routing Architecture. Sec. 3.4.";
             }
             leaf is-local {
               type boolean;
               default false;
               description
                 "'true' if the SID is local.";
             }

Liu, et al.             Expires September 2, 2022              [Page 19]
Internet-Draft            YANG SR MPLS Topology               March 2022

             leaf is-part-of-set {
               type boolean;
               default false;
               description
                 "'true' if the SID is part of a set.";
             }
             leaf is-persistent {
               type boolean;
               default true;
               description
                 "'true' if the SID is persistently allocated.";
             }
             leaf is-on-lan {
               type boolean;
               default false;
               description
                 "'true' if on a lan.";
             }
             leaf weight {
               type uint8;
               description
                 "The value represents the weight of the SID for the
                  purpose of load balancing.  The use of the weight
                  is defined in RFC 8402.";
               reference
                 "RFC 8402: Segment Routing Architecture. Sec. 3.4.";
             }
           }
         }
         uses information-source-attributes;
       } // sr
     } // sr-tp-attributes
   }
   <CODE ENDS>

5.  IANA Considerations

   RFC Ed.: In this section, replace all occurrences of 'XXXX' with the
   actual RFC number (and remove this note).

   This document registers the following namespace URIs in the IETF XML
   registry [RFC3688]:

Liu, et al.             Expires September 2, 2022              [Page 20]
Internet-Draft            YANG SR MPLS Topology               March 2022

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

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

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

   --------------------------------------------------------------------
   name:         ietf-sr-mpls-topology
   namespace:    urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology
   prefix:       srmt
   reference:    RFC XXXX
   --------------------------------------------------------------------

   --------------------------------------------------------------------
   name:         ietf-sr-mpls-topology-state
   namespace:    urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology-state
   prefix:       srmt-s
   reference:    RFC XXXX
   --------------------------------------------------------------------

6.  Security Considerations

   The YANG module specified in this document defines 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 preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module that are
   writable/creatable/deletable (i.e., config true, which is the
   default).  These data nodes may be considered sensitive or vulnerable
   in some network environments.  Write operations (e.g., edit-config)

Liu, et al.             Expires September 2, 2022              [Page 21]
Internet-Draft            YANG SR MPLS Topology               March 2022

   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:

   /nw:networks/nw:network/nw:network-types/l3t:l3-unicast-topology/sr-
   mpls
      This subtree specifies the SR MPLS topology type.  Modifying the
      configurations can make SR MPLS topology type invalid and cause
      interruption to all SR networks.

   /nw:networks/nw:network/l3t:l3-topology-attributes/sr
      This subtree specifies the topology-wide configurations, including
      the SRGB (Segment Routing Global Block).  Modifying the
      configurations here can cause traffic disabled or rerouted in this
      topology and the connected topologies.

   /nw:networks/nw:network/nw:node/l3t:l3-node-attributes
      This subtree specifies the SR configurations for nodes.  Modifying
      the configurations in this subtree can add, remove, or modify SR
      nodes, causing traffic disabled or rerouted in the specified nodes
      and the related TE topologies.

   /nw:networks/nw:network/nt:link/l3t:l3-link-attributes/sr
      This subtree specifies the configurations for SR Adjacency
      Segments.  Modifying the configurations in this subtree can add,
      remove, or modify SR Adjacency Segments causing traffic disabled
      or rerouted on the specified SR adjacencies, the related nodes,
      and the related SR MPLS topologies.

   Some of the readable data nodes in this YANG module may be considered
   sensitive or vulnerable in some network environments.  It is thus
   important to control read access (e.g., via get, get-config, or
   notification) to these data nodes.  These are the subtrees and data
   nodes and their sensitivity/vulnerability:

   /nw:networks/nw:network/nw:network-types/l3t:l3-unicast-topology/sr-
   mpls
      Unauthorized access to this subtree can disclose the SR MPLS
      topology type.

   /nw:networks/nw:network/l3t:l3-topology-attributes/sr
      Unauthorized access to this subtree can disclose the topology-wide
      configurations, including the SRGB (Segment Routing Global Block).

   /nw:networks/nw:network/nw:node/l3t:l3-node-attributes
      Unauthorized access to this subtree can disclose the operational
      state information of the SR nodes.

Liu, et al.             Expires September 2, 2022              [Page 22]
Internet-Draft            YANG SR MPLS Topology               March 2022

   /nw:networks/nw:network/nt:link/l3t:l3-link-attributes/sr
      Unauthorized access to this subtree can disclose the operational
      state information of SR Adjacency Segments.

7.  References

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

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

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

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

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

Liu, et al.             Expires September 2, 2022              [Page 23]
Internet-Draft            YANG SR MPLS Topology               March 2022

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

   [RFC8345]  Clemm, A., Medved, J., Varga, R., Bahadur, N.,
              Ananthakrishnan, H., and X. Liu, "A YANG Data Model for
              Network Topologies", RFC 8345, DOI 10.17487/RFC8345, March
              2018, <https://www.rfc-editor.org/info/rfc8345>.

   [RFC8346]  Clemm, A., Medved, J., Varga, R., Liu, X.,
              Ananthakrishnan, H., and N. Bahadur, "A YANG Data Model
              for Layer 3 Topologies", RFC 8346, DOI 10.17487/RFC8346,
              March 2018, <https://www.rfc-editor.org/info/rfc8346>.

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

   [RFC8491]  Tantsura, J., Chunduri, U., Aldrin, S., and L. Ginsberg,
              "Signaling Maximum SID Depth (MSD) Using IS-IS", RFC 8491,
              DOI 10.17487/RFC8491, November 2018,
              <https://www.rfc-editor.org/info/rfc8491>.

   [RFC8814]  Tantsura, J., Chunduri, U., Talaulikar, K., Mirsky, G.,
              and N. Triantafillis, "Signaling Maximum SID Depth (MSD)
              Using the Border Gateway Protocol - Link State", RFC 8814,
              DOI 10.17487/RFC8814, August 2020,
              <https://www.rfc-editor.org/info/rfc8814>.

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

   [I-D.ietf-teas-yang-l3-te-topo]
              Liu, X., Bryskin, I., Beeram, V. P., Saad, T., Shah, H.,
              and O. G. D. Dios, "YANG Data Model for Layer 3 TE
              Topologies", draft-ietf-teas-yang-l3-te-topo-12 (work in
              progress), October 2021.

Liu, et al.             Expires September 2, 2022              [Page 24]
Internet-Draft            YANG SR MPLS Topology               March 2022

7.2.  Informative References

   [RFC7752]  Gredler, H., Ed., Medved, J., Previdi, S., Farrel, A., and
              S. Ray, "North-Bound Distribution of Link-State and
              Traffic Engineering (TE) Information Using BGP", RFC 7752,
              DOI 10.17487/RFC7752, March 2016,
              <https://www.rfc-editor.org/info/rfc7752>.

   [RFC7951]  Lhotka, L., "JSON Encoding of Data Modeled with YANG",
              RFC 7951, DOI 10.17487/RFC7951, August 2016,
              <https://www.rfc-editor.org/info/rfc7951>.

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

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

   [RFC8667]  Previdi, S., Ed., Ginsberg, L., Ed., Filsfils, C.,
              Bashandy, A., Gredler, H., and B. Decraene, "IS-IS
              Extensions for Segment Routing", RFC 8667,
              DOI 10.17487/RFC8667, December 2019,
              <https://www.rfc-editor.org/info/rfc8667>.

   [RFC8795]  Liu, X., Bryskin, I., Beeram, V., Saad, T., Shah, H., and
              O. Gonzalez de Dios, "YANG Data Model for Traffic
              Engineering (TE) Topologies", RFC 8795,
              DOI 10.17487/RFC8795, August 2020,
              <https://www.rfc-editor.org/info/rfc8795>.

   [I-D.ietf-idr-bgp-ls-segment-routing-ext]
              Previdi, S., Talaulikar, K., Filsfils, C., Gredler, H.,
              and M. Chen, "Border Gateway Protocol - Link State (BGP-
              LS) Extensions for Segment Routing", draft-ietf-idr-bgp-
              ls-segment-routing-ext-18 (work in progress), April 2021.

Liu, et al.             Expires September 2, 2022              [Page 25]
Internet-Draft            YANG SR MPLS Topology               March 2022

Appendix A.  Companion YANG Model for Non-NMDA Compliant Implementations

   The YANG module ietf-sr-mpls-topology defined in this document is
   designed to be used in conjunction with implementations that support
   the Network Management Datastore Architecture (NMDA) defined in
   [RFC8342].  In order to allow implementations to use the model even
   in cases when NMDA is not supported, the following companion module,
   ietf-sr-mpls-topology-state, is defined as state model, which mirrors
   the module ietf-sr-mpls-topology defined earlier in this document.
   However, all data nodes in the companion module are non-configurable,
   to represent the applied configuration or the derived operational
   states.

   The companion module, ietf-sr-mpls-topology-state, is redundant and
   SHOULD NOT be supported by implementations that support NMDA.

   As the structure of the companion module mirrors that of the
   coorespinding NMDA model, the YANG tree of the companion module is
   not depicted separately.

A.1.  SR MPLS Topology State Module

   This module references [RFC8345] and [RFC8346].

   <CODE BEGINS> file "ietf-sr-mpls-topology-state@2021-10-23.yang"
   module ietf-sr-mpls-topology-state {
     yang-version 1.1;
     namespace
       "urn:ietf:params:xml:ns:yang:ietf-sr-mpls-topology-state";
     prefix "srmt-s";

     import ietf-sr-mpls-topology {
       prefix "srmt";
     }
     import ietf-network-state {
       prefix "nw-s";
       reference "RFC 8345: A YANG Data Model for Network Topologies";
     }
     import ietf-network-topology-state {
       prefix "nt-s";
       reference "RFC 8345: A YANG Data Model for Network Topologies";
     }
     import ietf-l3-unicast-topology-state {
       prefix "l3t-s";
       reference "RFC 8346: A YANG Data Model for Layer 3 Topologies";
     }
     import ietf-segment-routing-common {

Liu, et al.             Expires September 2, 2022              [Page 26]
Internet-Draft            YANG SR MPLS Topology               March 2022

       prefix "sr-cmn";
       reference "RFC 9020: YANG Data Model for Segment Routing";
     }

     organization
       "IETF Traffic Engineering Architecture and Signaling (TEAS)
        Working Group";

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

        Editor:   Xufeng Liu
                  <mailto:xufeng.liu.ietf@gmail.com>

        Editor:   Igor Bryskin
                  <mailto:Igor.Bryskin@huawei.com>

        Editor:   Vishnu Pavan Beeram
                  <mailto:vbeeram@juniper.net>

        Editor:   Tarek Saad
                  <mailto:tsaad@cisco.com>

        Editor:   Himanshu Shah
                  <mailto:hshah@ciena.com>

        Editor:   Stephane Litkowski
                  <mailto:stephane.litkowski@orange.com>";

     description
       "YANG data model for representing operational state information
        of Segment Routing Topologies on MPLS data plane, when NMDA is
        not supported.

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

Liu, et al.             Expires September 2, 2022              [Page 27]
Internet-Draft            YANG SR MPLS Topology               March 2022

     revision 2021-10-23 {
       description "Initial revision";
       reference
         "RFC XXXX: YANG Data Model for SR and SR TE Topologies on MPLS
          Data Plane";
     }

     augment "/nw-s:networks/nw-s:network/nw-s:network-types/"
       + "l3t-s:l3-unicast-topology" {
       description
         "Defines the SR MPLS topology type.";
       uses srmt:sr-mpls-topology-type;
     }

     augment "/nw-s:networks/nw-s:network/"
       + "l3t-s:l3-topology-attributes" {
       when "../nw-s:network-types/l3t-s:l3-unicast-topology/"
         + "srmt-s:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment topology configuration";
       uses srmt:sr-mpls-topology-attributes;
     }

     augment "/nw-s:networks/nw-s:network/nw-s:node/"
       + "l3t-s:l3-node-attributes" {
       when "../../nw-s:network-types/l3t-s:l3-unicast-topology/"
         + "srmt-s:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment node configuration.";
       uses srmt:sr-node-attributes;
     }

     augment "/nw-s:networks/nw-s:network/nw-s:node/"
       + "l3t-s:l3-node-attributes/l3t-s:prefix" {
       when "../../../nw-s:network-types/l3t-s:l3-unicast-topology/"
         + "srmt-s:sr-mpls" {
         description "Augment only for SR MPLS topology.";
       }
       description "Augment node prefix.";
       uses srmt:sr-node-prefix-attributes;
     }

     augment "/nw-s:networks/nw-s:network/nt-s:link/"
       + "l3t-s:l3-link-attributes" {
       when "../../nw-s:network-types/l3t-s:l3-unicast-topology/"
         + "srmt-s:sr-mpls" {

Liu, et al.             Expires September 2, 2022              [Page 28]
Internet-Draft            YANG SR MPLS Topology               March 2022

         description "Augment only for SR MPLS topology.";
       }
       description "Augment link configuration";
       uses srmt:sr-link-attributes;
     }

     grouping sr-mpls-topology-attributes {
       description "SR MPLS topology scope attributes.";
       container sr-mpls {
         description
           "Containing SR attributes.";
         uses sr-cmn:srgb;
       } // sr
     } // sr-mpls-topology-attributes
   }
   <CODE ENDS>

Appendix B.  Data Tree Example

   This section contains an example of an instance data tree in the JSON
   encoding [RFC7951].  The example instantiates "ietf-sr-mpls-topology"
   for the topology that is depicted in the following diagram.

Liu, et al.             Expires September 2, 2022              [Page 29]
Internet-Draft            YANG SR MPLS Topology               March 2022

               router-id: 203.0.113.1           router-id: 203.0.113.2
                   +------------+                   +------------+
                   |     D1     |                   |     D2     |
                  /-\          /-\                 /-\          /-\
                  | | 1-0-1    | |---------------->| | 2-1-1    | |
                  | |    1-2-1 | |<----------------| |    2-0-1 | |
                  \-/  1-3-1   \-/                 \-/  2-3-1   \-/
                   |   /----\   |                   |   /----\   |
                   +---|    |---+                   +---|    |---+
                       \----/                           \----/
                        A  |                             A  |
                        |  |                             |  |
                        |  |   router-id: 203.0.113.3    |  |
                        |  |       +------------+        |  |
                        |  |       |     D3     |        |  |
                        |  |      /-\          /-\       |  |
                        |  +----->| | 3-1-1    | |-------+  |
                        +---------| |    3-2-1 | |<---------+
                                  \-/          \-/
                                   |            |
                                   +------------+

                    Figure 4: Example SR MPLS Topology

   The corresponding instance data tree is depicted below.  Note that
   some lines have been wrapped to adhere to the 72-character line
   limitation of RFCs.

B.1.  SR MPLS Topology with TE Not Enabled

   {
     "ietf-network:networks": {
       "network": [
         {
           "network-types": {
             "ietf-l3-unicast-topology:l3-unicast-topology": {
               "ietf-sr-mpls-topology:sr-mpls": {}
             }
           },
           "network-id": "sr-mpls-topo-example",
           "ietf-l3-unicast-topology:l3-topology-attributes": {
             "ietf-sr-mpls-topology:sr-mpls": {
               "srgb": [
                 {
                   "lower-bound": 16000,
                   "upper-bound": 23999
                 }

Liu, et al.             Expires September 2, 2022              [Page 30]
Internet-Draft            YANG SR MPLS Topology               March 2022

               ]
             }
           },
           "node": [
             {
               "node-id": "D1",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "1-0-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 101
                   }
                 },
                 {
                   "tp-id": "1-2-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 121
                   }
                 },
                 {
                   "tp-id": "1-3-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 131
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.1"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.1/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [
                           {
   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 101,
                             "range": 1,
                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "srgb": [

Liu, et al.             Expires September 2, 2022              [Page 31]
Internet-Draft            YANG SR MPLS Topology               March 2022

                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               }
             },
             {
               "node-id": "D2",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "2-0-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 201
                   }
                 },
                 {
                   "tp-id": "2-1-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 211
                   }
                 },
                 {
                   "tp-id": "2-3-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 231
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.2"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.2/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [
                           {
   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 102,
                             "range": 1,

Liu, et al.             Expires September 2, 2022              [Page 32]
Internet-Draft            YANG SR MPLS Topology               March 2022

                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "srgb": [
                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               }
             },
             {
               "node-id": "D3",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "3-1-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 311
                   }
                 },
                 {
                   "tp-id": "3-2-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 321
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.3"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.3/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [

Liu, et al.             Expires September 2, 2022              [Page 33]
Internet-Draft            YANG SR MPLS Topology               March 2022

                           {
   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 103,
                             "range": 1,
                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "srgb": [
                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               }
             }
           ],
           "ietf-network-topology:link": [
             {
               "link-id": "D1,1-2-1,D2,2-1-1",
               "source": {
                 "source-node": "D1",
                 "source-tp": "1-2-1"
               },
               "destination": {
                 "dest-node": "D2",
                 "dest-tp": "2-1-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 121,

Liu, et al.             Expires September 2, 2022              [Page 34]
Internet-Draft            YANG SR MPLS Topology               March 2022

                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D2,2-1-1,D1,1-2-1",
               "source": {
                 "source-node": "D2",
                 "source-tp": "2-1-1"
               },
               "destination": {
                 "dest-node": "D1",
                 "dest-tp": "1-2-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 211,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D1,1-3-1,D3,3-1-1",
               "source": {
                 "source-node": "D1",
                 "source-tp": "1-3-1"
               },
               "destination": {
                 "dest-node": "D3",
                 "dest-tp": "3-1-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {

Liu, et al.             Expires September 2, 2022              [Page 35]
Internet-Draft            YANG SR MPLS Topology               March 2022

                         "value-type": "index",
                         "sid": 131,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D3,3-1-1,D1,1-3-1",
               "source": {
                 "source-node": "D3",
                 "source-tp": "3-1-1"
               },
               "destination": {
                 "dest-node": "D1",
                 "dest-tp": "1-3-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 311,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D2,2-3-1,D3,3-2-1",
               "source": {
                 "source-node": "D2",
                 "source-tp": "2-3-1"
               },
               "destination": {
                 "dest-node": "D3",
                 "dest-tp": "3-2-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {

Liu, et al.             Expires September 2, 2022              [Page 36]
Internet-Draft            YANG SR MPLS Topology               March 2022

                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 231,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D3,3-2-1,D2,2-3-1",
               "source": {
                 "source-node": "D3",
                 "source-tp": "3-2-1"
               },
               "destination": {
                 "dest-node": "D2",
                 "dest-tp": "2-3-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 321,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             }
           ]
         }
       ]
     }
   }

B.2.  SR MPLS Topology with TE Enabled

   In this section, the example below shows an instance data of a
   overlay topology as shown in Figure 4.  Some attributes are from the
   underlay topology shown in Figure 5.

Liu, et al.             Expires September 2, 2022              [Page 37]
Internet-Draft            YANG SR MPLS Topology               March 2022

                .............................   ....................
                .            D1             .   .        D2        .
                .                           .   .                  .
                .        SID:17012          .   .                  .
                .     Base64:MTcwMTI=       .   .                  .
                .  +---+    +---+    +---+  .   .  +---+    +---+  .
              -----|S11|----|S12|----|S15|---------|S23|----|S25|-----
                .  +---+\   +---+   /+---+  .   .  +---+   /+---+  .
                .        \         /        .   .         /   |    .
                .         \       /         .   .        /    |    .
                .          \+---+/          .   .  +---+/   +---+  .
                .           |S14|           .   .  |S24|----|S28|  .
                .           +---+           .   .  +---+    +---+  .
                ..............|..............   .....|..............
                              |                      |
                  SID:17051 +---+    +---+ SID:17052 |
                  Base64:   |S51|----|S52| Base64:   |
                  MTcwNTE=  +---+   /+---+ MTcwNTI=  |
                              |    /                 /
                              |   /      .........../
                              |  /       .   D3    /
                              | /        .        /.
                  SID:17053 +---+        .  +---+/ .
                  Base64:   |S53|-----------|S31|  .
                  MTcwNTM=  +---+        .  +---+  .
                                         ...........

               Figure 5: Example Underlay SR MPLS TE Toplogy

   {
     "ietf-network:networks": {
       "network": [
         {
           "network-types": {
             "ietf-l3-unicast-topology:l3-unicast-topology": {
               "ietf-sr-mpls-topology:sr-mpls": {}
             },
             "ietf-te-topology:te-topology": {
               "ietf-te-topology-packet:packet": {}
             }
           },
           "network-id": "sr-mpls-te-topo-example",
           "ietf-l3-unicast-topology:l3-topology-attributes": {
             "ietf-sr-mpls-topology:sr-mpls": {
               "srgb": [
                 {
                   "lower-bound": 16000,

Liu, et al.             Expires September 2, 2022              [Page 38]
Internet-Draft            YANG SR MPLS Topology               March 2022

                   "upper-bound": 23999
                 }
               ]
             }
           },
           "ietf-te-topology:te-topology-identifier": {
             "provider-id": 0,
             "client-id": 0,
             "topology-id": "sr-mpls-te-topo-example"
           },
           "ietf-te-topology:te": {
   "optimization-criterion": "ietf-te-types:of-minimize-cost-path"
           },
           "node": [
             {
               "node-id": "D1",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "1-0-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 101
                   },
                   "ietf-te-topology:te-tp-id": 101,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [
                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]
                       }
                     ]
                   }
                 },
                 {
                   "tp-id": "1-2-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 121
                   },
                   "ietf-te-topology:te-tp-id": 121,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [

Liu, et al.             Expires September 2, 2022              [Page 39]
Internet-Draft            YANG SR MPLS Topology               March 2022

                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]
                       }
                     ]
                   }
                 },
                 {
                   "tp-id": "1-3-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 131
                   },
                   "ietf-te-topology:te-tp-id": 131,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [
                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]
                       }
                     ]
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.1"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.1/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [
                           {

Liu, et al.             Expires September 2, 2022              [Page 40]
Internet-Draft            YANG SR MPLS Topology               March 2022

   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 101,
                             "range": 1,
                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "srgb": [
                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               },
               "ietf-te-topology:te-node-id": "203.0.113.1",
               "ietf-te-topology:te": {
                 "te-node-attributes": {
                   "admin-status": "up",
                   "domain-id": 1001,
                   "is-abstract": [null],
                   "signaling-address": [
                     "203.0.113.1"
                   ],
                   "connectivity-matrices": {
                     "is-allowed": true,
                     "path-constraints": {
                       "te-bandwidth": {
                         "generic": "0x1p20"
                       },
                       "path-metric-bounds": {
                         "path-metric-bound": [
                           {
                             "metric-type": "path-metric-delay-average",
                             "upper-bound": 15000
                           }
                         ]

Liu, et al.             Expires September 2, 2022              [Page 41]
Internet-Draft            YANG SR MPLS Topology               March 2022

                       }
                     },
                     "ietf-te-topology-packet:throttle": {
                       "threshold-out": {
                         "two-way-delay": 18000
                       }
                     },
                     "connectivity-matrix": [
                       {
                         "id": 1,
                         "from": {
                           "tp-ref": "1-0-1"
                         },
                         "to": {
                           "tp-ref": "1-2-1"
                         },
                         "is-allowed": true,
                         "underlay": {
                           "enabled": true,
                           "primary-path": {
                             "network-ref": "underlay-example",
                             "path-element": [
                               {
                                 "path-element-id": 1,
                                 "label-hop": {
                                   "te-label": {
                                     "generic": "MTcwMTI=",
                                     "direction": "forward"
                                   }
                                 }
                               }
                             ]
                           }
                         }
                       },
                       {
                         "id": 2,
                         "from": {
                           "tp-ref": "1-2-1"
                         },
                         "to": {
                           "tp-ref": "1-0-1"
                         },
                         "is-allowed": true,
                         "underlay": {
                           "enabled": true,
                           "primary-path": {
                             "network-ref": "underlay-example",

Liu, et al.             Expires September 2, 2022              [Page 42]
Internet-Draft            YANG SR MPLS Topology               March 2022

                             "path-element": [
                               {
                                 "path-element-id": 1,
                                 "label-hop": {
                                   "te-label": {
                                     "generic": "MTcwMTI=",
                                     "direction": "forward"
                                   }
                                 }
                               }
                             ]
                           }
                         }
                       }
                     ]
                   }
                 }
               }
             },
             {
               "node-id": "D2",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "2-0-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 201
                   },
                   "ietf-te-topology:te-tp-id": 201,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [
                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]
                       }
                     ]
                   }
                 },
                 {
                   "tp-id": "2-1-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {

Liu, et al.             Expires September 2, 2022              [Page 43]
Internet-Draft            YANG SR MPLS Topology               March 2022

                     "unnumbered-id": 211
                   },
                   "ietf-te-topology:te-tp-id": 211,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [
                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]
                       }
                     ]
                   }
                 },
                 {
                   "tp-id": "2-3-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 231
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.2"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.2/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [
                           {
   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 102,
                             "range": 1,
                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {

Liu, et al.             Expires September 2, 2022              [Page 44]
Internet-Draft            YANG SR MPLS Topology               March 2022

                   "srgb": [
                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               },
               "ietf-te-topology:te-node-id": "203.0.113.2",
               "ietf-te-topology:te": {
                 "te-node-attributes": {
                   "admin-status": "up",
                   "domain-id": 1001,
                   "is-abstract": [null],
                   "signaling-address": [
                     "203.0.113.2"
                   ]
                 }
               }
             },
             {
               "node-id": "D3",
               "ietf-network-topology:termination-point": [
                 {
                   "tp-id": "3-1-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 311
                   },
                   "ietf-te-topology:te-tp-id": 311,
                   "ietf-te-topology:te": {
                     "interface-switching-capability": [
                       {
                         "switching-capability": "switching-psc1",
                         "encoding": "lsp-encoding-packet",
                         "max-lsp-bandwidth": [
                           {
                             "priority": 7,
                             "te-bandwidth": {
                               "generic": "0x1p22"
                             }
                           }
                         ]

Liu, et al.             Expires September 2, 2022              [Page 45]
Internet-Draft            YANG SR MPLS Topology               March 2022

                       }
                     ]
                   }
                 },
                 {
                   "tp-id": "3-2-1",
   "ietf-l3-unicast-topology:l3-termination-point-attributes": {
                     "unnumbered-id": 321
                   }
                 }
               ],
               "ietf-l3-unicast-topology:l3-node-attributes": {
                 "router-id": ["203.0.113.3"],
                 "prefix": [
                   {
                     "prefix": "203.0.113.3/32",
                     "ietf-sr-mpls-topology:sr-mpls": {
                       "sids": {
                         "sid": [
                           {
   "algorithm": "prefix-sid-algorithm-shortest-path",
                             "start-sid": 103,
                             "range": 1,
                             "is-local": false,
                             "is-node": true
                           }
                         ]
                       }
                     }
                   }
                 ],
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "srgb": [
                     {
                       "lower-bound": 16000,
                       "upper-bound": 23999
                     }
                   ],
                   "srlb": [
                     {
                       "lower-bound": 15000,
                       "upper-bound": 15999
                     }
                   ]
                 }
               },
               "ietf-te-topology:te-node-id": "203.0.113.3",
               "ietf-te-topology:te": {

Liu, et al.             Expires September 2, 2022              [Page 46]
Internet-Draft            YANG SR MPLS Topology               March 2022

                 "te-node-attributes": {
                   "admin-status": "up",
                   "domain-id": 1001,
                   "signaling-address": [
                     "203.0.113.3"
                   ]
                 }
               }
             }
           ],
           "ietf-network-topology:link": [
             {
               "link-id": "D1,1-2-1,D2,2-1-1",
               "source": {
                 "source-node": "D1",
                 "source-tp": "1-2-1"
               },
               "destination": {
                 "dest-node": "D2",
                 "dest-tp": "2-1-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 121,
                         "is-local": true
                       }
                     ]
                   }
                 }
               },
               "ietf-te-topology:te": {
                 "te-link-attributes": {
                   "interface-switching-capability": [
                     {
                       "switching-capability": "switching-psc1",
                       "encoding": "lsp-encoding-packet",
                       "ietf-te-topology-packet:packet-switch-capable":
                       {
                         "minimum-lsp-bandwidth": "0x1p20"
                       }
                     }
                   ]
                 }

Liu, et al.             Expires September 2, 2022              [Page 47]
Internet-Draft            YANG SR MPLS Topology               March 2022

               }
             },
             {
               "link-id": "D2,2-1-1,D1,1-2-1",
               "source": {
                 "source-node": "D2",
                 "source-tp": "2-1-1"
               },
               "destination": {
                 "dest-node": "D1",
                 "dest-tp": "1-2-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 211,
                         "is-local": true
                       }
                     ]
                   }
                 }
               },
               "ietf-te-topology:te": {
                 "te-link-attributes": {
                   "interface-switching-capability": [
                     {
                       "switching-capability": "switching-psc1",
                       "encoding": "lsp-encoding-packet",
                       "ietf-te-topology-packet:packet-switch-capable":
                       {
                         "minimum-lsp-bandwidth": "0x1p20"
                       }
                     }
                   ]
                 }
               }
             },
             {
               "link-id": "D1,1-3-1,D3,3-1-1",
               "source": {
                 "source-node": "D1",
                 "source-tp": "1-3-1"
               },
               "destination": {

Liu, et al.             Expires September 2, 2022              [Page 48]
Internet-Draft            YANG SR MPLS Topology               March 2022

                 "dest-node": "D3",
                 "dest-tp": "3-1-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 131,
                         "is-local": true
                       }
                     ]
                   }
                 }
               },
               "ietf-te-topology:te": {
                 "te-link-attributes": {
                   "is-abstract": [null],
                   "underlay": {
                     "enabled": true,
                     "primary-path": {
                       "network-ref": "underlay-example",
                       "path-element": [
                         {
                           "path-element-id": 1,
                           "label-hop": {
                             "te-label": {
                               "generic": "MTcwNTE=",
                               "direction": "forward"
                             }
                           }
                         },
                         {
                           "path-element-id": 2,
                           "label-hop": {
                             "te-label": {
                               "generic": "MTcwNTI=",
                               "direction": "forward"
                             }
                           }
                         },
                         {
                           "path-element-id": 3,
                           "label-hop": {
                             "te-label": {
                               "generic": "MTcwNTM=",

Liu, et al.             Expires September 2, 2022              [Page 49]
Internet-Draft            YANG SR MPLS Topology               March 2022

                               "direction": "forward"
                             }
                           }
                         }
                       ]
                     }
                   },
                   "interface-switching-capability": [
                     {
                       "switching-capability": "switching-psc1",
                       "encoding": "lsp-encoding-packet",
                       "ietf-te-topology-packet:packet-switch-capable":
                       {
                         "minimum-lsp-bandwidth": "0x1p20"
                       }
                     }
                   ]
                 }
               }
             },
             {
               "link-id": "D3,3-1-1,D1,1-3-1",
               "source": {
                 "source-node": "D3",
                 "source-tp": "3-1-1"
               },
               "destination": {
                 "dest-node": "D1",
                 "dest-tp": "1-3-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 311,
                         "is-local": true
                       }
                     ]
                   }
                 }
               },
               "ietf-te-topology:te": {
                 "te-link-attributes": {
                   "is-abstract": [null],
                   "interface-switching-capability": [

Liu, et al.             Expires September 2, 2022              [Page 50]
Internet-Draft            YANG SR MPLS Topology               March 2022

                     {
                       "switching-capability": "switching-psc1",
                       "encoding": "lsp-encoding-packet",
                       "ietf-te-topology-packet:packet-switch-capable":
                       {
                         "minimum-lsp-bandwidth": "0x1p20"
                       }
                     }
                   ]
                 }
               }
             },
             {
               "link-id": "D2,2-3-1,D3,3-2-1",
               "source": {
                 "source-node": "D2",
                 "source-tp": "2-3-1"
               },
               "destination": {
                 "dest-node": "D3",
                 "dest-tp": "3-2-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {
                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 231,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             },
             {
               "link-id": "D3,3-2-1,D2,2-3-1",
               "source": {
                 "source-node": "D3",
                 "source-tp": "3-2-1"
               },
               "destination": {
                 "dest-node": "D2",
                 "dest-tp": "2-3-1"
               },
               "ietf-l3-unicast-topology:l3-link-attributes": {

Liu, et al.             Expires September 2, 2022              [Page 51]
Internet-Draft            YANG SR MPLS Topology               March 2022

                 "metric1": "100",
                 "ietf-sr-mpls-topology:sr-mpls": {
                   "sids": {
                     "sid": [
                       {
                         "value-type": "index",
                         "sid": 321,
                         "is-local": true
                       }
                     ]
                   }
                 }
               }
             }
           ]
         }
       ]
     }
   }

Appendix C.  Contributors

   Jeff Tantsura
   Email: jefftant.ietf@gmail.com

   Yingzhen Qu
   Email: yingzhen.qu@huawei.com

Authors' Addresses

   Xufeng Liu
   IBM Corporation

   EMail: xufeng.liu.ietf@gmail.com

   Igor Bryskin
   Individual

   EMail: i_bryskin@yahoo.com

   Vishnu Pavan Beeram
   Juniper Networks

   EMail: vbeeram@juniper.net

Liu, et al.             Expires September 2, 2022              [Page 52]
Internet-Draft            YANG SR MPLS Topology               March 2022

   Tarek Saad
   Juniper Networks

   EMail: tsaad@juniper.net

   Himanshu Shah
   Ciena

   EMail: hshah@ciena.com

   Stephane Litkowski
   Cisco

   EMail: slitkows.ietf@gmail.com

Liu, et al.             Expires September 2, 2022              [Page 53]