<?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="info" docName="draft-dang-ippm-multiple-path-measurement-04"
     ipr="trust200902">
  <front>
    <title abbrev="Multi-Path Concurrent Measurement for IPPM">Multi-Path
    Concurrent Measurement for IPPM</title>

    <author fullname="Joanna Dang" initials="D." role="editor" surname="Dang">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

          <country>China</country>

          <region/>
        </postal>

        <phone/>

        <email>dangjuanna@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Jianglong" initials="W." surname="Wang">
      <organization>China Telecom</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

          <country>China</country>
        </postal>

        <email>wangjl50@chinatelecom.cn</email>
      </address>
    </author>

    <author fullname="Shinyoung" initials="W." surname="LEE">
      <organization>LG U+</organization>

      <address>
        <postal>
          <street/>

          <city>Seoul</city>

          <code/>

          <country>Korea</country>
        </postal>

        <email>leesy@lguplus.co.kr</email>
      </address>
    </author>

    <author fullname="Liang" initials="W." surname="Cheng">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city>Beijing</city>

          <code/>

          <country>China</country>
        </postal>

        <email>liang.cheng@huawei.com</email>
      </address>
    </author>

    <date day="13" month="August" year="2020"/>

    <abstract>
      <t>This test method can test multi-paths concurrently from one edge node
      to another edge node. This document details Multi-Path Concurrent
      Measurement (MPCM).</t>
    </abstract>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>As we know, the current network has been already being in load
      balancing mode, however it is partially congested. In other words, from
      the same source node to the same destination node, some paths have been
      congested to cause a decline in service quality, but some paths carry
      less traffic and are lightly loaded. To solve the problem of unbalanced
      network load<xref target="draft-liu-ican"/>, the first is to have the
      ability to detect the quality of the load sharing paths. And then the
      traffic from the Scr node to the Dst node is required to be steered from
      the congested paths into the lightly loaded path/paths basing on the
      SLA's requirement. So it's necessary to measure the multi-paths in
      load-balancing mode.</t>

      <t>In the traditional method, the paths are measured separately because
      they aren't maintained by the path group. If the multiple load sharing
      paths are required to be selected based on the SLA information, the
      measured SLA information needs to be comparable. If you want to ensure
      that the data obtained by the test is available and accurate, the
      multi-paths are required to maintain by the path group in order that the
      test start and end points must be same.</t>

      <t>For example, the low latency services require millisecond delays. If
      the start time and the end time aren't same, the measured data may not
      be in one test cycle, and the accuracy of this data is relatively low
      and the data cannot be compared<xref target="Measured-Data"/>.</t>

      <t><figure align="center" anchor="Measured-Data"
          title="Measured Data in the Different Cycles ">
          <artwork type="ascii-art"><![CDATA[           Path1
     +-+-+-+-+-+-+-+-+
     |               |
     +-+-+-+-+-+-+-+-+
                      
                                  Path2
                            +-+-+-+-+-+-+-+-+
                            |               |
                            +-+-+-+-+-+-+-+-+

                   Path3
            +-+-+-+-+-+-+-+-+
            |               |
            +-+-+-+-+-+-+-+-+

-----------------------------------------------------------------------
 0                                           t
]]></artwork>
        </figure></t>

      <t>The Multi-Path Concurrent Measurement (MPCM) is required, which can
      be used bi-directionally to concurrently measure multi-paths metrics
      between two network elements. At the same time, this method also
      consider saving the number of test messages to reduces the load on the
      network.</t>

      <section anchor="requirements-language" 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 RFC 2119.</t>
      </section>

      <section title="Terminology &amp; Abbreviations">
        <t><list style="symbols">
            <t>Muti-paths<list style="symbols">
                <t>There are multiple paths between two nodes in the network.
                These paths may be equal-cost multi-path (ECMP) mode or
                unequal-cost multiple (UCMP) mode. In a real network, they
                might be one <xref
                target="draft-ietf-spring-segment-routing-policy"/> or <xref
                target="RFC7348"/> tunnel group.</t>
              </list></t>

            <t>Concurrent<list style="symbols">
                <t>In order to ensure comparability between multiple paths,
                the test start point and the test end point are required to be
                same.</t>
              </list></t>
          </list></t>
      </section>
    </section>

    <section anchor="overview" title="Overview of MPCM">
      <t>The Multi-Path Concurrent Measurement (MPCM) is the way of
      measurement of multi-paths metrics.</t>

      <t>MPCM can be embedded into a variety of transports such as NSH,
      Segment Routing, VxLAN, native IPv6 (via extension header), or IPv4.</t>

      <section anchor="principle" title="Principle">
        <t>To complete the target scenario, we need to optimize the
        single-path measurement mechanism, and then further diffuse the
        single-path measurement mechanism to multiple-path.</t>

        <t>1. For a single tunnel, the Dst needs to know when to start timing
        in order to delimit. The Dst needs to solve various problems such as
        congestion and discarding of measurement packets. Therefore, the Dst
        needs to initiate a periodic response.</t>

        <t>2. For multiple paths, the Dst needs to respond one measurement
        message with multiple path information in its specific time, solving
        the problems such as inconsistent initiation of any path, inconsistent
        measurement periods, clock drift, and different delays.</t>

        <section anchor="SPM" title="Single Path Measurement">
          <figure align="center" anchor="Single-path-Measurement"
                  title="Single path measurement">
            <artwork type="ascii-art"><![CDATA[           |-----ti-----|-----ti-----|-----ti-----|
           t0           t1           t2
   Src    -----------------------------------------
            |             \             \  
            |               \             \
            |                 \             \
            |                   \             \
   Dst    -----------------------------------------
           t0'                  t1'           t2'

]]></artwork>
          </figure>

          <t>A path between Scr node and Dst node in the network to obtain
          measurement results at equal intervals is as follows:</t>

          <t>1) Set the measurement interval ti.</t>

          <t>a) Before the test starts, the Scr sends a protocol packet to the
          Dst and sets the test interval ti.</t>

          <t>b) After receiving the protocol message, the Dst sets the test
          interval ti for the Scr and Dst, and replies to the Scr to confirm
          that the setting is successful. The congestion at the Dst will be
          counted at intervals ti.</t>

          <t>c) After receiving the interval setting successfully, the Scr
          starts to start measurement.</t>

          <t>2) The Scr sends the first delimited message, which includes the
          sending timestamp t0, and starts to count the data packets sent.</t>

          <t>3) After receiving the first delimited message, the Dst end
          stamps the time stamp t0 'and starts to count the received data
          messages.</t>

          <t>4) The Scr sends the second delimited message at time t1, where
          t1 = t0 + ti, the message includes the sending timestamp t1, and
          counts the number of data packets sent. The first delimited message
          uses high priority, and the second delimited message uses normal
          priority. Because the second delimitation message has a low priority
          and a large queuing delay, the interval between the first
          delimitation message and the second delimitation message shall
          become larger at the Dest.</t>

          <t>5) At the time t0 '+ ti, the Dst counts the number of packets
          received between t0' and t0 '+ ti, and sends the message back to the
          Src with the number of packets, the sending time t0 and the
          receiving time t0'. If the delimitation message has not been
          received at t0' + 2 * ti time, the Dst repeats the previous actions,
          and so on.</t>

          <t>6) When the second delimited message arrives at the Dst, the Dst
          counts the number of packets received between t0 'and t1' at t1
          'time, and sends the message back to the Src with the number of
          packets, the packet sending time t0 and the packet receiving time t0
          '.</t>

          <t>7) After t1 ', the sending time in the message from the Dst is
          updated to t1, and the receiving time in the message from the Dst is
          updated to t1'. The number of packets is still the number of packets
          received within ti time.</t>

          <t>8) Assuming that t1' is between t0' + (x-1) * ti and t0' + x *
          ti, then the congestion in the interval ti is calculated in two
          parts. The first part is from t0 '+ (x-1) * ti to t1', The
          statistics packets sent at t1' must include the packet statistics
          and time t0'; the second part is from t1 'to t0' + x * ti, t0 '+ x *
          ti need to include the packet statistics and t1'.</t>

          <t>9) Repeat the above steps.</t>
        </section>

        <section anchor="MPM" title="Multiple Path Measurement">
          <figure align="center" anchor="Multiple-path-measurement"
                  title="Multiple path measurement">
            <artwork type="ascii-art"><![CDATA[              | <-----------> |  <------------>| <------------> |
              |      Ti       |      Ti        |      Ti        |
       Path1  | m1        m2  |    m3          | m4     m5      |       m6
      ---------------------------------------------------------------
              |               |                |                |
       Path2  |          m1   |    m2           m3      m4      |   m5
      --------------------------------------+------------------------
              |               |                |                |
       Path3  | m1     m2    m3         m4     |    m5          | m6
      --------+---------------+----------------+----------------+----
]]></artwork>
          </figure>

          <t>There are multiple paths in the tunnel between Src node and Dst
          nodes in the network. This method is mainly implemented at the
          Dst.</t>

          <t>1) Set the measurement interval ti.</t>

          <t>a) Before the test starts, the Src sends a protocol packet to the
          Dst, setting the number of paths and the measurement interval ti.
          The measurement result of each path is a message with measurement
          data.</t>

          <t>b) After receiving the protocol message, the Dst sets the number
          of paths and measurement interval ti, and replies to the source to
          confirm the successful setting.</t>

          <t>c) After receiving the message with the number of paths and
          measurement interval, the Src starts to start measurement.</t>

          <t>2) On each path, the Src continuously sends measurement packets,
          and the Dst continuously calculates the measurement results at
          intervals ti.</t>

          <t>3) The Dst collects the measurement results of each path at
          intervals ti after the earliest measurement result of multiple paths
          is came out.</t>

          <t>4) The results of multiple paths in the same interval time ti are
          counted as a group. If there is no measured results on the specific
          path in the interval ti, the relevant information is set 0 in the
          group results. A set of measurement results packaged of multiple
          paths are taken back to the Src.</t>

          <t>5) The measurement results of multiple paths on the Dst are
          continuously packaged at intervals ti and sent back to the Src. The
          packaged message carries the sequence number within the message to
          prevent out of order.</t>
        </section>
      </section>
    </section>

    <section anchor="Format" title="MPCM-Test Packet Format and Content">
      <t>This section defines path header and associated data types required
      for MPCM.</t>

      <t>Firstly one path packet format<xref target="MPCMP-Path-header"/> of
      multi-path can be defined.</t>

      <t><figure align="center" anchor="MPCMP-Path-header"
          title="MPCM Path header">
          <artwork type="ascii-art"><![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 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             Session ID                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            Path ID            |         Path-E2E-Type         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Flags   |          Transaction ID                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure></t>

      <t><list style="symbols">
          <t>Session ID: A set of load sharing paths</t>

          <t>Path ID: One path of the session.</t>

          <t>Path-E2E-Type: A 16-bit identifier which Indicates whether the
          packet type is a send message or a request message.</t>

          <t>Flags: 8-bit field. Identify the query or response type.
          Following flags are defined: <list style="symbols">
              <t>Bit 0 Identify the query type</t>

              <t>Bit 1 Identify the response type</t>

              <t>Reserved</t>
            </list></t>

          <t>Transaction ID: 16-bit identifier of one measurement transaction.
          The sender and receiver to identify measurement transactions based
          on Transaction ID.</t>
        </list>When a measurement is for a set of paths, each query message is
      made for each path, but only one unified response message replies<xref
      target="Query-Response"/>.</t>

      <t><figure align="center" anchor="Query-Response"
          title="Query and Response message">
          <artwork type="ascii-art"><![CDATA[   Sender                                  Receiver
     |                                        |
     |        Query message of Path1          | 
     | -------------------------------------->|
     |        Query message of Path2          |
     |--------------------------------------->|
     |                  ...                   |
     |                  ...                   |
     |        Query message of PathN          |
     |--------------------------------------->|
     |                                        |
     |                                        |
     |                                        |
     |                                        |
     |                                        |
     |  Response message of All multi-paths   |
     |<---------------------------------------|
     |                                        |
     |                                        |
]]></artwork>
        </figure>The measurement response packet format of a path is as
      follows<xref target="Query-message"/>.</t>

      <figure align="center" anchor="Query-message" title="Query message">
        <artwork type="ascii-art"><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                E2E PathN Option Header                        |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |             PathN Edge-to-Edge Option Data                    |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>

      <t>The field of PathN Edge-to-Edge Option Data can refer to Edge-to-Edge
      Option Data of <xref target="draft-ietf-ippm-ioam-data-04"/>.</t>

      <t>It suppose there are N paths between two points.The measurement
      response packet format of multi-paths is as follows<xref
      target="Query-message"/>.</t>

      <t><figure align="center" anchor="response-type"
          title="Response message">
          <artwork type="ascii-art"><![CDATA[   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                E2E Path1 Option Header                        |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |             Path1 Edge-to-Edge Option Data                    |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   ~                             ...                               ~
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
   |                                                               |
   |                E2E PathN-1 Option Header                      |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |             PathN-1 Edge-to-Edge Option Data                  |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |                  E2E PathN Option Header                      |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   |               PathN Edge-to-Edge Option Data                  |
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
        </figure><list style="symbols">
          <t>Long-term measurement<list style="symbols">
              <t>The receiver can wait until it receives all measurement
              requests of a set of path and then responds.</t>
            </list></t>

          <t>Short-term measurement<list style="symbols">
              <t>The Sender can query once t.</t>

              <t>The receiver can reply once t.</t>
            </list></t>
        </list>The overall solution needs to consider two methods of
      long-period measurement and short-period measurement.</t>
    </section>

    <section anchor="vb"
             title="Expansion based on various measurement methods">
      <t>The measurement message format defined by this document can be
      extended based on various measurement methods.</t>

      <section anchor="ioam" title="IOAM">
        <t>A new type may be added in IOAM-E2E-Type of IOAM Edge-to-Edge
        Option header<xref target="draft-ietf-ippm-ioam-data-04-section4.4"/>
        as follow.</t>

        <t><list style="symbols">
            <t>Bit 4: Multiple paths measurement.</t>
          </list></t>

        <t>This bit is set by the headend node if Multi-Path Concurrent
        Measurement is activated.</t>

        <t>A common registry is maintained for IOAM-Types, see <xref
        target="iana-considerations"/>.</t>

        <t>For path-based quality measurements, there is no need to measure
        each message because the large-scale deployment consumes too much
        network resources. Here, the way of periodic measurement is
        recommended.In a period, if there is a packet, the appropriate packet
        is selected to be inserted into the iOAM packet; if there is no
        packet, a measurement packet is directly generated<xref
        target="draft-dang-ippm-congestion"/>.</t>
      </section>
    </section>

    <section anchor="qbv" title="Data Export">
      <t>MPCM nodes collect information for packets traversing a domain that
      supports MPCM. MPCM process the information further and export the
      information using e.g., IPFIX. Raw data export of IOAM data using IPFIX
      is discussed in <xref
      target="draft-spiegel-ippm-ioam-rawexport-00"/>.</t>
    </section>

    <section anchor="iana-considerations" title="IANA Considerations">
      <t>This document requests the following IANA Actions.</t>

      <t>IOAM E2E Type Registry:</t>

      <t>Bit 4 Multiple ways measurement</t>
    </section>

    <section anchor="security-considerations" title="Security Considerations">
      <t>The Proof of Transit option (Section Section 4.3 In-situ OAM <xref
      target="draft-ietf-ippm-ioam-data-04-section4.4"/>) is used for
      verifying the path of data packets.</t>
    </section>

    <section anchor="acknowledgements" title="Acknowledgements">
      <t>TBD</t>
    </section>
  </middle>

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

      <reference anchor="draft-ietf-ippm-ioam-data-04"
                 target="https://datatracker.ietf.org/doc/draft-ietf-ippm-ioam-data/">
        <front>
          <title>A Variety of Transports</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-ietf-ippm-ioam-data-04-section4.4"
                 target="https://datatracker.ietf.org/doc/draft-ietf-ippm-ioam-data/">
        <front>
          <title>IOAM Edge-to-Edge Option</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-ietf-spring-segment-routing-policy"
                 target="https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-02">
        <front>
          <title>Segment Routing Policy Architecture</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="RFC7348"
                 target="https://datatracker.ietf.org/doc/rfc7348/">
        <front>
          <title>Virtual eXtensible Local Area Network (VXLAN)</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-spiegel-ippm-ioam-rawexport-00"
                 target="https://tools.ietf.org/html/draft-spiegel-ippm-ioam-rawexport-00">
        <front>
          <title>In-situ OAM raw data export with IPFIX</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-liu-ican"
                 target="https://tools.ietf.org/html/draft-dang-ippm-congestion-02">
        <front>
          <title>Instant Congestion Assessment Network (iCAN) for Traffic
          Engineering</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>

      <reference anchor="draft-dang-ippm-congestion"
                 target="https://tools.ietf.org/html/draft-dang-ippm-congestion-02">
        <front>
          <title>A One-Path Congestion Metric for IPPM</title>

          <author>
            <organization/>
          </author>

          <date/>
        </front>
      </reference>
    </references>
  </back>
</rfc>
