<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?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 xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-lsr-isis-yang-augmentation-v1-11"
     ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" symRefs="true"
     sortRefs="true" version="3" consensus="true">
  <!-- xml2rfc v2v3 conversion 3.13.1 -->
  <!-- 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="ISIS YANG Augments V1">IS-IS YANG Model Augmentations for Additional Features - Release 1 </title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-lsr-isis-yang-augmentation-v1-11"/>
    <!-- add 'role="editor"' below for the editors if appropriate -->

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

    <author fullname="Acee Lindem" initials="A." surname="Lindem">
      <organization>Arrcus, Inc.</organization>
      <address>
        <postal>
          <street>301 Midenhall Way</street>
          <city>Cary, NC 27513</city>
        </postal>
        <email>acee.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Yingzhen Qu" initials="Y" surname="Qu">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <country>USA</country>
        </postal>
        <phone/>
        <email>yingzhen.ietf@gmail.com</email>
      </address>
    </author>
    <author fullname="Stephane Litkowski" initials="S." surname="Litkowski">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street/>
          <city/>
        </postal>
        <email>slitkows.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 YANG data modules augmenting the IETF IS-IS YANG
      model to provide support for IS-IS Minimum Remaining Lifetime
      as defined in RFC 7987, and
      Signaling Maximum SID Depth Using IS-IS as defined in RFC 8491. </t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Overview</name>
      <t>YANG <xref target="RFC7950" format="default"/> 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" format="default"/>.  YANG is proving relevant beyond its
      initial confines, as bindings to other interfaces (e.g., ReST) and
      encodings other than XML (e.g., JSON) are being defined.  Furthermore,
      YANG data models can be used as the basis for implementation of other
      interfaces, such as CLI and programmatic APIs.</t>
      <t>This document defines YANG data modules augmenting the IETF IS-IS
      YANG model <xref target="RFC9130" format="default"/>, which itself augments
      <xref target="RFC8349" format="default"/>, to provide support for configuration and
      operational state for the following IS-IS features:
      </t>
      <dl newline="false" spacing="normal">
        <dt>RFC7987:</dt>
        <dd>IS-IS Minimum Remaining Lifetime<xref target="RFC7987" format="default"/>.</dd>
        <dt>RFC8491:</dt>
        <dd>Signaling Maximum SID Depth (MSD) Using IS-IS  <xref target="RFC8491" format="default"/>.</dd>
      </dl>
      <t>The augmentations defined in this document require support for the
        IS-IS base model<xref target="RFC9130" format="default"/>, which specifies the
        basic IS-IS configuration and state. The IS-IS YANG model augments the
        ietf-routing YANG model defined in <xref target="RFC8349" format="default"/>.
      </t>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <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" format="default"/> <xref target="RFC8174" format="default"/>
        when, and only when, they appear in all capitals, as shown here.</t>
      </section>
      <section anchor="tree-info" toc="default" numbered="true">
        <name>Tree diagram</name>
        <t>Tree diagrams used in this document follow the notation defined in
        <xref target="RFC8340" format="default"/>.</t>
      </section>
    </section>
    <section numbered="true" toc="default">
      <name>YANG Module for IS-IS Minimum Remaining Lifetime</name>
      <t>This document defines a YANG module for IS-IS Minimum Remaining Lifetime
      as defined in <xref target="RFC7987" format="default"/>. It is an augmentation of the IS-IS
      base model. </t>
      <artwork align="left" name="" type="" alt=""><![CDATA[
module: ietf-isis-remaining-lifetime

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp:
    +--ro received-remaining-lifetime?   uint16

  notifications:
    +---n corrupt-remaining-lifetime
       +--ro routing-protocol-name?   leafref
       +--ro isis-level?              level
       +--ro lsp-id?                  isis:lsp-id
  ]]></artwork>

<sourcecode name="ietf-isis-remaining-lifetime@2025-10-06.yang" type="" markers="true"><![CDATA[
module ietf-isis-remaining-lifetime {
  yang-version 1.1;
  namespace
    "urn:ietf:params:xml:ns:yang:ietf-isis-remaining-lifetime";

  prefix isis-remaining-lifetime;

  import ietf-isis {
    prefix "isis";
    reference
      "RFC 9130: YANG Data Model for the IS-IS Protocol";
  }

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

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

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

      Author:   Yingzhen Qu
                <mailto:yingzhen.ietf@gmail.com>
      Author:   Acee Lindem
                <mailto:acee.ietf@gmail.com>
      Author:   Stephane Litkowski
                <mailto:slitkows.ietf@gmail.com>";

  description
    "This YANG module defines a notification which is sent when the
     IS-IS system detects corrupted lifetime of an LSP. This is for
     IS-IS Minimum Remaining Lifetime feature as defined in RFC 7987.

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

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (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.";

  reference "RFC XXXX";

  revision 2025-10-06 {
    description
      "Initial version";
    reference
      "RFC XXXX: A YANG Data Model for IS-IS Minimum Remaining
      Lifetime.";
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/isis:isis/isis:database/"
        + "isis:levels/isis:lsp" {
    leaf received-remaining-lifetime {
      type uint16;
      units "seconds";
      description
      "Remaining lifetime of this LSP at the time
       it was received.";
    }
    description
      "Preserve the remaining lifetime of this LSP when
       it was received.";
  }

  notification corrupt-remaining-lifetime {
    uses isis:notification-instance-hdr;
    leaf lsp-id {
      type isis:lsp-id;
      description "LSP ID";
    }
    description
      "This notification is sent when the system
       detects corrupted lifetime of an LSP.";
    reference "RFC 7987: IS-IS Minimum Remaining Lifetime";
  }
}

]]></sourcecode>
    </section>
    <section numbered="true" toc="default">
      <name>YANG Module for IS-IS Flexible Algorithms: Bandwidth,
        Delay, Metrics and Constraints</name>
      <t>This document defines a YANG module for IS-IS Flexible
      Algorithms: Bandwidth, Delay, Metrics and Constraints
      <xref target="I-D.ietf-lsr-flex-algo-bw-con" format="default"/>. 
      It is an augmentation of the IS-IS base model and the Flexible
      Algorithm YANG module . </t>

      <artwork align="left" name="" type="" alt=""><![CDATA[
module: ietf-isis-flex-algo-bw-con

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:interfaces
            /isis:interface:
    +--rw generic-metrics
       +--rw generic-metric* [metric-type]
          +--rw metric-type     identityref
          +--rw metric-value?   uint32
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis
            /isis-flex-algo:isis-flex-algo:
    +--rw bandwidth-constraints
    |  +--rw constraint* [constraint-type]
    |     +--rw constraint-type    identityref
    |     +--rw bandwidth-value?   te-types:te-bandwidth
    |     +--rw threshold?         uint8
    +--rw (metric-derivation-method)?
    |  +--:(reference-bandwidth)
    |  |  +--rw reference-bandwidth
    |  |     +--rw reference-bandwidth?
    |  |     |       rt-types:bandwidth-ieee-float32
    |  |     +--rw granularity-bandwidth?
    |  |             rt-types:bandwidth-ieee-float32
    |  +--:(bandwidth-thresholds)
    |     +--rw bandwidth-thresholds
    |        +--rw bandwidth-threshold* [bandwidth-threshold]
    |           +--rw bandwidth-threshold
    |           |       rt-types:bandwidth-ieee-float32
    |           +--rw threshold-metric?      rt-types:uint24
    +--rw exclude-min-bw?
    |       rt-types:bandwidth-ieee-float32
    +--rw exclude-max-delay?            rt-types:uint24
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:extended-is-neighbor
            /isis:neighbor/isis:instances/isis:instance:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         isis:wide-metric
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:extended-is-neighbor
            /isis:neighbor/isis:instances/isis:instance
            /isis-link-attr:asla-sub-tlvs
            /isis-link-attr:asla-sub-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         isis:wide-metric
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:mt-is-neighbor
            /isis:neighbor/isis:instances/isis:instance:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         isis:wide-metric
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:mt-is-neighbor
            /isis:neighbor/isis:instances/isis:instance
            /isis-link-attr:asla-sub-tlvs
            /isis-link-attr:asla-sub-tlv:
    +--ro generic-metric-sub-tlvs
       +--ro generic-metric-sub-tlv* []
          +--ro metric-type?   identityref
          +--ro value?         isis:wide-metric
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:router-capabilities
            /isis-flex-algo:fad-tlvs/isis-flex-algo:fad-tlv:
    +--ro faemb-sub-tlv
    |  +--ro min-bandwidth?   rt-types:bandwidth-ieee-float32
    +--ro faemd-sub-tlv
    |  +--ro max-link-delay?   rt-types:uint24
    +--ro fadrb-sub-tlv
    |  +--ro fadrb-flags*             identityref
    |  +--ro reference-bandwidth?
    |  |       rt-types:bandwidth-ieee-float32
    |  +--ro granularity-bandwidth?
    |          rt-types:bandwidth-ieee-float32
    +--ro fadbt-sub-tlv
       +--ro fadbt-flags*           identityref
       +--ro bandwidth-threshold* []
          +--ro bandwidth-threshold?
          |       rt-types:bandwidth-ieee-float32
          +--ro threshold-metric?      rt-types:uint24
      ]]></artwork>
      <artwork><![CDATA[
<CODE BEGINS> file "ietf-isis-flex-algo-bw-con@2025-10-06.yang"
module ietf-isis-flex-algo-bw-con {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:"
          + "ietf-isis-flex-algo-bw-con";
  prefix isis-flex-algo-bw;

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

  import ietf-routing-types {
    prefix "rt-types";
    reference "RFC 8294: Common YANG Data Types for the
               Routing Area";
  }

  import ietf-te-types {
    prefix te-types;
    reference
      "RFC8776: Common YANG Data Types for Traffic Engineering.";
  }

  import ietf-isis {
    prefix isis;
    reference
      "RFC 9130: YANG Data Model for the IS-IS Protocol";
  }

  import ietf-isis-flex-algo {
    prefix isis-flex-algo;
  }

  import ietf-isis-link-attr {
    prefix isis-link-attr;
  }

  import iana-igp-metric-types {
    prefix iana-metric-types;
  }  

  organization
    "IETF LSR - Link State Routing Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/lsr/>
     WG List:  <mailto:lsr@ietf.org>


     Author:    Yingzhen Qu
               <mailto:yingzhen.ietf@gmail.com>
     Author:    Acee Lindem
               <mailto:acee.ietf@gmail.com>
    ";

  description
    "The YANG module defines the configuration and operational
     state for IS-IS protocol as defined in
     draft-ietf-lsr-flex-algo-bw-con, IGP Flexible Algorithms:
     Bandwidth, Delay, Metrics and Constraints

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

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

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

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

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


  reference "RFC XXXX.";

  revision 2025-10-06 {
    description
      "Initial Version";
    reference
      "RFC XXXX";
  }

  /* Identities */

  identity bandwidth-constraint-type {
    description
      "Base identity for bandwidth constraint types.";
  }

  identity min-bw {
    base bandwidth-constraint-type;
    description
      "Minimum bandwidth constraint.";
  }

  identity max-bw {
    base bandwidth-constraint-type;
    description
      "Maximum bandwidth constraint.";
  }

  identity fadrb-flags {
    description
      "Base identity for OSPF Flexible Algorithm Definition
       Reference Bandwidth sub-tlv flags.";
  }

  identity g-bit {
    base fadrb-flags;
    description
      "G bit, when set, interface group mode MUST be used to
       derive total link bandwidth.";
  }

  identity fadbt-flags {
    description
      "Base identity for OSPF Flexible Algorithm Definition
       Reference Bandwidth sub-tlv flags.";
  }

  identity gp-bit {
    base fadbt-flags;
    description
      "G bit, when set, interface group mode MUST be used to
       derive total link bandwidth.";
  }

  /* Groupings */
  grouping bandwidth-constraint {
    description
      "Grouping for bandwidth constraints in Flex-Algo.";
    container bandwidth-constraints {
      list constraint {
        key "constraint-type";
        description
          "List of bandwidth constraints for the Flex-Algo.";
        leaf constraint-type {
          type identityref {
            base bandwidth-constraint-type;
          }
          description
            "Type of bandwidth constraint (e.g., min-bw, max-bw).";
        }
        leaf bandwidth-value {
          type te-types:te-bandwidth;
          description
            "Bandwidth value for the constraint.";
        }
        leaf threshold {
          type uint8 {
            range "1..100";
          }
          units "percent";
          description
            "Threshold percentage for triggering re-optimization.";
        }
      }
      description
        "Bandwidth constraints configuration for flex-algo.";
    }
  }

  grouping generic-metric-sub-tlv {
    container generic-metric-sub-tlvs {
      list generic-metric-sub-tlv {
        leaf metric-type {
          type identityref {
            base iana-metric-types:metric-type;
          }
            description
              "Type of metric to be used during the calculation.";
        }
        leaf value {
          type isis:wide-metric;
          description
            "A 24-bit unsigned integer representing the metric
             value. The valid range is from 0 to 16,777,215
             (0xFFFFFF).";
        }
        description
          "The list of generic metric sub-tlvs.";
      }
      description
        "The generic metric sub-tlv.";
    }
    description
      "The grouping for generic metric sub-tlv.";
  }

  grouping faemb-sub-tlv {
    container faemb-sub-tlv {
      leaf min-bandwidth {
        type rt-types:bandwidth-ieee-float32;
        description
          "A 32-bit field specifying the link bandwidth in IEEE
           floating point format (IEEE754). The units are
           bytes-per-second.";
      }
      description
        "Flex-algo Exclude Minimum Bandwidth sub-tlv (FAEMB).";
    }
    description
      "Grouping for FAEMB sub-tlv.";
  }

  grouping faemd-sub-tlv {
    container faemd-sub-tlv {
      leaf max-link-delay {
        type rt-types:uint24;
        description
          "A 24-bit field specifying the maximum link delay in
           microseconds.";
      }
      description
        "The Flex-algo Exclude Maximum Delay sub-tlv (FAEMD).";
    }
    description
      "Grouping for FAEMD sub-tlv.";
  }

  grouping fadrb-sub-tlv {
    container fadrb-sub-tlv {
      leaf-list fadrb-flags {
        type identityref {
          base fadrb-flags;
        }
        description
          "Flex-algo definition reference bandwidth sub-tlv
           flags list.";
      }
      leaf reference-bandwidth {
        type rt-types:bandwidth-ieee-float32;
        description
          "A 32-bit field specifying the link bandwidth in IEEE
           floating point format (IEEE754). The units are
           bytes-per-second.";
      }
      leaf granularity-bandwidth {
        type rt-types:bandwidth-ieee-float32;
        description
          "A 32-bit field specifying the link bandwidth in IEEE
           floating point format (IEEE754). The units are
           bytes-per-second.";
      }
      description
        "The Flex-algo Reference Bandwidth sub-tlv (FAEMD).";
    }
    description
      "Grouping for FADRB sub-tlv.";
  }

  grouping fadbt-sub-tlv {
    container fadbt-sub-tlv {
      leaf-list fadbt-flags {
        type identityref {
          base fadbt-flags;
        }
        description
          "Flex-algo definition bandwidth thresholds sub-tlv
           flags list.";
      }
      list bandwidth-threshold {
        leaf bandwidth-threshold {
          type rt-types:bandwidth-ieee-float32;
          description
            "Maximum link bandwidth. A 32-bit field specifying
             the link bandwidth in IEEE floating point format
             (IEEE754). The units are bytes-per-second.";
        }

        leaf threshold-metric {
          type rt-types:uint24;
          description
            "Metric value range 1 - 16,777,215 (0xFFFFFF).";
        }
        description
          "List of bandwidth thresholds and metrics.";
      }
      description
        "The Flex-algo Bandwidth Thresholds sub-tlv (FADBT).";
    }
    description
      "Grouping for FADBT sub-tlv."; 
  }  

  /* Configurations */
  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/isis:isis/"
        + "isis:interfaces/isis:interface" {
    when "/rt:routing/rt:control-plane-protocols/"
       + "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used.";
    }
    description
      "This augments the ISIS protocol interface
       configuration with generic metric configuration.";

    container generic-metrics {
      list generic-metric {
        key "metric-type";
        leaf metric-type {
          type identityref {
            base iana-metric-types:metric-type;
          }
          description
            "Type of metric to be used during the calculation.";
        }
        leaf metric-value {
          type uint32;
          description
            "Metric value, range is from 0 to 0xFFFFFFFF.";
        }
        description
          "Interface generic metric configuration per metric-type.";
      }
      description
        "Interface generic metric configuration.";
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
     + "rt:control-plane-protocol/isis:isis/"
     + "isis-flex-algo:isis-flex-algo" {
    when "derived-from(/rt:routing/rt:control-plane-protocols/"
         + "rt:control-plane-protocol/rt:type, 'isis:isis')" {
      description
        "This augments the ISIS routing protocol when used.";
    }
    description
      "This augments ISIS protocol Flexible Algorithm with
       bandwidth constraints.";

    uses bandwidth-constraint;
    choice metric-derivation-method {
      description
        "Choice of automatic metric derivation methods.";
      container reference-bandwidth {
        description
          "Metric is inversely proportional to the link
           bandwidth.";
        leaf reference-bandwidth {
          type rt-types:bandwidth-ieee-float32;
          description
            "A 32-bit field specifying the link bandwidth in IEEE
             floating point format (IEEE754). The units are
             bytes-per-second.";
        }
        leaf granularity-bandwidth {
          type rt-types:bandwidth-ieee-float32;
          description
            "A 32-bit field specifying the link bandwidth in IEEE
             floating point format (IEEE754). The units are
             bytes-per-second.";
        }
      }
      container bandwidth-thresholds {
        description
          "Pre-define non-proportional metric values from the
           varying ranges of link bandwidth.";
        list bandwidth-threshold {
          key bandwidth-threshold;
          leaf bandwidth-threshold {
            type rt-types:bandwidth-ieee-float32;
            description
              "Maximum link bandwidth. A 32-bit field specifying
               the link bandwidth in IEEE floating point format
               (IEEE754). The units are bytes-per-second.";
          }  
          leaf threshold-metric {
            type rt-types:uint24;
            description
              "Metric value range 1 - 16,777,215 (0xFFFFFF).";
          }
          description
            "List of bandwidth thresholds and metrics.";
        }
      }
    }

    leaf exclude-min-bw {
      type rt-types:bandwidth-ieee-float32;
      description
        "A 32-bit field specifying the link bandwidth in IEEE
         floating point format (IEEE754). The units are
         bytes-per-second.";    
    }

    leaf exclude-max-delay {
      type rt-types:uint24;
      description
        "A 24-bit field specifying the maximum link delay in
         microseconds.";    
    }
  }

  /* Database */

  /* TLV 22 */
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:extended-is-neighbor/isis:neighbor"+
          "/isis:instances/isis:instance" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB TLV22.";

    uses generic-metric-sub-tlv;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:extended-is-neighbor/isis:neighbor"+
          "/isis:instances/isis:instance"+
          "/isis-link-attr:asla-sub-tlvs"+
          "/isis-link-attr:asla-sub-tlv" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB TLV22 asla-sub-tlv.";

    uses generic-metric-sub-tlv;
  }

  /* TLV 223 */
  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:mt-is-neighbor/isis:neighbor"+
          "/isis:instances/isis:instance" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB TLV223.";

    uses generic-metric-sub-tlv;
  }

  augment "/rt:routing/" +
          "rt:control-plane-protocols/rt:control-plane-protocol"+
          "/isis:isis/isis:database/isis:levels/isis:lsp"+
          "/isis:mt-is-neighbor/isis:neighbor"+
          "/isis:instances/isis:instance"+
          "/isis-link-attr:asla-sub-tlvs"+
          "/isis-link-attr:asla-sub-tlv" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/rt:type = 'isis:isis'" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB TLV223 asla-sub-tlv.";

    uses generic-metric-sub-tlv;
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol/"
        + "isis:isis/isis:database/isis:levels/isis:lsp/"
        + "isis:router-capabilities/isis-flex-algo:fad-tlvs/"
        + "isis-flex-algo:fad-tlv" {
    when "/rt:routing/rt:control-plane-protocols/"+
         "rt:control-plane-protocol/"+
         "rt:type = 'isis:isis'" {
    description
      "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB router capability.";

    uses faemb-sub-tlv;
    uses faemd-sub-tlv;
    uses fadrb-sub-tlv;
    uses fadbt-sub-tlv;
  }
}

        ]]></artwork>
    </section>

    <section numbered="true" toc="default">
      <name>YANG Module for IS-IS Maximum SID Depth</name>
      <t>This document defines a module for Signaling Maximum SID Depth (MSD)
        using IS-IS <xref target="RFC8491" format="default"/>.  It is an
        augmentation of the IS-IS base model.</t>
      <t>The figure below describes the overall structure of the isis-msd
      YANG module:</t>

      <artwork align="left">
module: ietf-isis-msd

  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:router-capabilities
            /isis:router-capability:
    +--ro node-msd-tlv
       +--ro node-msds* [msd-type]
          +--ro msd-type     identityref
          +--ro msd-value?   uint8
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:extended-is-neighbor
            /isis:neighbor/isis:instances/isis:instance:
    +--ro link-msd-sub-tlv
       +--ro link-msds* [msd-type]
          +--ro msd-type         identityref
          +--ro msd-value?       uint8
          +--ro msd-raw-value?   uint8
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:database
            /isis:levels/isis:lsp/isis:mt-is-neighbor
            /isis:neighbor/isis:instances/isis:instance:
    +--ro link-msd-sub-tlv
       +--ro link-msds* [msd-type]
          +--ro msd-type         identityref
          +--ro msd-value?       uint8
          +--ro msd-raw-value?   uint8
      </artwork>
      <artwork><![CDATA[
      <CODE BEGINS> file "ietf-isis-msd@2025-10-06.yang"
module ietf-isis-msd {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-isis-msd";
  prefix isis-msd;

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

  import ietf-mpls-msd {
    prefix mpls-msd;
  }

  organization
    "IETF LSR - LSR Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/lsr>
     WG List:  <mailto:lsr@ietf.org>

     Author:    Yingzhen Qu
               <mailto:yingzhen.ietf@gmail.com>
     Author:    Acee Lindem
               <mailto:acee.ietf@gmail.com>
     Author:    Stephane Litkowski
               <mailto:slitkows.ietf@gmail.com>
     Author:    Jeff Tantsura
               <mailto:jefftant.ietf@gmail.com>
     
    ";
  description
    "The YANG module augments the base ISIS model to
     manage different types of MSDs.

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

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

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

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

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

  revision 2025-10-06 {
    description
      "Initial Version";
    reference
      "RFC XXXX: YANG Data Model for ISIS MSD.";
  }

  grouping link-msd-sub-tlv {
    description
      "Link Maximum SID Depth (MSD) grouping for an interface.";
    container link-msd-sub-tlv {
      list link-msds {
        key "msd-type";
        uses mpls-msd:msd-type-value;
        leaf msd-raw-value {
          type uint8;
          description
            "MSD integer value.";
        }
        description
          "List of link MSDs";
      }
      description
        "Link MSD sub-tlvs.";
    }
  }

  /* Node MSD TLV */

  augment "/rt:routing/"
        + "rt:control-plane-protocols/rt:control-plane-protocol"
        + "/isis:isis/isis:database/isis:levels/isis:lsp"
        + "/isis:router-capabilities/isis:router-capability" {
    when "derived-from-or-self(../../../../../../rt:type,"
       + "'isis:isis')" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB router capability.";
    container node-msd-tlv {
      list node-msds {
        key "msd-type";
        uses mpls-msd:msd-type-value;
        description
          "Node MSD is the smallest link MSD supported by
           the node.";
      }
      description
        "Node MSD is the number of SIDs supported by a node.";
      reference
        "RFC 8491: Signaling Maximum SID Depth (MSD) Using IS-IS";
    }
  }

  /* link MSD sub-tlv */

  augment "/rt:routing/"
        + "rt:control-plane-protocols/rt:control-plane-protocol"
        + "/isis:isis/isis:database/isis:levels/isis:lsp"
        + "/isis:extended-is-neighbor/isis:neighbor"
        + "/isis:instances/isis:instance" {
    when "derived-from-or-self(../../../../../../../../rt:type,"
       + "'isis:isis')" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB neighbor with
       Link MSD sub-TLV.";
    uses link-msd-sub-tlv;
  }

  augment "/rt:routing/"
        + "rt:control-plane-protocols/rt:control-plane-protocol"
        + "/isis:isis/isis:database/isis:levels/isis:lsp"
        + "/isis:mt-is-neighbor/isis:neighbor"
        + "/isis:instances/isis:instance" {
    when "derived-from-or-self(../../../../../../../../rt:type,"
       + "'isis:isis')" {
      description
        "This augment ISIS routing protocol when used";
    }
    description
      "This augments ISIS protocol LSDB neighbor.";
    uses link-msd-sub-tlv;
  }
}

<CODE ENDS>
      ]]></artwork>


    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <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" format="default"/> or
       RESTCONF <xref target="RFC8040" format="default"/>. The lowest NETCONF layer is the secure transport
       layer, and the mandatory-to-implement secure transport is Secure Shell (SSH)
       <xref target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS, and the
       mandatory-to-implement secure transport is TLS <xref target="RFC8446" format="default"/>.</t>
      <t>The NETCONF access control model <xref target="RFC8341" format="default"/> 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. These correspond
      to the following schema nodes:
      </t>
      <ul empty="true" spacing="normal">
        <li>/isis:isis/isis:interfaces/isis:interface/isis-link-attr - Modification
          of link attributes operation mode could result in traffic being
          redirected or DoS attack.</li>
      </ul>
      <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. The exposure of the Link State Database (LSDB) will
      expose the detailed topology of the network. This may be undesirable since
      both due to the fact that exposure may facilitate other attacks. Additionally,
      network operators may consider their topologies to be sensitive confidential
      data.These correspond to the following schema nodes:
      </t>
      <ul empty="true" spacing="normal">
        <li>/isis:isis/isis:database/isis:levels/isis:lsp/isis:mt-is-neighbor/isis:neighbor/isis:instances/isis:instance/application-specific-link-attributes-sub-tlvs </li>
        <li>/isis:isis/isis:database/isis:levels/isis:lsp/application-specific-srlg-tlv </li>
        <li>/isis:router-capabilities/node-msd-tlv</li>
        <li>/isis:isis/isis:database/isis:levels/isis:lsp//isis:extended-is-neighbor/isis:neighbor/link-msd-sub-tlv</li>
        <li>/isis:isis/isis:database/isis:levels/isis:lsp//isis:mt-is-neighbor/isis:neighbor/link-msd-sub-tlv</li>
      </ul>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document registers URIs in the IETF XML registry
   <xref target="RFC3688" format="default"/>.  Following the format in <xref target="RFC3688" format="default"/>,
   the following registrations is requested to be made:
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  URI: urn:ietf:params:xml:ns:yang:ietf-isis-remaining-lifetime
  Registrant Contact: The IESG.
  XML: N/A, the requested URI is an XML namespace.
   ]]></artwork>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  URI: urn:ietf:params:xml:ns:yang:ietf-isis-flex-algo-bw-con
  Registrant Contact: The IESG.
  XML: N/A, the requested URI is an XML namespace.
   ]]></artwork>
     <artwork name="" type="" align="left" alt=""><![CDATA[
  URI: urn:ietf:params:xml:ns:yang:ietf-isis-msd
  Registrant Contact: The IESG.
  XML: N/A, the requested URI is an XML namespace
   ]]></artwork>
      <t>This document registers the YANG modules in the YANG Module Names
   registry <xref target="RFC6020" format="default"/>.
      </t>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  name: ietf-isis-remaining-lifetime
  namespace: urn:ietf:params:xml:ns:yang:ietf-isis-remaining-lifetime
  prefix: isis-remaining-lifetime
  reference: RFC XXXX
   ]]></artwork>
      <artwork name="" type="" align="left" alt=""><![CDATA[
  name: ietf-isis-flex-algo-bw-con
  namespace: urn:ietf:params:xml:ns:yang:ietf-isis-flex-algo-bw-con
  prefix: isis-flex-algo-bw-con
  reference: RFC XXXX
   ]]></artwork>
     <artwork name="" type="" align="left" alt=""><![CDATA[
  name: ietf-isis-msd
  namespace: urn:ietf:params:xml:ns:yang:ietf-isis-msd
  prefix: isis-msd
  reference: RFC XXXX
   ]]></artwork>
    </section>
    <section anchor="Acknowledgements" numbered="true" toc="default">
      <name>Acknowledgements</name>
      <t>The YANG model was developed using the suite of YANG tools written
         and maintained by numerous authors.</t>
         <t>Thanks to Renato Westphal for review, comments, and
            implementation.</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">
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.2119.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.3688.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6020.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.6242.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7950.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.7987.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8040.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8341.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8349.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8446.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8491.xml"/>
      <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.9130.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-lsr-flex-algo-bw-con.xml"/>
    </references>
    <references title="Informative References">
        <xi:include href="https://www.rfc-editor.org/refs/bibxml/reference.RFC.8340.xml"/>
        <!-- Here we use entities that we defined at the beginning. -->
    </references>
  </back>
</rfc>
