[Docs] [txt|pdf|xml|html] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 00 01 02 03 04 05 06 07 08 09

Network Working Group                                          G. Mirsky
Internet-Draft                                                    X. Min
Intended status: Standards Track                               ZTE Corp.
Expires: December 15, 2017                                        A. Pan
                                                                  W. Luo
                                                                Ericsson
                                                           June 13, 2017


      Two-Way Active Measurement Protocol (TWAMP) Light Data Model
                 draft-mirsky-ippm-twamp-light-yang-09

Abstract

   This document specifies the data model for implementations of
   Session-Sender and Session-Reflector for Two-Way Active Measurement
   Protocol (TWAMP) Light mode using YANG.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on December 15, 2017.

Copyright Notice

   Copyright (c) 2017 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of




Mirsky, et al.          Expires December 15, 2017               [Page 1]


Internet-Draft           TWAMP Light data model                June 2017


   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Conventions used in this document . . . . . . . . . . . .   2
       1.1.1.  Requirements Language . . . . . . . . . . . . . . . .   2
   2.  Scope, Model, and Applicability . . . . . . . . . . . . . . .   3
     2.1.  Data Model Parameters . . . . . . . . . . . . . . . . . .   3
       2.1.1.  Session-Sender  . . . . . . . . . . . . . . . . . . .   3
       2.1.2.  Session-Reflector . . . . . . . . . . . . . . . . . .   4
   3.  Data Model  . . . . . . . . . . . . . . . . . . . . . . . . .   4
     3.1.  Tree Diagram  . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  YANG Module . . . . . . . . . . . . . . . . . . . . . . .   9
   4.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  27
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  28
   6.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  28
     6.1.  Normative References  . . . . . . . . . . . . . . . . . .  28
     6.2.  Informative References  . . . . . . . . . . . . . . . . .  29
   Appendix A.  Acknowledgements . . . . . . . . . . . . . . . . . .  29
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  29

1.  Introduction

   The Two-Way Active Measurement Protocol (TWAMP) [RFC5357] can be used
   to measure performance parameters of IP networks such as latency,
   jitter, and packet loss by sending test packets and monitoring their
   experience in the network.  The [RFC5357] defines two protocols,
   TWAMP Control and TWAMP Test, and a profile of TWAMP Test, TWAMP
   Light.  The TWAMP Light is known to have many implementations though
   no common management framework being defined, thus leaving some
   aspects of test packet processing to interpretation.  The goal of
   this document is to collect analyze these variations; describe common
   model while allowing for extensions in the future.  This document
   defines such a TWAMP data model and specifies it formally using the
   YANG data modeling language [RFC6020].

1.1.  Conventions used in this document

1.1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.




Mirsky, et al.          Expires December 15, 2017               [Page 2]


Internet-Draft           TWAMP Light data model                June 2017


2.  Scope, Model, and Applicability

   The scope of this document includes model of the TWAMP Light as
   defined in Appendix I of [RFC5357].  This mode of TWAMP Light will be
   referred in this document as Stateless.  Another mode, where the
   Session-Reflector is aware of the state of the TWAMP test session and
   thus can independently count reflected test packets, referred as
   Stateful.  This document benefits from earlier attempt to define
   TWAMP MIB in [I-D.elteto-ippm-twamp-mib] and from TWAMP YANG model
   defined in [I-D.ietf-ippm-twamp-yang].

   Figure 1 updates TWAMP-Light reference model presented in Appendix I
   [RFC5357] for the scenario when instantiation of a TWAMP-Test session
   between Session-Sender and Session-Reflector controlled by
   communication between a Configuration Client as a manager and
   Configuration Servers as agents of the configuration session.


         o----------------------------------------------------------o
         |                        Config client                     |
         o----------------------------------------------------------o
               ||                                          ||
               ||             NETCONF/RESTCONF             ||
               ||                                          ||
      o-------------------o                       o-------------------o
      |   Config server   |                       |   Config server   |
      |                   |                       |                   |
      +-------------------+                       +-------------------+
      |  Session-Sender   |  <--- TWAMP-Test ---> | Session-Reflector |
      +-------------------+                       +-------------------+


                   Figure 1: TWAMP Light Reference Model

2.1.  Data Model Parameters

   This section describes all the parameters of the the TWAMP-Light data
   model.

2.1.1.  Session-Sender

   The twamp-light-session-sender container holds items that are related
   to the configuration of the TWAMP-Light Session-Sender logical
   entity.

   The twamp-light-session-sender-state container holds information
   about the state of the particular TWAMP-Light test session.




Mirsky, et al.          Expires December 15, 2017               [Page 3]


Internet-Draft           TWAMP Light data model                June 2017


   RPCs twamp-sender-start and twamp-sender-stop respectively start and
   stop the referenced by session-id TWAMP-Light test session.

2.1.1.1.  Controls for Test Session and Preforrmance Metric Calculation

   The data model supports several scenarios for Session-Sender to
   execute test sessions and calculate performance metrics:

      The test mode in which the test packets are sent unbound in time
      at defined by the parameter 'interval' in the twamp-light-session-
      sender container frequency is referred as continuous mode.
      Performance metrics in the continuous mode are calculated at
      period defined by the parameter 'measurement-interval'.

      The test mode that has specific number of the test packets
      configured for the test session in the 'number-of-packets'
      parameter is referred as periodic mode.  The test session may be
      repeated by the Session-Sender with the same parameters.  The
      'repeat' parameter defines number of tests and the 'repeat-
      interval' - the interval between the consecuitive tests.  The
      performance metrics are calculated after each test session when
      the interval defined by the 'session-timeout' expires.

2.1.2.  Session-Reflector

   The twamp-light-session-reflector container holds items that are
   related to the configuration of the TWAMP-Light Session-Reflector
   logical entity.

   The twamp-light-session-refl-state container holds Session-Reflector
   state data for the particular TWAMP-Light test session.

3.  Data Model

   Creating TWAMP-Light data model presents number of challenges and
   among them is identification of a test-session at Session-Reflector.
   A Session-Reflector MAY require only as little as its IP and UDP port
   number in received TWAMP-Test packet to spawn new test session.  More
   so, to test processing of Class-of-Service along the same route in
   Equal Cost Multi-Path environment Session-Sender may run TWAMP test
   sessions concurrently using the same source IP address, source UDP
   port number, destination IP address, and destination UDP port number.
   Thus the only parameter that can be used to differentiate these test
   sessions would be DSCP value.  The DSCP field may get re-marked along
   the path and without use of [RFC7750] that will go undetected, but by
   using five-tuple instead of four-tuple as a key we can ensure that
   TWAMP test packets that are considered as different test sessions
   follow the same path even in ECMP environments.



Mirsky, et al.          Expires December 15, 2017               [Page 4]


Internet-Draft           TWAMP Light data model                June 2017


3.1.  Tree Diagram


module: ietf-twamp-light
    +--rw twamp-light
    |  +--rw twamp-light-session-sender {session-sender-light}?
    |  |  +--rw sender-light-enable?   enable
    |  |  +--rw test-session* [session-id]
    |  |     +--rw session-id                     uint32
    |  |     +--rw test-session-enable?           enable
    |  |     +--rw number-of-packets?             union
    |  |     +--rw packet-padding-size?           uint32
    |  |     +--rw interval?                      uint32
    |  |     +--rw session-timeout?               uint32
    |  |     +--rw measurement-interval?          uint32
    |  |     +--rw repeat?                        union
    |  |     +--rw repeat-interval?               uint32
    |  |     +--rw dscp-value?                    inet:dscp
    |  |     +--rw test-session-reflector-mode?   session-reflector-mode
    |  |     +--rw sender-ip                      inet:ip-address
    |  |     +--rw sender-udp-port                inet:port-number
    |  |     +--rw reflector-ip                   inet:ip-address
    |  |     +--rw reflector-udp-port             inet:port-number
    |  |     +--rw authentication-params! {twamp-light-authentication}?
    |  |     |  +--rw key-chain?   kc:key-chain-ref
    |  |     +--rw first-percentile?              percentile
    |  |     +--rw second-percentile?             percentile
    |  |     +--rw third-percentile?              percentile
    |  +--rw twamp-light-session-reflector {session-reflector-light}?
    |     +--rw reflector-light-enable?       enable
    |     +--rw ref-wait?                     uint32
    |     +--rw reflector-light-mode-state?   session-reflector-mode
    |     +--rw test-session* [session-id]
    |        +--rw session-id               uint32
    |        +--rw dscp-handling-mode?      session-dscp-mode
    |        +--rw dscp-value?              inet:dscp
    |        +--rw sender-ip                inet:ip-address
    |        +--rw sender-udp-port          inet:port-number
    |        +--rw reflector-ip             inet:ip-address
    |        +--rw reflector-udp-port       inet:port-number
    |        +--rw authentication-params! {twamp-light-authentication}?
    |           +--rw key-chain?   kc:key-chain-ref
    +--ro twamp-light-state
       +--ro twamp-light-session-sender-state {session-sender-light}?
       |  +--ro test-session-state* [session-id]
       |     +--ro session-id              uint32
       |     +--ro sender-session-state?   enumeration
       |     +--ro current-stats



Mirsky, et al.          Expires December 15, 2017               [Page 5]


Internet-Draft           TWAMP Light data model                June 2017


       |     |  +--ro start-time                yang:date-and-time
       |     |  +--ro packet-padding-size?      uint32
       |     |  +--ro interval?                 uint32
       |     |  +--ro duplicate-packets?        uint32
       |     |  +--ro reordered-packets?        uint32
       |     |  +--ro sender-ip                 inet:ip-address
       |     |  +--ro sender-udp-port           inet:port-number
       |     |  +--ro reflector-ip              inet:ip-address
       |     |  +--ro reflector-udp-port        inet:port-number
       |     |  +--ro dscp?                     inet:dscp
       |     |  +--ro sent-packets?             uint32
       |     |  +--ro rcv-packets?              uint32
       |     |  +--ro sent-packets-error?       uint32
       |     |  +--ro rcv-packets-error?        uint32
       |     |  +--ro last-sent-seq?            uint32
       |     |  +--ro last-rcv-seq?             uint32
       |     |  +--ro two-way-delay
       |     |  |  +--ro delay
       |     |  |  |  +--ro min?   yang:gauge32
       |     |  |  |  +--ro max?   yang:gauge32
       |     |  |  |  +--ro avg?   yang:gauge32
       |     |  |  +--ro delay-variation
       |     |  |     +--ro min?   uint32
       |     |  |     +--ro max?   uint32
       |     |  |     +--ro avg?   uint32
       |     |  +--ro one-way-delay-far-end
       |     |  |  +--ro delay
       |     |  |  |  +--ro min?   yang:gauge32
       |     |  |  |  +--ro max?   yang:gauge32
       |     |  |  |  +--ro avg?   yang:gauge32
       |     |  |  +--ro delay-variation
       |     |  |     +--ro min?   uint32
       |     |  |     +--ro max?   uint32
       |     |  |     +--ro avg?   uint32
       |     |  +--ro one-way-delay-near-end
       |     |  |  +--ro delay
       |     |  |  |  +--ro min?   yang:gauge32
       |     |  |  |  +--ro max?   yang:gauge32
       |     |  |  |  +--ro avg?   yang:gauge32
       |     |  |  +--ro delay-variation
       |     |  |     +--ro min?   uint32
       |     |  |     +--ro max?   uint32
       |     |  |     +--ro avg?   uint32
       |     |  +--ro low-percentile
       |     |  |  +--ro delay-percentile
       |     |  |  |  +--ro rtt-delay?        percentile
       |     |  |  |  +--ro near-end-delay?   percentile
       |     |  |  |  +--ro far-end-delay?    percentile



Mirsky, et al.          Expires December 15, 2017               [Page 6]


Internet-Draft           TWAMP Light data model                June 2017


       |     |  |  +--ro jitter-percentile
       |     |  |     +--ro rtt-jitter?        percentile
       |     |  |     +--ro near-end-jitter?   percentile
       |     |  |     +--ro far-end-jitter?    percentile
       |     |  +--ro mid-percentile
       |     |  |  +--ro delay-percentile
       |     |  |  |  +--ro rtt-delay?        percentile
       |     |  |  |  +--ro near-end-delay?   percentile
       |     |  |  |  +--ro far-end-delay?    percentile
       |     |  |  +--ro jitter-percentile
       |     |  |     +--ro rtt-jitter?        percentile
       |     |  |     +--ro near-end-jitter?   percentile
       |     |  |     +--ro far-end-jitter?    percentile
       |     |  +--ro high-percentile
       |     |  |  +--ro delay-percentile
       |     |  |  |  +--ro rtt-delay?        percentile
       |     |  |  |  +--ro near-end-delay?   percentile
       |     |  |  |  +--ro far-end-delay?    percentile
       |     |  |  +--ro jitter-percentile
       |     |  |     +--ro rtt-jitter?        percentile
       |     |  |     +--ro near-end-jitter?   percentile
       |     |  |     +--ro far-end-jitter?    percentile
       |     |  +--ro two-way-loss
       |     |  |  +--ro loss-count?         int32
       |     |  |  +--ro loss-ratio?         percentage
       |     |  |  +--ro loss-burst-max?     int32
       |     |  |  +--ro loss-burst-min?     int32
       |     |  |  +--ro loss-burst-count?   int32
       |     |  +--ro one-way-loss-far-end
       |     |  |  +--ro loss-count?         int32
       |     |  |  +--ro loss-ratio?         percentage
       |     |  |  +--ro loss-burst-max?     int32
       |     |  |  +--ro loss-burst-min?     int32
       |     |  |  +--ro loss-burst-count?   int32
       |     |  +--ro one-way-loss-near-end
       |     |     +--ro loss-count?         int32
       |     |     +--ro loss-ratio?         percentage
       |     |     +--ro loss-burst-max?     int32
       |     |     +--ro loss-burst-min?     int32
       |     |     +--ro loss-burst-count?   int32
       |     +--ro history-stats* [id]
       |        +--ro id                        uint32
       |        +--ro end-time                  yang:date-and-time
       |        +--ro number-of-packets?        uint32
       |        +--ro packet-padding-size?      uint32
       |        +--ro interval?                 uint32
       |        +--ro duplicate-packets?        uint32
       |        +--ro reordered-packets?        uint32



Mirsky, et al.          Expires December 15, 2017               [Page 7]


Internet-Draft           TWAMP Light data model                June 2017


       |        +--ro loss-packets?             uint32
       |        +--ro sender-ip                 inet:ip-address
       |        +--ro sender-udp-port           inet:port-number
       |        +--ro reflector-ip              inet:ip-address
       |        +--ro reflector-udp-port        inet:port-number
       |        +--ro dscp?                     inet:dscp
       |        +--ro sent-packets?             uint32
       |        +--ro rcv-packets?              uint32
       |        +--ro sent-packets-error?       uint32
       |        +--ro rcv-packets-error?        uint32
       |        +--ro last-sent-seq?            uint32
       |        +--ro last-rcv-seq?             uint32
       |        +--ro two-way-delay
       |        |  +--ro delay
       |        |  |  +--ro min?   yang:gauge32
       |        |  |  +--ro max?   yang:gauge32
       |        |  |  +--ro avg?   yang:gauge32
       |        |  +--ro delay-variation
       |        |     +--ro min?   uint32
       |        |     +--ro max?   uint32
       |        |     +--ro avg?   uint32
       |        +--ro one-way-delay-far-end
       |        |  +--ro delay
       |        |  |  +--ro min?   yang:gauge32
       |        |  |  +--ro max?   yang:gauge32
       |        |  |  +--ro avg?   yang:gauge32
       |        |  +--ro delay-variation
       |        |     +--ro min?   uint32
       |        |     +--ro max?   uint32
       |        |     +--ro avg?   uint32
       |        +--ro one-way-delay-near-end
       |           +--ro delay
       |           |  +--ro min?   yang:gauge32
       |           |  +--ro max?   yang:gauge32
       |           |  +--ro avg?   yang:gauge32
       |           +--ro delay-variation
       |              +--ro min?   uint32
       |              +--ro max?   uint32
       |              +--ro avg?   uint32
       +--ro twamp-light-session-refl-state {session-reflector-light}?
          +--ro reflector-light-admin-status    boolean
          +--ro test-session-state* [session-id]
             +--ro session-id            uint32
             +--ro sent-packets?         uint32
             +--ro rcv-packets?          uint32
             +--ro sent-packets-error?   uint32
             +--ro rcv-packets-error?    uint32
             +--ro last-sent-seq?        uint32



Mirsky, et al.          Expires December 15, 2017               [Page 8]


Internet-Draft           TWAMP Light data model                June 2017


             +--ro last-rcv-seq?         uint32
             +--ro sender-ip             inet:ip-address
             +--ro sender-udp-port       inet:port-number
             +--ro reflector-ip          inet:ip-address
             +--ro reflector-udp-port    inet:port-number

  rpcs:
    +---x twamp-sender-start
    |  +---w input
    |     +---w session-id    uint32
    +---x twamp-sender-stop
       +---w input
          +---w session-id    uint32


3.2.  YANG Module


<CODE BEGINS> file "ietf-twamp-light@2017-06-13.yang"

module ietf-twamp-light {
   namespace "urn:ietf:params:xml:ns:yang:ietf-twamp-light";
    //namespace need to be assigned by IANA
   prefix "ietf-twamp-light";

   import ietf-inet-types {
     prefix inet;
   }
   import ietf-yang-types {
     prefix yang;
   }
   import ietf-key-chain {
     prefix kc;
   }

   organization
     "IETF IPPM (IP Performance Metrics) Working Group";

   contact
     "draft-mirsky-ippm-twamp-light-yang@tools.ietf.org";

   description "TWAMP Light Data Model";

   revision "2017-06-13" {
     description
     "08 version. Appendix I RFC 5357 is covered.";
     reference "RFC 5357";
   }



Mirsky, et al.          Expires December 15, 2017               [Page 9]


Internet-Draft           TWAMP Light data model                June 2017


   feature session-sender-light {
     description
     "This feature relates to the device functions as the
     TWAMP Light Session-Sender";
   }

   feature session-reflector-light {
     description
     "This feature relates to the device functions as the
     TWAMP Light Session-Reflector";
   }

   feature twamp-light-authentication {
     description
     "TWAMP Light authentication supported";
   }

   typedef enable {
      type boolean;
      description "enable";
   }

   typedef session-reflector-mode {
        type enumeration {
                enum stateful {
                        description
                        "When the Session-Reflector is stateful,
                        i.e. is aware of TWAMP-Test session state.";
                }
                enum stateless {
                        description
                        "When the Session-Reflector is stateless,
                        i.e. is not aware of the state of
                        TWAMP-Test session.";
                }
        }
        description "State of the Session-Reflector";
   }

   typedef session-dscp-mode {
        type enumeration {
                enum copy-received-value {
                        description
                        "Use DSCP value copied from received
                        TWAMP test packet of the test session.";
                }
                enum use-configured-value {
                        description



Mirsky, et al.          Expires December 15, 2017              [Page 10]


Internet-Draft           TWAMP Light data model                June 2017


                        "Use DSCP value configured for this
                        test session on the Session-Reflector.";
                }
        }
        description
        "DSCP handling mode by Session-Reflector.";
   }

   typedef percentage {
        type decimal64 {
                fraction-digits 5;
        }
        description "Percentage";
   }

   typedef percentile {
        type decimal64 {
                fraction-digits 2;
        }
        description
        "Percentile is a measure used in statistics
        indicating the value below which a given
        percentage of observations in a group of
        observations fall.";
   }

   grouping maintenance-statistics {
     description "Maintenance statistics grouping";
     leaf sent-packets {
       type uint32;
       description "Packets sent";
     }
     leaf rcv-packets {
       type uint32;
       description "Packets received";
     }
     leaf sent-packets-error {
       type uint32;
       description "Packets sent error";
     }
     leaf rcv-packets-error {
       type uint32;
       description "Packets received error";
     }
     leaf last-sent-seq {
       type uint32;
       description "Last sent sequence number";
     }



Mirsky, et al.          Expires December 15, 2017              [Page 11]


Internet-Draft           TWAMP Light data model                June 2017


     leaf last-rcv-seq {
       type uint32;
       description "Last received sequence number";
     }
   }

grouping twamp-session-percentile {
   description "Percentile grouping";
   leaf first-percentile {
      type percentile;
      default 95.00;
      description
      "First percentile to report";
   }
   leaf second-percentile {
      type percentile;
      default 99.00;
      description
      "Second percentile to report";
   }
   leaf third-percentile {
      type percentile;
      default 99.90;
      description
      "Third percentile to report";
   }
}

   grouping delay-statistics {
     description "Delay statistics grouping";
     container delay {
       description "Packets transmitted delay";
                 leaf min {
                   type yang:gauge32;
                   units microseconds;
                   description
                   "Min of Packets transmitted delay";
                 }
                 leaf max {
                    type yang:gauge32;
                    units microseconds;
                    description
                    "Max of Packets transmitted delay";
                 }
                 leaf avg {
                    type yang:gauge32;
                    units microseconds;
                    description



Mirsky, et al.          Expires December 15, 2017              [Page 12]


Internet-Draft           TWAMP Light data model                June 2017


                    "Avg of Packets transmitted delay";
                 }
     }

         container delay-variation {
                 description
                 "Packets transmitted delay variation";
                 leaf min {
                   type uint32;
                   units microseconds;
                   description
                   "Min of Packets transmitted
                   delay variation";
                 }
                 leaf max {
                   type uint32;
                   units microseconds;
                   description
                   "Max of Packets transmitted
                   delay variation";
                 }
                 leaf avg {
                   type uint32;
                   units microseconds;
                   description
                   "Avg of Packets transmitted
                   delay variation";
                 }
          }
   }
     grouping time-percentile-report {
        description "Delay percentile report grouping";
        container delay-percentile {
                description
                "Report round-trip, near- and far-end delay";
                leaf rtt-delay {
                        type percentile;
                        description
                        "Percentile of round-trip delay";
                }
                leaf near-end-delay {
                        type percentile;
                        description
                        "Percentile of near-end delay";
                }
                leaf far-end-delay {
                        type percentile;
                        description



Mirsky, et al.          Expires December 15, 2017              [Page 13]


Internet-Draft           TWAMP Light data model                June 2017


                        "Percentile of far-end delay";
                }
        }
        container jitter-percentile {
                description
                "Report round-trip, near- and far-end jitter";
                leaf rtt-jitter {
                        type percentile;
                        description
                        "Percentile of round-trip jitter";
                }
                leaf near-end-jitter {
                        type percentile;
                        description
                        "Percentile of near-end jitter";
                }
                leaf far-end-jitter {
                        type percentile;
                        description
                        "Percentile of far-end jitter";
                }
        }
     }

     grouping packet-loss-statistics {
        description
        "Grouping for Packet Loss statistics";
        leaf loss-count {
                type int32;
                description
                "Number of lost packets
                during the test interval.";
        }
        leaf loss-ratio {
                type percentage;
                description
                "Ratio of packets lost to packets
                sent during the test interval.";
        }
        leaf loss-burst-max {
                type int32;
                description
                "Maximum number of consequtively
                lost packets during the test interval.";
        }
        leaf loss-burst-min {
                type int32;
                description



Mirsky, et al.          Expires December 15, 2017              [Page 14]


Internet-Draft           TWAMP Light data model                June 2017


                "Minimum number of consequtively
                lost packets during the test interval.";
        }
                leaf loss-burst-count {
                type int32;
                description
                "Number of occasions with packet
                loss during the test interval.";
                }
     }

   grouping session-light-parameters {
     description
     "Parameters common among
     Session-Sender and Session-Reflector";
     leaf sender-ip {
       type inet:ip-address;
       mandatory true;
       description "Sender IP address";
     }
     leaf sender-udp-port {
       type inet:port-number {
         range "49152..65535";
       }
       mandatory true;
       description "Sender UDP port number";
     }
     leaf reflector-ip {
       type inet:ip-address;
       mandatory true;
       description "Reflector IP address";
     }
     leaf reflector-udp-port {
       type inet:port-number{
         range "49152..65535";
       }
       mandatory true;
       description "Reflector UDP port number";
     }
   }

   grouping session-light-auth-params {
      description
      "Grouping for TWAMP Light authentication parameters";
      container authentication-params {
         if-feature twamp-light-authentication;
         presence "Enables TWAMP Light authentication";
         description



Mirsky, et al.          Expires December 15, 2017              [Page 15]


Internet-Draft           TWAMP Light data model                June 2017


         "Parameters for TWAMP Light authentication";
         leaf key-chain {
            type kc:key-chain-ref;
            description "Name of key-chain";
         }
      }
   }

   /*Configuration Data*/
   container twamp-light {
     description
     "Top level container for TWAMP-Light configuration";

    container twamp-light-session-sender {
       if-feature session-sender-light;
       description "TWAMP-Light Session-Sender container";

       leaf sender-light-enable {
         type enable;
         default "true";
         description
         "Whether this network element is enabled to
         act as TWAMP-Light Sender";
       }

       list test-session {
         key "session-id";
               unique "sender-ip sender-udp-port reflector-ip"
         +" reflector-udp-port dscp-value";
         description
         "This structure is a container of test session
         managed objects";

         leaf session-id {
           type uint32;
           description "Session ID";
         }

         leaf test-session-enable {
           type enable;
           default "true";
           description
           "Whether this TWAMP Test session is enabled";
         }

         leaf number-of-packets {
           type union {
                type uint32 {



Mirsky, et al.          Expires December 15, 2017              [Page 16]


Internet-Draft           TWAMP Light data model                June 2017


                        range 1..4294967294 {
                                description
                                "The overall number of UDP test packet
                                to be transmitted by the sender for this
                                test session";
                        }
                }
                type enumeration {
                        enum forever {
                                description
                                "Indicates that the test session SHALL
                                be run *forever*.";
                        }
                }
           }
           default 10;
           description
           "This value determines if the TWAMP-Test session is
              bound by number of test packets or not.";
         }

         leaf packet-padding-size {
           type uint32;
           default 27;
           description
           "Size of the Packet Padding. Suggested to run
           Path MTU Discovery to avoid packet fragmentation in
           IPv4 and packet blackholing in IPv6";
         }

         leaf interval  {
           type uint32;
           units microseconds;
           description
           "Time interval between transmission of two
           consecutive packets in the test session in
           microseconds";
         }

            leaf session-timeout {
              when "../number-of-packets != 'forever'" {
                description
                "Test session timeout only valid if the
                test mode is periodic.";
           }
           type uint32;
           units "seconds";
           default 900;



Mirsky, et al.          Expires December 15, 2017              [Page 17]


Internet-Draft           TWAMP Light data model                June 2017


           description
           "The timeout value for the Session-Sender to
           collect outstanding reflected packets.";
         }

         leaf measurement-interval {
           when "../number-of-packets = 'forever'" {
                description
                "Valid only when the test to run forever,
                i.e. continuously.";
           }
           type uint32;
           units "seconds";
           default 60;
           description
           "Interval to calculate performance metric when
                 the test mode is 'continuous'.";
            }

            leaf repeat {
              type union {
                type uint32 {
                        range 0..4294967294;
                }
                type enumeration {
                        enum forever {
                                description
                                "Indicates that the test session SHALL
                                be repeated *forever* using the
                                information in repeat-interval
                                parameter, and SHALL NOT decrement
                                the value.";
                        }
                }
              }
              default 0;
              description
              "This value determines if the TWAMP-Test session must
              be repeated. When a test session has completed, the
              repeat parameter is checked. The default value
              of 0 indicates that the session MUST NOT be repeated.
              If the repeat value is 1 through 4,294,967,294
              then the test session SHALL be repeated using the
              information in repeat-interval parameter.
              The implementation MUST decrement the value of repeat
              after determining a repeated session is expected.";
            }




Mirsky, et al.          Expires December 15, 2017              [Page 18]


Internet-Draft           TWAMP Light data model                June 2017


            leaf repeat-interval {
                when "../repeat != '0'";
                type uint32;
                units seconds;
                default 0;
                description
                "This parameter determines the timing of repeated
                TWAMP-Test sessions when repeat is more than 0.";
            }

            leaf dscp-value {
              type inet:dscp;
              default 0;
              description
              "DSCP value to be set in the test packet.";
            }

            leaf test-session-reflector-mode {
                 type session-reflector-mode;
                 default "stateless";
                 description
                 "The mode of TWAMP-Reflector for the test session.";
            }

         uses session-light-parameters;
         uses session-light-auth-params;
         uses twamp-session-percentile;
       }
     }

     container twamp-light-session-reflector {
       if-feature session-reflector-light;
       description
       "TWAMP-Light Session-Reflector container";
         leaf reflector-light-enable {
           type enable;
           default "true";
           description
           "Whether this network element is enabled to
           act as TWAMP-Light Reflector";
         }

         leaf ref-wait {
         type uint32 {
           range 1..604800;
         }
         units seconds;
         default 900;



Mirsky, et al.          Expires December 15, 2017              [Page 19]


Internet-Draft           TWAMP Light data model                June 2017


         description
         "REFWAIT(TWAMP test session timeout in seconds),
         the default value is 900";
       }

       leaf reflector-light-mode-state {
         type session-reflector-mode;
         default stateless;
         description
         "The state of the mode of the TWAMP-Light
         Session-Reflector";
        }

        list test-session {
          key "session-id";
                unique "sender-ip sender-udp-port reflector-ip"
          +" reflector-udp-port";
          description
          "This structure is a container of test session
          managed objects";

        leaf session-id {
          type uint32;
          description "Session ID";
        }

        leaf dscp-handling-mode {
          type session-dscp-mode;
          default copy-received-value;
          description
          "Session-Reflector handling of DSCP:
                 - use value copied from received TWAMP-Test packet;
                 - use value explicitly configured";
           }

           leaf dscp-value {
             when "../dscp-handling-mode = 'use-configured-value'";
             type inet:dscp;
             default 0;
             description
             "DSCP value to be set in the reflected packet
                if dscp-handling-mode is set to use-configured-value.";
           }

        uses session-light-parameters;
        uses session-light-auth-params;
       }
     }



Mirsky, et al.          Expires December 15, 2017              [Page 20]


Internet-Draft           TWAMP Light data model                June 2017


   }

 /*Operational state data nodes*/
 container twamp-light-state{
   config "false";
   description
   "Top level container for TWAMP-Light state data";

   container twamp-light-session-sender-state {
     if-feature session-sender-light;
     description
     "Session-Sender container for state data";
     list test-session-state{
       key "session-id";
       description
       "This structure is a container of test session
       managed objects";

       leaf session-id {
         type uint32;
         description "Session ID";
       }

       leaf sender-session-state {
         type enumeration {
           enum active {
             description "Test session is active";
           }
           enum ready {
             description "Test session is idle";
           }
         }
         description
         "State of the particular TWAMP-Light test
         session at the sender";
       }

       container current-stats {
         description
         "This container contains the results for the current
          Measurement Interval in a Measurement session ";
          leaf start-time {
            type yang:date-and-time;
            mandatory true;
            description
            "The time that the current Measurement Interval started";
          }




Mirsky, et al.          Expires December 15, 2017              [Page 21]


Internet-Draft           TWAMP Light data model                June 2017


          leaf packet-padding-size {
            type uint32;
            default 27;
            description
            "Size of the Packet Padding. Suggested to run
            Path MTU Discovery to avoid packet fragmentation
            in IPv4 and packet backholing in IPv6";
          }

          leaf interval  {
            type uint32;
            units microseconds;
           description
           "Time interval between transmission of two
           consecutive packets in the test session";
          }

          leaf duplicate-packets  {
            type uint32;
           description "Duplicate packets";
          }
          leaf reordered-packets  {
            type uint32;
           description "Reordered packets";
          }

          uses session-light-parameters;
          leaf dscp {
            type inet:dscp;
            description
            "The DSCP value that was placed in the header of
            TWAMP UDP test packets by the Session-Sender.";
          }
          uses maintenance-statistics;

          container two-way-delay {
            description
            "two way delay result of the test session";
            uses delay-statistics;
          }

          container one-way-delay-far-end {
            description
            "one way delay far-end of the test session";
            uses delay-statistics;
          }

          container one-way-delay-near-end {



Mirsky, et al.          Expires December 15, 2017              [Page 22]


Internet-Draft           TWAMP Light data model                June 2017


            description
            "one way delay near-end of the test session";
            uses delay-statistics;
          }

          container low-percentile {
                when "/twamp-light/twamp-light-session-sender/"
                +"test-session[session-id]/"
                +"first-percentile != '0.00'" {
                        description
                        "Only valid if the
                        the first-percentile is not NULL";
                }
                description
                "Low percentile report";
                uses time-percentile-report;
          }

          container mid-percentile {
                when "/twamp-light/twamp-light-session-sender/"
                +"test-session[session-id]/"
                +"second-percentile != '0.00'" {
                        description
                        "Only valid if the
                        the first-percentile is not NULL";
                }
                description
                "Mid percentile report";
                uses time-percentile-report;
          }

          container high-percentile {
                when "/twamp-light/twamp-light-session-sender/"
                +"test-session[session-id]/"
                +"third-percentile != '0.00'" {
                        description
                        "Only valid if the
                        the first-percentile is not NULL";
                }
                description
                "High percentile report";
                uses time-percentile-report;
          }

          container two-way-loss {
            description
            "two way loss count and ratio result of
            the test session";



Mirsky, et al.          Expires December 15, 2017              [Page 23]


Internet-Draft           TWAMP Light data model                June 2017


            uses packet-loss-statistics;
          }
          container one-way-loss-far-end {
            when "/twamp-light/twamp-light-session-sender/"
            +"test-session[session-id]/"
            +"test-session-reflector-mode = 'stateful'" {
                description
                "One-way statistic is only valid if the
                session-reflector is in stateful mode.";
            }
            description
            "one way loss count and ratio far-end of
            the test session";
            uses packet-loss-statistics;
          }
          container one-way-loss-near-end {
            when "/twamp-light/twamp-light-session-sender/"
            +"test-session[session-id]/"
            +"test-session-reflector-mode = 'stateful'" {
                description
                "One-way statistic is only valid if the
                session-reflector is in stateful mode.";
            }
            description
            "one way loss count and ratio near-end of
            the test session";
            uses packet-loss-statistics;
          }
       }

       list history-stats {
         key id;
         description
         "This container contains the results for the history
          Measurement Interval in a Measurement session ";
          leaf id {
            type uint32;
            description
            "The identifier for the Measurement Interval
            within this session";
          }
          leaf end-time {
            type yang:date-and-time;
            mandatory true;
            description
            "The time that the Measurement Interval ended";
          }
          leaf number-of-packets {



Mirsky, et al.          Expires December 15, 2017              [Page 24]


Internet-Draft           TWAMP Light data model                June 2017


            type uint32;
            description
            "The overall number of UDP test packets to be
            transmitted by the sender for this test session";
          }

          leaf packet-padding-size {
            type uint32;
            default 27;
            description
            "Size of the Packet Padding. Suggested to run
            Path MTU Discovery to avoid packet fragmentation
            in IPv4 and packet blackholing in IPv6";
          }

          leaf interval  {
            type uint32;
            units microseconds;
           description
           "Time interval between transmission of two
           consecutive packets in the test session";
          }
          leaf duplicate-packets  {
            type uint32;
           description "Duplicate packets";
          }
          leaf reordered-packets  {
            type uint32;
           description "Reordered packets";
          }
          leaf loss-packets  {
            type uint32;
           description "Loss packets";
          }

          uses session-light-parameters;
          leaf dscp {
            type inet:dscp;
            description
            "The DSCP value that was placed in the header of
            TWAMP UDP test packets by the Session-Sender.";
          }
          uses maintenance-statistics;

          container two-way-delay{
            description
            "two way delay result of the test session";
            uses delay-statistics;



Mirsky, et al.          Expires December 15, 2017              [Page 25]


Internet-Draft           TWAMP Light data model                June 2017


          }
          container one-way-delay-far-end{
            description
            "one way delay far end of the test session";
            uses delay-statistics;
          }
          container one-way-delay-near-end{
            description
            "one way delay near end of the test session";
            uses delay-statistics;
          }
       }
     }
   }

    container twamp-light-session-refl-state {
      if-feature session-reflector-light;
      description
      "TWAMP-Light Session-Reflector container for
      state data";
      leaf reflector-light-admin-status {
        type boolean;
        mandatory "true";
        description
        "Whether this network element is enabled to
        act as TWAMP-Light Reflector";
      }

     list test-session-state {
       key "session-id";
       description
       "This structure is a container of test session
       managed objects";

       leaf session-id {
         type uint32;
         description "Session ID";
       }

       uses maintenance-statistics;
       uses session-light-parameters;
     }
   }
 }

 rpc twamp-sender-start {
   description
         "start the configured sender session";



Mirsky, et al.          Expires December 15, 2017              [Page 26]


Internet-Draft           TWAMP Light data model                June 2017


   input {
         leaf session-id {
           type uint32;
           mandatory true;
           description
                 "The session to be started";
         }
   }
 }

 rpc twamp-sender-stop {
   description
         "stop the configured sender session";
   input {
         leaf session-id {
           type uint32;
           mandatory true;
           description
                 "The session to be stopped";
         }
   }
 }
}

 <CODE ENDS>

4.  IANA Considerations

   This document registers a URI in the IETF XML registry [RFC3688].
   Following the format in [RFC3688], the following registration is
   requested to be made.

   URI: urn:ietf:params:xml:ns:yang:ietf-twamp-light

   Registrant Contact: The IPPM WG of the IETF.

   XML: N/A, the requested URI is an XML namespace.

   This document registers a YANG module in the YANG Module Names
   registry [RFC6020].

   name: ietf-twamp-light

   namespace: urn:ietf:params:xml:ns:yang:ietf-twamp-light

   prefix: twamp

   reference: RFC XXXX



Mirsky, et al.          Expires December 15, 2017              [Page 27]


Internet-Draft           TWAMP Light data model                June 2017


5.  Security Considerations

   The configuration, state, action data defined in this document may be
   accessed via the NETCONF protocol [RFC6241].  SSH [RFC6242] is
   mandatory secure transport that is the lowest NETCONF layer.  The
   NETCONF access control model [RFC6536] provides means to restrict
   access for particular NETCONF users to a pre-configured subset of all
   available NETCONF protocol operations and content.

   But, in general, this TWAMP Light YANG module does not change any
   underlying security issues that already may exist in
   [I-D.elteto-ippm-twamp-mib].

6.  References

6.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <http://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <http://www.rfc-editor.org/info/rfc3688>.

   [RFC5357]  Hedayat, K., Krzanowski, R., Morton, A., Yum, K., and J.
              Babiarz, "A Two-Way Active Measurement Protocol (TWAMP)",
              RFC 5357, DOI 10.17487/RFC5357, October 2008,
              <http://www.rfc-editor.org/info/rfc5357>.

   [RFC6020]  Bjorklund, M., Ed., "YANG - A Data Modeling Language for
              the Network Configuration Protocol (NETCONF)", RFC 6020,
              DOI 10.17487/RFC6020, October 2010,
              <http://www.rfc-editor.org/info/rfc6020>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <http://www.rfc-editor.org/info/rfc6241>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <http://www.rfc-editor.org/info/rfc6242>.







Mirsky, et al.          Expires December 15, 2017              [Page 28]


Internet-Draft           TWAMP Light data model                June 2017


   [RFC6536]  Bierman, A. and M. Bjorklund, "Network Configuration
              Protocol (NETCONF) Access Control Model", RFC 6536,
              DOI 10.17487/RFC6536, March 2012,
              <http://www.rfc-editor.org/info/rfc6536>.

   [RFC7750]  Hedin, J., Mirsky, G., and S. Baillargeon, "Differentiated
              Service Code Point and Explicit Congestion Notification
              Monitoring in the Two-Way Active Measurement Protocol
              (TWAMP)", RFC 7750, DOI 10.17487/RFC7750, February 2016,
              <http://www.rfc-editor.org/info/rfc7750>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <http://www.rfc-editor.org/info/rfc8174>.

6.2.  Informative References

   [I-D.elteto-ippm-twamp-mib]
              Elteto, T. and G. Mirsky, "Two-Way Active Measurement
              Protocol (TWAMP) Management Information Base (MIB)",
              draft-elteto-ippm-twamp-mib-01 (work in progress), January
              2014.

   [I-D.ietf-ippm-twamp-yang]
              Civil, R., Morton, A., Rahman, R., Jethanandani, M., and
              K. Pentikousis, "Two-Way Active Measurement Protocol
              (TWAMP) Data Model", draft-ietf-ippm-twamp-yang-03 (work
              in progress), February 2017.

Appendix A.  Acknowledgements

   TBD

Authors' Addresses

   Greg Mirsky
   ZTE Corp.

   Email: gregimirsky@gmail.com


   Xiao Min
   ZTE Corp.

   Email: xiao.min2@zte.com.cn






Mirsky, et al.          Expires December 15, 2017              [Page 29]


Internet-Draft           TWAMP Light data model                June 2017


   Adrian Pan
   Ericsson

   Email: adrian.pan@ericsson.com


   Wei S Luo
   Ericsson

   Email: wei.s.luo@ericsson.com









































Mirsky, et al.          Expires December 15, 2017              [Page 30]


Html markup produced by rfcmarkup 1.124, available from https://tools.ietf.org/tools/rfcmarkup/