<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF" docName="draft-gandhi-ippm-simple-direct-loss-06" category="std" consensus="yes" ipr="trust200902" obsoletes="" updates="" xml:lang="en" sortRefs="false" symRefs="true" tocInclude="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.1 -->
  <!-- Generated by id2xml 1.5.0 on 2020-02-06T01:41:26Z -->
    <front>
    <title abbrev="Simple Direct Loss Measurement Procedure">Simple Two-Way Direct Loss Measurement Procedure</title>
    <seriesInfo name="Internet-Draft" value="draft-gandhi-ippm-simple-direct-loss-06"/>
    <author fullname="Rakesh Gandhi" initials="R." role="editor" surname="Gandhi">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Canada</street>
        </postal>
        <email>rgandhi@cisco.com</email>
      </address>
    </author>
    <author fullname="Clarence Filsfils" initials="C." surname="Filsfils">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <email>cfilsfil@cisco.com</email>
      </address>
    </author>
    <author fullname="Daniel Voyer" initials="D." surname="Voyer">
      <organization>Bell Canada</organization>
      <address>
        <email>daniel.voyer@bell.ca</email>
      </address>
    </author>
    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>
      <address>
        <email>mach.chen@huawei.com</email>
      </address>
    </author>
    <author fullname="Bart Janssens" initials="B." surname="Janssens">
      <organization>Colt</organization>
      <address>
        <email>Bart.Janssens@colt.net</email>
      </address>
    </author>
    <date day="11" month="August" year="2023"/>
    <workgroup>IPPM Working Group</workgroup>
    <abstract>
      <t>
   This document defines Simple Two-Way Direct Loss Measurement (DLM) procedure
   that can be used for Alternate-Marking Method for detecting accurate data packet loss in a network.
   Specifically, DLM probe packets are defined for both unauthenticated
   and authenticated modes and they are efficient for hardware-based implementation.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>Many Service Provider Service Level Agreements (SLAs) depend on the 
   ability to measure performance loss metric experienced by the Customer data traffic flow. 
   Accurate Customer data packet loss can be measured by using a Direct Loss Measurement (DLM) procedure.
   Currently there is no efficient active measurement procedure 
   available for accurate data packet loss detection in IP networks.
   Note that an approach for conducting packet loss measurement in an IP
   network is documented in <xref target="RFC7680" format="default"/>.
   This approach requires clock synchronization
   between the measurement points and lacks support for
   accurate data packet loss measurement.</t>
      <t><xref target="ITU-Y1731" format="default"/> defines procedures for performance 
   loss monitoring for Ethernet-based networks.
   Specifically, the Loss Measurement Message (LMM) defined in Section 9.12 of 
   <xref target="ITU-Y1731" format="default"/> can be used for accurate frame loss measurement as 
   described in Appendix II of that document. The procedure is specific 
   to the Ethernet-based networks and does not apply to the IP networks. </t>
      <t>The Simple Two-Way Active Measurement Protocol (STAMP) provides
   capabilities for the measurement of various performance
   metrics in IP networks <xref target="RFC8762" format="default"/> 
   without the use of a control channel to pre-signal session parameters.
   The STAMP can be used for (synthetic or inferred) packet 
   loss measurement based on the Sequence Number in the 
   test packets, however, this method can only provide approximate packet loss metrics.</t>
      <t><xref target="RFC8972" format="default"/> defines optional extensions for STAMP.
   The STAMP test packet with the "Direct Measurement" TLV (Type 5) <xref target="RFC8972" format="default"/> 
   can be used for combined timestamps and data packet counters collection.
   This method, however, has the following limitations when used for detecting data packet loss:</t>
      <ul spacing="normal">
        <li>
    For hardware-based implementation (e.g., in an ASIC), 
    the optional "Direct Measurement" TLV adds unnecessary processing overhead 
    on the Session-Reflector as not all STAMP Session-Sender test
    packets carry the "Direct Measurement" TLV and also there can be multiple TLV Types present.
    This also means that the location of the transmit counter is not at the fixed location in the STAMP test packets.
	</li>
        <li>
    The STAMP "Direct Measurement" TLV does not support 64-bit counters, counters for bytes, counters per traffic class.
	</li>
        <li>
    The STAMP "Direct Measurement" TLV also does 
    not identify the Block Number of the Direct Measurement, which is  
    required for Alternate-Marking Method (AMM) <xref target="RFC9341" format="default"/> for data packet loss measurement.
    </li>
      </ul>
      <t>This document defines Simple Two-Way Direct Loss Measurement (DLM) procedure
   that can be used for Alternate-Marking Method <xref target="RFC9341" format="default"/> 
   for detecting accurate data packet loss in a network.
   Specifically, DLM probe packets are defined for both unauthenticated
   and authenticated modes and they are efficient for hardware-based implementation (e.g., in an ASIC).
      </t>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>Conventions Used in This Document</name>
      <section anchor="sect-2.1" numbered="true" toc="default">
        <name>Requirements Language</name>
   <t>
   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  <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/>
   when, and only when, they appear in all capitals, as shown here.
   </t>
      </section>
      <section anchor="sect-2.2" numbered="true" toc="default">
        <name>Abbreviations</name>
        <t>
   AMM: Alternate-Marking Method.</t>
        <t>
   DLM: Direct Loss Measurement.</t>
        <t>
   HMAC: Hashed Message Authentication Code.</t>
        <t>
   MBZ: Must be Zero.</t>
        <t>
   PM: Performance Measurement.</t>
        <t>
   SHA: Secure Hash Algorithm.</t>
        <t>
   SSID: Sender Session Identifier.</t>
        <t>
   STAMP: Simple Two-Way Active Measurement Protocol.</t>
        <t>
   TTL: Time To Live.</t>
      </section>
      <section anchor="sect-2.3" numbered="true" toc="default">
        <name>Reference Topology</name>
        <t>
   As shown in the Reference Topology, the Session-Sender S1 
   initiates a Direct Loss Measurement (DLM) probe packet over IP/UDP transport.
   The Session-Reflector R1
   receives the Session-Sender's DLM probe packet and acts according to the
   local configuration. The Session-Reflector R1 transmits 
   a DLM reply probe packet to the Session-Sender S1.
   The C1 is a transmit counter and C4 is a receive counter added by node S1. 
   The C2 is a receive counter and C3 is a transmit counter added by node R1. 
    </t>

        <artwork name="" type="" align="left" alt=""><![CDATA[
                     C1                    C2
                    /                       \
           +-------+     DLM Probe Packet    +-------+
           |       | - - - - - - - - - - - ->|       |
           |   S1  |=========================|   R1  |
           |       |<- - - - - - - - - - - - |       |
           +-------+  DLM Reply Probe Packet +-------+
                    \                       /
                     C4                    C3

         Session-Sender                  Session-Reflector

                      Reference Topology
]]></artwork>
      </section>
    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>Overview</name>
      <t>
    For accurate data packet loss detection,
    the DLM probe packets are transmitted by the Session-Sender over UDP transport, and are used
    to collect the transmit and receive counters for the data traffic flow under measurement.
    The DLM reply probe packets are transmitted by the Session-Reflector
    to collect the transmit and receive counters for the data traffic 
    flow under measurement in the reverse direction.</t>
      <t>The DLM probe packets carry user-configured destination UDP port. 
    The destination UDP port 862 is not used for the DLM probe packets. 
    The user-configured destination UDP port follows the guidelines 
    described in Section 4.1 of <xref target="RFC8762" format="default"/>. 
    Different destination UDP port is used for
    DLM probe packets than the STAMP test packets defined in <xref target="RFC8762" format="default"/>.
    Hence, the Session-Sender and the Session-Reflector do not require backwards
    compatibility and support for STAMP.</t>
      <t>A DLM session is identified by the 4-tuple (source and destination
    IP addresses, source and destination UDP port numbers).  A DLM
    Session-Sender MAY generate a locally unique Sender Session Identifier
    (SSID).  The SSID is a two-octet, non-zero unsigned integer.  The
    SSID generation policy is implementation specific.  An
    implementation MUST NOT assign the same identifier to different DLM
    sessions.  A Session-Sender uses the SSID to identify a DLM
    session.</t>
      <t>The DLM Session-Reflector operates in the Stateless mode.
    </t>
      <t>In this document, the examples of DLM probe packets are shown with UDP header,
    however, the probe packets can be encapsulated with a different header based on the
    transport protocol used in the network.</t>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>Session-Sender Direct Loss Measurement Probe Packet</name>
      <t>In this document, base Session-Sender DLM probe packet formats 
   are defined as shown in Figure 1 and Figure 2 for unauthenticated and authenticated modes, respectively. 
   They are stand-alone DLM probe packet formats to 
   carry the counters for the data traffic 
   flow under measurement. The DLM probe packet formats are similar to the base STAMP test 
   packet formats (for example the locations of the Counters vs. STAMP Timestamps).</t>
      <figure anchor="ure-lm-probe-packet-format">
        <name>Session-Sender Direct Loss Measurement Probe Packet - Unauthenticated Mode</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Timestamp                     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter (C1)                  |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B|T|S|BlockNumber|   DSCP    | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                                                               |
 |                        MBZ (28 octets)                        |
 |                                                               |
 |                                                               |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <figure anchor="ure-lm-probe-packet-format-authenticated-mode">
        <name>Session-Sender Direct Loss Measurement Probe Packet - Authenticated Mode</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Timestamp                     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter (C1)                  |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B|T|S|BlockNumber|   DSCP    | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        MBZ (68 octets)                        |
 .                                                               .
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        HMAC (16 octets)                       |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>
   Fields are defined as the following:</t>
   <t>
   Transmit Timestamp (32-bit): This is 32-bit nano-sec field of the PTPv2 timestamp on transmit side. This field may carry Sequence Number instead of PTPv2 timestamp. 
   </t>
      <t>
   Transmit Counter (64-bit): The number of packets or octets transmitted by
   the Session-Sender in the 
   DLM probe packet.  The counter is always written at the well-known fixed 
   location in the DLM probe packet.  This is an important
   property for hardware-based implementation (e.g., in an ASIC), e.g., for point-to-point links and circuits. 
   Counter is for the data traffic flow under measurement.</t>
      <dl newline="true" spacing="normal" indent="3">
        <dt>XBTS Flags (3-bit): The meanings of the Flag bits are:</dt>
        <dd>
          <t>
    X: Extended counter format indicator.  Indicates the use of
      extended (64-bit) counter values.  Initialized to 1 upon creation
      (and prior to transmission) of a DLM probe packet.  Set to 0 when the DLM probe packet is
      transmitted or received over an interface that writes 32-bit counter values.
          </t>
          <t>
    B: Octet (byte) count.  When set to 1, indicates that the Counter
      fields represent octet counts.  The octet count applies to all
      packets within the DLM scope, and the octet count of a packet transmitted
      or received includes the total length of that packet (but excludes
      headers, labels, or framing of the channel itself).  When set to
      0, indicates that the Counter fields represent packet counts.
          </t>
          <t>
    T: Traffic-class-specific measurement indicator.  Set to 1 when
      the DLM session is scoped to data packets of a particular
      traffic class (DSCP value), and 0 otherwise.  When set to 1, the
      DSCP field of the DLM probe packet indicates the measured traffic class.
	  </t>
	  <t>
    S: Sequence Number indicator.  When set to 1, it indicates that the Transmit Timestamp field 
      contains Sequence Number (instead of PTPv2 timestamp).
          </t>
        </dd>
      </dl>
      <t>
   DSCP (6-bit): DSCP of the data traffic flow being measured when T flag is set.</t>
      <t>
   Block Number (6-bit): The Direct Loss Measurement using Alternate-Marking
   Method <xref target="RFC9341" format="default"/> requires collecting 
   Block Number of the counters for the data traffic flow under measurement.  
   To be able to correlate the transmit and receive counters of the
   matching Block Number, the Block Number of the counters
   carried in the DLM probe packets.</t>
      <t>
   SSID (16-bit): DLM Sender Session Identifier.</t>
      <t>
   HMAC: The use of the HMAC field is described in Section 4.4 of <xref target="RFC8762" format="default"/>.
   HMAC uses its own key and the mechanism to distribute the HMAC key is
   outside the scope of this document.</t>
      <t>
   MBZ: Must be Zero.  It MUST be all zeroed on the transmission and MUST
   be ignored on receipt.</t>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>Session-Reflector Direct Loss Measurement Probe Packet</name>
      <t>The Session-Reflector receives the DLM Session-Sender probe packet and verifies it.
     If the DLM probe packet is validated, the Session-Reflector
     that supports this specification prepares and transmits the DLM reply probe packet.
     In this document, Session-Reflector DLM reply probe packet formats 
     are defined as shown in Figure 3 and Figure 4, 
     for unauthenticated and authenticated modes, respectively.</t>
      <figure anchor="ure-lm-reply-packet-format">
        <name>Session-Reflector Direct Loss Measurement Probe Packet - Unauthenticated Mode</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Timestamp                     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter (C3)                  |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B|T|S|BlockNumber|   DSCP    | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Receive Counter (C2)                   |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Session-Sender Transmit Timestamp      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Session-Sender Counter (C1)            |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |FLAGS  |SS-BlockNum| SS-DSCP   | MBZ (2 octets)                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Ses-Sender TTL |        MBZ                                    |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <figure anchor="ure-lm--reply-packet-format-authenticated-mode">
        <name>Session-Reflector Direct Loss Measurement Probe Packet - Authenticated Mode</name>
        <artwork name="" type="" align="left" alt=""><![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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Timestamp                     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Transmit Counter (C3)                  |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |X|B|T|S|BlockNumber|   DSCP    | SSID                          |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (4 octets)                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Receive Counter (C2)                   |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (8 octets)                         |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Session-Sender Transmit Timestamp      |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (12 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        Session-Sender Counter (C1)            |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |FLAGS  |SS-BlockNum| SS-DSCP   | MBZ (2 octets)                |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                        MBZ (4 octets)                         |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |Ses-Sender TTL |                                               |
 +-+-+-+-+-+-+-+-+                                               +
 |                        MBZ (15 octets)                        |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 |                        HMAC (16 octets)                       |
 |                                                               |
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>
   Fields are defined as the following:</t>
   <t>
   Transmit Timestamp (32-bit): This is 32-bit nano-sec field of the PTPv2 timestamp on transmit side. This field may carry Sequence Number instead of PTPv2 timestamp. 
   </t>
   <t>
   Transmit Counter (64-bit): The number of packets or octets transmitted by
   the Session-Reflector in the DLM reply probe packet. 
   Counter is for the reverse direction data traffic flow under measurement.
   The Session-Reflector writes the Transmit Counter at the same location in the
   DLM reply probe packet as the Session-Sender DLM probe packet. 
   This is an important property for hardware-based implementation (e.g., in an ASIC).</t>
      <t>
   XBTS Flags (3-bit): The XBTS Flags for the reverse direction data traffic flow under measurement
   set using the same procedure defined for the Session-Sender DLM probe packet.</t>
      <t>
   DSCP (6-bit): Set for the reverse direction data traffic flow under measurement
   using the same procedure defined for the Session-Sender DLM probe packet.</t>
      <t>
   Block Number (6-bit): Set for the reverse direction data traffic flow under measurement
   using the same procedure defined for the Session-Sender DLM probe packet.</t>
      <t>
   SSID: SSID is the exact copy of the SSID in the received Session-Sender DLM probe packet.</t>
      <t>
   Receive Counter (64-bit): The number of packets or octets received at
   the Session-Reflector.  It is written by the Session-Reflector in the DLM reply probe packet.
   Counter is for the data traffic flow under measurement.</t>
      <t>
   Session-Sender Counter (64-bit): This is the exact copy of the Transmit
   Counter from the received Session-Sender DLM probe packet.</t>
      <t>
   Session-Sender Transmit Timestamp (32-bit): This is the exact copy of the Transmit Timestamp 
   from the received Session-Sender DLM probe packet.</t>
      <t>
   Session-Sender Block Number: This is the exact copy of the Block Number 
   from the received Session-Sender DLM probe packet.</t>
      <t>
   Session-Sender FLAGS: This is the exact copy of the XBTS Flags
   from the received Session-Sender DLM probe packet.</t>
      <t>
   Session-Sender DSCP: This is the exact copy of the DSCP
   from the received Session-Sender DLM probe packet.</t>
      <t>
   Session-Sender TTL: The Session-Sender TTL field is one octet long, and its value is
   the copy of the TTL field in IPv4 (or Hop Limit in IPv6) from the
   received Session-Sender DLM probe packet.</t>
    </section>
    <section anchor="sect-6" numbered="true" toc="default">
      <name>Data Loss Calculation</name>
      <t>
   Using the Counters C1, C2, C3 and C4 as per reference topology, 
   from the nth and (n-1)th DLM probe packets, packet loss and byte loss for
   the data traffic flow can be calculated as follows:</t>
      <t>
    Transmit Loss TxL[ n-1, n] = (C1[ n] - C1[ n-1]) - (C2[ n] - C2[ n-1])
      </t>
      <t>
    Receive Loss RxL[ n-1, n]  = (C3[ n] - C3[ n-1]) - (C4[ n] - C4[ n-1])
      </t>
      <t>
    The Total Transmit and Receive Loss are calculated as follows:
      </t>
      <t>
    Total Transmit Loss = TxL[ 1, 2] + TxL[ 2, 3] + ...
      </t>
      <t>
    Total Receive Loss  = RxL[ 1, 2] + RxL[ 2, 3] + ...
      </t>
      <t>These values are updated each time a DLM reply probe packet is received and
   processed at the Session-Sender, and they represent the Total Transmit and Total Receive Loss
   since the DLM session was initiated. 
   When computing the values TxL[n-1,n] and RxL[n-1,n], the possibility 
   of counter wrap must be taken into account. 
      </t>
      <t>When using Alternate-Marking Method, all Counters used for loss calculation
   belongs to the same Block Number, as described in Section 3.1 of <xref target="RFC9341" format="default"/>.</t>
    </section>
    <section anchor="sect-7" numbered="true" toc="default">
      <name>Optional Extensions</name>
      <t>
   There are currently no optional (TLV) extensions defined for the DLM probe packets.</t>
    </section>
    <section anchor="sect-8" numbered="true" toc="default">
      <name>Integrity Protection and Confidentiality Protection</name>
      <t>
   The integrity protection and confidentiality protection specified in <xref target="RFC8762" format="default"/>
   also apply to the procedures defined in this document.</t>
    </section>
    <section anchor="sect-9" numbered="true" toc="default">
      <name>Operational Considerations</name>
      <t>
   The operational considerations specified in <xref target="RFC8762" format="default"/>
   also apply to the procedures defined in this document.</t>
    </section>
    <section anchor="sect-10" numbered="true" toc="default">
      <name>Security Considerations</name>
     <t>
   The DLM protocol defined in this document is intended for deployment in a single operator network domain.
   As such, the Session-Sender address and Session-Reflector address are provisioned by the operator for the DLM session.
   It is assumed that the operator has 
   verified the integrity of the path and identity of the far-end Session-Reflector.
     </t>

      <t>If desired, attacks can be mitigated by performing basic validation
   and sanity checks, at the Session-Sender, of the counter fields (e.g., packet loss is not negative) 
   in received reply probe packets.  The minimal state
   associated with these protocols also limits the extent of measurement
   disruption that can be caused by a corrupt or invalid probe packet to a
   single probe cycle.</t>

      <t>The DLM protocol uses UDP port that could become 
   a target of denial of service (DoS) or could
   be used to aid on-path attacks.
   Thus, the security considerations and measures to mitigate the 
   risk of the attack documented in Section 6 of <xref target="RFC8545" format="default"/>
   equally apply to the STAMP extensions in this document.</t>

      <t>The security considerations specified in <xref target="RFC8762" format="default"/>
   and <xref target="RFC8972" format="default"/> also apply to the protocol 
   defined in this document.  Specifically, the
   message integrity protection using HMAC, as defined in <xref target="RFC8762" format="default"/>
   Section 4.4, also apply to the procedure described in this document.
      </t>

    </section>
    <section anchor="sect-11" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
    This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization/>
            </author>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization/>
            </author>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC9341" target="https://www.rfc-editor.org/info/rfc9341" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9341.xml">
          <front>
            <title>Alternate-Marking Method</title>
            <author initials="G." surname="Fioccola" fullname="G. Fioccola" role="editor">
              <organization/>
            </author>
            <author initials="M." surname="Cociglio" fullname="M. Cociglio">
              <organization/>
            </author>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky">
              <organization/>
            </author>
            <author initials="T." surname="Mizrahi" fullname="T. Mizrahi">
              <organization/>
            </author>
            <author initials="T." surname="Zhou" fullname="T. Zhou">
              <organization/>
            </author>
            <date year="2022" month="December"/>
          </front>
          <seriesInfo name="RFC" value="9341"/>
          <seriesInfo name="DOI" value="10.17487/RFC9341"/>
        </reference>
        <reference anchor="RFC8762" target="https://www.rfc-editor.org/info/rfc8762" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8762.xml">
          <front>
            <title>Simple Two-Way Active Measurement Protocol</title>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky">
              <organization/>
            </author>
            <author initials="G." surname="Jun" fullname="G. Jun">
              <organization/>
            </author>
            <author initials="H." surname="Nydell" fullname="H. Nydell">
              <organization/>
            </author>
            <author initials="R." surname="Foote" fullname="R. Foote">
              <organization/>
            </author>
            <date year="2020" month="March"/>
          </front>
          <seriesInfo name="RFC" value="8762"/>
          <seriesInfo name="DOI" value="10.17487/RFC8762"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="RFC7680" target="https://www.rfc-editor.org/info/rfc7680" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7680.xml">
          <front>
            <title>A One-Way Loss Metric for IP Performance Metrics (IPPM)</title>
            <author initials="G." surname="Almes" fullname="G. Almes">
              <organization/>
            </author>
            <author initials="S." surname="Kalidindi" fullname="S. Kalidindi">
              <organization/>
            </author>
            <author initials="M." surname="Zekauskas" fullname="M. Zekauskas">
              <organization/>
            </author>
            <author initials="A." surname="Morton" fullname="A. Morton" role="editor">
              <organization/>
            </author>
            <date year="2016" month="January"/>
          </front>
          <seriesInfo name="STD" value="82"/>
          <seriesInfo name="RFC" value="7680"/>
          <seriesInfo name="DOI" value="10.17487/RFC7680"/>
        </reference>

        <reference anchor="RFC8545" target="https://www.rfc-editor.org/info/rfc8545" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8545.xml">
          <front>
            <title>Well-Known Port Assignments for the One-Way Active Measurement Protocol (OWAMP) and the Two-Way Active Measurement Protocol (TWAMP)</title>
            <author initials="A." surname="Morton" fullname="A. Morton" role="editor">
              <organization/>
            </author>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky" role="editor">
              <organization/>
            </author>
            <date year="2019" month="March"/>
          </front>
          <seriesInfo name="RFC" value="8545"/>
          <seriesInfo name="DOI" value="10.17487/RFC8545"/>
        </reference>


        <reference anchor="RFC8972" target="https://www.rfc-editor.org/info/rfc8972" xml:base="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8972.xml">
          <front>
            <title>Simple Two-Way Active Measurement Protocol Optional Extensions</title>
            <author initials="G." surname="Mirsky" fullname="G. Mirsky">
              <organization/>
            </author>
            <author initials="X." surname="Min" fullname="X. Min">
              <organization/>
            </author>
            <author initials="H." surname="Nydell" fullname="H. Nydell">
              <organization/>
            </author>
            <author initials="R." surname="Foote" fullname="R. Foote">
              <organization/>
            </author>
            <author initials="A." surname="Masputra" fullname="A. Masputra">
              <organization/>
            </author>
            <author initials="E." surname="Ruffini" fullname="E. Ruffini">
              <organization/>
            </author>
            <date year="2021" month="January"/>
          </front>
          <seriesInfo name="RFC" value="8972"/>
          <seriesInfo name="DOI" value="10.17487/RFC8972"/>
        </reference>
        <reference anchor="ITU-Y1731">
          <front>
            <title>G.8013/Y.1731 : Operations, administration and maintenance (OAM) functions and mechanisms for Ethernet-based networks</title>
            <author>
              <organization>Recommendation ITU-TG.8013/Y.1731: https://www.itu.int/rec/T-REC-G.8013-201508-I/en
              </organization>
            </author>
            <date month="August" year="2015"/>
          </front>
        </reference>
        <reference anchor="SRV6-PM-TNSM">
          <front>
            <title>SRv6-PM: Performance Monitoring of SRv6 Networks with a Cloud-Native Architecture: https://arxiv.org/pdf/2007.08633.pdf</title>
            <author>
              <organization>
            Loreti, P., Mayer, A., Lungaroni, P., Lombardo, F., Scarpitta, C., Sidoretti, G.,
            Bracciale, L., Ferrari, M., Salsano, S., Abdelsalam, A., Gandhi, R., and C. Filsfils, 
                IEEE Transactions on Network and Service Management</organization>
            </author>
            <date month="February" year="2021"/>
          </front>
        </reference>
        <reference anchor="SRV6-PM-IEEE">
          <front>
            <title>Implementation of Accurate Per-Flow Packet Loss Monitoring in Segment Routing over IPv6 Networks: https://arxiv.org/pdf/2004.11414.pdf</title>
            <author>
              <organization>
            Loreti, P., Mayer, A., Lungaroni, P., 
            Salsano, S., Gandhi, R., and C. Filsfils, 
                IEEE International Conference on High Performance Switching and Routing</organization>
            </author>
            <date month="May" year="2020"/>
          </front>
        </reference>
      </references>
    </references>
    <section numbered="false" anchor="acknowledgments" toc="default">
      <name>Acknowledgments</name>
      <t>
   The authors would like to thank Greg Mirsky, Tianran Zhou, Gyan Mishra, 
   Zhenqiang Li, Reshad Rahman, Cheng Li, 
   and Yali Wang for the comments on Direct Loss Measurement. 
   The authors would like to thank Pierpaolo Loreti, Stefano Salsano, and the team for 
   the Open Source implementation of SRv6-PM Loss Monitoring and its publications in 
   <xref target="SRV6-PM-TNSM" format="default"/> and <xref target="SRV6-PM-IEEE" format="default"/>.
   The authors would like to acknowledge the earlier 
   work on the loss measurement using TWAMP
   described in draft-xiao-ippm-twamp-ext-direct-loss.</t>
    </section>
  </back>
</rfc>
