<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="2"?>
<?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-ahuang-ioam-on-path-delay-00"
     ipr="trust200902">
  <front>
    <title abbrev="On-Path delay for IOAM">On-Path delay Data Field for In
    Situ Operations, Administration, and Maintenance (IOAM)</title>

    <author fullname="Alex Huang Feng" initials="A." surname="Huang Feng">
      <organization>INSA-Lyon</organization>

      <address>
        <postal>
          <street/>

          <city>Lyon</city>

          <region/>

          <code/>

          <country>France</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>alex.huang-feng@insa-lyon.fr</email>

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

    <author fullname="Pierre Francois" initials="P." surname="Francois">
      <organization>INSA-Lyon</organization>

      <address>
        <postal>
          <street/>

          <city>Lyon</city>

          <region/>

          <code/>

          <country>France</country>
        </postal>

        <phone/>

        <facsimile/>

        <email>pierre.francois@insa-lyon.fr</email>

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

    <author fullname="Benoit Claise" initials="B" surname="Claise">
      <organization>Huawei</organization>

      <address>
        <email>benoit.claise@huawei.com</email>
      </address>
    </author>

    <author fullname="Thomas Graf" initials="T" surname="Graf">
      <organization>Swisscom</organization>

      <address>
        <postal>
          <street>Binzring 17</street>

          <city>Zurich</city>

          <code>8045</code>

          <country>Switzerland</country>
        </postal>

        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>

    <date day="03" month="March" year="2023"/>

    <abstract>
      <t>This document defines a Data Field In Situ Operations,
      Administration, and Maintenance (IOAM) architecture for on-path delay
      information. This data field is registered as a new entry in the "IOAM
      Trace-Type" registry.</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 BCP 14
      <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when,
      they appear in all capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section anchor="introduction" title="Introduction">
      <t>Network operators want to measure the On-Path delay of the customers
      packets across their networks to determine where how much delay has been
      accumulated for a given application to optimize and maintain their
      networks.</t>

      <t>This document proposes an IOAM Trace-Type data field and its
      associated bit field to export delay measurements. The delay
      measurements is obtained in passport-based IOAM based on the "timestamp
      seconds" and "timestamp fractions" Trace-Type data fields defined in
      <xref target="RFC9197"/>. In postcard-based IOAM the delay is obtained
      using the timestamp extensions defined in <xref
      target="I-D.ahuang-ippm-dex-timestamp-ext"/>.</t>

      <t><xref target="solution_overview"/> describes the suggested solution
      and <xref target="on_path_delay_datafield"/> describes the proposed IOAM
      data field.</t>
    </section>

    <section anchor="terminology" title="Terminology">
      <t>This document makes use of the following terms as defined in <xref
      target="RFC9197"/>.</t>

      <t><list style="symbols">
          <t>IOAM-domain</t>

          <t>IOAM encapsulation node</t>

          <t>IOAM transit node</t>

          <t>IOAM decapsulation node</t>
        </list></t>
    </section>

    <section anchor="solution_overview" title="Solution overview">
      <t>The On-path delay is computed between the encapsulation node and the
      transit or decapsulation node of the IOAM-domain as shown in <xref
      target="topology"/>. The calculated delays in <xref target="topology"/>
      are computed as following:</t>

      <t><list style="symbols">
          <t>D1: delay between the encapsulation node R1 and the transit node
          R2.</t>

          <t>D2: delay between the encapsulation node R1 and the transit node
          R3.</t>

          <t>D3: delay between the encapsulation node R1 and the decapsulation
          node R4.</t>
        </list></t>

      <figure anchor="topology"
              title="On-path delay use case. Packets flow from host 1 to host 2.">
        <artwork align="center"><![CDATA[
                              IOAM Domain
              .........................................
              .                                       .
              .    D1                                 .
              . <------>                              .
              .                                       .
              .          D2                           .
              . <-------------------->                .
              .                                       .
              .                  D3                   .
              . <-----------------------------------> .
              .                                       .
(H1) ------ (R1) ------- (R2) ------- (R3) -------- (R4) ------ (H2)
Host 1  Encapsulation   Transit      Transit   Decapsulation  Host 2
            Node         Node 1       Node 2        Node
              .                                       .
              .                                       .
              .........................................         

]]></artwork>
      </figure>

      <t>In passport-based IOAM this delay is exported using Pre-allocated
      Trace-Option and Incremental Trace-Option as defined in <xref
      target="RFC9197"/> and in postcard-based IOAM, the delay is computed 
      using IOAM DEX Option as defined in <xref target="RFC9326"/>.</t>

      <t><xref target="trace-option"/> describes how the delay is computed
      using the existing Trace-Type data fields and <xref
      target="dex-option"/> describes how the delay can be calculated using a
      timestamp extension.</t>

      <section anchor="trace-option" title="Using IOAM Trace-Option">
        <t>In passport-based IOAM, telemetry data is added to the data-plane
        packet at each node of the IOAM-domain and all collected metrics are
        exported by the decapsulation node.</t>

        <t>Pre-allocated Trace Option-type and Incremental Trace Option-type,
        as defined in Section 4.4 of <xref target="RFC9197"/>, is used to
        transport the different metrics. The exported metrics are defined by
        the bit field in IOAM Trace-Type as defined in Section 4.4.1 of <xref
        target="RFC9197"/>.</t>

        <t>To compute the delay at the transit and decapsulation node, a
        timestamp reference from the encapsulation node is added. Bit 2
        (timestamp seconds) and bit 3 (timestamp fraction) from the IOAM
        Trace-type field <xref target="RFC9197"/> is used for this purpose and
        at each node, the On-path delay is computed using the delay from the
        encapsulation and the current node.</t>

        <t>To export the On-path delay, a new bit in the IOAM Trace-Type bit
        field is required. <xref target="on_path_delay_datafield"/> defines
        the data field.</t>

        <t><xref target="export"/> describes how the On-path delay metrics can
        be exported.</t>

        <!-- <t>To export the On-path delay metrics, <xref
        target="I-D.spiegel-ippm-ioam-rawexport"/> is used to collect raw IOAM
        data.</t> -->
      </section>

      <section anchor="dex-option" title="Using IOAM DEX Option">
        <t>In postcard-based IOAM, telemetry data is exported at the transit
        nodes and decapsulation node of the IOAM domain. The telemetry data is
        aggregated at each node before being exported to a collector.</t>

        <t>DEX Option-type, as defined in <xref target="RFC9326"/>, is used
        for this purpose. The exported telemetry data is defined in IOAM
        Trace-Type bit field. The export of the On-path delay is based on the
        On-Path Delay field defined in <xref
        target="on_path_delay_datafield"/>.</t>

        <t>The timestamp reference needs to be added to the IOAM DEX
        Option-type header. <xref target="I-D.ahuang-ippm-dex-timestamp-ext"/>
        defines an extension to allow the timestamp being added in the
        encapsulation node. Bit 2 (timestamp seconds) and bit 3 (timestamp
        fraction) from the IOAM DEX Extension-Flags, defined in <xref
        target="I-D.ahuang-ippm-dex-timestamp-ext"/>, are used to add this
        time reference. At each transit and decapsulation node, the difference
        between the timestamp in the header and the current timestamp is
        computed.</t>

        <t><xref target="export"/> describes how the On-path delay metrics can
        be exported.</t>

        <!-- <t>To export the aggregated On-path delay metrics, IPFIX can be used
        with <xref target="I-D.ietf-opsawg-ipfix-on-path-telemetry"/>. This
        allows data aggregation before the export. Raw IOAM DEX Option data
        can also be exported using <xref
        target="I-D.spiegel-ippm-ioam-rawexport"/>.</t> -->
      </section>

      <section anchor="export" title="Export of On-path delay">
        <t>The export of the On-path delay is out of scope of this document.
        <xref target="I-D.spiegel-ippm-ioam-rawexport"/> proposes a way to export 
        the raw IOAM header for both passport-mode and postcard-mode and
        <xref target="I-D.ietf-opsawg-ipfix-on-path-telemetry"/> proposes
        IPFIX Information Elements to allow aggregation before the export. 
        </t>
      </section>
    </section>

    <section anchor="on_path_delay_datafield" title="On-Path delay Data-field">
      <t>The "On-Path Delay" field type is a 4-octet unsigned integer. This
      field indicates the On-path delay between the encapsulation node and the
      transit or decapsulation node measured in microseconds.</t>

      <figure anchor="fig_datafield" title="On-Path delay Data-field Format">
        <artwork align="center"><![CDATA[TBD
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        On-Path Delay                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>

      <t>The Data-Field is allocated by IANA, as defined in <xref
      target="IANA_Considerations"/>.</t>
    </section>

    <section anchor="security" title="Security Considerations">
      <t>The security considerations for the IOAM Trace-Type and IOAM DEX
      Option-type are defined in <xref target="RFC9197"/> and in <xref
      target="RFC9326"/>. This document adds no additional security
      considerations.</t>
    </section>

    <section anchor="IANA_Considerations" title="IANA Considerations">
      <t>This document requests IANA to add the following bit in the "IOAM
      Trace-Type" Registry.</t>

      <t><figure>
          <artwork align="left"><![CDATA[
  Bit: [TBD]
  Description: On-path delay between the encapsulated node and the
               transit or decapsulation node measured in microseconds.
  Reference: [This-RFC-to-be]
          ]]></artwork>
        </figure></t>
    </section>

    <section anchor="acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank xxx for their review and valuable
      comments.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9197.xml"?>

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.9326.xml"?>

      <reference anchor="I-D.ahuang-ippm-dex-timestamp-ext" target="">
        <front>
          <title>Timestamp extension IOAM DEX</title>

          <author fullname="Alex Huang Feng" initials="A."
                  surname="Huang Feng">
            <organization>INSA-Lyon</organization>
          </author>

          <author fullname="Pierre Francois" initials="P." surname="Francois">
            <organization>INSA-Lyon</organization>
          </author>

          <author fullname="Benoit Claise" initials="B." surname="Claise">
            <organization>Huawei</organization>
          </author>

          <author fullname="Thomas Graf" initials="T." surname="Graf">
            <organization>Swisscom</organization>
          </author>

          <date month="February" year="2023"/>
        </front>

        <seriesInfo name="Internet-Draft"
                    value="draft-ahuang-ippm-dex-timestamp-ext-00"/>
      </reference>
    </references>

    <references title="Informative References">
      <?rfc include="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.spiegel-ippm-ioam-rawexport.xml"?>

      <?rfc include="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-opsawg-ipfix-on-path-telemetry.xml"?>
    </references>
  </back>
</rfc>
