<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC5357 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5357.xml">
<!ENTITY RFC4656 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4656.xml">
<!ENTITY RFC6038 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6038.xml">
<!ENTITY RFC5938 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5938.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc5357.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-spv-ippm-monitor-methodology-services-kpi-01">

  <front>
    <title abbrev="Service KPIs using TWAMP methodology">Monitoring Service KPIs using TWAMP - Methodology</title>

    <author fullname="Srivathsa Sarangapani" initials="Srivathsa" surname="Sarangapani">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>89, Asthagrama Layout 2nd Stage, Basavehwaranagar</street>
          <city>Bangalore</city>
          <region></region>
          <code>560079</code>
          <country>INDIA</country>
        </postal>
        <phone>+91 9845052354</phone>
        <email>srivathsas@juniper.net</email>
      </address>
    </author>

    <author fullname="Peyush Gupta" initials="Peyush" surname="Gupta">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street>Flat #206, Keerti Royal Apartment, Outer Ring Road</street>
          <city>Bangalore</city>
          <region>Karnataka</region>
          <code>560043</code>
          <country>INDIA</country>
        </postal>
        <phone>+91 9449251927</phone>
        <email>peyushg@juniper.net</email>
      </address>
    </author>

    <author fullname="Vinayak Hegde" initials="V." surname="Hegde">
      <organization>Consultant</organization>
      <address>
        <postal>
          <street>Brahma Sun City, Wadgaon-Sheri</street>
          <city>Pune</city>
          <region>Maharashtra</region>
          <code>411014</code>
          <country>INDIA</country>
        </postal>
        <phone>+91 944984401</phone>
        <email>vinayakh@gmail.com</email>
      </address>
    </author>

    <date year="2016" />

    <area>General</area>

    <workgroup>IP Performance Metrics Group</workgroup>

    <keyword>template</keyword>

    <abstract>
     <t>We are introducing a new method to calculate services KPIs and metrics in the network using TWAMP protocol. Services here ranging from Layer 4 to Layer 7 services. Some of the examples are Http based services, Traffic load balancer, DPI, Video caching, real time streaming and IPSec. The KPIs MAY be service latency, liveliness of an application, number of flows and sessions per service, load balancer statistics.</t>
     
     <t>This draft outlines the methodology to calculate these parameters in the service plane in the real network using TWAMP protocol. Some of the existing fields extended to support new modes in the TWAMP protocol for calculating these KPIs. set of new messages are added in the control protocol between TWAMP client (session sender) and the TWAMP server (session reflector).</t>
     
     <t>There is a separate draft "draft-spv-ippm-monitor-implementation-services-kpi" that talks about implementation of monitoring these KPIs in the network using TWAMP. Monitoring of these KPIs in the service plane with in a network play a vital role in optimum usage of network resources and improving the overall performance and capacity.</t>
    </abstract>

    </front>
  <middle>
    <section title="Introduction">
      <t> The TWAMP-Test runs between a Session-Sender and a Session-Reflector <xref target="RFC5357">RFC&nbsp;5357</xref>. The existing TWAMP-Test packet format has existing padding octets that are currently not used (either set to zero or pseudo-random values). These octets can be used to carry additional information between the Session-Sender and the Session-Reflector. The proposed extension uses these padding octets and provide a method to monitor services KPIs in the network. This feature is termed as Services KPI Monitoring using TWAMP.</t>

      <t> The services here refers to Layer 4 to Layer 7 services like DPI, SFW, CGNAT, TDF and so on. Additionally these services can refer to applications like DNS, HTTP, FTP and so on. The KPIs MAY include service latency, service load monitoring in terms of number of flows, number of sessions, number of subscribers, number of octets, liveliness of a service.</t>

      <t>For instance, Services KPI Monitoring using TWAMP MAY be used to measure service latency of DPI, number of CGNAT flows, number of TDF subscribers and so on. Similarly this MAY be used to monitor the liveliness of the DNS Server, HTTP Server and so on.</t> 
   
      <t>As per the proposed extension, both the TWAMP-Control and the TWAMP-Test packet formats are modified. One TWAMP-Test session SHALL be used to monitor KPIs for a specific service. But there can be multiple KPIs monitored using a single test session for a specific service. A single TWAMP-Control connection MAY establish multiple TWAMP-Test sessions that measure KPIs for multiple services in the network.</t>

      <t>This extension can be used to monitor KPIs for standalone service or a set of services.</t>
       <section title="Conventions used in this document">
          <section title="Requirements Language">
            <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">RFC 2119</xref>.</t>
          </section>
       </section>

       <section title="Terminology">
          <t>TWAMP: Two-Way Active Measurement Protocol</t>
          <t>OWAMP: One-Way Active Measurement Protocol</t>
          <t>KPI: Key Performance Indicator</t>
          <t>DPI: Deep Packet Inspection</t>
          <t>CGNAT: Carrier Grade Network Address Translation</t>
          <t>SFW: Stateful Firewall</t>
          <t>TDF: Traffic Detection Function</t>
          <t>DNS: Domain Name Server</t>
          <t>HTTP: Hyper Text Transfer Protocol</t>
          <t>FTP: File Transfer Protocol</t>
          <t>SKMC: Services KPI Monitoring Command</t>
          <t>SID: Session ID</t>
          <t>PDU: Protocol Data Unit</t>
          <t>MBZ: Must Be Zero</t>
          <t>HMAC: Hash Message Authentication Code</t>
          <t>IPVN: IP Version Number</t>
       </section>
    </section>

    <section title="Purpose and Scope">
      <t>The purpose of this extension is to provide a method to describe an additional optional feature for TWAMP <xref target="RFC5357">RFC&nbsp;5357</xref>.</t>

      <t>The scope of the extension is limited to specifications of the following features:</t>

      <t><list style="numbers">
          <t>Extension of the modes of operation through assignment of a new value in the Modes field to communicate feature capability.</t>
          
          <t>Addition of new command types to identify, negotiate and monitor the supported services and supported KPIs for each service between Control-Client and TWAMP Server.</t>

          <t>Use of existing padding octets of TWAMP-Test session to carry the services KPI data that is being monitored as part of the TWAMP-Test session.</t>

          </list>The purpose for this feature is to enhance TWAMP protocol to monitor and calculate service-related KPIs in real-time that helps in network performance analysis and optimization.</t>
          <t>The actual method to calculate the KPIs is discussed in a separate draft on implementation</t> 
    </section>

    <section title="Logical Model">
       <t>The set of messages that are exchanged between the Control-Client and TWAMP Server to negotiate and monitor the services KPI is referred to as Service Block (Fig 1.) Service Block MAY be a part of the same network element or can be a different entity.</t>

       <t>Services KPI-Monitor-REQ is sent from Control-Client to TWAMP Server to get the list of supported services and the KPIs that can be monitored for each service. Once TWAMP Server receives this request, Services KPI-Monitor-RSP is sent with the number of services that can be monitored on this Control-Client connection.</t>
   
       <t>This message is followed by Services KPI-Monitor-IND message from the Session-Reflector which contain a service ID to identify the service and the list of KPIs that are supported for this service.The client replies with the Services KPI-Monitor-ACK message that include the list of KPIs the client is interested in monitoring.These two sets of messages will be repeated for each of the services that Server can monitor.</t>

       <t>Then the client will initiate Request-TW-Session Message that contain the service ID for a specific service. Once Server replies with the Accept-Session Message, the client SHALL start sending test packets that MAY contain Service PDU.</t>

       <figure align="left" anchor="Service_block">
       <artwork align="center"><![CDATA[
+--------+                          +--------+
| Client |                          | Server |
+--------+                          +--------+
    |                                   |
    |<------TCP Connection------------->|
    |                                   |
    |<------Greeting Message------------|
    |                                   |
    |-------Set-Up-Response------------>|
    |                                   |
    |<------Server-Start----------------|
    |                                   |
    |-------Services KPI-Monitor-REQ--->|
    |<------Services KPI-Monitor-RSP----|
    |                                   |
    |<-----Services KPI-Monitor-IND-----|
    |------Services KPI-Monitor-ACK---->|
    |              .                    |
    |              .                    |
    |              .                    |
    |<-----Services KPI-Monitor-IND-----|
    |------Services KPI-Monitor-ACK---->|
    |                                   |
    |------Request-TW-Session---------->|
    |<-----Accept Session---------------|
    |              .                    |
    |              .                    |
    |------Request-TW-Session---------->|
    |<-----Accept Session---------------| 
            ]]></artwork>
      </figure>
    </section>
    <section title="TWAMP Extensions">
      <t> The TWAMP connection establishment follows the procedure defined in Section 3.1 of <xref target="RFC4656">OWAMP&nbsp;</xref> and Section 3.1 of <xref target="RFC5357">TWAMP&nbsp;</xref> where the Modes field is used to identify and select specific communication capabilities.  At the same time the Modes field been recognized and used as an extension mechanism of <xref target="RFC6038">TWAMP Reflect Octets and Symmetrical Size Features&nbsp;</xref>. The new feature requires a new bit position to identify the ability of a Session-Reflector to monitor Services KPIs. There are changes in both the Control-Client and TWAMP-Test packet formats to support this functionality.</t> 
       <section title="TWAMP-Control Extensions">
          <t>The TWAMP-Control is a derivative of the OWAMP-Control, and provides two-way measurement capability. <xref target="RFC5357">TWAMP;</xref> uses the Modes field to identify and select specific communication capabilities, and this field is a recognized extension mechanism. The following Sections describe one such extension.</t>
          <section title="Connection Setup with Services KPIs Monitoring">
            <t>TWAMP-Control connection establishment follows the procedure defined in Section 3.1 of <xref target="RFC4656">OWAMP;</xref>. The Services KPIs Monitoring using TWAMP mode requires one new bit position (and value) to identify the ability of the Server or the Session-Reflector to monitor the Services KPIs of the sessions. This new extension requires an additional TWAMP mode bit assignment as explained in Section 5.1.</t>
            <t>A Control-Client MAY request for Services KPIs monitoring for some of its sessions. To do so, it needs to know which services can be monitored and the corresponding KPIs (of those services)that can be monitored.</t>

            <t>Services KPI Monitoring Command (SKMC) consist of a set of messages which SHALL be used for monitoring the KPIs of a service. This new command requires an additional TWAMP Command Number as explained in <xref target="IANA" />.</t>
          </section>
          <section title="Services KPI-Monitor-REQ Command" anchor="SKMREQ">
             <t>A Control-Client MAY send Services KPI-Monitor-REQ command to the Server to obtain the list of services and their KPIs that can be monitored by the Session-Reflector.</t>

             <t>The format of the Services KPI-Monitor-REQ Command is as follows:</t>

             <figure align="left" anchor="skmreq_cmd" title="Services KPI-Monitor-REQ Command">
               <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command Number|       REQ     |       MBZ (2 octets)          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                       HMAC (16 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                 ]]></artwork>
            </figure>

            <t>Since this is a new command, a Command Number value should be allocated by the IANA in the registry as mentioned in <xref target="IANA" />. The command number indicates that this is one of the Services KPI Monitoring Command.  The Control-Client MUST compose this command, and the Server MUST interpret this command, according to the field descriptions below.</t>

            <t>The sub-type field MUST be REQ for this message. This message indicates that the Client is requesting Server to send the list of Services and the corrosponding KPIs that can be monitored.</t>
            <t>The message is terminated with a single block HMAC, as illustrated above.</t>

            <t>The Server MUST respond with Services KPI-Monitor-RSP Command <xref target="SKMRSP" />.</t>
          </section>

          <section title="Services KPI-Monitor-RSP Command" anchor="SKMRSP">
             <t>The Server responds to the Services KPI-Monitor-REQ Command by sending a Services KPI-Monitor-RSP Command. The format of the Services KPI-Monitor-RSP Command is as follows:</t>

             <figure align="left" anchor="skmrsp_cmd" title="Services KPI-Monitor-RSP Command">
                <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Command Number |      RSP      |       MBZ (2 octets)          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Number of services                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                       HMAC (16 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                ]]></artwork>
             </figure>

             <t>The Command Number value here is same as mentioned in <xref target="IANA" />. The Server MUST compose this command, and the Control-Client MUST interpret this command, according to the field descriptions below.</t>
   
             <t>The sub-type field MUST be RSP for this command. The field "Number of Services" indicates the number of Services for which the Session-Reflector can monitor the KPI.</t>
 
            <t>The message is terminated with a single block HMAC, as illustrated above.</t>
          </section>

          <section title="Services KPI-Monitor-IND Command" anchor="SKMIND">
            <t> The Server MUST send the Services KPI-Monitor-IND Command after sending Services KPI Monitor-RSP message. This message includes the list of KPIs that can be monitored for a service.</t>

             <figure align="left" anchor="skmind_cmd" title="Services KPI-Monitor-IND Command">
               <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command Number|       IND     |         Service ID            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         Service Description (12 octets)                       |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         Supported Services KPIs Bitmask (2 octets)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         HMAC (16 octets)                                      |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
               ]]></artwork>
             </figure>

             <t>The Command Number value here is same as mentioned in <xref target="IANA" />. The Server MUST compose this command, and the Control-Client MUST interpret this command, according to the field descriptions below.</t>

             <t>The sub-type field MUST be IND for this Command. This field indicates that the Server is responding to the Control-Client with the details of the KPIs of a service that can be monitored by Session-Reflector.</t>

             <t>Service ID is an identifier which would be set by the Server to identify a Service. This ID MUST be used in the TWAMP-Control and TWAMP-Test messages to identify a particular Service. The range of Service ID MUST be 1 to 65535; The value 0 is Reserved.</t>


             <t>Service Description MAY be set of alphanumeric characters that would provide a brief description of a particular Service. Example: "DPI"  "CGNAT" "DNS-Server" "HTTP-Server".</t>

             <t>Supported Services KPIs Bitmask is a bitmask that would indicate the kind of KPI Monitoring using TWAMP is supported by the Session-Reflector for a particular Service.</t>

             <t>The message is terminated with a single block HMAC, as illustrated above.</t>

             <t>For each Services KPIs monitoring supported, the Server MUST send one Services KPI-Monitor-IND Command to the Control-Client.</t>
          </section>

          <section title="Services KPI-Monitor-ACK Command" anchor="SKMACK">
             <t>The Control-client MUST respond back with a Services KPI-Monitor-ACK Command for each Services KPI-Monitor-IND Command.</t>

             <figure align="left" anchor="skmack_cmd" title="Services KPI-Monitor-ACK Command">
                <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command Number|       ACK       |         Service ID          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         Service Description (12 octets)                       |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         Requested Services KPIs Bitmask (2 octets)            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|         HMAC (16 octets)                                      |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                ]]></artwork>
             </figure>

             <t>The Command Number is same as mentioned in <xref target="IANA" />. The Server MUST frame this command, and the Control-Client MUST interpret this command, according to the field descriptions below.</t>
             <t>The sub-type field MUST be ACK for this message. This field indicates that the Control-client is acknowledging the Server with details of which KPIs of a particular service it is interested in.</t>

             <t>Service ID and Service Description MUST be same as that received in the Services KPI-Monitor-IND Command. These two fields together identify a particular Service.</t>

             <t>Requested Services KPIs Bitmask MUST be set by the Control-Client and that indicates the KPIs of the services that the Control-Client is interested in monitoring. The KPIs can be a subset or the full set of KPIs sent in the corresponding Service KPI-Monitor-IND Command.</t>
   
             <t>The Command is terminated with a single block HMAC, as illustrated above.</t>
<t>For each Services KPI-Monitor-IND Command received at the control-client, it acknowledges by sending a Services KPI-Monitor-ACK Command.</t>
          </section>

          <section title="Request-TW-Session Command Format" anchor="RTWSCF">
             <figure align="left" anchor="req_tw_sess_cmd" title="Request-TW-Session Command">
                     <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      5        |  MBZ  | IPVN  |  Conf-Sender  | Conf-Receiver |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                  Number of Schedule Slots                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Number of Packets                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Sender Port          |         Receiver Port         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sender Address                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|           Sender Address (cont.) or MBZ (12 octets)           |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Receiver Address                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|           Receiver Address (cont.) or MBZ (12 octets)         |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        SID (16 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Padding Length                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           Start Time                          |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Timeout, (8 octets)                     |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Type-P Descriptor                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Octets to be reflected    |  Length of padding to reflect |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Service ID           |        MBZ (2 octets)         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                       HMAC (16 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                  ]]></artwork>
             </figure>
             <t>This new feature requires 2 octets to indicate the Service ID as a part of Request-TW-Session Command. See <xref target="IANA" /> for details on the octet position. If Services KPIs Monitoring using TWAMP feature is not requested as a part of this TWAMP-Test Session, then the Service ID MUST be 0.</t>

             <t>If Service ID has a non-zero value, then the Padding Length field MAY not have any significance. The test packets between Session-Sender and Session-Reflector MAY be of different size based on the implementation.</t>

             <t>The actual test packets MAY contain valid data which SHOULD be interpreted by Session-Sender or Session-Reflector to monitor Services KPIs.  Please refer TWAMP-Test Extension <xref target="TTE" /> for more details.</t>
          </section>
       </section>

       <section title="TWAMP-Test Extension" anchor="TTE">
          <t>As part of this extension, the existing Packet Padding octets in the Test Packet MAY be used for the monitoring of the Services KPIs as explained in KPI Implemnetation Draft. The Packet Padding octets which were either zero or filled with pseudo-random values MAY now have some valid data like timestamps, statistics, service PDUs and so on.</t>

          <t>The Session-Sender Test Session data packet formats are provided below.</t>
          <figure align="left" anchor="ssudf_cmd" title="Unauthenticated
                  Mode Session-Sender Data Packet Format">
              <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Error Estimate         |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
|                         MBZ (6 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                         Packet Padding                        .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                ]]></artwork>
          </figure>
          <t>As a part of the extension, 6 octets of MBZ are added after the Error Estimate field.</t>

          <figure align="left" anchor="ssaedf_cmd" title="Authenticated and
                  Encrypted Mode Session-Reflector Data Packet Format">
              <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                        MBZ (12 octets)                        |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Error Estimate         |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
|                         MBZ (6 octets)                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                       HMAC (16 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                        Packet Padding                         .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              ]]></artwork>
          </figure>
          <t>The Session-Reflector Test Session data packet formats are provided below.</t>

          <figure align="left" anchor="srudf_cmd" title="Unauthenticated Mode
                  Session-Reflector Data Packet Format">
              <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Error Estimate        |           MBZ                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Receive Timestamp                    |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sender Sequence Number                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Sender Timestamp                     |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Sender Error Estimate    |           MBZ                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sender TTL   |                 MBZ                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|  Monitored Services KPIs Bitmask (2 octets)                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                                                               .
.                   Packet Padding                              .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
              ]]></artwork>
          </figure>
          <t>As a part of this extension, The 3 octets of MBZ are added after the Error Estimate field to align the next set of fields.</t>
  
          <t>Monitored Services KPIs Bitmask indicates the services KPIs that are present in this message. The KPIs would be present in the Packet Padding area in the same order as indicated by Bitmask starting from bit 0 Position.</t>
 
          <figure align="left" anchor="sraedf_cmd" title="Authenticated and
                  Encrypted Mode Session-Reflector Data Packet Format">
            <artwork align="center"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        MBZ (12 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          Timestamp                            |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Error Estimate        |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                        MBZ (6 octets)                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Receive Timestamp                      |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        MBZ (8 octets)                         |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Sender Sequence Number                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        MBZ (12 octets)                        |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Sender Timestamp                         |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      Sender Error Estimate    |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                        MBZ (6 octets)                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sender TTL   |                                               |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
|                                                               |
|                        MBZ (15 octets)                        |
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                        HMAC (16 octets)                       |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|    Monitored Services KPIs Bitmask (2 octets)                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
.                   Packet Padding                              .
.                                                               .
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                 ]]></artwork>
          </figure>
          <t>As a part of this extension, Monitored Services KPIs Bitmask indicates the services KPIs that are present in this message. The KPIs would be present in the Packet Padding area in the same order as indicated by Bitmask starting from bit 0 Position. The set of KPIs defined for a service are listed in KPI Implementation draft</t>
       </section>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>We would like to thank Perceival A Monteiro for their comments, suggestions, reviews, helpful discussion, and proof-reading</t>
    </section>

    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="IANA" title="IANA Considerations">
      <t>The TWAMP-Modes registry defined in <xref target="RFC6038"></xref>. IANA is requested to reserve a new bit in Modes registry for Services KPIs Monitoring Capability as follows:</t>
      <texttable anchor="SKMCap" title="Services KPIs Monitoring Capability">
        <ttcol align="left">Value</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Semantics</ttcol>
        <ttcol align="left">Reference</ttcol>

        <c>X (proposed 256)</c>
        <c>Services KPIs Monitoring Capability</c>
        <c>bit position Y(proposed 8)</c>
        <c>This document</c>
      </texttable>

      <t>TWAMP-Control Command Number Registry defined in <xref target="RFC5938"></xref>.IANA is requested to reserve a Command Number for Services KPIs Monitoring Capability as follows:</t>
      <texttable anchor="SKMCom" title="New Service Latency Monitoring Command">
        <ttcol align="left">Value</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Semantics</ttcol>
        <ttcol align="left">Reference</ttcol>

        <c>SKMC (proposed 11)</c>
        <c>Services KPIs Monitoring Command</c>
        <c> </c>
        <c>This document</c>
      </texttable>

      <t>TWAMP Services KPIs sub-type Registry</t>
      <t>IANA is requested to reserve and maintain the sub-types as a part of Services KPIs Monitoring Command as follows:</t>

      <texttable anchor="SKsub-reg" title="TWAMP Services KPIs sub-type Registry">
        <ttcol align="left">Value</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Explanation</ttcol>

        <c>0</c>     
        <c>Reserved</c> 
        <c></c>     
        <c>1</c>     
        <c>REQ</c>    
        <c><xref target="SKMREQ" /></c>     
        <c>2</c>   
        <c>RESP</c>   
        <c><xref target="SKMRSP" /></c>     
        <c>3</c>   
        <c>IND</c>    
        <c><xref target="SKMIND" /></c>     
        <c>4</c>   
        <c>ACK</c>    
        <c><xref target="SKMACK" /></c>     
      </texttable>

      <t>TWAMP Services KPIs Registry</t>
      <t>IANA is requested to reserve and maintain the below Services KPIs:</t> 

      <texttable anchor="SKreg" title="TWAMP Services KPIs Registry">
        <ttcol align="left">Value</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Explanation</ttcol>

        <c>0</c>
        <c>None</c>
        <c></c>
        <c>1</c>
        <c>Keepalive</c>
        <c>Whether the respective service is running or not</c>
        <c>2</c>
        <c>Service Latency</c>
        <c>Service Latency which SHALL include the transit time and actual service time</c>
        <c>4</c>
        <c>Serviced Packets Count</c>
        <c>Number of ingress and egress packets for the respective service</c>
        <c>8</c>
        <c>Serviced Bytes Count</c>
        <c>Number of ingress and egress bytes for the respective service.</c>
        <c>16</c>
        <c>Serviced Subscriber Count</c>
        <c>Number of subscribers currently active for the respective service.</c>
      </texttable>

      <t>Request-TW-Session message defined in <xref target="RFC6038"></xref>.IANA is requested to reserve 2 octets for Service ID as follows:</t>
      <texttable anchor="NSKMCap" title="New Services KPIs Monitoring Capability">
        <ttcol align="left">Value</ttcol>
        <ttcol align="left">Description</ttcol>
        <ttcol align="left">Semantics</ttcol>
        <ttcol align="left">Reference</ttcol>

        <c>X </c>
        <c>Service ID</c>
        <c>2 Octets starting from offset 92th Octet</c>
        <c>This document</c>
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
            <t>The TWAMP protocol (RFC 5357) supports anthenticated and encrypted mode for TWAMP session and data. The new extension proposed in this draft supports the authenticated and encrypted mode and is therefore provides a secure mechanism to monitor services KPIs</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;
      &RFC5357;
      &RFC4656;
      &RFC6038;
      &RFC5938;
    </references>
  </back>
</rfc>
