<?xml version="1.0" encoding="US-ASCII"?>
<!-- edited with XMLSPY v5 rel. 3 U (http://www.xmlspy.com)
     by Daniel M Kohn (private) --> encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
  <!ENTITY rfc2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"> nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" category="std" consensus="true" docName="draft-ietf-opsawg-yang-vpn-service-pm-15"
     ipr="trust200902">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

  <?rfc toc="yes" ?>

  <?rfc symrefs="yes" ?>

  <?rfc sortrefs="yes"?>

  <?rfc iprnotified="no" ?>

  <?rfc strict="yes" ?> number="9375" ipr="trust200902" obsoletes="" updates="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">

<!-- xml2rfc v2v3 conversion 3.15.2 -->

  <front>
    <title abbrev="Network abbrev="A YANG Data Model for Network and VPN Service PM YANG">A PM">A YANG Data Model for Network
    and VPN Service Performance Monitoring</title>
    <seriesInfo name="RFC" value="9375"/>
    <author fullname="Bo Wu" initials="B." role="editor" surname="Wu">
      <organization>Huawei</organization>
      <address>
        <postal>
	  <extaddr>Yuhua District</extaddr>
          <street>101 Software Avenue, Yuhua District</street> Avenue</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>lana.wubo@huawei.com</email>
      </address>
    </author>
    <author fullname="Qin Wu" initials="Q." role="editor" surname="Wu">
      <organization>Huawei</organization>
      <address>
        <postal>
	  <extaddr>Yuhua District</extaddr>
          <street>101 Software Avenue, Yuhua District</street> Avenue</street>
          <city>Nanjing</city>
          <region>Jiangsu</region>
          <code>210012</code>
          <country>China</country>
        </postal>
        <email>bill.wu@huawei.com</email>
      </address>
    </author>
    <author fullname="Mohamed Boucadair" initials="M." role="editor" surname="Boucadair">
      <organization>Orange</organization>
      <address>
        <postal>
          <street>Rennes 35000</street>
          <country>France</country>
        </postal>
        <email>mohamed.boucadair@orange.com</email>
      </address>
    </author>
    <author fullname="Oscar Gonzalez de Dios" initials="O." surname="Gonzalez de Dios">
      <organization>Telefonica</organization>
      <address>
        <postal>
          <street/>
          <city>Madrid</city>

          <country>ES</country>
          <country>Spain</country>
        </postal>
        <email>oscar.gonzalezdedios@telefonica.com</email>
      </address>
    </author>
    <author fullname="Bin Wen" initials="B" surname="Wen">
      <organization>Comcast</organization>
      <address>
        <email>bin_wen@comcast.com</email>
      </address>
    </author>
    <date year="2022"/>

    <area>OPS Area</area>

    <workgroup>OPSAWG Working Group</workgroup>

    <keyword>RFC</keyword>

    <keyword>Request for Comments</keyword>

    <keyword>Internet-Draft</keyword> year="2023" month="April" />
    <area>ops</area>
    <workgroup>opsawg</workgroup>
    <keyword>VPN Performance Measurement Telemetry</keyword>
    <abstract>
      <t>The data model for network topologies defined in RFC 8345 introduces
      vertical layering relationships between networks that can be augmented
      to cover network and service topologies. This document defines a YANG
      module for performance monitoring (PM) of both underlay networks and
      overlay VPN services that can be used to monitor and manage network
      performance on the topology of both layers.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction"> numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC8969"/> target="RFC8969" format="default"/> describes a framework for automating service
      and network management with YANG <xref target="RFC7950"/> target="RFC7950" format="default"/> data models. It
      defines
      states that the performance measurement telemetry model should be tied
      to the services (such as a Layer 3 VPN or Layer 2 VPN) or to the network
      models to monitor the overall network performance and the Service Level
      Agreements (SLAs).</t>
      <t>The performance of VPN services is associated with the performance
      changes of the underlay networks that carries carry VPN services. For example,
      link delay between Provider Edge (PE) and Provider (P) devices and
      packet loss status on Layer 2 and Layer 3 interfaces connecting PEs and
      Customer Edge (CE) devices directly impact VPN service performance.
      Additionally, the integration of Layer 2/Layer 2 / Layer 3 VPN performance and
      network performance data enables the orchestrator to monitor
      consistently. Therefore, this document defines a YANG module for both
      network and VPN service performance monitoring (PM). The module can be
      used to monitor and manage network performance on the topology level or
      the service topology between VPN sites.</t>
      <t>The base model presented here specified in <xref target="YANG_Module"/> can be extended to include
      technology-specific details, e.g., adding Explicit Congestion
      Notification (ECN) statistics for Layer 3 networks or VPN services to
      support performance-sensitive applications.</t>
      <t>This document does not introduce new metrics for network performance
      or mechanisms for measuring network performance, but it uses the existing
      mechanisms and statistics to monitor the performance of the network and
      the services.</t>
      <t>The YANG module defined in this document is designed as an
      augmentation to the network topology YANG data model defined in <xref
      target="RFC8345"/> target="RFC8345" format="default"/> and draws on relevant YANG types defined in <xref
      target="RFC6991"/>, target="RFC6991" format="default"/>, <xref target="RFC8345"/>, target="RFC8345" format="default"/>, <xref target="RFC8532"/>, target="RFC8532" format="default"/>,
      and <xref target="RFC9181"/>.</t> target="RFC9181" format="default"/>.</t>
      <t><xref target="examples"/> target="examples" format="default"/> provides a set of examples to illustrate
      the use of the module.</t>
    </section>
    <section title="Terminology"> numbered="true" toc="default">
      <name>Terminology</name>
      <t>The following terms are defined in <xref format="default" target="RFC7950"/> and are used in this specification:</t>

      <t><list style="symbols">
          <t>augment</t>

          <t>data model</t>

          <t>data node</t>
        </list></t>
      <ul spacing="normal">
        <li>augment</li>
        <li>data model</li>
        <li>data node</li>
      </ul>
      <t>The terminology for describing YANG data models is found in <xref format="default" target="RFC7950"/>.</t>
      <t>The tree diagrams used in this document follow the notation defined
      in <xref format="default" target="RFC8340"/>.</t>
      <section title="Acronyms"> numbered="true" toc="default">
        <name>Acronyms</name>

        <t>The following acronyms are used in the document:<?rfc subcompact="yes" ?></t>

        <t><list hangIndent="8" style="hanging">
            <t hangText="CE">Customer document:</t>
        <dl newline="false" spacing="normal" indent="10">
          <dt>CE</dt>
          <dd>Customer Edge, as defined in <xref
            target="RFC4026"/></t>

            <t hangText="L2VPN">Layer target="RFC4026" format="default"/></dd>
	   <dt>L2VPN</dt>
          <dd>Layer 2 Virtual Private Network, as defined in
            <xref target="RFC4026"/></t>

            <t hangText="L3VPN">Layer target="RFC4026" format="default"/></dd>
          <dt>L3VPN</dt>
          <dd>Layer 3 Virtual Private Network, as defined in
          <xref target="RFC4026"/></t>

            <t hangText="L2NM">L2VPN target="RFC4026" format="default"/></dd>
          <dt>L2NM</dt>
          <dd>L2VPN Network Model</t>

            <t hangText="L3NM">L3VPN Model</dd>
          <dt>L3NM</dt>
          <dd>L3VPN Network Model</t>

            <t hangText="MPLS">Multiprotocol Model</dd>
          <dt>MPLS</dt>
          <dd>Multiprotocol Label Switching</t>

            <t hangText="OAM">Operations, Switching</dd>
          <dt>OAM</dt>
          <dd>Operations, Administration, and Maintenance</t>

            <t hangText="OSPF">Open Maintenance</dd>
          <dt>OSPF</dt>
          <dd>Open Shortest Path First</t>

            <t hangText="OWAMP">One-Way First</dd>
          <dt>OWAMP</dt>
          <dd>One-Way Active Measurement Protocol, as
            defined in <xref target="RFC4656"/></t>

            <t hangText="P">Provider Router, target="RFC4656" format="default"/></dd>
          <dt>P</dt>
          <dd>Provider router, as defined in <xref
            target="RFC4026"/></t>

            <t hangText="PE">Provider target="RFC4026" format="default"/></dd>
          <dt>PE</dt>
          <dd>Provider Edge, as defined in <xref
            target="RFC4026"/></t>

            <t hangText="PM">Performance Monitoring</t>

            <t hangText="SLA">Service target="RFC4026" format="default"/></dd>
          <dt>PM</dt>
          <dd>Performance Monitoring</dd>
          <dt>SLA</dt>
          <dd>Service Level Agreement</t>

            <t hangText="TP">Termination Agreement</dd>
          <dt>TP</dt>
          <dd>Termination Point, as defined in <xref
            target="RFC8345"/> section 4.2</t>

            <t hangText="TWAMP">Two-Way target="RFC8345" section="4.2" sectionFormat="comma"/></dd>
          <dt>TWAMP</dt>
          <dd>Two-Way Active Measurement Protocol, as
            defined in <xref target="RFC5357"/></t>

            <t hangText="VPLS">Virtual target="RFC5357" format="default"/></dd>
          <dt>VPLS</dt>
          <dd>Virtual Private LAN Service, as defined in
            <xref target="RFC4026"/></t>

            <t hangText="VPN">Virtual target="RFC4026" format="default"/></dd>
          <dt>VPN</dt>
          <dd>Virtual Private Network</t>
          </list></t>

        <t><?rfc subcompact="no" ?></t> Network</dd>
        </dl>
      </section>
    </section>
    <section title="Network numbered="true" toc="default">
      <name>Network and VPN Service Performance Monitoring Model Usage"> Usage</name>
      <t>Models are key for automating network management operations (Section
      3 of <xref target="RFC8969"/>). (<xref target="RFC8969" section="3" sectionFormat="of"/>). Particularly, together with service and
      network models, performance measurement telemetry models are needed to
      monitor network performance to meet specific service requirements
      (typically captured in an SLA).</t>

      <figure anchor="fig1"
              title="An anchor="fig1">
        <name>An Example Architecture with a Service Orchestrator">
        <artwork><![CDATA[ Orchestrator</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                         +---------------+
                         |   Customer    |
                         +-------+-------+
                                 |
         Customer Service Models |
                                 |
                         +-------+---------+
                         |    Service      |
                         |  Orchestration  Orchestrator   |
                         +------+-+--------+
                                | |
         Network Service Models | | Network and VPN Service PM Models
                                | |
                         +------+-+--------+
                         |     Network     |
                         |   Controller    |
                         +-------+---------+
                                 |
         +-----------------------+------------------------+
                               Network
]]></artwork>
      </figure>
      <t>The network and VPN service performance monitoring (PM) PM model can be
      used to expose operational performance information to the layer above,
      e.g., to an orchestrator or other BSS/OSS Business Support System (BSS) / Operational Support System (OSS) client application, via
      standard network management APIs. <xref target="fig1"/> target="fig1" format="default"/> shows an example
      usage in a layered model architecture as described in <xref
      target="RFC8309"/>.</t> target="RFC8309" format="default"/>.</t>

      <t>Before using the model, the controller needs to establish topology
      visibility of the network and VPN. For example, the controller can use
      network information from <xref target="RFC8345"/>, target="RFC8345" format="default"/> and <xref
      target="I-D.ietf-opsawg-sap"/> target="I-D.ietf-opsawg-sap" format="default"/> or VPN information from the L3VPN Network
      Model (L3NM) <xref target="RFC9182"/> target="RFC9182" format="default"/> and the L2VPN Network Model (L2NM)
      <xref target="RFC9291"/>. target="RFC9291" format="default"/>. Then the controller derives network or VPN
      level
      performance data by aggregating (and filtering) lower-level data
      collected via monitoring counters of the devices involved.</t>
      <t>The network or VPN performance data can be based on different
      sources. For example, the performance monitoring data per link in the
      underlying networks can be collected using a network performance
      measurement method such as the One-Way Active Measurement Protocol (OWAMP)
      <xref target="RFC4656"/>, target="RFC4656" format="default"/>, Two-Way Active Measurement Protocol (TWAMP)
      <xref target="RFC5357"/>, target="RFC5357" format="default"/>, Simple Two-way Active Measurement Protocol
      (STAMP) <xref target="RFC8762"/>, target="RFC8762" format="default"/>, Multiprotocol Label Switching (MPLS)
      Loss and Delay Measurement <xref target="RFC6374"/> target="RFC6374" format="default"/>, or In Situ situ OAM
      (IOAM) <xref target="RFC9197"/>. target="RFC9197" format="default"/>. The performance monitoring information
      reflecting the quality of the network or VPN service (e.g., network
      performance data between source node and destination node in the
      networks or between VPN sites) can be computed and aggregated, for
      example, using the information from the Traffic Engineering Database
      (TED),
      (TED) <xref target="RFC7471"/> target="RFC7471" format="default"/> <xref target="RFC8570"/> target="RFC8570" format="default"/> <xref
      target="RFC8571"/>, target="RFC8571" format="default"/> or LMAP (Large-Scale Large-Scale Measurement Platform) Platform (LMAP) <xref
      target="RFC8194"/>.</t> target="RFC8194" format="default"/>.</t>
      <t>The measurement and report intervals that are associated with these
      performance data usually depend on the configuration of the specific
      measurement method or collection method or various combinations. This
      document defines network-wide measurement intervals to align measurement
      requirements for networks or VPN services.</t>
      <section title="Collecting numbered="true" toc="default">
        <name>Collecting Data via the Pub/Sub Mechanism"> Mechanism</name>
        <t>Some applications, such as service-assurance applications, which
        must maintain a continuous view of operational data and state, can use
        the subscription model specified in <xref target="RFC8641"/> target="RFC8641" format="default"/> to
        subscribe to the specific network performance data or VPN service
        performance data they are interested in, at the data source. For
        example, networks network or VPN topologies topology updates may be obtained through
        on-change notifications <xref target="RFC8641"/>. target="RFC8641" format="default"/>. For dynamic PM data,
        e.g. VRF data
        (e.g., VPN Routing and Forwarding (VRF) routes or MAC Media Access Control (MAC) entries, link metrics, and interface metrics, metrics),
        various notifications can be specified to obtain more complete data. A
        periodic notification <xref target="RFC8641"/> target="RFC8641" format="default"/> can be specified to
        obtain real-time performance data. For devices/controllers that
        maintain historical performance data for a period of time, a replay
        notification (see <xref target="RFC5277"/> target="RFC5277" format="default"/> or <xref target="RFC8639"/> target="RFC8639" format="default"/>) can
        be used to obtain the historical data. And alarm notifications <xref
        target="RFC8632"/> target="RFC8632" format="default"/> can be specified to get alarms for the metrics
        which
        that exceed or fall below the performance threshold.</t>
        <t>The data source can, then, can then use the network and VPN service
        performance monitoring model defined in this document and the YANG
        Push YANG-Push
        data model <xref target="RFC8641"/> target="RFC8641" format="default"/> to distribute specific telemetry
        data to target recipients.</t>
      </section>
      <section title="Collecting numbered="true" toc="default">
        <name>Collecting Data On Demand"> Demand</name>
        <t>To obtain a snapshot of performance data from a network topology or
        a VPN service topology, service-assurance applications may retrieve
        information using the network and VPN service PM model through a
        NETCONF
        Network Configuration Protocol (NETCONF) <xref target="RFC6241"/> target="RFC6241" format="default"/> or a RESTCONF <xref
        target="RFC8040"/> target="RFC8040" format="default"/> interface. For example, a specified "link-id" of a
        VPN can be used as a filter in a RESTCONF GET request to retrieve
        per-link VPN PM data.</t>
      </section>
    </section>
    <section title="Description numbered="true" toc="default">
      <name>Description of The the YANG Data Model"> Model</name>
      <t>This document defines the "ietf-network-vpn-pm" YANG module, "ietf-network-vpn-pm", which
      is an augmentation to the "ietf-network" and "ietf-network-topology"
      YANG modules.</t>
      <section anchor="layering"
               title="Layering numbered="true" toc="default">
        <name>Layering Relationship between Multiple Layers of Topology"> Topology</name>
        <t><xref target="RFC8345"/> target="RFC8345" format="default"/> defines a YANG data model for
        network/service topologies and inventories. The service topology
        described in <xref target="RFC8345"/> target="RFC8345" format="default"/> includes the abstract topology
        for a service layer above Layer 1 (L1), Layer 2 (L2), and Layer 3 (L3)
        underlay topologies. This service topology has the generic topology
        elements of node, link, and terminating termination point. One typical example of
        a service topology is described in Figure 3 of <xref
        target="RFC8345"/>: target="RFC8345" format="default"/>: two VPN service topologies instantiated over a
        common L3 topology. Each VPN service topology is mapped onto a subset
        of nodes from the L3 topology.</t>
        <t><xref target="fig3"/> target="fig3" format="default"/> illustrates an example of a topology
        hierarchy that maps between the VPN service topology and an underlying
        Layer 3 network topology:</t> topology.</t>
        <figure align="center" anchor="fig3"
                title="Example anchor="fig3">
          <name>Example of Topology Mapping Between between VPN Service Topology and an Underlying Network">
          <artwork><![CDATA[ Network</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[                     VPN 1                       VPN 2
          +------------------------+   +------------------------+
         /                        /   /                        /
        / S1C_[VN3]..........    /   /                        /
       /         \          :   /   / S2A_[VN1]____[VN3]_S2B /
      /           \         :  /   /        *        *      /
     /             \        :............ * ....     *     /
    / S1B_[VN2]____[VN1]_S1A /   /       *     :     *    /
   +---------:-------:------+   +-------*------:-----*---+
             :        :      * * *  * *        :     *
             :         :   *                   :     *
   Site-1A   :  +-------:-*--------------------:-----*-----+ Site-1C
     [CE1]___:_/_______[N1]___________________[N2]___*____/__[CE3]
             :/       / / \             _____//      *   /
   [CE5]_____:_______/ /    \     _____/     /     *    /
 Site-2A    /:        /       \  /          /    *     /
           / :                [N5]         /   *      /
          /   :     /       __/ \__       /  *       /
         /     :   /    ___/       \__   / *        /
Site-1B /       : / ___/              \ /*         /  Site-2B
[CE2]__/________[N4]__________________[N3]________/____[CE4]
      /                                          /
     +------------------------------------------+
                                   L3 Topology

   Legend:
    N:Node   VN:VPN-Node  S:Site  CE:Customer
      N:   Node
      VN:  VPN Node
      S:   Site
      CE:  Customer Edge
      __   Link within a network layer
      :    Mapping between VPN 1 service topology and L3 topology
      *    Mapping between VPN 2 service topology and L3 topology
]]></artwork>
        </figure>
        <t>As shown in <xref target="fig3"/>, target="fig3" format="default"/>, two VPN services topologies are
        built on top of one underlying Layer 3 network:<list style="hanging">
            <t hangText="VPN 1: ">This network:</t>

        <dl newline="false" spacing="normal">
          <dt>VPN 1:</dt>
          <dd>This service topology supports hub-spoke Hub-and-Spoke
            communications for 'customer 1' "customer 1", connecting the customer's access
            at three sites: 'Site-1A', 'Site-1B', Site-1A, Site-1B, and 'Site-1C'. Site-1C. These sites
            are connected to nodes that are mapped to node 1 (N1), node 2
            (N2), and node 4 (N4) in the underlying Layer 3 network. 'Site-1A' Site-1A
            plays the role of hub Hub while 'Site-1B' Site-1B and 'Site-1C' Site-1C are configured
            as spoke.</t>

            <t hangText="VPN Spokes.</dd>
          <dt>VPN 2: ">This </dt>
          <dd>This service topology supports any-to-any
            communications for 'customer 2' "customer 2", connecting the customer's access
            at two sites: 'Site-2A' Site-2A and 'Site-2B'. Site-2B. These sites are connected
            to nodes that are mapped to nodes node 1 (N1) and node 3 (N3) in the
            underlying Layer 3 network. 'Site-2A' Site-2A and 'Site-2B' Site-2B have
            'any-to-any' role.</t>
          </list></t> an
            "any-to-any" role.</dd>
        </dl>
        <t>Based on the association between the VPN service topologies and the
        underlying network topologies, the VPN Network and VPN Service PM YANG module extends
        the performance status of the underlay networks and VPN services. For
        example, the module can provide link PM statistics and port statistics
        of an underlay network, e.g. e.g., Layer 1, Layer 2, Layer 3, and OSPF networks.
        And it
        It can also provide VPN PM statistics, which can be further split
        into PM for the VPN tunnel and PM at the VPN PE access node, as
        illustrated in the following diagram.</t>
        <figure align="center" anchor="fig4" title="An anchor="fig4">
          <name>An Example of VPN PM">
          <artwork><![CDATA[ PM</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[
       +-----------------------------------------------------+
       |                                                     |
       |                      VPN2 Link                      |
       |              |<-------------------->|               |
       |              |                      |               |
       |      VPN2+---+---+              +---+---+VPN2       |
       |       TP1| VN1   |  Tunnel PM   |  VN3  |TP2        |
       |       ---+ PE A  |==============|  PE B +----       |
       |vpn-access+-------+              +-------+ vpn-access|
       |-interface|                              | -interface|
       |          |##############################|           |
       |          |inter-vpn-access-interface PM |           |
       |                                                     |
       +-----------------------------------------------------+
       |                                                     |
       |                                                     |
+----+ |        TP+-----+ Link  +---+ Link  +-----+TP        | +----+
| CE4+-+----------+ N1  +-------+-N2+-------+  N3 +----------+-+CE5 |
+----+ |       1-1+-----+1-2 2-1+---+2-2 3-1+-----+3-2       | +----+
       |                                                     |
       |                                                     |
       +-----------------------------------------------------+

       Legend:
        N:node   VN:VPN-Node TP:Termination
         N:  node
         VN: VPN Node
         TP: Termination Point
        -:Link]]></artwork>
         -:  Link]]></artwork>
        </figure>
        <t><xref target="fig4"/> target="fig4" format="default"/> illustrates an example of VPN PM and two VPN
        PM measurement methods including the VPN tunnel PM and the
        inter-VPN-access interface PM. VPN PM can also provide statistics on
        VPN access interfaces, the number of current VRF routes routes, or L2VPN MAC
        entry of a VPN node.</t>
      </section>
      <section title="Network Level numbered="true" toc="default">

<name>Network-Level Performance Monitoring Augmentation"> Augmentation</name>
        <t>The model module described below can be used for performance monitoring both for both the
        underlay networks and the VPN services, which would be separate
        entries in the network list <xref target="RFC8345"/>. target="RFC8345" format="default"/>. The differences
        are as follows:<list style="symbols">
            <t>When follows:</t>
        <ul spacing="normal">
          <li>When the &ldquo;service&rdquo; "service" presence container is absent,
            then it indicates performance monitoring of the network
            itself.</t>

            <t>When
            itself.</li>
          <li>When the &ldquo;service&rdquo; "service" presence container is present,
            then it indicates performance monitoring of the VPN service
            specified by the &ldquo;service-type&rdquo; "service-type" leaf, e.g. , e.g., L3VPN or
            Virtual Private LAN Service (VPLS). The values are taken from
            <xref target="RFC9181"/>. target="RFC9181" format="default"/>. When a network topology instance
            contains the L3VPN or other L2VPN network type, types, it represents a
            VPN instance that can perform performance monitoring</t>
          </list></t> monitoring.</li>
        </ul>
        <t>The YANG tree in <xref target="ntree"/> target="ntree" format="default"/> is a part of
        the "ietf-network-vpn-pm" tree. It also defines the following set of
        network level attributes:<list style="hanging">
            <t hangText="&quot;vpn-id&quot;:">Refers
        network-level attributes:</t>
        <dl newline="false" spacing="normal">
          <dt>"vpn-id":</dt>
          <dd>Refers to an identifier of VPN
            service defined in <xref target="RFC9181"/>. target="RFC9181" format="default"/>. This identifier is
            used to correlate the performance status with the network service
            configuration.</t>

            <t hangText="&quot;vpn-service-topology&quot;: ">Indicates
            configuration.</dd>
          <dt>"vpn-service-topology": </dt>
          <dd>Indicates the
            type of the VPN service topology. This model supports
            "any-to-any", "Hub and Spoke" "hub-spoke" (where Hubs can exchange traffic),
            and "Hub and Spoke disjoint" "hub-spoke-disjoint" (where Hubs cannot exchange traffic)
            that traffic),
            which are taken from <xref target="RFC9181"/>. target="RFC9181" format="default"/>. These VPN service
            topology types can be used to describe how VPN sites communicate
            with each other.</t>
          </list></t>

        <t><figure anchor="ntree"
            title="Network Level other.</dd>
        </dl>

        <figure anchor="ntree">
          <name>Network-Level YANG Tree of the Hierarchies">
            <artwork><![CDATA[module: Tree</name>
          <sourcecode type="yangtree"><![CDATA[
module: ietf-network-vpn-pm
  augment /nw:networks/nw:network/nw:network-types:
    +--rw service!
       +--rw service-type            identityref
       +--rw vpn-id?                 vpn-common:vpn-id
       +--rw vpn-service-topology?   identityref
]]></artwork>
          </figure></t>
]]></sourcecode>
        </figure>
      </section>
      <section title="Node Level numbered="true" toc="default">
        <name>Node-Level Performance Monitoring Augmentation"> Augmentation</name>
        <t>The YANG tree in <xref target="nodetree"/> target="nodetree" format="default"/> is the node part of the
        "ietf-network-vpn-pm" tree.</t>
        <t>For network performance monitoring, the module defines the
        following attributes:<list style="hanging">
            <t hangText="&quot;node-type&quot;: ">Indicates attributes:</t>
        <dl newline="false" spacing="normal">
          <dt>"node-type": </dt>
          <dd>Indicates the device type of
            Provider Edge (PE), Provider (P) the PE, P device, or Autonomous System
            Border Router (ASBR) as defined in <xref target="RFC4026"/> target="RFC4026" format="default"/> and
            <xref target="RFC4364"/>, target="RFC4364" format="default"/> so that the performance metric between
            any two nodes that each with have a specific node type can be reported.</t>

            <t hangText="&quot;entry-summary&quot;: ">Lists reported.</dd>
          <dt>"entry-summary": </dt>
          <dd>Lists a set of IPv4
            statistics, IPv6 statistics, and MAC statistics. The detailed
            statistics are specified separately.</t>
          </list></t> separately.</dd>
        </dl>
        <t>For VPN service topology, the module defines one attribute:</t>

        <t><list style="hanging">
            <t hangText="&quot;role&quot;:">Defines
        <dl newline="false" spacing="normal">
          <dt>"role":</dt>
          <dd>Defines the role in a particular
            VPN service topology. The roles are taken from <xref
            target="RFC9181"/> target="RFC9181" format="default"/> (e.g., any-to-any-role, spoke-role,
            hub-role).</t>
          </list></t>

        <t><figure anchor="nodetree"
            title="Node Level "any-to-any-role", "spoke-role", and
            "hub-role").</dd>
        </dl>
        <figure anchor="nodetree">
          <name>Node-Level YANG Tree of the Hierarchies">
            <artwork><![CDATA[ Tree</name>
          <sourcecode type="yangtree"><![CDATA[
  augment /nw:networks/nw:network/nw:node:
    +--rw node-type?       identityref
    +--ro entry-summary
       +--ro ipv4-num
       |  +--ro maximum-routes?        uint32
       |  +--ro total-active-routes?   uint32
       +--ro ipv6-num
       |  +--ro maximum-routes?        uint32
       |  +--ro total-active-routes?   uint32
       +--ro mac-num
          +--ro maximum-mac-entries?        uint32
          +--ro total-active-mac-entries?   uint32
  augment /nw:networks/nw:network/nw:node:
    +--rw role?   identityref
]]></artwork>
          </figure></t>

        <t/>
]]></sourcecode>
        </figure>

      </section>
      <section title="Link numbered="true" toc="default">
        <name>Performance Monitoring Augmentation at Link and Termination Point Level Performance Monitoring Augmentation"> Level</name>
        <t>The YANG tree in <xref target="ltree"/> target="ltree" format="default"/> is the link and termination
        point (TP) part of ietf-network-vpn-pm the "ietf-network-vpn-pm" tree.</t>
        <t>The 'links' "links" are classified into two types: topology link defined (defined in
        <xref target="RFC8345"/> target="RFC8345" format="default"/>) and abstract link of a VPN between PEs
        defined (defined in this module.</t> module).</t>
        <t>The performance data of a link is a collection of counters and
        gauges that report the performance status. All these metrics are
        defined as unidirectional metrics.</t>

        <t><figure anchor="ltree"
            title="Link
        <figure anchor="ltree">
          <name>Link and Termination point Level Point YANG Tree of the hierarchies">
            <artwork><![CDATA[ Subtree </name>
<sourcecode type="yangtree"><![CDATA[
  augment /nw:networks/nw:network/nt:link:
    +--rw perf-mon
       +--rw low-percentile?            percentile
       +--rw intermediate-percentile?   percentile
       +--rw high-percentile?           percentile
       +--rw measurement-interval?      uint32
       +--ro pm* [pm-type]
       |  +--ro pm-type          identityref
       |  +--ro pm-attributes
       |     +--ro start-time?                     yang:date-and-time
       |     +--ro end-time?                       yang:date-and-time
       |     +--ro pm-source?                      identityref
       |     +--ro one-way-pm-statistics
       |     |  +--ro loss-statistics
       |     |  |  +--ro packet-loss-count?   yang:counter64
       |     |  |  +--ro loss-ratio?          percentage
       |     |  +--ro delay-statistics
       |     |  |  +--ro unit-value?                     identityref
       |     |  |  +--ro min-delay-value?                yang:gauge64
       |     |  |  +--ro max-delay-value?                yang:gauge64
       |     |  |  +--ro low-delay-percentile?           yang:gauge64
       |     |  |  +--ro intermediate-delay-percentile?  yang:gauge64
       |     |  |  +--ro high-delay-percentile?          yang:gauge64
       |     |  +--ro jitter-statistics
       |     |     +--ro unit-value?                     identityref
       |     |     +--ro min-jitter-value?               yang:gauge64
       |     |     +--ro max-jitter-value?               yang:gauge64
       |     |     +--ro low-jitter-percentile?          yang:gauge64
       |     |     +--ro intermediate-jitter-percentile? yang:gauge64
       |     |     +--ro high-jitter-percentile?         yang:gauge64
       |     +--ro one-way-pm-statistics-per-class* [class-id]
       |        +--ro class-id             string
       |        +--ro loss-statistics
       |        |  +--ro packet-loss-count?   yang:counter64
       |        |  +--ro loss-ratio?          percentage
       |        +--ro delay-statistics
       |        |  +--ro unit-value?                     identityref
       |        |  +--ro min-delay-value?                yang:gauge64
       |        |  +--ro max-delay-value?                yang:gauge64
       |        |  +--ro low-delay-percentile?           yang:gauge64
       |        |  +--ro intermediate-delay-percentile?  yang:gauge64
       |        |  +--ro high-delay-percentile?          yang:gauge64
       |        +--ro jitter-statistics
       |           +--ro unit-value?                     identityref
       |           +--ro min-jitter-value?               yang:gauge64
       |           +--ro max-jitter-value?               yang:gauge64
       |           +--ro low-jitter-percentile?          yang:gauge64
       |           +--ro intermediate-jitter-percentile? yang:gauge64
       |           +--ro high-jitter-percentile?         yang:gauge64
       +--rw vpn-pm-type
          +--rw inter-vpn-access-interface
          |  +--rw inter-vpn-access-interface?   empty
          +--rw vpn-tunnel!
             +--ro vpn-tunnel-type?   identityref
  augment /nw:networks/nw:network/nw:node/nt:termination-point:
    +--ro pm-statistics
       +--ro last-updated?               yang:date-and-time
       +--ro inbound-octets?             yang:counter64
       +--ro inbound-unicast?            yang:counter64
       +--ro inbound-broadcast?          yang:counter64
       +--ro inbound-multicast?          yang:counter64
       +--ro inbound-discards?           yang:counter64
       +--ro inbound-errors?             yang:counter64
       +--ro inbound-unknown-protocol?   yang:counter64
       +--ro outbound-octets?            yang:counter64
       +--ro outbound-unicast?           yang:counter64
       +--ro outbound-broadcast?         yang:counter64
       +--ro outbound-multicast?         yang:counter64
       +--ro outbound-discards?          yang:counter64
       +--ro outbound-errors?            yang:counter64
       +--ro vpn-network-access* [network-access-id]
          +--ro network-access-id           vpn-common:vpn-id
          +--ro last-updated?               yang:date-and-time
          +--ro inbound-octets?             yang:counter64
          +--ro inbound-unicast?            yang:counter64
          +--ro inbound-broadcast?          yang:counter64
          +--ro inbound-multicast?          yang:counter64
          +--ro inbound-discards?           yang:counter64
          +--ro inbound-errors?             yang:counter64
          +--ro inbound-unknown-protocol?   yang:counter64
          +--ro outbound-octets?            yang:counter64
          +--ro outbound-unicast?           yang:counter64
          +--ro outbound-broadcast?         yang:counter64
          +--ro outbound-multicast?         yang:counter64
          +--ro outbound-discards?          yang:counter64
          +--ro outbound-errors?            yang:counter64

]]></artwork>
          </figure></t>
]]></sourcecode>
        </figure>
        <t>For the data nodes of 'link' "link" depicted in <xref target="ltree"/>, target="ltree" format="default"/>,
        the YANG module defines the following minimal set of link-level
        performance attributes:<list style="hanging">
            <t hangText="Percentile attributes:</t>
        <dl newline="false" spacing="normal">

          <dt>Percentile parameters: ">The </dt>
          <dd>The module supports
            reporting delay and jitter metric by metrics with percentile values. There are
            three percentile values for configuring various percentile
            reporting levels. By default, low percentile (10th percentile),
            intermediate percentile (50th percentile), and high percentile (90th
            percentile) are used. Configuring a percentile to 0.000 indicates
            the client is not interested in receiving a particular percentile.
            If all percentile nodes are configured to 0.000, this it represents
            that no percentile related percentile-related nodes will be reported for a given
            performance metric (e.g., one-way delay, delay and one-way delay variation)
            and only peak/min values will be reported. For example, a client
            can inform the server that it is interested in receiving only high
            percentiles. Then for a given link, link at a given "start-time",
            "end-time"
            "end-time", and &ldquo;measurement-interval", "measurement-interval", the
            'high-delay-percentile'
            "high-delay-percentile" and 'high-jitter-percentile' "high-jitter-percentile" will be
            reported. An example to illustrate the use of percentiles is
            provided in <xref target="perc"/>.</t>

            <t
            hangText="Measurement target="perc" format="default"/>.</dd>
          <dt>Measurement interval (&quot;measurement-interval&quot;): ">Specifies ("measurement-interval"): </dt>
          <dd>Specifies
            the performance measurement interval, in seconds.</t>

            <t hangText="Start seconds.</dd>
          <dt>Start time (&quot;start-time&ldquo;): ">Indicates ("start-time"): </dt>
          <dd>Indicates the
            start time of the performance measurement for link statistics.</t>

            <t hangText="End statistics.</dd>
          <dt>End time (&quot;end-time&ldquo;): ">Indicates ("end-time"): </dt>
          <dd>Indicates the end
            time of the performance measurement for link statistics.</t>

            <t hangText="PM statistics.</dd>
          <dt>PM source (&quot;pm-source&quot;): ">Indicates ("pm-source"): </dt>
          <dd>Indicates the
            performance monitoring source. The data for the topology link can
            be based, e.g., on BGP-LS BGP - Link State (BGP-LS) <xref target="RFC8571"/>. target="RFC8571" format="default"/>. The statistics
            of the VPN abstract links can be collected based upon VPN OAM
            mechanisms, e.g., OAM mechanisms referenced in <xref
            target="RFC9182"/>, target="RFC9182" format="default"/> or Ethernet service OAM <xref
            target="ITU-T-Y-1731"/> target="ITU-T-Y-1731" format="default"/> referenced in <xref target="RFC9291"/>. target="RFC9291" format="default"/>.
            Alternatively, the data can be based upon the underlay technology
            OAM mechanisms, for example, e.g., Generic Routing Encapsulation (GRE)
            tunnel OAM.</t>

            <t hangText="Loss OAM.</dd>
          <dt>Loss statistics: ">A </dt>
          <dd>A set of one-way loss statistics
            attributes that are used to measure end to end end-to-end loss between VPN
            sites or between any two network nodes. The exact loss value or
            the loss percentage can be reported.</t>

            <t hangText="Delay reported.</dd>
          <dt>Delay statistics: ">A </dt>
          <dd>A set of one-way delay statistics
            attributes that are used to measure end to end end-to-end latency between VPN
            sites or between any two network nodes. The peak/min values or
            percentile values can be reported.</t>

            <t hangText="Jitter reported.</dd>
          <dt>Jitter statistics: ">A </dt>
          <dd>A set of one-way IP Packet Delay
            Variation <xref target="RFC3393"/> target="RFC3393" format="default"/> statistics attributes that are
            used to measure end to end end-to-end jitter between VPN sites or between any
            two network nodes. The peak/min values or percentile values can be
            reported.</t>

            <t
            hangText="PM
            reported.</dd>
          <dt>PM statistics per class: ">"one-way-pm-statistics-per-class" </dt>
          <dd>"one-way-pm-statistics-per-class"
            lists performance measurement statistics for the topology link or
            the abstract link between VPN PEs with given "class-id" names. The
            list is defined separately from "one-way-pm-statistics", which is
            used to collect generic metrics for unspecified "class-id"
            names.</t>

            <t hangText="VPN
            names.</dd>
            <dt>VPN PM type (&quot;vpn-pm-type&quot;): ">Indicates ("vpn-pm-type"): </dt>

        <dd>Indicates
            the VPN performance type, which can be
            &ldquo;inter-vpn-access-interface&rdquo;
            "inter-vpn-access-interface" PM or
            &ldquo;vpn-tunnel&rdquo;
            "vpn-tunnel" PM. These two methods are common VPN
            measurement methods. The &ldquo;inter-VPN-access-interface&rdquo; "inter-VPN-access-interface"
            PM is used to monitor the performance of logical point-to-point VPN
            connections between a source and a destination VPN access
            interfaces. And the &ldquo;vpn-tunnel&rdquo; "vpn-tunnel" PM is used to monitor the
            performance of VPN tunnels. The
            &ldquo;inter-VPN-access-interface&rdquo;
            "inter-VPN-access-interface" PM includes PE-PE
            monitoring. Therefore, usually only one of the two methods is
            used. The &ldquo;inter-VPN-access-interface&rdquo; "inter-VPN-access-interface" PM is defined
            as an empty leaf, which is not bound to a specific VPN access
            interface. The source or destination VPN access interface of the
            measurement can be augmented as needed.</t>

            <t
            hangText="VPN needed.</dd>
          <dt>VPN tunnel type (&quot;vpn-tunnel-type&quot;): ">Indicates ("vpn-tunnel-type"): </dt>
          <dd>Indicates
            the abstract link protocol-type of a VPN, such as GRE or IP-in-IP.
            The leaf refers to an identifier of the "underlay-transport"
            defined in <xref target="RFC9181"/>, target="RFC9181" format="default"/>, which describes the transport
            technology to carry that carries the traffic of the VPN service. In the case of
            multiple types of tunnels between a single pair of VPN nodes, a
            separate link for each type of tunnel can be created.</t>
          </list></t> created.</dd>
        </dl>
        <t>For the data nodes of 'termination-point' "termination-point" depicted in <xref
        target="ltree"/>, target="ltree" format="default"/>, the module defines the following minimal set of
        statistics: <list style="hanging">
            <t
            hangText="Last </t>
        <dl newline="false" spacing="normal">
          <dt>Last updated time (&quot;last-updated&ldquo;): ">Indicates ("last-updated"): </dt>
          <dd>Indicates
            the date and time when the counters were last updated.</t>

            <t hangText="Inbound updated.</dd>
          <dt>Inbound statistics: ">A </dt>
          <dd>A set of inbound statistics
            attributes that are used to measure the inbound statistics of the
            termination point, such as received packets, received packets with
            errors, etc.</t>

            <t hangText="Outbound etc.</dd>
          <dt>Outbound statistics: ">A </dt>
          <dd>A set of outbound statistics
            attributes that are used to measure the outbound statistics of the
            termination point, such as sent packets, packets that could not be
            sent due to errors, etc.</t>

            <t
            hangText="VPN etc.</dd>
          <dt>VPN network access (&quot;vpn-network-access&quot;): ">Lists ("vpn-network-access"): </dt>
          <dd>Lists
            counters of the VPN network access defined in the L3NM <xref
            target="RFC9182"/> target="RFC9182" format="default"/> or the L2NM <xref target="RFC9291"/>. target="RFC9291" format="default"/>. When
            multiple VPN network accesses are created using the same physical
            port, finer-grained metrics can be monitored. If a TP is
            associated with only a single VPN, this list is not required.</t>
          </list></t> required.</dd>
        </dl>
      </section>
    </section>
    <section title="Network numbered="true" toc="default" anchor="YANG_Module">
      <name>Network and VPN Service Performance Monitoring YANG Module"> Module</name>

      <t>The "ietf-network-vpn-pm" YANG module uses types defined in <xref
      target="RFC8345"/>, target="RFC6991" format="default"/>, <xref target="RFC6991"/>, target="RFC8345" format="default"/>, <xref target="RFC8532"/>, target="RFC8532" format="default"/>,
      and <xref target="RFC9181"/>.</t>

      <figure>
        <artwork><![CDATA[<CODE BEGINS> file "ietf-network-vpn-pm@2022-11-11.yang" target="RFC9181" format="default"/>.
</t>

<sourcecode name="ietf-network-vpn-pm@2023-03-20.yang" type="yang" markers="true"><![CDATA[
module ietf-network-vpn-pm {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-network-vpn-pm";
  prefix nvp;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 6991: Common YANG Data Types";
  }
  import ietf-vpn-common {
    prefix vpn-common;
    reference
      "RFC 9181: A Common YANG Data Model for Layer 2 and
           Layer 3 VPNs."; VPNs";
  }
  import ietf-network {
    prefix nw;
    reference
      "RFC 8345: A YANG Data Model for Network
           Topologies, Section 6.1";
  }
  import ietf-network-topology {
    prefix nt;
    reference
      "RFC 8345: A YANG Data Model for Network
           Topologies, Section 6.2";
  }
  import ietf-lime-time-types {
    prefix lime;
    reference
      "RFC 8532: Generic YANG Data Model for the Management of
           Operations, Administration, and Maintenance (OAM)
           Protocols That Use Connectionless Communications";
  }

  organization
    "IETF OPSAWG (Operations and Management Area Working Group)";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/opsawg/>
     WG List:  <mailto:opsawg@ietf.org>

     Editor: Bo Wu
          <lana.wubo@huawei.com>

     Editor: Mohamed Boucadair
          <mohamed.boucadair@orange.com>

     Editor: Qin Wu
          <bill.wu@huawei.com>

     Author: Oscar Gonzalez de Dios
          <oscar.gonzalezdedios@telefonica.com>

     Author: Bin Wen
          <bin_wen@comcast.com>";
  description
    "This YANG module defines a model for Network network and VPN Service
     Performance monitoring. service
     performance monitoring (PM).

     Copyright (c) 2022 2023 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); 9375
     (https://www.rfc-editor.org/info/rfc9375); see the RFC itself
     for full legal notices.";

  // RFC Ed.: update the date below with the date of RFC
  // publication and remove this note.
  // RFC Ed.: replace XXXX with actual RFC number and remove
  // this note.

  revision 2022-11-11 2023-03-20 {
    description
      "Initial revision.";
    reference
      "RFC XXXX: 9375: A YANG Data Model for Network and VPN Service
           Performance Monitoring";
  }

  identity node-type {
    description
      "Base identity for node type";
  }

  identity pe {
    base node-type;
    description
      "Provider Edge (PE) node type.  A PE is the device or set
       of devices at the edge of the provider network with the
       functionality that is needed to interface with the
       customer.";
  }

  identity p {
    base node-type;
    description
      "Provider router node type.  That is, a router
       in the core network that does not have interfaces
       directly toward a customer.";
  }

  identity asbr {
    base node-type;
    description
      "Autonomous System Border Router (ASBR) node type.";
    reference
      "RFC 4364: BGP/MPLS IP Virtual Private Networks (VPNs)";
  }

  identity pm-source-type {
    description
      "Base identity from which specific performance monitoring
       mechanism types are derived.";
  }

  identity pm-source-bgpls {
    base pm-source-type;
    description
      "Indicates BGP-LS as the performance monitoring metric source";
       source.";
    reference
      "RFC 8571: BGP - Link State (BGP-LS) Advertisement of
           IGP Traffic Engineering Performance Metric
           Extensions";
  }

  identity pm-source-owamp {
    base pm-source-type;
    description
      "Indicates the One-Way Active Measurement Protocol(OWAMP) Protocol (OWAMP)
       as the performance monitoring metric source.";
    reference
      "RFC 4656: A One-Way One-way Active Measurement Protocol (OWAMP)";
  }

  identity pm-source-twamp {
    base pm-source-type;
    description
      "Indicates the Two-Way Active Measurement Protocol(TWAMP) Protocol (TWAMP)
       as the performance monitoring metric source.";
    reference
      "RFC 5357: A Two-Way Active Measurement Protocol (TWAMP)";
  }

  identity pm-source-stamp {
    base pm-source-type;
    description
      "Indicates the Simple Two-way Active Measurement Protocol(STAMP) Protocol
       (STAMP) as the performance monitoring metric source.";
    reference
      "RFC 8762: Simple Two-Way Active Measurement Protocol";
  }

  identity pm-source-y-1731 {
    base pm-source-type;
    description
      "Indicates Ethernet OAM Y.1731 as the performance monitoring
       metric source.";
    reference
      "ITU-T Y.1731: Operations, administration and
             maintenance (OAM) functions and mechanisms
             for Ethernet-based networks";
  }

  identity pm-source-ioam {
    base pm-source-type;
    description
      "Indicates In Situ Operations, Administration, and Maintenance
       (IOAM) as the performance monitoring metric source.";
    reference
      "RFC 9197: Data Fields for In Situ Operations, Administration,
           and Maintenance (IOAM)";
  }

  identity pm-type {
    description
      "Base identity for the PM type.";
  }

  identity pm-type-network-link {
    base pm-type;
    description
      "Indicates that the PM type is for the link in
       the network topology.";
  }

  identity pm-type-vpn-inter-access {
    base pm-type;
    description
      "Indicates that the PM type is for logical point-to-point VPN
       connections between a source and a destination VPN access
       interfaces.";
  }

  identity pm-type-vpn-tunnel {
    base pm-type;
    description
      "Indicates that the PM type is for VPN tunnels.";
  }

  typedef percentage {
    type decimal64 {
      fraction-digits 5;
      range "0..100";
    }
    description
      "Percentage to 5 decimal places.";
  }

  typedef percentile {
    type decimal64 {
      fraction-digits 3;
      range "0..100";
    }
    description
      "The percentile is a value between 0 and 100 to 3
       decimal places, e.g. e.g., 10.000, 99.900 ,99.990, etc. 99.900, and 99.990.
       For example, for a given one-way delay measurement,
       if the percentile is set to 95.000 and the 95th percentile
       one-way delay is 2 milliseconds, then the 95 percent of
       the sample value is less than or equal to 2 milliseconds.";
  }

  grouping entry-summary {
    description
      "Entry summary grouping used for network topology
       augmentation.";
    container entry-summary {
      config false;
      description
        "Container for VPN or network entry summary.";
      container ipv4-num {
        leaf maximum-routes {
          type uint32;
          description
            "Indicates the maximum number of IPv4 routes
             for the VPN or network.";
        }
        leaf total-active-routes {
          type uint32;
          description
            "Indicates total active IPv4 routes
             for the VPN or network.";
        }
        description
          "IPv4-specific parameters.";
      }
      container ipv6-num {
        leaf maximum-routes {
          type uint32;
          description
            "Indicates the maximum number of IPv6 routes
             for the VPN or network.";
        }
        leaf total-active-routes {
          type uint32;
          description
            "Indicates total active IPv6 routes
             for the VPN or network.";
        }
        description
          "IPv6-specific parameters.";
      }
      container mac-num {
        leaf maximum-mac-entries {
          type uint32;
          description
            "Indicates the maximum number of MAC entries
             for the VPN or network.";
        }
        leaf total-active-mac-entries {
          type uint32;
          description
            "Indicates the total active MAC entries
             for the VPN or network.";
        }
        description
          "MAC statistics.";
      }
    }
  }

  grouping link-loss-statistics {
    description
      "Grouping for per link per-link error statistics.";
    container loss-statistics {
      description
        "One-way link loss summarized information.";
      reference
        "RFC 4656: A One-way Active Measurement Protocol (OWAMP)
         ITU-T Y.1731: Operations, administration and
               maintenance (OAM) functions and mechanisms
               for Ethernet-based networks";
      leaf packet-loss-count {
        type yang:counter64;
        description
          "Total number of lost packets.";
      }
      leaf loss-ratio {
        type percentage;
        description
          "Loss ratio of the packets. Express  Expressed as percentage
           of packets lost with respect to packets sent.";
      }
    }
  }

  grouping link-delay-statistics {
    description
      "Grouping for per link per-link delay statistics.";
    container delay-statistics {
      description
        "One-way link delay summarized information.";
      reference
        "RFC 4656: A One-way Active Measurement Protocol (OWAMP)
         ITU-T Y.1731: Operations, administration and
               maintenance (OAM) functions and mechanisms
               for Ethernet-based networks";
      leaf unit-value {
        type identityref {
          base lime:time-unit-type;
        }
        default "lime:milliseconds";
        description
          "Time units, where the options are hours, minutes, seconds,
           milliseconds, microseconds, and nanoseconds.";
      }
      leaf min-delay-value {
        type yang:gauge64;
        description
          "Minimum observed one-way delay.";
      }
      leaf max-delay-value {
        type yang:gauge64;
        description
          "Maximum observed one-way delay.";
      }
      leaf low-delay-percentile {
        type yang:gauge64;
        description
          "Low percentile of observed one-way delay with
           specific measurement method.";
      }
      leaf intermediate-delay-percentile {
        type yang:gauge64;
        description
          "Intermediate percentile of observed one-way delay with
           specific measurement method.";
      }
      leaf high-delay-percentile {
        type yang:gauge64;
        description
          "High percentile of observed one-way delay with
           specific measurement method.";
      }
    }
  }

  grouping link-jitter-statistics {
    description
      "Grouping for per link per-link jitter statistics.";
    container jitter-statistics {
      description
        "One-way link jitter summarized information.";
      reference
        "RFC 3393: IP Packet Delay Variation Metric
             for IP Performance Metrics (IPPM)
         RFC 4656: A One-way Active Measurement Protocol (OWAMP)
         ITU-T Y.1731: Operations, administration and
               maintenance (OAM) functions and mechanisms
               for Ethernet-based networks";
      leaf unit-value {
        type identityref {
          base lime:time-unit-type;
        }
        default "lime:milliseconds";
        description
          "Time units, where the options are hours, minutes, seconds,
           milliseconds, microseconds, and nanoseconds.";
      }
      leaf min-jitter-value {
        type yang:gauge64;
        description
          "Minimum observed one-way jitter.";
      }
      leaf max-jitter-value {
        type yang:gauge64;
        description
          "Maximum observed one-way jitter.";
      }
      leaf low-jitter-percentile {
        type yang:gauge64;
        description
          "Low percentile of observed one-way jitter.";
      }
      leaf intermediate-jitter-percentile {
        type yang:gauge64;
        description
          "Intermediate percentile of observed one-way jitter.";
      }
      leaf high-jitter-percentile {
        type yang:gauge64;
        description
          "High percentile of observed one-way jitter.";
      }
    }
  }

  grouping tp-svc-telemetry {
    leaf last-updated {
      type yang:date-and-time;
      config false;
      description
        "Indicates the date and time when the counters were
         last updated.";
    }
    leaf inbound-octets {
      type yang:counter64;
      description
        "The total number of octets received on the
         interface, including framing characters.";
    }
    leaf inbound-unicast {
      type yang:counter64;
      description
        "The total number of inbound unicast packets.";
    }
    leaf inbound-broadcast {
      type yang:counter64;
      description
        "The total number of inbound broadcast packets.";
    }
    leaf inbound-multicast {
      type yang:counter64;
      description
        "The total number of inbound multicast packets.";
    }
    leaf inbound-discards {
      type yang:counter64;
      description
        "The number of inbound packets that were chosen to be discarded
         even though no errors had been detected.  Possible
         reasons for discarding such a packet could be to
         free up buffer space, not enough buffer for too
         much data, etc.";
    }
    leaf inbound-errors {
      type yang:counter64;
      description
        "The number of inbound packets that contained errors.";
    }
    leaf inbound-unknown-protocol {
      type yang:counter64;
      description
        "The number of packets received via the interface
         which
         that were discarded because of an unknown or
         unsupported protocol.";
    }
    leaf outbound-octets {
      type yang:counter64;
      description
        "The total number of octets transmitted out of the
         interface, including framing characters.";
    }
    leaf outbound-unicast {
      type yang:counter64;
      description
        "The total number of outbound unicast packets.";
    }
    leaf outbound-broadcast {
      type yang:counter64;
      description
        "The total number of outbound broadcast packets.";
    }
    leaf outbound-multicast {
      type yang:counter64;
      description
        "The total number of outbound multicast packets.";
    }
    leaf outbound-discards {
      type yang:counter64;
      description
        "The number of outbound packets which that were chosen
         to be discarded
         even though no errors had been detected to
         prevent their being transmitted. transmission.  Possible reasons
         for discarding such a packet could be to free
         up buffer space, not enough buffer for too
         much data, etc.";
    }
    leaf outbound-errors {
      type yang:counter64;
      description
        "The number of outbound packets that contained errors.";
    }
    description
      "Grouping for interface service telemetry.";
  }

  augment "/nw:networks/nw:network/nw:network-types" {
    description
      "Defines the service topologies types.";
    container service {
      presence "Presence of the container indicates performance
                monitoring of the VPN service, and absence of
                the container indicates performance monitoring
                of the network itself.";
      description
        "Container for VPN service.";
      leaf service-type {
        type identityref {
          base vpn-common:service-type;
        }
        mandatory true;
        description
          "This indicates the network service type,
           e.g., L3VPN, VPLS, etc."; L3VPN and VPLS.";
      }
      leaf vpn-id {
        type vpn-common:vpn-id;
        description
          "VPN identifier.";
      }
      leaf vpn-service-topology {
        type identityref {
          base vpn-common:vpn-topology;
        }
        description
          "VPN service topology, e.g., hub-spoke, any-to-any,
           and hub-spoke-disjoint.";
      }
    }
  }

  augment "/nw:networks/nw:network/nw:node" {
    description
      "Augments the network node with other general attributes.";
    leaf node-type {
      type identityref {
        base node-type;
      }
      description
        "Node type, e.g., PE, P, and ASBR.";
    }
    uses entry-summary;
  }

  augment "/nw:networks/nw:network/nw:node" {
    when '../nw:network-types/nvp:service' {
      description
        "Augments for VPN service PM.";
    }
    description
      "Augments the network node with VPN service attributes.";
    leaf role {
      type identityref {
        base vpn-common:role;
      }
      default "vpn-common:any-to-any-role";
      description
        "Role of the node in the VPN service topology.";
    }
  }

  augment "/nw:networks/nw:network/nt:link" {
    description
      "Augments the network topology link with performance
       monitoring attributes.";
    container perf-mon {
      description
        "Container for PM attributes.";
      leaf low-percentile {
        type percentile;
        default "10.000";
        description
          "Low percentile to report.  Setting low-percentile
           to 0.000 indicates the client is not interested
           in receiving low percentile.";
      }
      leaf intermediate-percentile {
        type percentile;
        default "50.000";
        description
          "Intermediate percentile to report.  Setting
           intermediate-percentile to 0.000 indicates the client
           is not interested in receiving intermediate percentile.";
      }
      leaf high-percentile {
        type percentile;
        default "95.000";
        description
          "High percentile to report.  Setting high-percentile
           to 0.000 indicates the client is not interested in
           receiving high percentile.";
      }
      leaf measurement-interval {
        type uint32 {
          range "1..max";
        }
        units "seconds";
        default "60";
        description
          "Indicates the time interval to perform PM
           measurement over.";
      }
      list pm {
        key "pm-type";
        config false;
        description
          "The list of PM based on PM type"; type.";
        leaf pm-type {
          type identityref {
            base pm-type;
          }
          config false;
          description
            "The PM type of the measured PM attributes"; attributes.";
        }
        container pm-attributes {
          description
            "Container for PM attributes.";
          leaf start-time {
            type yang:date-and-time;
            config false;
            description
              "The date and time the measurement last started.";
          }
          leaf end-time {
            type yang:date-and-time;
            config false;
            description
              "The date and time the measurement last ended.";
          }
          leaf pm-source {
            type identityref {
              base pm-source-type;
            }
            config false;
            description
              "The OAM tool used to collect the PM data.";
          }
          container one-way-pm-statistics {
            config false;
            description
              "Container for link telemetry attributes.";
            uses link-loss-statistics;
            uses link-delay-statistics;
            uses link-jitter-statistics;
          }
          list one-way-pm-statistics-per-class {
            key "class-id";
            config false;
            description
              "The list of PM data based on class of service.";
            leaf class-id {
              type string;
              description
                "The class-id is used to identify the class
                 of service.  This identifier is internal
                 to the administration.";
            }
            uses link-loss-statistics;
            uses link-delay-statistics;
            uses link-jitter-statistics;
          }
        }
      }
    }
  }

  augment "/nw:networks/nw:network/nt:link/perf-mon" {
    when '../../nw:network-types/nvp:service' {
      description
        "Augments for VPN service PM.";
    }
    description
      "Augments the network topology link with VPN service
       performance monitoring attributes.";
    container vpn-pm-type {
      description
        "The VPN PM type of this logical point-to-point
         unidirectional VPN link.";
      container inter-vpn-access-interface {
        description
          "Indicates inter-vpn-access-interface PM, which is used
           to monitor the performance of logical point-to-point
           VPN connections between a source and a destination VPN
           access interfaces.";
        leaf inter-vpn-access-interface {
          type empty;
          description
            "This is a placeholder for inter-vpn-access-interface PM,
             which is not bound to a specific VPN access interface.
             The source or destination VPN access interface
             of the measurement can be augmented as needed.";
        }
      }
      container vpn-tunnel {
        presence "Enables VPN tunnel PM";
        description
          "Indicates VPN tunnel PM, which is used to monitor
           the performance of VPN tunnels.";
        leaf vpn-tunnel-type {
          type identityref {
            base vpn-common:protocol-type;
          }
          config false;
          description
            "The leaf indicates the VPN tunnel type, e.g.,
             Generic Routing Encapsulation (GRE), (GRE) and Generic
             Network Virtualization Encapsulation (Geneve),
             etc."; (Geneve).";
        }
      }
    }
  }

  augment "/nw:networks/nw:network/nw:node/nt:termination-point" {
    description
      "Augments the network topology termination point with
       performance monitoring attributes.";
    container pm-statistics {
      config false;
      description
        "Container for termination point PM attributes.";
      uses tp-svc-telemetry;
    }
  }

  augment "/nw:networks/nw:network/nw:node"
        + "/nt:termination-point/pm-statistics" {
    when '../../../nw:network-types/nvp:service' {
      description
        "Augments for VPN service PM.";
    }
    description
      "Augments the network topology termination-point with
       VPN service performance monitoring attributes"; attributes.";
    list vpn-network-access {
      key "network-access-id";
      description
        "The list of PM based on VPN network accesses.";
      leaf network-access-id {
        type vpn-common:vpn-id;
        description
          "The reference to an identifier for the VPN network
           access.";
      }
      uses tp-svc-telemetry;
    }
  }
}
<CODE ENDS>]]></artwork>
      </figure>
]]></sourcecode>

    </section>
    <section title="Security Considerations"> numbered="true" toc="default">
      <name>Security Considerations</name>

     <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"/> target="RFC6241" format="default"/> or RESTCONF <xref target="RFC8040"/>. 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"/>. target="RFC6242" format="default"/>. The lowest RESTCONF layer is HTTPS, and the
      mandatory-to-implement secure transport is TLS <xref
      target="RFC8446"/>.</t> target="RFC8446" format="default"/>.</t>
      <t>The Network Configuration Access Control Model (NACM) <xref
      target="RFC8341"/> target="RFC8341" format="default"/> 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>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) to these data
      nodes without proper protection can have a negative effect on network
      operations.
      These write operates operations can lead to inaccurate or incomplete
      network measurements which that can impact the visibility and decisions this
      data would be used to inform. Unauthorized write access to the following
      subtrees could have the following impacts:</t>

      <figure>
        <artwork><![CDATA[+--------+----------------------+------------------------------+

| Access |      Node            |   Potential impact           |

+--------+----------------------+------------------------------+

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

| write  |

       <table>
        <name>Write Operation Sensitivity Impact</name>
	<thead>
	  <tr>
	    <th>Access</th>
	    <th>Node</th>
            <th>Potential Impact</th>
	  </tr>
	  </thead>
	  <tbody>
	    <tr>
	      <th colspan="3">/nw:networks/nw:network/nw:network-types</th>
	    </tr>
	    <tr>
	      <td>write</td>
	      <td>service type</td>
              <td>disable VPN PM</td>
	    </tr>
	    <tr>

	      <td>write</td>
	      <td>VPN identifier</td>
	      <td>disable VPN PM</td>
	    </tr>
	    <tr>
	      <td>write</td>
	      <td>VPN service type         | disable VPN PM               |

| write  | VPN identifier       | disable VPN PM               |

| write  | VPN service topology | render topology</td>
	      <td>render data unusable         |

+--------+----------------------+------------------------------+
|    /nw:networks/nw:network/nw:node                           |

| write  | node type            | render unusable</td>
	    </tr>
	    <tr>
	    <th colspan="3">/nw:networks/nw:network/nw:node</th>
	    </tr>
	    <tr>

	      <td>write</td>
	      <td>node type</td>
	      <td>render data unusable         |

| write  | VPN unusable</td>
	      </tr><tr>

	      <td>write</td>
	      <td>VPN topology role    | render role</td>
	      <td>render data unusable         |

+--------+----------------------+------------------------------+
|    /nw:networks/nw:network/nw:link/nvp:perf-mon              |

| write  | percentile           | impact unusable</td>
	    </tr>
	    <tr>
	      <th colspan="3">/nw:networks/nw:network/nw:link/nvp:perf-mon</th>
	    </tr>
	    <tr>

	      <td>write</td>
	      <td>percentile</td>
	      <td>impact reporting cadence     |

| write  | measurement interval | impact cadence</td>
	    </tr>
	    <tr>

	      <td>write</td>
	      <td>measurement interval</td>
	      <td>impact monitoring fidelity   |

| write  | vpn-pm-type          | impact fidelity</td>
	    </tr>
	    <tr>

	      <td>write</td>
	      <td>vpn-pm-type</td>
	      <td>impact monitoring fidelity   |

+--------+----------------------+------------------------------+
]]></artwork>
      </figure> fidelity</td>
	    </tr>
	  </tbody>
      </table>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus might be
      important to control read access (e.g., via get, get-config, or
      notification) to these data nodes.
      When using, the trade-off between
      confidentiality and proper monitoring of performance needs to be
      considered. Unauthorized access to the following subtrees could have the
      following impacts:</t>

      <t><list style="symbols">
          <t>&ldquo;/nw:networks/nw:network/nw:node": Unauthorized
      <dl>
        <dt>"/nw:networks/nw:network/nw:node":</dt><dd>Unauthorized read access
          to this subtree can disclose the operational state information of
          underlay network instances or VPN instances.</t>

          <t>&ldquo;/nw:networks/nw:network/nt:link/nvp:perf-mon/nvp:one-way-pm-statistics": instances.</dd>
        <dt>"/nw:networks/nw:network/nt:link/nvp:perf-mon/nvp:one-way-pm-statistics":</dt><dd>
          Unauthorized read access to this subtree can disclose the
          operational state information of underlay network links or VPN
          abstract links.</t>

          <t>&ldquo;/nw:networks/nw:network/nw:node/nt:termination-point/nvp:pm-statistics": links.</dd>
        <dt>"/nw:networks/nw:network/nw:node/nt:termination-point/nvp:pm-statistics":</dt><dd>
          Unauthorized read access to this subtree can disclose the
          operational state information of underlay network termination points
          or VPN network accesses.</t>
        </list>This accesses.</dd>
      </dl>
      <t>This YANG module does not define any RPC (Remote Remote Procedure
      Call)
      Call (RPC) operations and Actions.</t> actions.</t>
    </section>
    <section title="IANA Considerations">
      <t>This document requests IANA to register numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA has registered the following URI in the "ns"
      subregistry within the "IETF XML Registry" <xref target="RFC3688"/>:</t>

      <figure>
        <artwork><![CDATA[   URI: urn:ietf:params:xml:ns:yang:ietf-network-vpn-pm
   Registrant Contact: The IESG.
   XML: N/A, target="RFC3688" format="default"/>:</t>
      <dl spacing="compact">
	<dt>URI:</dt>
	<dd>urn:ietf:params:xml:ns:yang:ietf-network-vpn-pm</dd>
	<dt>Registrant Contact:</dt>
	<dd>The IESG.</dd>
	<dt>XML:</dt>
	<dd>N/A; the requested URI is an XML namespace.
]]></artwork>
      </figure>

      <t>This document requests IANA to register namespace.</dd>
      </dl>
      <t>IANA has registered the following YANG module in
      the "YANG Module Names" subregistry <xref target="RFC6020"/> target="RFC6020" format="default"/> within the
      "YANG Parameters" registry.</t>

      <figure>
        <artwork><![CDATA[   Name:         ietf-network-vpn-pm
   Namespace:    urn:ietf:params:xml:ns:yang:ietf-network-vpn-pm
   Maintained by IANA: N
   Prefix:       nvp
   Reference:    RFC XXXX (RFC Ed.: replace XXXX with actual
        RFC number and remove this note.)
]]></artwork>
      </figure>
    </section>

    <section title="Acknowledgements">
      <t>Thanks to Joe Clarke, Adrian Farrel, Tom Petch, Greg Mirsky, Roque
      Gagliano, Erez Segev, and Dhruv Dhody for reviewing and providing
      important input to this document.</t>

      <t>This work was partially supported
      <dl spacing="compact">
	<dt>Name:</dt>
	<dd>ietf-network-vpn-pm</dd>
	<dt>Namespace:</dt>
	<dd>urn:ietf:params:xml:ns:yang:ietf-network-vpn-pm</dd>
	<dt>Maintained by the European Commission under
      Horizon 2020 grant agreement number 101015857 Secured autonomic traffic
      management for a Tera of SDN flows (Teraflow).</t>
    </section>

    <section title="Contributors">
      <t>The following authors contributed significantly to this document:</t>

      <figure>
        <artwork><![CDATA[   Michale Wang
   Huawei
   Email:wangzitao@huawei.com

   Roni Even
   Huawei
   Email: ron.even.tlv@gmail.com

   Change Liu
   China Unicom
   Email: liuc131@chinaunicom.cn

   Honglei Xu
   China Telecom
   Email: xuhl6@chinatelecom.cn
]]></artwork>
      </figure> IANA:</dt>
	<dd>N</dd>
	<dt>Prefix:</dt>
	<dd>nvp</dd>
	<dt>Reference:</dt>
	<dd>RFC 9375</dd>
      </dl>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.9181'?>

      <?rfc include="reference.RFC.3688"?>

      <?rfc include='reference.RFC.3393'?>

      <?rfc include='reference.RFC.5357'?>

      <?rfc include='reference.RFC.4364'?>

      <?rfc include="reference.RFC.8571"?>

      <?rfc include='reference.RFC.4656'?>

      <?rfc include="reference.RFC.6020"?>

      <?rfc include="reference.RFC.6241"?>

      <?rfc include="reference.RFC.6242"?>

      <?rfc include="reference.RFC.6374"?>

      <?rfc include='reference.RFC.6991'?>

      <?rfc include="reference.RFC.8446"?>

      <?rfc include="reference.RFC.7950"?>

      <?rfc include="reference.RFC.8340"?>

      <?rfc include="reference.RFC.8762"?>

      <?rfc include="reference.RFC.8345"?>

      <?rfc include='reference.RFC.8641'?>

      <?rfc include='reference.RFC.8532'?>

      <?rfc include='reference.RFC.8341'?>

      <?rfc include='reference.RFC.8040'?>

<displayreference target="I-D.ietf-opsawg-sap" to="YANG-SAP"/>

    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9181.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3393.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5357.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4364.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8571.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4656.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6242.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6374.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8762.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8345.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8532.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
      </references>

    <references title="Informative References">
      <?rfc include='reference.RFC.8969'?>

      <?rfc include='reference.RFC.4026'?>

      <?rfc include='reference.RFC.8639'?>

      <?rfc include='reference.RFC.5277'?>

      <?rfc include='reference.RFC.8632'?>

      <?rfc include='reference.RFC.9182'?>

      <?rfc include='reference.RFC.9197'?>

      <?rfc include='reference.RFC.9291'?>

      <?rfc include='reference.I-D.ietf-opsawg-sap'?>

      <?rfc include="reference.RFC.7471"?>

      <?rfc include="reference.RFC.8570"?>

      <?rfc include='reference.RFC.8309'?>

      <?rfc include='reference.RFC.8194'?>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8969.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4026.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8639.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5277.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8632.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9182.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9197.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9291.xml"/>

<!-- [I-D.ietf-opsawg-sap] in RFC-EDITOR state as of 4/21/23; entered the long way to capture the editor role and correct format of Oscar's name -->
<reference anchor="ITU-T-Y-1731"
                 target="https://www.itu.int/rec/T-REC-Y.1731/en"> anchor="I-D.ietf-opsawg-sap">
   <front>
          <title>Operator Ethernet
      <title>A YANG Network Model for Service Definition</title> Attachment Points (SAPs)</title>
      <author fullname="ITU-T"
                  surname="Recommendation Y.1731 - OAM initials="M." surname="Boucadair" fullname="Mohamed Boucadair" role="editor">
         <organization>Orange</organization>
      </author>
      <author initials="O." surname="Gonzalez de Dios" fullname="Oscar Gonzalez de Dios">
         <organization>Telefonica</organization>
      </author>
      <author initials="S." surname="Barguil" fullname="Samier Barguil">
         <organization>Nokia</organization>
      </author>
      <author initials="Q." surname="Wu" fullname="Qin Wu">
         <organization>Huawei</organization>
      </author>
      <author initials="V." surname="Lopez" fullname="Victor Lopez">
         <organization>Nokia</organization>
      </author>
      <date month="January" day="18" year="2023" />
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-opsawg-sap-15" />
</reference>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7471.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8570.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8309.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8194.xml"/>

        <reference anchor="ITU-T-Y-1731" target="https://www.itu.int/rec/T-REC-Y.1731/en">
          <front>
            <title>Operations, administration and maintenance (OAM) functions
        and mechanisms for Ethernet based networks"/> Ethernet-based networks</title>
            <author><organization>ITU-T</organization></author>
            <date month="August" year="2015"/>
          </front>
	  <seriesInfo name="ITU-T" value="Recommendation G.8013/Y.1731"/>
        </reference>
      </references>
    </references>
    <section anchor="examples" title="Illustrative Examples">
      <t/> numbered="true" toc="default">
      <name>Illustrative Examples</name>

      <section title="VPN numbered="true" toc="default">
        <name>Example of VPN Performance Subscription Example"> Subscription</name>
        <t>The example shown in <xref target="ex"/> target="ex" format="default"/> illustrates how a client
        subscribes to the performance monitoring information between nodes
        ('node-id')
        ("node-id") A and B in the L3 network topology. The performance
        monitoring parameter that the client is interested in is end-to-end
        loss.</t>
        <figure align="center" anchor="ex" title="Pub/Sub Retrieval">
          <artwork><![CDATA[ anchor="ex">
          <name>Example of Pub/Sub Retrieval</name>

<sourcecode type=""><![CDATA[============== NOTE: '\' line wrapping per RFC 8792 ===============

POST /restconf/operations
        /ietf-subscribed-notifications:establish-subscription /restconf/operations/ietf-subscribed-notifications:establish-\
                                   subscription
Host: example.com
Content-Type: application/yang-data+json

{
  "ietf-subscribed-notifications:input": {
    "stream-subtree-filter": {
      "ietf-network:networks": {
        "network": {
          "network-id": "foo:vpn1", "example:VPN1",
          "ietf-network-vpn-pm:service": {
            "service-type": "ietf-vpn-common:l3vpn"
          },
          "node": [
            {
              "node-id": "A", "example:A",
              "ietf-network-vpn-pm:node-type": "PE", "pe",
              "termination-point": [
                {
                  "tp-id": "1-0-1" "example:1-0-1"
                }
              ]
            },
            {
              "node-id": "B", "example:B",
              "ietf-network-vpn-pm:node-type": "PE", "pe",
              "termination-point": [
                {
                  "tp-id": "2-0-1" "example:2-0-1"
                }
              ]
            }
          ],
          "ietf-network-topology:link": [
            {
              "link-id": "A-B", "example:A-B",
              "source": {
                "source-node": "A" "example:A"
              },
              "destination": {
                "dest-node": "B" "example:B"
              },
              "ietf-network-vpn-pm:perf-mon": {
                "pm": [
                  {
                    "pm-type": "pm-type-vpn-tunnel",
                    "pm-attributes": {
                      "one-way-pm-statistics": {
                        "loss-statistics": {
                          "packet-loss-count": {}
                        }
                      }
                    }
                  }
                ],
                "vpn-pm-type": {
                  "vpn-tunnel": {
                    "vpn-tunnel-type": "ietf-vpn-common:gre"
                  }
                }
              }
            }
          ]
        }
      },
      "ietf-yang-push:periodic": {
        "ietf-yang-push:period":
        "period": "500"
      }
    }
  }
}
]]></artwork>
]]></sourcecode>

        </figure>
      </section>
      <section title="Example numbered="true" toc="default">
        <name>Example of VPN Performance Snapshot">
        <t>This example, Snapshot</name>
        <t>The example depicted in <xref target="ex2"/>, target="ex2" format="default"/> illustrates an a VPN
        PM instance example in which message body of a client uses RESTCONF <xref
        target="RFC8040"/> request to fetch the performance data of the link and TP
        belonged that belongs to "VPN1".</t>

        <figure align="center" anchor="ex2">
          <artwork><![CDATA[{
	  <name>Example of VPN PM</name>
          <sourcecode type=""><![CDATA[{
  "ietf-network:networks": {
    "network": {
      "network-id": "foo:vpn1", "example:VPN1",
      "node": [
        {
          "node-id": "A", "example:A",
          "ietf-network-vpn-pm:node-type": "PE", "pe",
          "termination-point": [
            {
              "tp-id": "1-0-1", "example:1-0-1",
              "ietf-network-vpn-pm:pm-statistics": {
                "inbound-octets": "100",
                "outbound-octets": "150"
              }
            }
          ]
        },
        {
          "node-id": "B", "example:B",
          "ietf-network-vpn-pm:node-type": "PE", "pe",
          "termination-point": [
            {
              "tp-id": "2-0-1", "example:2-0-1",
              "ietf-network-vpn-pm:pm-statistics": {
                "inbound-octets": "150",
                "outbound-octets": "100"
              }
            }
          ]
        }
      ],
      "ietf-network-topology:link": [
        {
          "link-id": "A-B", "example:A-B",
          "source": {
            "source-node": "A" "example:A"
          },
          "destination": {
            "dest-node": "B" "example:B"
          },
          "ietf-network-pm:perf-mon": {
            "pm": [
              {
                "pm-type": "pm-type-vpn-tunnel",
                "pm-attributes": {
                  "one-way-pm-statistics": {
                    "loss-statistics": {
                      "packet-loss-count": "120"
                    }
                  }
                }
              }
            ],
            "vpn-pm-type": {
              "vpn-tunnel": {
                "vpn-tunnel-type": "ietf-vpn-common:gre"
              }
            }
          }
        }
      ]
    }
  }
}
]]></artwork>
]]></sourcecode>
        </figure>
      </section>
      <section anchor="perc" title="Example numbered="true" toc="default">
        <name>Example of Percentile Monitoring"> Monitoring</name>
        <t>This is an example of percentile measurement data that could be
        returned for a link foo:vpn1-link1 "example:A-B" between vpn-node1 "example:A" and
        vpn-node3.</t>

        <figure>
          <artwork><![CDATA[{
        "example:B".</t>
	<figure anchor="fig_9">
	  <name>Example of VPN PM with Percentile Value</name>
        <sourcecode type=""><![CDATA[{
  "ietf-network-topology:link": [
    {
      "link-id": "foo:vpn1-link1", "example:A-B",
      "source": {
        "source-node": "vpn-node1" "example:A"
      },
      "destination": {
        "dest-node": "vpn-node3" "example:B"
      },
      "ietf-network-vpn-pm:perf-mon": {
        "low-percentile": "20.000",
        "intermediate-percentile": "50.000",
        "high-percentile": "90.000",
        "pm": [
          {
            "pm-type": "pm-type-vpn-inter-access",
            "pm-attributes": {
              "one-way-pm-statistics": {
                "delay-statistics": {
                  "unit-value": "lime:milliseconds", "ietf-lime-time-types:milliseconds",
                  "min-delay-value": "43",
                  "max-delay-value": "99",
                  "low-delay-percentile": "64",
                  "intermediate-delay-percentile": "77",
                  "high-delay-percentile": "98"
                }
              }
            }
          }
        ],
        "vpn-pm-type": {
          "inter-vpn-access-interface": {
            "inter-vpn-access-interface": [null]
          }
        }
      }
    }
  ]
}

]]></artwork>
]]></sourcecode>
	 </figure>

        <t/>
      </section>
    </section>

    <section numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>Thanks to <contact fullname="Joe Clarke"/>, <contact fullname="Adrian Farrel"/>, <contact fullname="Tom Petch"/>, <contact fullname="Greg Mirsky"/>, <contact fullname="Roque
      Gagliano"/>, <contact fullname="Erez Segev"/>, and <contact fullname="Dhruv Dhody"/> for reviewing and providing
      important input to this document.</t>
      <t>This work is partially supported by the European Commission under
      Horizon 2020 Secured autonomic traffic
      management for a Tera of SDN flows (Teraflow) project (grant agreement number 101015857).</t>
    </section>
    <section numbered="false" toc="default">
      <name>Contributors</name>
      <t>The following authors contributed significantly to this document:</t>

<contact fullname="Michale Wang">
 <organization>Huawei</organization>
 <address>
   <email>wangzitao@huawei.com</email>
 </address>
</contact>

<contact fullname="Roni Even">
 <organization>Huawei</organization>
 <address>
   <email>ron.even.tlv@gmail.com</email>
 </address>
</contact>

<contact fullname="Change Liu">
<organization>China Unicom</organization>
<address>
  <email>liuc131@chinaunicom.cn</email>
</address>
</contact>

<contact fullname="Honglei Xu">
<organization>China Telecom</organization>
<address>
  <email>xuhl6@chinatelecom.cn</email>
</address>
</contact>
    </section>
  </back>
</rfc>