<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-li-ippm-stamp-on-lag-00" ipr="trust200902">
  <front>
    <title abbrev="STAMP PM on LAG">Simple Two-Way Active Measurement Protocol
    Extensions for Performance Measurement on LAG</title>

    <author fullname="Zhenqiang Li" initials="Z." surname="Li">
      <organization>China Mobile</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <code/>

          <country/>
        </postal>

        <email>li_zhenqiang@hotmail.com</email>
      </address>
    </author>

    <author fullname="Mach(Guoyi) Chen" initials="M." surname="Chen">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>
        </postal>

        <email>mach.chen@huawei.com</email>
      </address>
    </author>

    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>ZTE Corp.</organization>

      <address>
        <postal>
          <street/>
        </postal>

        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <date year="2021"/>

    <abstract>
      <t>This document defines extensions to Simple Two-Way Active Measurement
      Protocol (STAMP) to implement performance measurement on every member
      link of a Link Aggregation Group (LAG). Knowing the measured metrics of
      each member link of a LAG enables operators to enforce a performance
      metric-based traffic steering policy across the member links.</t>
    </abstract>

    <note title="Requirements Language">
      <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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
      appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>Link Aggregation Group (LAG), as defined in <xref target="IEEE802.1AX"/>, provides mechanisms to combine multiple physical
      links into a single logical link. This logical link offers higher
      bandwidth and better resiliency, because if one of the physical member
      links fails, the aggregate logical link can continue to forward traffic
      over the remaining operational physical member links.</t>

      <t>Usually, when forwarding traffic over a LAG, a hash-based or similar
      mechanism is used to load-balance the traffic across the LAG member
      links. In some cases, the link delays of the member links are different
      because they are over different transport paths. To provide low delay
      service to time-sensitive traffic, we have to know the link delay of
      each member link of a LAG and then steer traffic accordingly. That
      requires a solution that could measure the performance metrics of each
      member link of a LAG.</t>

      <t>However, when using Simple Two-Way Active Measurement Protocol
      (STAMP) <xref target="RFC8762"/> to measure a LAG's performance, the LAG
      is treated as a single logical link/path. The measured metrics reflect
      the performance of one member link or an average of some/all member
      links of the LAG.</t>

      <t>In addition, for LAG, using passive or hybrid methods (like
      alternative marking<xref target="RFC8321"/> or iOAM <xref target="I-D.ietf-ippm-ioam-data"/>) can only monitor the link crossed by
      traffic. It means that the measured metrics reflect the performance of
      some member links or an average of some/all member links of the LAG.
      Therefore, in order to measure every link of a LAG, using active methods
      would be more appropriate.</t>

      <t>This document defines extensions to STAMP <xref target="RFC8762"/> to
      implement performance measurement on every member link of a LAG.</t>
    </section>

    <section title="Micro-Session on LAG">
      <t>This document intends to address the scenario (e.g., <xref target="PMforLAG"/>) where a LAG (e.g., the LAG includes three member
      links) directly connects two nodes (A and B) . The goal is to measure
      the performance of each link of the LAG.</t>

      <figure anchor="PMforLAG" title="PM for LAG">
        <artwork><![CDATA[                   
                  +---+                       +---+
                  |   |-----------------------|   | 
                  | A |-----------------------| B | 
                  |   |-----------------------|   |
                  +---+                       +---+ 
]]></artwork>
      </figure>

      <t>To measure performance metrics of every member link of a LAG,
      multiple sessions (one session for each member link) need to be
      established between the two hosts that are connected by the LAG. These
      sessions are called micro-sessions for the remainder of this
      document.</t>

      <t>All micro-sessions of a LAG share the same Sender Address, Receiver
      Address. As for the Sender Port and Receiver Port, the micro-sessions
      may share the same Sender Port and Receiver Port pair, or each micro
      session is configured with a different Sender Port and Receiver Port
      pair. But from simplifying operation point of view, the former is
      recommended.</t>

      <t>In addition, with micro-sessions, there needs a way to correlate a
      session with a member link. For example, when the Reflector receives a
      Test packet, it needs to know from which member link the packet is
      received, and correlate it with a micro-session. That is a new
      functionality for STAMP as defined in <xref target="RFC8762"/> and <xref target="RFC8972"/>.</t>

      <t>Upon receiving a Test packet for a micro-session, the receiver uses
      the receiving link's identifier to correlate the packet to a particular
      session. In addition, Test packets may need to carry the member link
      information for validation checking. For example, when a
      Session-Sender/Session-Reflector receives a Test packet, it may need to
      check whether the Test packet is from the expected member link.</t>
    </section>

    <section title="Micro-STAMP Session">
      <section title="Micro-STAMP-Test">
        <t>The micro-STAMP-Test protocol is based on the STAMP-Test protocol
        <xref target="RFC8762"/> and <xref target="RFC8972"/> with the
        following extensions.</t>

        <section title="LAG Member Link ID TLV">
          <t>The LAG Member Link ID TLV is defined to carry the LAG member
          link identifiers associated with a micro-STAMP session. The member
          link identifiers are used for the Session-Sender and
          Session-Reflector to check whether a Test packet is received from
          the expected member link. The detailed procedures are defined in
          Section 3.1.2.</t>

          <t>The format is as below:</t>

          <t><figure anchor="IDTLV" title="LAG Member Link ID TLV">
              <artwork><![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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |STAMP TLV Flags|      Type     |           Length              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Sender Member Link ID      |   Reflector Member Link ID    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
            </figure></t>

          <t>Sender Member Link ID (2-octets in length): it is defined to
          carry the LAG member link identifier of the Sender side. The value
          of the Sender Member Link ID MUST be unique at the
          Session-Sender.</t>

          <t>Reflector Member Link ID (2-octets in length): it is defined to
          carry the LAG member link identifier of the Reflector side. The
          value of the Reflector Member ID MUST be unique at the
          Session-Reflector.</t>
        </section>

        <section title="Micro-STAMP-Test Procedures">
          <t>The micro-STAMP-Test reuses the procedures as defined in Section
          4 of STAMP <xref target="RFC8762"/> with the following
          additions:</t>

          <t>The micro-STAMP Session-Sender MUST send the micro-STAMP-Test
          packets over the member link associated with the session. The micro
          STAMP Session-Reflector MUST send the reflected Test packets over
          the receiving member link. </t>

          <t>The configuration and management of the association between a
          micro-STAMP session and the Sender/Reflector member link identifiers
          are outside the scope of this document.</t>

          <t>When the Session-Sender sends a Test packet, the LAG Member
          Link ID TLV MUST be carried, and the Sender member link identifier
          associated with the micro-STAMP session MUST be put in the Sender
          Member Link ID field. If the Session-Sender knows the Reflector
          member link identifier, it MUST set it as the Reflector Member Link
          ID field's value. Otherwise, the Reflector Member Link ID field MUST be set
          to zero.</t>

          <t>The Session-Sender uses the Sender Member Link ID field's value to check
          whether the reflected Test packet is received from the member
          link associated with the correct micro-STAMP session. Therefore, the
          Session-Reflector MUST copy the Sender Member Link ID value to the
          reflected Test packet. </t>

          <t>The Session-Reflector uses the Reflector Member Link ID value to check whether
          a Test packet is received from the member link associated with the correct micro-STAMP session.</t>

          <t>The Reflector member link identifier can be obtained from
          pre-configuration or learned through the data plane (e.g., learned from
          a reflected Test packet). How to obtain/learn the Reflector member
          link identifier is outside of this document's scope.</t>

          <t>When the micro-STAMP Session-Reflector receives a Test packet, it
          MUST use the receiving member link to correlate the Test packet to a
          micro-STAMP session. If there is no such a micro-STAMP session, the
          Test packet MUST be discarded. Suppose the Reflector Member Link ID
          is not zero. In that case, the micro-STAMP Session-Reflector MUST
          use the Reflector member link identifier to check whether it is
          associated with the micro-STAMP session. If it is not, the Test
          packet MUST be discarded and no reflected Test packet will be sent
          back to the Session-Sender. If all validation passed, the
          Session-Reflector sends a reflected Test packet to the
          Session-Sender over the receiving member link. The micro-STAMP
          Session-Reflector MUST put the Sender and Reflector member link
          identifiers associated with the micro-STAMP session in the
          Sender Member Link ID and Reflector Member Link ID fields,
          respectively. The Sender member link identifier is copied from the
          received Test packet.</t>

          <t>When the micro-STAMP Session-Sender receives a reflected Test
          packet, it MUST use the receiving member link to correlate the
          reflected Test packet to a micro-STAMP session. If there is no such
          a session, the reflected Test packet MUST be discarded. If a matched
          micro-STAMP session exists, the Session-Sender MUST use the
          identifier carried in the Sender Member Link ID field to check
          whether it associates with the session. If the checking failed, the
          Test packet MUST be discarded.</t>
        </section>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document requires the IANA to allocate the following the TLV
      type from the "STAMP TLV Types" sub-registry. </t>

      <t><figure>
          <artwork><![CDATA[           Value   |Description           | Reference 
          ---------+----------------------+----------------------
           TBD1    |LAG Member Link ID    | This document
]]></artwork>
        </figure></t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not introduce additional security requirements and
      mechanisms other than the ones described in <xref target="RFC8762"/>
      apply to this document.</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank Min Xiao, Fang Xin for the valuable
      comments to this work.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include='reference.RFC.8174'?>

      <?rfc include='reference.RFC.8762'?>

      <?rfc include='reference.RFC.8972'?>
    </references>

    <references title="Informative References">
      <reference anchor="IEEE802.1AX">
        <front>
          <title>IEEE Standard for Local and metropolitan area networks - Link
          Aggregation</title>

          <author>
            <organization>IEEE Std. 802.1AX</organization>
          </author>

          <date month="November" year="2008"/>
        </front>
      </reference>

      <?rfc include='reference.RFC.8321'?>

      <?rfc include='reference.I-D.ietf-ippm-ioam-data'?>
    </references>
  </back>
</rfc>
