<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY RFC2119 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY RFC3688 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml'>
    <!ENTITY RFC6020 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml'>
    <!ENTITY RFC6241 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml'>
    <!ENTITY RFC6242 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6242.xml'>
    <!ENTITY RFC7950 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml'>
    <!ENTITY RFC8040 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml'>
    <!ENTITY RFC8174 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml'>
    <!ENTITY RFC8341 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8341.xml'>
    <!ENTITY RFC8342 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8342.xml'>
    <!ENTITY RFC8349 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8349.xml'>
    <!ENTITY RFC8446 PUBLIC ''
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8446.xml'>
    <!ENTITY RFC8476 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8476.xml'>
    <!ENTITY RFC8491 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8491.xml'>
    <!ENTITY RFC8662 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8662.xml'>
    <!ENTITY RFC8960 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8960.xml'>
    ]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="no" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>

<?rfc rfcedstyle="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" docName="draft-qu-mpls-mpls-msd-yang-04" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN" 
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
         full title is longer than 39 characters -->

  <title abbrev="MPLS MSD YANG">A YANG Model for MPLS MSD </title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <region>CA</region>
          <code>95050</code>
          <country>USA</country>
        </postal>
        <phone></phone>
        <email>yingzhen.qu@futurewei.com</email>
      </address>
    </author>
    <author fullname="Acee Lindem" initials="A." surname="Lindem">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>301 Midenhall Way</street>
          <city>Cary, NC 27513</city>
        </postal>
        <email>acee@cisco.com</email>
      </address>
    </author>
    <author fullname="Stephane Litkowski" initials="S" surname="Litkowski">
      <organization>Cisco Systems</organization>
      <address>
        <email>slitkows.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Jeff Tantsura" initials="J" surname="Tantsura">
      <organization>Juniper</organization>
      <address>
        <email>jefftant.ietf@gmail.com</email>
      </address>
    </author>

    <date/>

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
         in the current day for you. If only the current year is specified, xml2rfc will fill 
   in the current day and month for you. If the year is not the current one, it is 
   necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
   purpose of calculating the expiry date).  With drafts it is normally sufficient to 
   specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <workgroup>Internet</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.  
   If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>This document defines a YANG data module augmenting the IETF MPLS YANG
      model to provide support for MPLS Maximum SID Depths (MSDs) as defined in
      RFC 8476 and RFC 8491. </t>
    </abstract>
  </front>

  <middle>
    <section title="Overview">
      <t>YANG <xref target="RFC7950"></xref> is a 
      data definition language 
      used to define the contents of a conceptual data store 
      that allows networked devices to be managed using NETCONF 
      <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.</t>

      <t>This document defines a YANG data model augmenting the IETF MPLS 
      YANG model <xref target="RFC8960"/>, which itself augments 
      <xref target="RFC8349"/>, to provide operational state for 
      various MSDs<xref target="RFC8662"/>.
      </t>
  
      <t>The augmentation defined in this document requires support for the 
        MPLS base model<xref target="RFC8960"></xref> which defines 
        basic MPLS configuration and state.
      </t>

      <t>The YANG module in this document conforms to the Network Management
        Datastore Architecture (NMDA) <xref target="RFC8342"/>.
      </t>
               
      <section title="Requirements Language">
        <t>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 <xref target="RFC2119"/> <xref target="RFC8174"/>
      when, and only when, they appear in all capitals, as shown here.</t>
      </section>
    </section>
  
  <section title="YANG Module for MPLS MSD">
    <t>This document defines a YANG module for MSD extensions 
      <xref target="RFC8476"/><xref target="RFC8491"/> to MPLS base 
      model as defined in <xref target="RFC8960"/>.
    </t>

    <figure align="left">
      <artwork align="left">  
module: ietf-mpls-msd
  augment /rt:routing/mpls:mpls:
    +--ro node-msd
       +--ro node-msds* []
          +--ro msd-type?    identityref
          +--ro msd-value?   uint8
  augment /rt:routing/mpls:mpls/mpls:interfaces/mpls:interface:
    +--ro link-msd
       +--ro link-msds* []
          +--ro msd-type?    identityref
          +--ro msd-value?   uint8
             
      </artwork>
    </figure> 
        <t>
    <figure>
      <artwork><![CDATA[
<CODE BEGINS> file "ietf-mpls-msd@2021-08-02.yang"
module ietf-mpls-msd {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-msd";
  prefix mpls-msd;

  import ietf-routing {
    prefix rt;
    reference 
      "RFC 8349: A YANG Data Model for Routing
                 Management (NMDA Version)";
  }

  import ietf-mpls {
    prefix mpls;
    reference "RFC 8960: A YANG Data Model for MPLS Base";
  }

  organization
    "IETF MPLS - MPLS Working Group";
  contact
    "WG Web:   <https://tools.ietf.org/wg/mpls/>
     WG List:  <mailto:mpls@ietf.org>

     Author:    Yingzhen Qu
               <mailto:yingzhen.qu@futurewei.com>
     Author:    Acee Lindem
               <mailto:acee@cisco.com>
     Author:    Stephane Litkowski
               <mailto:slitkows.ietf@gmail.com>
     Author:    Jeff Tantsura
               <mailto:jefftant.ietf@gmail.com>

    ";
  description
    "The YANG module augments the base MPLS model, and it is to 
     manage different types of Maximum SID Depth (MSD).

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

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

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

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

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";


  reference "RFC XXXX: YANG Data Model for Segment Routing.";

  revision 2021-08-02 {
    description
      "Initial Version";
    reference "RFC XXXX: YANG Data Model for Segment Routing.";
  }

  identity msd-base-type {
    description
      "Base identity for Maximum SID Depth (MSD) Type";
  }

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

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

  augment "/rt:routing/mpls:mpls" {
    description
      "This module augments MPLS data model (RFC 8960)
       with node MSD.";
    container node-msd {
      config false;
      description
        "Maximum SID Depth (MSD) operational state.";
      list node-msds {
        leaf msd-type {
          type identityref {
            base msd-base-type;
          }
          description
            "MSD types";
        }
        leaf msd-value {
          type uint8;
          description
            "MSD value, in the range of 0-255.";
        }
        description
          "Node MSD is the smallest link MSD supported by
           the node.";
      }
    }
  }

  augment "/rt:routing/mpls:mpls/mpls:interfaces/mpls:interface" {
    description
      "This module augments MPLS data model (RFC 8960)
       with link MSD.";
    container link-msd {
      config false;
      description
        "Maximum SID Depth (MSD) interface operational state.";
      list link-msds {
        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";
      }
    }
  }
}
  <CODE ENDS>
      ]]></artwork>
    </figure>
  </t> 
  </section>

  

    <section anchor="Security" title="Security Considerations">
    <t>The YANG modules specified in this document define a schema for 
       data that is designed to be accessed via network
       management protocols such as NETCONF <xref target="RFC6241"/> or
       RESTCONF <xref target="RFC8040"/>. The lowest NETCONF layer is the secure transport
       layer, and the mandatory-to-implement secure transport is Secure Shell (SSH)
       <xref target="RFC6242"/>. The lowest RESTCONF layer is HTTPS, and the
       mandatory-to-implement secure transport is TLS <xref target="RFC8446"/>.</t>

   <t>The NETCONF Access Control Model (NACM) <xref target="RFC8341"/> provides the 
      means to restrict access for particular NETCONF or RESTCONF users to a
      pre-configured subset of all available NETCONF or RESTCONF protocol 
      operations and content.</t>

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

   <t>Some of the readable data nodes in the modules
      may be considered sensitive or vulnerable in some network environments. It is thus 
      important to control read access (e.g., via get, get-config, or notification)
      to these data nodes. These are the
      subtrees and data nodes and their sensitivity/vulnerability:
      <list style="empty">
        <t>/rt:routing/mpls:mpls/msd/node-msds</t>
        <t>/rt:routing/mpls:mpls/msd/link-msds</t>
        <t>Exposure of the node's maximum SID depth may be useful in mounting a
          Denial-of-Service (DoS) attach by sending packets to the node that 
          the router can't process.</t>
      </list></t>

   </section>
<section title="IANA Considerations">
<t>This document registers URIs in the IETF XML registry 
   <xref target="RFC3688"/>.  Following the format in <xref target="RFC3688"/>, 
   the following registrations is requested to be made:
   <figure>
   <artwork>  
   URI: urn:ietf:params:xml:ns:yang:ietf-mpls-msd
   Registrant Contact: The IESG.
   XML: N/A, the requested URI is an XML namespace.
   </artwork> 
   </figure>
</t>
   <t>This document registers the YANG modules in the YANG Module Names
   registry <xref target="RFC6020"/>.
   <figure>
   <artwork>  
   name: ietf-mpls-msd
   namespace: urn:ietf:params:xml:ns:yang:ietf-mpls-msd
   prefix: mpls-msd
   reference: RFC XXXX
   </artwork> 
   </figure>
   </t>
</section>
    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>This document was produced using Marshall Rose's xml2rfc tool.</t>
      <t>The YANG model was developed using the suite of YANG tools written 
         and maintained by numerous authors.</t>
    </section>   
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
      &RFC3688;
      &RFC6020;
      &RFC6241;
      &RFC6242;
      &RFC7950;
      &RFC8040;
      &RFC8174;
      &RFC8341;
      &RFC8342;
      &RFC8349;
      &RFC8446;
      &RFC8476;
      &RFC8491;
      &RFC8960;
    </references>
    <references title="Informative References">
      <!-- Here we use entities that we defined at the beginning. -->
      &RFC8662;
    </references>

  </back>
</rfc>
