<?xml version="1.0" encoding="UTF-8"?>
<!--  Edited by Dino Farinacci farinacci@gmail.com -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<rfc category="exp" ipr="trust200902" docName="draft-farinacci-lisp-telemetry-12">

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>

<front>
  <title>LISP Data-Plane Telemetry</title>
  <author initials='D' surname="Farinacci" fullname='Dino Farinacci'>
    <organization>lispers.net</organization>
    <address><postal>
      <street></street>
      <city>San Jose</city> <region>CA</region>
      <code></code>
      <country>USA</country>
    </postal>
    <email>farinacci@gmail.com</email></address>
  </author>

  <author initials='S' surname="Ouissal" fullname='Said Ouissal'>
    <organization>Zededa</organization>
    <address><postal>
      <street></street>
      <city>Santa Clara</city> <region>CA</region>
      <code></code>
      <country>USA</country>
    </postal>
    <email>said@zededa.com</email></address>
  </author>

  <author initials='E' surname="Nordmark" fullname='Erik Nordmark'>
    <organization>Zededa</organization>
    <address><postal>
      <street></street>
      <city>Santa Clara</city> <region>CA</region>
      <code></code>
      <country>USA</country>
    </postal>
    <email>erik@zededa.com</email></address>
  </author>

  <date></date>

  <abstract>
    <t>This draft specs a JSON formatted RLOC-record for telemetry data
    which decapsulating xTRs include in RLOC-probe Map Reply messages.</t>
  </abstract>
</front>

<middle>
  <section title="Introduction">
    <t>This document describes how the Locator/Identifier Separation
    Protocol (LISP) can obtain, measure, and distribute data-plane
    telemetry information. LISP is an encapsulation protocol built
    around the fundamental idea of separating the topological location
    of a network attachment point from the node's identity <xref
    target="RFC9300"/>. As a result LISP creates two
    namespaces: Endpoint Identifiers (EIDs), that are used to identify
    end-hosts and routable Routing Locators (RLOCs), used to identify
    network attachment points.  LISP then defines functions for
    mapping between the two namespaces and for encapsulating traffic
    originated by devices using non-routable EIDs for transport across
    a network infrastructure that routes and forwards using
    RLOCs.</t>

    <t>This document specifies how a decapsulating xTR returns telemetry data
    to an encapsulating xTR using RLOC-probe messages defined in
    <xref target="RFC9301"/>.</t>

    <t>Early versions of this document will define the type and format of the
    telemetry data and how it will be distributed. Later versions of this
    document will describe how telemetry measurement will be performed.</t>

    <t><vspace blankLines='30' /></t>
  </section>

  <section title="Definition of Terms">
    <t><list style="hanging">
      <t hangText="Encapsulating xTR">is a LISP ITR, RTR, or PITR
      data-plane network element <xref
      target="RFC9300"/>. An encapsulating xTR
      typically sends RLOC-probe Map-Request messages to decapsulating
      xTRs to test for reachability of RLOC addresses. For the design
      scope of this specification, RLOC-probes are also sent to obtain
      LISP telemetry data measured by a decapsulating xTR.</t>

      <t hangText="Decapsulating xTR">is a LISP ETR, RTR, or PETR
      data-plane network element <xref
      target="RFC9300"/>. A decapsulating xTR
      typically RLOC-probe replies with a Map-Reply message to an
      RLOC-probe Map-Request sent by an encapsulating xTR. When a
      decapsulating xTR does data-plane telemetry measurement, it
      returns measurement data in RLOC-probe Map-Reply messages to an
      encapsulating xTR.</t>
      
      <t hangText="Telemetry Record">a telemetry record is an
      RLOC-record that contains telemetry data specified in this
      document. The telemetry data is encoded as an LCAF JSON Type
      specified in <xref target="RFC8060"/>.</t>
    </list></t>

    <t><vspace blankLines='30' /></t>
  </section>

  <section title="Overview">
    <t>The following list of telemetry data has been identified as being
    useful to obtain:</t>
    <t><list style="symbols">
      <t>Packet Count - the number of packets received within a given
      time window between the encapsulating xTR and decapsulating
      xTR.</t>

      <t>Byte Count - the number bytes summed from all packets
      received within a given time window between the encapsulating
      xTR and decapsulating xTR.</t>

      <t>Packet Rate - the rate in packets per second an encapsulating xTR
      is sending encapsulated packets to a decapsulating xTR.</t>
      
      <t>Bit Rate - the bit rate per second an encapsulating xTR is
      sending encapsulated packets to a decapsulating xTR.</t>

      <t>Bandwidth - the amount of bandwidth used between encapsulating xTR and
      decapsulating xTR in bytes per second.</t>

      <t>Packet Loss - the number of packets lost within a given time window
      between the encapsulating xTR and decapsulating xTR.</t>

      <t>Packet Jitter - the amount of inter-packet time for a train
      of packets within a given time window between the encapsulating
      xTR and decapsulating xTR.</t>

      <t>Forward Hop-Count - the number underlay router hops from the
      encapsulating xTR to the decapsulating xTR.</t>

      <t>Forward One-Way Latency - the amount of time from the
      encapsulating xTR to the decapsulating xTR. Available when a
      universal clock and rough time synchronization is available.</t>

      <t>Reverse TTL - the TTL value a decapsulating xTR is using for the
      RLOC-probe Map-Reply. This is used to compute the return or Reverse
      Hop-Count or number of underlay router hops between the decapsulating
      xTR and encapsulating xTR.</t>
      
      <t>Reverse Timestamp - the universal clock timestamp when the
      decapsulating xTR sent the RLOC-probe Map-Reply message. This is
      used to compute the return or Reverse One-Way Latency between the
      decapsulating xTR to the encapsulating xTR.</t>
    </list></t>
  </section>

  <section title="Telemetry Record Encoding">
    <t>A Telemetry Record is an RLOC-record encoded in LCAF JSON Type format
    <xref target="RFC8060"/> within the EID-record inserted in a RLOC-probe
    Map-Reply message. The RLOC-record is appended to the existing RLOC-records
    for the EID being probed.</t>

    <t>An encapsulating xTR does not need to request telemetry data
    so the decapsulating xTR can provide it unilaterally by default or
    via configuration to enable the feature. When an encapsulating xTR
    receives a Telemetry Record in a RLOC-probe Map-Reply, it SHOULD NOT
    store it in the map-cache and not use the RLOC-record for forwarding (since
    there are no RLOCs in this record). The priority for this RLOC-record MUST
    be set to 255 and the weight MUST be set to 0.</t>

    <t>The JSON key values imply directionality. The directionality is
    from encapsulating xTR to decapsulating xTR. That is, the same
    direction of RLOC-probe Map-Requests and encapsulated packet
    flow. The JSON string format is defined to be:</t>

    <figure>
      <preamble></preamble>
      <artwork><![CDATA[
{ "type" :              "telemetry",
  "packet-count" :      "<pc>",
  "packet-loss" :       "<pl>",
  "byte-count" :        "<bc>",
  "packet-rate" :       "<pr>",
  "bit-rate" :          "<br>", 
  "bandwidth" :         "<b>",
  "packet-jitter" :     "<pj>",
  "forward-latency" :   "<fl>",
  "forward-hop-count" : "<hc>",
  "reverse-ttl" :       "<ttl>",
  "reverse-timestamp" : "<ts>"
}
      ]]></artwork>
      <postamble />
    </figure>

    <t><vspace blankLines='30' /></t>
    <t>JSON data values:</t>
      <texttable>
        <ttcol align='left'>JSON Value</ttcol>
        <ttcol align='left'>Encoding Description</ttcol>
        <c>&lt;pc&gt;</c>
        <c>Number of packets encoded as an integer value within a string.</c>

        <c>&lt;pl&gt;</c>
        <c>Number of lost packets encoded as an integer value within a
        string.</c>

        <c>&lt;bc&gt;</c>
        <c>Number of bytes encoded as an integer value within a
        string.</c>

        <c>&lt;pr&gt;</c>
        <c>Packet rate in packets per second encoded as an integer
        value within a string.</c>

        <c>&lt;br&gt;</c>
        <c>Bit rate in kilobits per second encoded as an integer value
        within a string.</c>

        <c>&lt;b&gt;</c>
        <c>Bandwidth in kilobytes encoded as an integer value within a
        string.</c>

        <c>&lt;pj&gt;</c>
        <c>Packet jitter in milliseconds encoded as an integer value
        within a string.</c>

        <c>&lt;fl&gt;</c>
        <c>Latency in milliseconds encoded as an integer value within
        a string.</c>

        <c>&lt;hc&gt;</c>
        <c>Hop count encoded as an integer value within a string.</c>

        <c>&lt;ttl&gt;</c ><c>Map-Reply IP header TTL encoded as an
        integer value within a string.</c>

        <c>&lt;ts&gt;</c>
        <c>Timestamp encoded in Linux UTC format
        as an within a string (i.e. Tue Jun 26 16:27:25 UTC 2018).</c>
      </texttable>
  </section>

  <section title="Security Considerations">
    <t>RLOC-probe Map-Reply messages are signed to protect and
    authenticate the Telemetry Record according to details in <xref
    target="RFC9303"/>. Telemetry Records can be kept
    confidential by encrypting RLOC-probe Map-Reply message with the
    asymmetric keys described in <xref
    target="I-D.ietf-lisp-ecdsa-auth"/> or the symmetric keys
    computed by the key exchange detailed in <xref
    target="RFC8061"/>.</t>
  </section>

  <section title="IANA Considerations">
    <t>At this time there are no specific requests for IANA.</t>
  </section>
</middle>

<back>
  <references title='Normative References'>
    <?rfc include="reference.RFC.8060'?>
    <?rfc include="reference.RFC.8061'?>
    <?rfc include="reference.RFC.9300'?>
    <?rfc include="reference.RFC.9301'?>
    <?rfc include="reference.RFC.9303'?>
  </references>

  <references title='Informative References'>
    <?rfc include='http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-lisp-ecdsa-auth.xml'?>
  </references>
  
  <section title="Acknowledgments">
    <t>The authors would like to thank the LISP WG for their review
    and acceptance of this draft. A special thanks to Colin Cantrell
    for his review, commentary and guidance.</t>
  </section>

  <section title="Document Change Log">
    <t>[RFC Editor: Please delete this section on publication as RFC.]</t>

    <section title="Changes to draft-farinacci-lisp-telemetry-12">
      <t><list style="symbols">
        <t>Posted April 2024.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-11">
      <t><list style="symbols">
        <t>Posted October 2023.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-10">
      <t><list style="symbols">
        <t>Posted May 2023.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-09">
      <t><list style="symbols">
        <t>Posted November 2022.</t>
        <t>Included new references to standards track RFCs.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-08">
      <t><list style="symbols">
        <t>Posted May 2022.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-07">
      <t><list style="symbols">
        <t>Posted November 2021.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-06">
      <t><list style="symbols">
        <t>Posted May 2021.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-05">
      <t><list style="symbols">
        <t>Posted November 2020.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-04">
      <t><list style="symbols">
        <t>Posted June 2020.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-03">
      <t><list style="symbols">
        <t>Posted December 2019.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-02">
      <t><list style="symbols">
        <t>Posted June 2019.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-01">
      <t><list style="symbols">
        <t>Posted December 2018.</t>
        <t>Document timer and reference update.</t>
      </list></t>
    </section>

    <section title="Changes to draft-farinacci-lisp-telemetry-00">
      <t><list style="symbols">
        <t>Initial draft posted June 2018.</t>
      </list></t>
    </section>

  </section>

</back>
</rfc>
