<?xml version="1.0" encoding="utf-8"?>
<!--
     draft-white-ippm-stamp-ecn-00

     This template includes examples of most of the features of RFCXML with comments explaining
     how to customise them, and examples of how to achieve specific formatting.

     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-white-ippm-stamp-ecn-00"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
<!--
    * docName should be the name of your draft
    * category should be one of std, bcp, info, exp, historic
    * ipr should be one of trust200902, noModificationTrust200902, noDerivativesTrust200902, pre5378Trust200902
    * updates can be an RFC number as NNNN
    * obsoletes can be an RFC number as NNNN
-->

  <front>
    <title abbrev="STAMP ECN">Simple Two-Way Active Measurement Protocol (STAMP) Extension for DSCP and ECN Traversal Measurement</title> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#title-4 -->
    <!--  The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-white-ippm-stamp-ecn-00"/> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#seriesinfo -->
    <!-- Set value to the name of the draft  -->

    <author fullname="Greg White" initials="G" surname="White"> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#author -->
    <!-- initials should not include an initial for the surname -->
    <!-- role="editor" is optional -->
    <!-- Can have more than one author -->

    <!-- all of the following elements are optional -->
      <organization>CableLabs</organization> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#organization -->
      <address> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#address -->
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>858 Coal Creek Circle</street>
          <city>Louisville</city>
          <region>Colorado</region>
          <code>80027</code>
          <country>US</country>
          <!-- Can use two letter country code -->
        </postal>
        <email>g.white@cablelabs.com</email>
        <!-- Can have more than one <email> element -->
        <uri>http://www.cablelabs.com</uri>
      </address>
    </author>

    <date/> <!-- https://authors.ietf.org/en/rfcxml-vocabulary#date -->
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>General</area>
    <workgroup>IP Performance Measurement</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is
          not present, the default is "Network Working Group", which is used by the RFC Editor as
          a nod to the history of the RFC Series. -->

    <keyword>stamp</keyword>
    <!-- Multiple keywords are allowed.  Keywords are incorporated into HTML output files for
         use by search engines. -->

    <abstract> <t>The Simple Two-Way Active Measurement Protocol (STAMP) enables
    one-way and round-trip measurement of network metrics between IP hosts, and has a facility for defining
    optional extensions. This document defines a STAMP extension to enable the
    measurement of manipulation of the value of the explicit congestion notification (ECN) field of the IP header by middleboxes between two STAMP hosts, and to
    enable discovery and measurement of paths that provide differential treatment of packets depending
    on the value of their ECN field.</t> </abstract>

  </front>

  <middle>

    <section>
    <!-- The default attributes for <section> are numbered="true" and toc="default" -->
      <name>Introduction</name> <t><xref target="RFC8972" section="4.4"/>
      defines a "Class of Service TLV" extension for the STAMP protocol <xref
      target="RFC8762"/> which enables bi-directional measurement of manipulation of the differentiated services code point (DSCP) field of the IP header by
      middleboxes <xref
      target="RFC2474"/> but only allows one-way measurement of manipulation of the ECN field of the IP header by
      <xref target="RFC3168"/><xref target="RFC8311"/><xref target="RFC9331"/>
      middleboxes. Since the ECN field of the IP header is separately meaningful in each
      direction, it is valuable to have the capability to perform
      bi-directional measurements of ECN traversal and to have the abilty to
      measure path characteristics that depend on the value of the ECN codepoint. In
      addition, bi-directional measurements are important to isolate
      traversal issues so that remediation actions can be taken
      appropriately.</t>

      <section anchor="requirements">
      <!-- anchor is an optional attribute -->
        <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"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
      <!-- The 'Requirements Language' section is optional -->
    </section>

    <section>
      <name>DSCP and ECN Traversal STAMP Extension</name>
      <t>The STAMP session-sender <bcp14>MAY</bcp14> include a DSCP and
      ECN TLV in the STAMP test packet. The format of the TLV is presented in <xref
    target="TLV"/>.</t>
    <figure anchor="TLV">
      <name>DSCP and ECN Traversal TLV</name>
      <artset>
        <artwork type="ascii-art" name="TLV.txt">
        <![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              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   DSCP1   |EC1|  DSCP2    |EC2| RP|    Reserved               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]>
        </artwork>
        </artset>
      </figure>

      <t>The fields are defined as follows.</t>
      <ul spacing="normal">
        <li>STAMP TLV Flags: eight-bit field; format presented
          in <xref target="RFC8972"/>.</li>
        <li>Type: one-octet field; value 179 allocated by this specification</li>
        <li>Length: two-octet field; set equal to the value 4 octets</li>
        <li>DSCP1: DSCP value intended by the
          session-sender to be used as the DSCP value of the reflected test packet</li>
        <li>EC1: ECN value intended by the session-sender to be used as
          the ECN value of the reflected test packet </li>
        <li>DSCP2: received value in the DSCP field at the ingress of the
          session-reflector</li>
        <li>EC2: received value in the ECN field at the ingress of the
          session-reflector</li>
        <li>RP (reverse path): two-bit field; a session-sender <bcp14>MUST</bcp14> set the value of the RP field to 0 on transmission</li>
        <li>Reserved: fourteen-bit field to be zeroed on transmission
          and ignored on receipt</li>
      </ul>

      <t> A session-reflector that receives a test packet with the DSCP and ECN
      Traversal TLV <bcp14>MUST</bcp14> include the DSCP and ECN Traversal TLV
      in the reflected test packet.</t>

      <t>The session-reflector <bcp14>MUST</bcp14> copy the value of the DSCP
      and ECN fields of the IP header of the received STAMP test packet into
      the DSCP2 field and EC2 field in the reflected test packet.</t>

      <t>The session-reflector <bcp14>MUST</bcp14> set the value of the ECN field in
      the IP header of the reflected test packet equal to the value in the EC1
      field of the received test packet.</t>

      <t>Finally, the session-reflector <bcp14>MUST</bcp14> use the local policy
      to verify whether the CoS corresponding to the value of the DSCP1 field
      is permitted in the domain. If the corresponding CoS is permitted in the
      domain, the session-reflector <bcp14>MUST</bcp14> set the DSCP field's
      value in the IP header of the reflected test packet equal to the value of
      the DSCP1 field of the received test packet. If the corresponding CoS is
      not permitted in the domain, the session-reflector <bcp14>MUST</bcp14>
      use the DSCP value of the received STAMP packet and set the value of the
      RP field to 1. Upon receiving the reflected packet, if the value of the
      RP field is 0, the session-sender will save the DSCP and ECN values for
      analysis of the CoS in the reverse direction. If the value of the RP
      field in the received reflected packet is 1, only CoS in the forward
      direction can be analyzed. </t>
    </section>

    <section anchor="Implementation">
      <name>Implementation Status</name>
      <t>The author is aware of two independent implementations of this STAMP Extension TLV, one of which is publicly available <eref target="https://github.com/cerfcast/teaparty">here</eref>.</t>

    </section>

    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>Add this extension to the IANA <eref target="https://www.iana.org/assignments/stamp-tlv-types/stamp-tlv-types.xhtml#stamp-tlv-types-1">STAMP TLV Types</eref> Registry.</t>

      <ul>
        <li>Value = 179</li>
        <li>Description = "DSCP and ECN Traversal"</li>
        <li>Reference = this document</li>
      </ul>

    </section>

    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>This document should not affect the security of the Internet.</t>
    </section>

    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2474.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3168.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8762.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8972.xml"/>
      </references>

      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8311.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9331.xml"/>

      </references>
    </references>


    <section anchor="Acknowledgements" numbered="false">
      <!-- an Acknowledgements section is optional -->
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>

    <section anchor="Contributors" numbered="false">
      <!-- a Contributors section is optional -->
      <name>Contributors</name>
      <t>Karthik Sundaresan, William Hawkins III</t>
    </section>

 </back>
</rfc>
