<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd'[
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC6206 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6206.xml">
<!ENTITY RFC6241 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml">
<!ENTITY RFC7390 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7390.xml">
<!ENTITY RFC7731 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7731.xml">
<!ENTITY RFC7774 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7774.xml">
<!ENTITY RFC7950 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7950.xml">
<!ENTITY RFC8340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml">
<!ENTITY RFC8342 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8342.xml">
<!ENTITY RFC8343 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8343.xml">
<!ENTITY I-D.ietf-core-sid SYSTEM "https://xml2rfc.tools.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-core-sid.xml">
<!ENTITY I-D.ietf-netmod-yang-tree-diagrams SYSTEM
"http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-yang-tree-diagrams.xml">
]>


<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>

<rfc category="std" ipr="trust200902" docName="draft-ietf-roll-mpl-yang-02">
  <front>
    <title abbrev="MPL-YANG">A YANG model for Multicast Protocol for Low power and lossy Networks (MPL)</title>

    <author initials="P." surname="van der Stok" fullname="Peter van der Stok" role="editor" >
      <organization abbrev="consultant">consultant</organization>
      <address>
        <phone>+31-492474673 (Netherlands), +33-966015248 (France)</phone>
        <email>consultancy@vanderstok.org</email>
        <uri>www.vanderstok.org</uri>
      </address>
    </author>

 
    <date />
    <area>Routing</area>
    <workgroup>roll</workgroup>
    <abstract>
      <t>
        This document defines a YANG data model for management of Multicast Protocol for Low power and lossy Networks (MPL)
   implementations.  The data model includes configuration data and
   state data.

      </t>
    </abstract>
    <note title="Note">
      <t>
        Discussion and suggestions for improvement are requested,
        and should be sent to roll@ietf.org.
      </t>
    </note>
  </front>
  <middle>

<section anchor="introduction" title="Introduction">
<t>
This document defines a YANG <xref target="RFC7950"/> data model for management of Multicast Protocol for Low power and lossy Networks (MPL) <xref target="RFC7731"/> 
 implementations.

   The data model covers configuration of MPL
   parameters per interface.  It
   also provides information about which Multicast addresses are operationally
   used, and the seeds of the forwarded packets.

</t>

<section anchor="terminology" title="Terminology">
<t>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in <xref target="RFC2119"/>.
</t>
<t>
The following terms are defined in <xref target="RFC6241"/> and are not redefined here:

<list style="symbols">
<t>client</t>
<t>configuration data</t>
<t>server</t>
<t>state data</t>
</list>
The following terms are defined in <xref target="RFC7950"/> and are not redefined here:
<list style="symbols">
<t>data model</t>
<t>data node</t>
</list>
   The terminology for describing YANG data models is found in
   <xref target="RFC7950"/>.
</t><t> Terms like message, domain, seed, I, k, c are defined in <xref target="RFC7731"/>.
</t><t> Terms like YANG Schema Item iDentifier (SID) and delta are defined in <xref target="I-D.ietf-core-sid"/>.
</t><t>
Multiple copies of a message can be received or sent by a node.
</t>

<section anchor="tree-diagrams" title="Tree Diagrams">
<t>
YANG tree diagrams provide a concise representation of a YANG module, and SHOULD be included to help readers understand YANG module structure.  Guidelines on tree diagrams can be found in Section 3 of <xref target="I-D.ietf-netmod-yang-tree-diagrams"/>. Tree diagrams used in this document follow the notation defined in <xref target="RFC8340"/>.
</t>
</section>  <!-- Tree diagrams  -->

</section>  <!-- Terminology -->

</section>  <!-- Introduction -->


<section anchor="MODEL" title="MPL model">
<t>
This document defines the YANG modules "ietf-yang-mpl-xxx", which specify a data model for MPL servers. The model is separated into four modules which can be loaded independently to accommodate the storage space to the wanted functionality. The model consists of the following parts: (1) "mpl-domain", (2) "mpl-op", (3) "mpl-seeds", and (4) "mpl-statistics". The four models are discussed below accompanied by their trees.
</t>

<section anchor="NMDA" title="NMDA considerations">
<t>
The Network Management Data Architecture (NMDA) is specified in <xref target="RFC8342"/>. The MPL protocol is designed for low-resource nodes, where the hardware is fixed once and for all. The configuration of the node in the MPL context is limited to enabling the interface(s) with Multicast addresses. The interface configuration of the YANG module replaces the multicast address assignment of section 2.6.2 of <xref target="RFC7390"/>.</t>
<t>
Consequently, The contents of the "candidate", "startup", "running", and "intended" datastores are identical. The conceptual datastore consists of an "operational" and an "intended" datastore. The "intended" store contains the nodes of the modules: ietf-yang-mpl-domain, and ietf-yang-mpl-ops. The "running" store contains the nodes of the modules: ietf-yang-mpl-seeds, and ietf-yang-mpl-statistics. The ietf-yang-mpl-domain is necessary when any MPL management is wanted. The two modules of the "running" store need the two modules of the "intended" store, and can be loaded dependent on the management wishes and resource constraints.</t>
<t>
The modules ietf-yang-mpl-ops, ietf-yang-mpl-seeds, and ietf-yang-mpl-statistics "augment" ietf-yang-mpl-domain. 
</t>
</section>  <!-- NMDA considerations -->

<section title="MPL-domain tree" anchor="MPL-domain-tree">
<t>
The "mpl-domain" module describes the MPL-domains and associated Multicast addresses and the interfaces on which the Multicast addresses are enabled. The model allow for a short single MPL-domain configuration or a multi-domain configuration that needs more storage space.   
</t>
<figure>
  <artwork align="left"><![CDATA[
  
module: ietf-yang-mpl-domain
    +--rw domain
       +--rw (multiple)?
          +--:(mpl-domain)
          |  +--rw mpl-domain
          |     +--rw domains* [domainID]
          |     |  +--rw domainID    uint16
          |     |  +--rw MClist*     inet:ipv6-address
          |     +--rw addresses* [MCaddress]
          |        +--rw MCaddress     inet:ipv6-address
          |        +--rw interfaces*   string
          +--:(mpl-single)
             +--rw mpl-single
                +--rw MCaddresses*   inet:ipv6-address

]]></artwork>
 </figure>

</section>  <!-- MPL-domain tree -->

<section title="MPL-ops tree" anchor="MPL-ops-tree">
<t>
The generator node of a MPL message is called a seed that emits on a multicast address of a domain.
The "mpl-ops" module describes the operational parameters settings per domain. The parameters determine the dynamics of the message reception intervals per domain <xref target="RFC7731"/>.
</t> 
<figure>
  <artwork align="left"><![CDATA[
  
module: ietf-yang-mpl-ops
  augment /mpl:domain:
    +--rw mpl-ops
       +--rw PROACTIVE_FORWARDING?      boolean
       +--rw SEED_SET_ENTRY_LIFETIME?   uint64
       +--rw mpl-parameter* [domainID]
          +--rw domainID                             uint16
          +--rw DATA_MESSAGE_IMIN?                   uint16
          +--rw DATA_MESSAGE_IMAX?                   uint16
          +--rw DATA_MESSAGE_K?                      uint16
          +--rw DATA_MESSAGE_TIMER_EXPIRATIONS?      uint16
          +--rw CONTROL_MESSAGE_IMIN?                uint16
          +--rw CONTROL_MESSAGE_IMAX?                uint16
          +--rw CONTROL_MESSAGE_K?                   uint16
          +--rw CONTROL_MESSAGE_TIMER_EXPIRATIONS?   uint16

]]></artwork>
 </figure>
</section>  <!-- MPL-ops tree -->


<section title="MPL-seeds tree" anchor="MPL-seeds-tree">
<t>
The "mpl-seeds" part describes the MPL buffer contents and the Trickle timer values associated with each seed and domain. Multiple seeds per domain may exist. The module exposes the state of the MPL buffer and key information about the messages in the MPL buffers at a given acquisition moment.
</t>
<figure>
  <artwork align="left"><![CDATA[

 module: ietf-yang-mpl-seeds
  augment /mpl:domain:
    +--rw SE_LIFETIME?   uint16
    +--ro mpl-seeds* [seedID domainID]
       +--ro seedID               uint64
       +--ro domainID             uint16
       +--ro local?               boolean
       +--ro generate-seqno?      uint8
       +--ro life-time?           uint64
       +--ro min-seqno?           uint8
       +--ro data-number?         uint8
       +--ro control-number?      uint8
       +--ro buffered-messages* [seqno]
          +--ro seqno    uint8
          +--ro I?       uint8
          +--ro c?       uint8
          +--ro e?       uint8
          +--ro t?       uint8

]]></artwork>
 </figure>
</section>  <!-- MPL-seeds tree -->


<section title="MPL-statistics tree" anchor="MPL-statistics-tree">
<t>
The "mpl-statistics" module describes the number of lost and correctly forwarded messages and its copies.
</t>
<figure>
  <artwork align="left"><![CDATA[

  module: ietf-yang-mpl-statistics
  augment /mpl:domain:
    +--ro mpl-statistics* [seedID domainID]
    |  +--ro seedID                        uint64
    |  +--ro domainID                      uint16
    |  +--ro c-too-high?                   uint64
    |  +--ro nr-forwarded?                 uint64
    |  +--ro nr-of-messages-received?      uint64
    |  +--ro nr-of-messages-forwarded?     uint64
    |  +--ro nr-of-copies-received?        uint64
    |  +--ro nr-of-copies-forwarded?       uint64
    |  +--ro nr-of-refused-copies?         uint64
    |  +--ro nr-of-missed-messages?        uint64
    |  +--ro nr-of-notreceived-messages?   uint64
    |  +--ro nr-of-inconsistent-data?      uint64
    |  +--ro nr-of-consistent-data?        uint64
    |  +--ro nr-of-consistent-control?     uint64
    |  +--ro nr-of-inconsistent-control?   uint64
    |  +--ro statistics-interval?          uint64
    |  +---x reset-buffer-statistics
    +---x reset-all-statistics

]]></artwork>
 </figure>
</section>  <!-- MPL-statistics tree -->

</section>  <!-- MPL model -->

<section anchor="SID" title="SID file generation">
  <t> YANG Schema Item iDentifiers (SID) are allocated to replace the relatively long YANG identifiers by the much shorter SIDs. Consequently, the payload size is considerably reduced. The assignment tool is https://comi.space/. SIDs are allocated to the identifiers specified in the four modules. Their values are:
</t>

<section title="mpl-domain">
<figure>
  <artwork align="left"><![CDATA[

Module : ietf-yang-mpl-domain
Revision : 2018-07-06

SID	Namespace	YANG identifier
1004000	module	ietf-yang-mpl-domain
1004001	data	/ietf-yang-mpl-domain:domain
1004002	data	/ietf-yang-mpl-domain:domain/mpl-domain
1004003	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /addresses
1004004	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /addresses/MCaddress
1004005	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /addresses/interfaces
1004006	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /domains
1004007	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /domains/MClist
1004008	data	/ietf-yang-mpl-domain:domain/mpl-domain
                                      /domains/domainID
1004009	data	/ietf-yang-mpl-domain:domain/mpl-single
1004010	data	/ietf-yang-mpl-domain:domain/mpl-single
                                      /MCaddresses
]]></artwork>
 </figure>

</section> <!-- domain -->


<section title="mpl-ops">

<figure>
  <artwork align="left"><![CDATA[

Module : ietf-yang-mpl-ops
Revision : 2018-07-06

SID	Namespace	YANG identifier
1004050	module	ietf-yang-mpl-ops
1004051	data	/ietf-yang-mpl-domain:domain
                                   /ietf-yang-mpl-ops:mpl-ops
1004052	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/PROACTIVE_FORWARDING
1004053	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/SEED_SET_ENTRY_LIFETIME
1004054	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter
1004055	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/CONTROL_MESSAGE_IMAX
1004056	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/CONTROL_MESSAGE_IMIN
1004057	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/CONTROL_MESSAGE_K
1004058	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
         mpl-ops/mpl-parameter/CONTROL_MESSAGE_TIMER_EXPIRATIONS
1004059	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/DATA_MESSAGE_IMAX
1004060	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/DATA_MESSAGE_IMIN
1004061	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/DATA_MESSAGE_K
1004062	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/DATA_MESSAGE_TIMER_EXPIRATIONS
1004063	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-ops:
           mpl-ops/mpl-parameter/domainID
]]></artwork>
 </figure>

</section> <!-- mpl-ops -->


<section title="mpl-seeds">

<figure>
  <artwork align="left"><![CDATA[

Module : ietf-yang-mpl-seeds
Revision : 2018-07-06

SID	Namespace	YANG identifier
1004100	module	ietf-yang-mpl-seeds
1004101	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:SE_LIFETIME
1004102	data	/ietf-yang-mpl-domain:domain
                             /ietf-yang-mpl-seeds:mpl-seeds
1004103	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages
1004104	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages/I
1004105	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages/c
1004106	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages/e
1004107	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages/seqno
1004108	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/buffered-messages/t
1004109	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/control-number
1004110	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/data-number
1004111	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/domainID
1004112	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/generate-seqno
1004113	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/life-time
1004114	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/local
1004115	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/min-seqno
1004116	data	/ietf-yang-mpl-domain:domain/ietf-yang-mpl-seeds:
           mpl-seeds/seedID
]]></artwork>
 </figure>

</section> <!-- seeds -->


<section title="mpl-statistics">

<figure>
  <artwork align="left"><![CDATA[

Module : ietf-yang-mpl-statistics
Revision : 2018-07-06

SID	Namespace	YANG identifier
1004150	module	ietf-yang-mpl-statistics
1004151	data	/ietf-yang-mpl-domain:domain/
           ietf-yang-mpl-statistics:mpl-statistics
1004152	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics/c-too-high
1004153	data	/ietf-yang-mpl-domain:domain/
     ietf-yang-mpl-statistics:mpl-statistics/domainID
1004154	data	/ietf-yang-mpl-domain:domain/
     ietf-yang-mpl-statistics:mpl-statistics/nr-forwarded
1004155	data	/ietf-yang-mpl-domain:domain/
     ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-consistent-control
1004156	data	/ietf-yang-mpl-domain:domain/
      ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-consistent-data
1004157	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-copies-forwarded
1004158	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-copies-received
1004159	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-inconsistent-control
1004160	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-inconsistent-data
1004161	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-messages-forwarded
1004162	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-messages-received
1004163	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-missed-messages
1004164	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-notreceived-messages
1004165	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /nr-of-refused-copies
1004166	data	/ietf-yang-mpl-domain:domain/
    ietf-yang-mpl-statistics:mpl-statistics
                              /seedID
1004167	data	/ietf-yang-mpl-domain:domain/
     ietf-yang-mpl-statistics:mpl-statistics
                              /statistics-interval
]]></artwork>
 </figure>

</section> <!-- statistics -->

</section>  <!-- sid-file generation  -->

<section title="yang-mpl modules">
<t>
This section describes the four yang modules. The modules are based on the MPL specification published in <xref target="RFC7731"/> and the specification of <xref target="RFC6206"/>. The identification of the interfaces follows the specification of ietf-interfaces of <xref target="RFC8343"/>.
</t><t>
The data model allows to set values to the parameters of the MPL algorithm. This approach requires an active manager process to set the values without use of DHCP as described in: <xref target="RFC7774"/>.
</t><t>
The names of the four modules are: yang-mpl-domain, yang-mpl-ops, yang-mpl-seeds, and yang-mpl-statistics, described in subsections with the same name.
</t>

<section title ="yang-mpl-domain module">
<t>
This module describes (1) the MPL domains and the associated multicast addresses, and (2) the interfaces and the multicast addresses for which they are enabled. 
</t><t>
The model features a choice such that:
<list>
<t>the model specifies for constrained devices with only one "single" interface and only one "single" domain, a list of MC addresses for which the single interface is enabled.</t>
<t>the model specifies for larger devices "multiple" interface and "multiple" domains, a list of MC addresses for which one or more interfaces are enabled.</t>
</list>
</t>
<figure><artwork align="left"><![CDATA[

<CODE BEGINS>file "ietf-yang-mpl-domain@2018-07-06.yang"


module ietf-yang-mpl-domain {

  yang-version 1.1;

  namespace 
      "urn:ietf:params:xml:ns:yang:ietf-yang-mpl-domain";

  prefix mpl;

import ietf-inet-types{
    prefix inet;
}

  organization
    "IETF ROLL (Routing Over Low power and lossy networks)
     Working Group";

  contact
    "WG Web:   http://tools.ietf.org/wg/roll/
     WG List:  mailto:roll@ietf.org

     WG Chair: Peter van der Stok
               mailto:consultancy@vanderstok.org

     WG Chair: Ines Robles
               mailto:maria.ines.robles@ericsson.com

     Editor:   Peter van der Stok
               mailto:consultancy@vanderstok.org";

  description
    "This module contains information about the state of the MPL domain.

     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

revision "2018-07-06" {
      description "revision 3";
      reference
        "I-D:draft-ietf-roll-mpl-yang: A YANG model for Multicast
         Protocol for Low power and lossy Networks (MPL)";
    }
   container domain {
     description
        "High level container containing the choice statement 
         between single domain/interface and multiple
         domains and interfaces.";

   choice multiple {
     description
        "A choice for large devices with multiple domains 
         and interfaces.";
     container mpl-domain {
        description
           "The entries describe the MPL domains, the associated
            Multicast addresses and interfaces.";

        list domains {
          key domainID;
          description
             "The entries describe a given domain identified with
              domainID and the associated Multicast addresses.";

        leaf domainID {
          type uint16;
          description
             "Entry uniquely identifies the domain in the
              forwarder.";
         }

         leaf-list MClist{
            type inet:ipv6-address;
            description
               "List of associated IPv6 Addresses.";
         }
       }   // domains list

       list addresses {
         key MCaddress;
         description
            "The entries describe the interfaces enabled 
             with the specified MC address.";

          leaf MCaddress {
            type inet:ipv6-address;
            description
               "MC address belonging to a MPL domain.";
          }

          leaf-list interfaces {
             type string;
             description
                "List of names of interfaces enabled for this
                 Multicast address. Interface name is defined
                 in Appendix A of [RFC8343].";
         }
       }   // addresses list
     }   // container mpl-domain
     container mpl-single {
        description
           "A choice for constrained devices  with a list of 
            MC addresses for single interface and domain.";
        leaf-list MCaddresses{
           type inet:ipv6-address;
           description
              "list of MC addresses belonging to one single
               domain and interface.";
         }  
     }   // container mpl-simple
   }   // choice simple
}  // container module
}  //module ietf-yang-mpl-domain


<CODE ENDS>

]]></artwork>
    </figure>


</section> <!-- yang-mpl-domain -->



<section title ="yang-mpl-ops module">
<t>
This module models the operational aspects of MPL. Per domain MPL specifies four parameters I_MAX, I_MIN, K, and TIMER_EXPIRATIONs for data and control messages. The value of the MPL intervals are expressed in TUNIT. The entry SE_LIFETIME taken over from <xref target = "RFC7774"/> fixes TUNIT to milliseconds. For very constrained devices with only one domain there can be only one instance of mpl-parameter list. The module augments the ietf-yang-mpl-domain module.
</t>
<figure><artwork align="left"><![CDATA[

<CODE BEGINS>file "ietf-yang-mpl-ops@2018-07-06.yang"

module ietf-yang-mpl-ops {

  yang-version 1.1;

  namespace 
      "urn:ietf:params:xml:ns:yang:ietf-yang-mpl-ops";
  prefix "mplo";

  import ietf-yang-mpl-domain{
     prefix "mpl";
  }

  organization
    "IETF ROLL (Routing over Low power and lossy networks)
 Working Group";

  contact
     "WG Web:   http://tools.ietf.org/wg/roll/
     WG List:  mailto:roll@ietf.org

     WG Chair: Peter van der Stok
               mailto:consultancy@vanderstok.org

     WG Chair: Ines Robles
               mailto:maria.ines.robles@ericsson.com

     Editor:   Peter van der Stok
               mailto:consultancy@vanderstok.org";

  description
     "This module contains information about the operation of 
      the MPL protocol.

     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or

     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

revision "2018-07-06" {
      description "revision 3";
      reference
        "I-D:draft-ietf-roll-mpl-yang: A YANG model for Multicast
         Protocol for Low power and lossy Networks (MPL)";
    }

    augment "/mpl:domain" {
       description 
          "additional MPL server settings to MPL domains";

    container mpl-ops {
      description
         "Parameter settings for each MPL server and for each 
          individual domain of the server.";

      leaf PROACTIVE_FORWARDING {
        type boolean;
        description
           "The boolean value indicates whether the MPL forwarder
            schedules MPL data message transmission after
            receiving them for the first time.
            Specified in section 5.4 of [RFC7731]";
      }

      leaf SEED_SET_ENTRY_LIFETIME {
         type uint64;
         units "seconds";
         default 1800;
         description
            "The value indicates the minimum lifetime for 
             an entry in the Seed set expressed in seconds.
             Default value is 30 minutes.
             Specified in section 5.4 of [RFC7731]";
       }

       list mpl-parameter{
          key  domainID;
          description
             "Each domain has a set of MPL forwarding parameters
              which regulate the forwarding operation.";

          leaf  domainID{
             type uint16;
             description
                "Each domainID must be present in  
                 mpl-parameter list.";
          }

          leaf DATA_MESSAGE_IMIN{
             type uint16;
             description
                "The minimum Trickle timer interval
                 for MPL Data Message transmissions.
                 mpl-ops/mpl-parameter/DATA_MESSAGE_IMIN <=
                 mpl-seeds/buffered-messages/I <=
                 mpl-ops/mpl-parameter/DATA_MESSAGE_IMAX 
                 Specified in section 5.4 of [RFC7731]";
           }

           leaf DATA_MESSAGE_IMAX{
              type uint16;
              description
                 "The maximum Trickle timer interval 
                  for MPL Data Message transmissions.
                  mpl-ops/mpl-parameter/DATA_MESSAGE_IMIN <=
                  mpl-seeds/buffered-messages/I <=
                  mpl-ops/mpl-parameter/DATA_MESSAGE_IMAX 
                  Specified in section 5.4 of [RFC7731]";
           }

           leaf DATA_MESSAGE_K{
              type uint16;
              default 1;
              description
                 "The redundancy constant
                  for MPL Data Message transmissions.
                  Specified in section 5.4 of [RFC7731]";
           }

           leaf DATA_MESSAGE_TIMER_EXPIRATIONS{
              type uint16;
              default 3;
              description
                  "The number of Trickle timer expirations, as
                   that occur before terminating the Trickle 
                   algorithm's retransmission of a given 
                   MPL Data Message.
                   Specified in section 5.4 of [RFC7731]";
            }

            leaf CONTROL_MESSAGE_IMIN{
               type uint16;
               description
                  "The minimum Trickle timer interval
                   for MPL Control Message transmissions.
                   Specified in section 5.4 of [RFC7731]";
            }

            leaf CONTROL_MESSAGE_IMAX{
               type uint16;
               description
                  "The maximum Trickle timer interval
                   for MPL Control Message transmissions.
                   Specified in section 5.4 of [RFC7731]";
            }

            leaf CONTROL_MESSAGE_K{
               type uint16;
               default 1;
               description
                  "The redundancy constant
                   for MPL Control Message transmissions.
                   Specified in section 5.4 of [RFC7731]";
            }

            leaf CONTROL_MESSAGE_TIMER_EXPIRATIONS{
               type uint16;
               default 10;
               description
                  "The number of Trickle time expirations,
                   that occur before terminating the Trickle
                   algorithm for MPL Control Message
                   transmissions.
                   Specified in section 5.4 of [RFC7731]";
            }

       }  // list MPL-parameter
     }  // container MPL-ops
   }  // augment ietf-yang-mpl-domain
} // module ietf-yang-mpl-ops

<CODE ENDS>

]]></artwork>
    </figure>

</section> <!-- MPL ops -->

<section title ="yang-mpl-seeds module">
<t>
This module specifies the current values of the operation of the MPL forwarder. The values are acquired by the client and set by the server. The module specifies a set of message buffers, with a buffer per seed and domain. In constrained devices there will be only one domain, but probably multiple seeds.
</t><t>
The message buffer contains a set of messages where each message is uniquely identified by its sequence number and seed. The associated I, c, e, and t values indicate the progress of MPL with respect to this message, as specified in <xref target = "RFC7731"/>. A forwarder sends and receives multiple copies of a message. When a forwarder has sent (received) a copy of a message, the forwarder has sent (received) that message.
</t><t>
For forwarders which are seeds, local has value true and seqno is the sequence number of the next message to send.
</t><t>
The module augments the ietf-yang-mpl-domain module.
</t>
<figure><artwork align="left"><![CDATA[

<CODE BEGINS>file "ietf-yang-mpl-seeds@2018-07-06.yang"

module ietf-yang-mpl-seeds {

  yang-version 1.1;

  namespace 
      "urn:ietf:params:xml:ns:yang:ietf-yang-mpl-seeds";

  prefix "mplse";

  import ietf-yang-mpl-domain{
     prefix "mpl";
  }

  organization
    "IETF ROLL (Routing over Low power and lossy networks)
 Working Group";

  contact
    "WG Web:   http://tools.ietf.org/wg/roll/
     WG List:  mailto:roll@ietf.org

     WG Chair: Peter van der Stok
               mailto:consultancy@vanderstok.org

     WG Chair: Ines Robles
               mailto:maria.ines.robles@ericsson.com

     Editor:   Peter van der Stok
               mailto:consultancy@vanderstok.org";

  description
     "This module contains information about the operation 
      of the MPL protocol.

     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or

     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

revision "2018-07-06" {
      description "revision 3";
      reference
        "I-D:draft-ietf-roll-mpl-yang: A YANG model for Multicast
 Protocol for Low power and lossy Networks (MPL)";
    }
 
augment "/mpl:domain" {
       description "additional message buffer status to MPL 
       domains";

     leaf SE_LIFETIME {
        type uint16;
        units "milliseconds/timer units";
        description
           "Conversion from clock ticks to milliseconds,
            equivalent to SEED_SET_ENTRY_LIFETIME/TUNIT as
            specified in [RFC7774].";
     }

     list mpl-seeds{
        key "seedID domainID";
        config false;
        description
           "List describes all seeds that are active in the 
            server. Seed information contains the message buffer
            contents and the operational values of I, c, sequence
            number and the life-times per message.";

      leaf seedID{
         type uint64;
         description
            "value uniquely identifies the MPL Seed within a MPL
             domain.";
      }

      leaf domainID{
         type uint16;
         description
            "together with seedID uniquely identifies buffer 
             set.";
      }

      leaf local {
         type boolean;
         description
            "When local == true, seed originated in this
             forwarder.
             When local == false, seed originated in different
             forwarder.";
     }

     leaf generate-seqno {
        type uint8;
        description
           "Sequence number of next message to be generated by 
            this local seed.";
     }

     leaf life-time {
        type uint64;
        units   "milliseconds";
        description
           "Minimum remaining lifetime of the seed entry in
            milliseconds.";
     }

     leaf min-seqno{
        type uint8;
        description
           "Lower bound sequence number in the buffer of the 
            seed.";
     }

     leaf data-number{
        type uint8;
        description
           "Number of currently buffered data messages.";
     }

     leaf control-number{
        type uint8;
        description
           "Number of currently buffered control messages.";
     }

      list buffered-messages{
         key seqno;
         description
            "status of trickle intervals of the buffered message 
             identified by seqno. and seed/domain";

         leaf seqno{
            type uint8;
            description
               "Sequence number of message.";
         }

         leaf I{
            type uint8;
            units  "milliseconds";
            description
               "Current Trickle timer interval size in 
                milliseconds.
                mpl-ops/mpl-parameter/DATA_MESSAGE_IMIN <=
                mpl-seeds/buffered-messages/I <=
                mpl-ops/mpl-parameter/DATA_MESSAGE_IMAX"; 
         }

         leaf c{
            type uint8;
            description
               "number of times that a copy of this message has 
                been received in this interval.";
         }

         leaf e{
            type uint8;
            description
               "number of Trickle time expirations since last
                Trickle timer reset.";
         }

         leaf t{
            type uint8;
            units  "milliseconds";
            description
               "Time expressed in milliseconds
                that message will be (is) forwarded.
                mpl-seeds/buffered-messages/t < 
                mpl-seeds/buffered-messages/I";
         }

     } // list seed-timers
   } // list MPL-seeds
  } // augment
} // module ietf-yang-mpl-seeds


<CODE ENDS>

]]></artwork>
    </figure>

</section> <!-- MPL seeds -->

<section title ="yang-mpl-statistics module">
<t>
This module specifies the operation of the MPL forwarder expressed in number of messages and copies. The values are acquired by the client and set by the server. Statistics are specified per seed and domain. In constrained devices there will be only one domain, but probably multiple seeds.
</t><t>
The parameter k determines how many copies of a message can be forwarded. The counters c-too-high, nr-forwarded, and nr-not-forwarded give insight in the consequences of the current value of k.
</t><t>
The other counters give insight in the loss of messages caused by the medium or forwarding delays. The inconsistent/consistent counters indicate when consistent or inconsistent messages were received according to the definition of consistent in <xref target = "RFC7731"/>.
</t><t>
The module augments the ietf-yang-mpl-domain module.
</t>

<figure><artwork align="left"><![CDATA[

<CODE BEGINS>file "ietf-yang-mpl-statistics@2018-07-06.yang"


module ietf-yang-mpl-statistics {

  yang-version 1.1;

  namespace 
      "urn:ietf:params:xml:ns:yang:ietf-yang-mpl-statistics";

  prefix "mplst";

  import ietf-yang-mpl-domain{
     prefix "mpl";
  }

  organization
    "IETF ROLL (Routing over Low power and lossy networks)
     Working Group";

  contact
    "WG Web:   http://tools.ietf.org/wg/roll/
     WG List:  mailto:roll@ietf.org

     WG Chair: Peter van der Stok
               mailto:consultancy@vanderstok.org

     WG Chair: Ines Robles
               mailto:maria.ines.robles@ericsson.com

     Editor:   Peter van der Stok
               mailto:consultancy@vanderstok.org";

  description
    "This module contains information about the operation 
     of the MPL protocol.

     Copyright (c) 2018 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or

     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.";

revision "2018-07-06" {
      description "revision 3";
      reference
        "I-D:draft-ietf-roll-mpl-yang: A YANG model for Multicast
 Protocol for Low power and lossy Networks (MPL)";
    }

 augment "/mpl:domain" {
       description "additional MPL message statistics to MPL 
       domains";

     list mpl-statistics{
     key "seedID domainID";

     config false;
    
     description
        "List describes performance statistics integrated over
         the messages identified by seed and domain identifiers.
         A forwarder can receive and forward multiple copies of 
         a message uniquely identified by seqno, domain, and 
         seed.";
      
      leaf seedID{
         type uint64;
         description
            "value uniquely identifies the MPL Seed within a MPL
             domain.";
      }

      leaf domainID{
         type uint16;
         description
            "together with seed-ID uniquely identifies buffer 
             set.";
      }

      leaf c-too-high {
         type uint64;
         description
            "Number of times that a copy was not forwarded
             because c > k.";
      }

      leaf nr-forwarded {
         type uint64;
         description
            "number of times copies are forwarded, 
             while c <= k.";
      }

      leaf nr-of-messages-received{
         type uint64;
         description
            "number of messages received, 
             must be smaller than or equal to seqno.";
      }

         leaf nr-of-messages-forwarded{
         type uint64;
         description
            "number of forwarded messages, must be smaller 
             than or equal to nr-of-messages-received.";
      }


      leaf nr-of-copies-received{
         type uint64;
         description
            "total number of message copies received.";
      }

      leaf nr-of-copies-forwarded{
         type uint64;
         description
            "number of forwarded copies, can be larger than 
             number-of-copies-received.";
      }

      leaf nr-of-refused-copies{
         type uint64;
         description
            "number of refused copies because seqno too small.";
      }

      leaf nr-of-missed-messages{
         type uint64;
         description
            "number of messages that were not received 
             because seqno < min-seqno.";
      }

      leaf nr-of-notreceived-messages{
         type uint64;
         description
            "number of messages that were not received
             according to control message.";
      }

      leaf nr-of-inconsistent-data{
         type uint64;
         description
            "number of inconsistent data messages.";
      }

      leaf nr-of-consistent-data{
         type uint64;
         description
            "number of consistent data messages.";
      }

      leaf nr-of-consistent-control{
         type uint64;
         description
            "number of consistent control messages.";
      }

      leaf nr-of-inconsistent-control{
         type uint64; 
         description
            "number of inconsistent control messages.";
      }

      leaf statistics-interval{
         type uint64;
         description
            "Interval, expressed in seconds, during which
             the statistics are collected.";
      }

      action reset-buffer-statistics{
         description
            "set all statistics counters and 
             statistics-interval of buffer[seedID domainID}
             to zero.";
      }
 
   }  // list mpl statistics
   
   action reset-all-statistics{
      description
         "set all statistics counters and 
          statistics-interval of all buffers to zero.";
   }

  }  //  augment
} // module  ietf-yang-mpl-statistics


<CODE ENDS>

]]></artwork>
    </figure>

</section> <!-- MPL statistics -->

</section> <!--MPL yang -->


<section  title="IANA Considerations">  
  <t>
Registration of four YANG modules and corresponding SID files in the "YANG module assignment" registry is required.
<list>
<t>module: ietf-yang-mpl-domain</t>
<t><list>
<t> .yang file: ietf-yang-mpl-domain@2018-07-06.yang</t>
<t> .sid file: ietf-yang-mpl-domain@2018-07-06.sid</t>
</list></t>
</list>

<list>
<t>module: ietf-yang-mpl-ops</t>
<t><list>
<t> .yang file: ietf-yang-mpl-ops@2018-07-06.yang</t>
<t> .sid file: ietf-yang-mpl-ops@2018-07-06.sid</t>
</list></t>
</list>

<list>
<t>module: ietf-yang-mpl-seeds</t>
<t><list>
<t> .yang file: ietf-yang-mpl-seeds@2018-07-06.yang</t>
<t> .sid file: ietf-yang-mpl-seeds@2018-07-06.sid</t>
</list></t>
</list>

<list>
<t>module: ietf-yang-mpl-statistics</t>
<t><list>
<t> .yang file: ietf-yang-mpl-statistics@2018-07-06.yang</t>
<t> .sid file: ietf-yang-mpl-statistics@2018-07-06.sid</t>
</list></t>
</list>

  </t>
</section>

<section title="Acknowledgements">
<t>
Andy Bierman has commented on the use of YANG for mpl. Many thanks to Radi Krejci for yang review.
</t>
</section>

<section title="Changelog">
<t>
Changes from version 01 to version 02
<list style="symbols">
<t>Added NMDA section. </t>
<t> added module explanation in model section </t>
<t> IANA considerations added </t> 
</list>

Changes from version 00 to version 01
<list style="symbols">
<t> config false in "statistics" and "seeds" modules</t>
<t> separated into 4 modules </t>
<t> inserted choice in domain modules </t>
<t> more explanatory text </t>
<t> renamed some parameters </t>
<t> Introduced section per module </t>
<t> reset of statistics is added </t>
</list>

Version ietf-00 copied from version vanderstok-02
</t>

</section>

</middle>
  <back>
    <references title="Normative References">
      &RFC2119;
	 &RFC6241;
      &RFC8343;
	 &RFC7731;
      &RFC7950;
      &I-D.ietf-core-sid;
    </references>

    <references title="Informative References">
       &RFC6206;
       &RFC7390;
       &RFC7774;
       &RFC8340;
       &RFC8342;
       &I-D.ietf-netmod-yang-tree-diagrams;
    </references>



</back>

</rfc>
