<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<?rfc toc="yes"?>
<?rfc compact="no"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<rfc ipr="trust200902"
     category="std"
     docName="draft-hopps-lsr-yang-isis-reverse-metric-00"     submissionType="IETF"
    consensus="true"    tocInclude="true"    version="3">
  <front>
    <title abbrev="YANG Data Model for the IS-IS Reverse Metric Extension">YANG Data Model for the IS-IS Reverse Metric Extension</title>
<author initials='C.' surname='Hopps' fullname='Christian Hopps'><organization>LabN Consulting, L.L.C.</organization><address><email>chopps@chopps.org</email></address></author>  <date/><abstract><t>This document defines a YANG module for managing the reverse metric
extension to the the intermediate system to intermediate system
routeing protocol.</t></abstract>  </front>  <middle>

<section title="Introduction">
<t>This document defines a YANG module for managing the reverse metric
extension to the intermediate system to intermediate system routeing
protocol (IS-IS) <xref target="RFC8500"/>, <xref target="ISO10589"/>. Please refer to <xref target="RFC8500"/> for the
description and definition of the functionality managed by this
module.</t>

<t>The YANG data model described in this document conforms to the
Network Management Datastore Architecture defined in <xref target="RFC8342"/>.</t>

</section>

<section title="YANG Management">
<section title="YANG Tree">
<t>The following is the YANG tree diagram (<xref target="RFC8340"/>) for the IS-IS
reverse metric extension additions.</t>

<artwork><![CDATA[

module: ietf-isis-reverse-metric
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:interfaces
            /isis:interface:
    +--rw reverse-metric
       +--rw reverse-metric
       |  +--rw metric?   isis:wide-metric
       |  +--rw flags?    bits
       +--rw exclude-te-metric?   boolean
  augment /rt:routing/rt:control-plane-protocols
            /rt:control-plane-protocol/isis:isis/isis:interfaces
            /isis:interface/isis:adjacencies/isis:adjacency:
    +--ro reverse-metric
    |  +--ro metric?   isis:wide-metric
    |  +--ro flags?    bits
    +--ro te-metric?        uint32
]]></artwork>

</section>

<section title="YANG Module">
<t>The following is the YANG module for managing the IS-IS reverse metric
functionality defined in <xref target="RFC8500"/>.</t>

<sourcecode><![CDATA[
<CODE BEGINS> file "ietf-isis-reverse-metric@2019-03-31.yang"
module ietf-isis-reverse-metric {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-isis-reverse-metric";
  prefix isis-rmetric;

  import ietf-isis { prefix isis; }
  import ietf-routing { prefix "rt"; }

  organization
    "IETF NETMOD Working Group (NETMOD)";
  contact
    "WG Web:  <https://tools.ietf.org/wg/netmod/>
     WG List: <mailto:netmod@ietf.org>

     Author: Christian Hopps
	     <mailto:chopps@chopps.org>";

  // RFC Ed.: replace XXXX with actual RFC number and
  // remove this note.

  description
    "This module defines the configuration and operational state for
     managing the IS-IS reverse metric functionality [RFC8500].

     Copyright (c) 2019 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
     (https://tools.ietf.org/html/rfcXXXX); see the RFC itself for
     full legal notices.";

  revision 2019-03-31 {
    description "Initial Revision";
    reference "RFC XXXX: YANG IS-IS Reverse Metric";
  }

  grouping reverse-metric-data {
    description "IS-IS reverse metric data.";
    container reverse-metric {
      description "IS-IS reverse metric data.";
      leaf metric {
	type isis:wide-metric;
	description "The reverse metric value.";
      }
      leaf flags {
	type bits {
	  bit whole-lan {
	    position 0;
	    description
	      "The 'whole LAN' or W-bit. If true then a DIS
	       processing this reverse metric will add the metric
	       value to all the nodes it advertises in the
	       pseudo-node LSP for this interface. Otherwise it will
	       only increment the metric for the advertising node in
	       the pseudo-node LSP for this interface.";
	  }
	  bit allow-unreachable {
	    position 1;
	    description
	      "The 'allow-unreachable' or U-bit. If true it allows
	       the neighbor to increment the overall metric up to
	       2^24-1 rather than the lesser maximum of 2^24-2, and
	       if done will cause traffic to stop using rather than
	       avoid using the interface.";
	  }
	}
	description "The reverse metric flag values.";
      }
    }
  }

  grouping tlv16-reverse-metric {
    description "IS-IS reverse metric TLV data.";
    uses reverse-metric-data;
    leaf te-metric {
      type uint32;
      description "The TE metric value from the sub-TLV if present.";
    }
  }

  augment "/rt:routing/rt:control-plane-protocols/"
    +"rt:control-plane-protocol/"
    +"isis:isis/isis:interfaces/isis:interface" {
    when "rt:type = 'isis:isis'" {
      description
	"This augment is only valid when routing protocol instance
	 type is 'isis'.";
    }

    description
      "The reverse metric configuration for an interface.";

    container reverse-metric {
      description "Announce a reverse metric to neighbors.";
      uses reverse-metric-data;
      leaf exclude-te-metric {
	type boolean;
	default false;
	description
	  "If true and there is a TE metric defined for this
	   interface then do not send the TE metric sub-TLV in the
	   reverse metric TLV.";
      }
    }
  }
  augment "/rt:routing/rt:control-plane-protocols/"
    +"rt:control-plane-protocol/"
    +"isis:isis/isis:interfaces/isis:interface/"
    +"isis:adjacencies/isis:adjacency" {
    when "rt:type = 'isis:isis'" {
      description
	"This augment is only valid when routing protocol instance
	 type is 'isis'";
    }

    description
      "The reverse metric state advertised by a neighbor.";
    uses tlv16-reverse-metric;
  }
}
<CODE ENDS>
]]></sourcecode>

</section>

</section>

<section title="IANA Considerations">
<section title="Updates to the IETF XML Registry">
<t>This document registers a URI in the "IETF XML Registry" <xref target="RFC3688"/>.
Following the format in <xref target="RFC3688"/>, the following registration has been
made:</t>

<dl>
<dt>URI</dt><dd><t>urn:ietf:params:xml:ns:yang:ietf-isis-reverse-metric</t></dd>
<dt>Registrant Contact</dt><dd><t>The IESG.</t></dd>
<dt>XML</dt><dd><t>N/A; the requested URI is an XML namespace.</t></dd>
</dl>

</section>

<section title="Updates to the YANG Module Names Registry">
<t>This document registers one YANG module in the "YANG Module Names"
registry <xref target="RFC6020"/>. Following the format in <xref target="RFC6020"/>, the following
registration has been made:</t>

<dl>
<dt>name</dt><dd><t>ietf-isis-reverse-metric</t></dd>
<dt>namespace</dt><dd><t>urn:ietf:params:xml:ns:yang:ietf-isis-reverse-metric</t></dd>
<dt>prefix</dt><dd><t>isis-rmetric</t></dd>
<dt>reference</dt><dd><t>RFC XXXX (RFC Ed.: replace XXX with actual RFC number and remove this note.)</t></dd>
</dl>

</section>

</section>

<section title="Security Considerations">
<t>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 <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 Network Configuration Access Control Model (NACM) <xref target="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.</t>

<t>The YANG module defined in this document can enable, disable and
modify the behavior of metrics used by routing. For the security
implications regarding these types of changes consult the <xref target="RFC8500"/>
which defines the functionality.</t>

</section>

</middle>
<back>
<references title="Normative References">


<reference anchor="ISO10589">
<front>
<title>Intermediate system to intermediate system intra-domain-routing routine information exchange protocol for use in conjunction with the protocol for providing the connectionless-mode Network Service (ISO 8473)</title>
<author>
<organization>International Organization for Standardization</organization>
</author>
<date month="" year="1992" />
</front>

<seriesInfo name="ISO" value="Standard 10589" />

</reference>


<reference  anchor='RFC3688' target='https://www.rfc-editor.org/info/rfc3688'>
<front>
<title>The IETF XML Registry</title>
<author initials='M.' surname='Mealling' fullname='M. Mealling'><organization /></author>
<date year='2004' month='January' />
<abstract><t>This document describes an IANA maintained registry for IETF standards which use Extensible Markup Language (XML) related items such as Namespaces, Document Type Declarations (DTDs), Schemas, and Resource Description Framework (RDF) Schemas.</t></abstract>
</front>
<seriesInfo name='BCP' value='81'/>
<seriesInfo name='RFC' value='3688'/>
<seriesInfo name='DOI' value='10.17487/RFC3688'/>
</reference>


<reference  anchor='RFC6020' target='https://www.rfc-editor.org/info/rfc6020'>
<front>
<title>YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund' role='editor'><organization /></author>
<date year='2010' month='October' />
<abstract><t>YANG is a data modeling language used to model configuration and state data manipulated by the Network Configuration Protocol (NETCONF), NETCONF remote procedure calls, and NETCONF notifications. [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6020'/>
<seriesInfo name='DOI' value='10.17487/RFC6020'/>
</reference>


<reference  anchor='RFC6241' target='https://www.rfc-editor.org/info/rfc6241'>
<front>
<title>Network Configuration Protocol (NETCONF)</title>
<author initials='R.' surname='Enns' fullname='R. Enns' role='editor'><organization /></author>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund' role='editor'><organization /></author>
<author initials='J.' surname='Schoenwaelder' fullname='J. Schoenwaelder' role='editor'><organization /></author>
<author initials='A.' surname='Bierman' fullname='A. Bierman' role='editor'><organization /></author>
<date year='2011' month='June' />
<abstract><t>The Network Configuration Protocol (NETCONF) defined in this document provides mechanisms to install, manipulate, and delete the configuration of network devices.  It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the protocol messages.  The NETCONF protocol operations are realized as remote procedure calls (RPCs).  This document obsoletes RFC 4741.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6241'/>
<seriesInfo name='DOI' value='10.17487/RFC6241'/>
</reference>


<reference  anchor='RFC6242' target='https://www.rfc-editor.org/info/rfc6242'>
<front>
<title>Using the NETCONF Protocol over Secure Shell (SSH)</title>
<author initials='M.' surname='Wasserman' fullname='M. Wasserman'><organization /></author>
<date year='2011' month='June' />
<abstract><t>This document describes a method for invoking and running the Network Configuration Protocol (NETCONF) within a Secure Shell (SSH) session as an SSH subsystem.  This document obsoletes RFC 4742.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6242'/>
<seriesInfo name='DOI' value='10.17487/RFC6242'/>
</reference>


<reference  anchor='RFC8040' target='https://www.rfc-editor.org/info/rfc8040'>
<front>
<title>RESTCONF Protocol</title>
<author initials='A.' surname='Bierman' fullname='A. Bierman'><organization /></author>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<author initials='K.' surname='Watsen' fullname='K. Watsen'><organization /></author>
<date year='2017' month='January' />
<abstract><t>This document describes an HTTP-based protocol that provides a programmatic interface for accessing data defined in YANG, using the datastore concepts defined in the Network Configuration Protocol (NETCONF).</t></abstract>
</front>
<seriesInfo name='RFC' value='8040'/>
<seriesInfo name='DOI' value='10.17487/RFC8040'/>
</reference>


<reference  anchor='RFC8341' target='https://www.rfc-editor.org/info/rfc8341'>
<front>
<title>Network Configuration Access Control Model</title>
<author initials='A.' surname='Bierman' fullname='A. Bierman'><organization /></author>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<date year='2018' month='March' />
<abstract><t>The standardization of network configuration interfaces for use with the Network Configuration Protocol (NETCONF) or the RESTCONF protocol requires a structured and secure operating environment that promotes human usability and multi-vendor interoperability.  There is a need for standard mechanisms to restrict NETCONF or RESTCONF protocol access for particular users to a preconfigured subset of all available NETCONF or RESTCONF protocol operations and content.  This document defines such an access control model.</t><t>This document obsoletes RFC 6536.</t></abstract>
</front>
<seriesInfo name='STD' value='91'/>
<seriesInfo name='RFC' value='8341'/>
<seriesInfo name='DOI' value='10.17487/RFC8341'/>
</reference>


<reference  anchor='RFC8342' target='https://www.rfc-editor.org/info/rfc8342'>
<front>
<title>Network Management Datastore Architecture (NMDA)</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<author initials='J.' surname='Schoenwaelder' fullname='J. Schoenwaelder'><organization /></author>
<author initials='P.' surname='Shafer' fullname='P. Shafer'><organization /></author>
<author initials='K.' surname='Watsen' fullname='K. Watsen'><organization /></author>
<author initials='R.' surname='Wilton' fullname='R. Wilton'><organization /></author>
<date year='2018' month='March' />
<abstract><t>Datastores are a fundamental concept binding the data models written in the YANG data modeling language to network management protocols such as the Network Configuration Protocol (NETCONF) and RESTCONF. This document defines an architectural framework for datastores based on the experience gained with the initial simpler model, addressing requirements that were not well supported in the initial model.  This document updates RFC 7950.</t></abstract>
</front>
<seriesInfo name='RFC' value='8342'/>
<seriesInfo name='DOI' value='10.17487/RFC8342'/>
</reference>


<reference  anchor='RFC8446' target='https://www.rfc-editor.org/info/rfc8446'>
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2018' month='August' />
<abstract><t>This document specifies version 1.3 of the Transport Layer Security (TLS) protocol.  TLS allows client/server applications to communicate over the Internet in a way that is designed to prevent eavesdropping, tampering, and message forgery.</t><t>This document updates RFCs 5705 and 6066, and obsoletes RFCs 5077, 5246, and 6961.  This document also specifies new requirements for TLS 1.2 implementations.</t></abstract>
</front>
<seriesInfo name='RFC' value='8446'/>
<seriesInfo name='DOI' value='10.17487/RFC8446'/>
</reference>


<reference  anchor='RFC8500' target='https://www.rfc-editor.org/info/rfc8500'>
<front>
<title>IS-IS Routing with Reverse Metric</title>
<author initials='N.' surname='Shen' fullname='N. Shen'><organization /></author>
<author initials='S.' surname='Amante' fullname='S. Amante'><organization /></author>
<author initials='M.' surname='Abrahamsson' fullname='M. Abrahamsson'><organization /></author>
<date year='2019' month='February' />
<abstract><t>This document describes a mechanism to allow IS-IS routing to quickly and accurately shift traffic away from either a point-to-point or multi-access LAN interface during network maintenance or other operational events.  This is accomplished by signaling adjacent IS-IS neighbors with a higher reverse metric, i.e., the metric towards the signaling IS-IS router.</t></abstract>
</front>
<seriesInfo name='RFC' value='8500'/>
<seriesInfo name='DOI' value='10.17487/RFC8500'/>
</reference>
</references>
<references title="Informative References">


<reference  anchor='RFC8340' target='https://www.rfc-editor.org/info/rfc8340'>
<front>
<title>YANG Tree Diagrams</title>
<author initials='M.' surname='Bjorklund' fullname='M. Bjorklund'><organization /></author>
<author initials='L.' surname='Berger' fullname='L. Berger' role='editor'><organization /></author>
<date year='2018' month='March' />
<abstract><t>This document captures the current syntax used in YANG module tree diagrams.  The purpose of this document is to provide a single location for this definition.  This syntax may be updated from time to time based on the evolution of the YANG language.</t></abstract>
</front>
<seriesInfo name='BCP' value='215'/>
<seriesInfo name='RFC' value='8340'/>
<seriesInfo name='DOI' value='10.17487/RFC8340'/>
</reference>
</references>
  </back>
</rfc>
