<?xml version="1.0" encoding="utf-8"?>
<!--
     draft-rfcxml-general-template-standard-00

     This template includes examples of the most commonly used features of RFCXML with comments
     explaining how to customise them. This template can be quickly turned into an I-D by editing
     the examples provided. Look for [REPLACE], [REPLACE/DELETE], [CHECK] and edit accordingly.
     Note - 'DELETE' means delete the element or attribute, not just the contents.

     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-whimir-ippm-stamp-cos-ecn-00"
  ipr="trust200902"
  obsoletes=""
  updates="8972"
  submissionType="IETF"
  xml:lang="en"
  version="3">
<!-- [REPLACE]
       * docName with name of your draft
     [CHECK]
       * 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 CoS ECN Update">Update of the Simple Two-way Active Measurement Protocol Class-of-Service Extension - ECN</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-whimir-ippm-stamp-cos-ecn-00"/>


    <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>

    <author fullname="Greg Mirsky" initials="G" surname="Mirsky">
    <!-- all of the following elements are optional -->
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <author fullname="Xiao Min" initials="X" surname="Min">
    <!-- all of the following elements are optional -->
      <organization>ZTE Corp.</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <city>Nanjing</city>
          <country>CN</country>
          <!-- Can use two letter country code -->
        </postal>
        <email>xiao.min2@zte.com.cn</email>
      </address>
    </author>


    <date/>

    <area>Operations and Management</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>
    <keyword>DSCP</keyword>
    <keyword>ECN</keyword>
    <keyword>Congestion</keyword>
    <!-- [REPLACE/DELETE]. Multiple 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 updates the definition of the Class of Service TLV (originally defined
    in RFC 8972) 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>
      <name>Introduction</name>
      <t>   <xref target="RFC8972"/> defined several extensions to the Simple Two-way Active
   Measurement Protocol (STAMP).  Among those is a Class of Service (CoS)
   TLV that enables measurements that utilize the Differentiated Services Code Point
   (DSCP) marking in both directions.  Also, the CoS TLV
   supports outbound measurements that utilize the Explicit Congestion
   Notification (ECN) field, but it lacked support for such measurements on the return path.
   Experience deploying STAMP and its extensions
   demonstrated that it is helpful to an operator to monitor ECN's
   consistency in both directions.  This specification updates
   the definition of the CoS TLV in a backward compatible manner to
   support monitoring of ECN in the return path of the STAMP test
   session.
      </t>
    </section>


    <section>
      <name>Conventions Used in This Document</name>
      <section>
        <name>Acronyms</name>
        <dl>
        <dt>CoS:</dt>
        <dd>Class of Service</dd>
        <dt>DSCP:</dt>
        <dd>Differentiated Services Code Point</dd>
        <dt>ECN:</dt>
        <dd>Explicit Congestion Notification</dd>
        <dt>STAMP:</dt>
        <dd>Simple Two-way Active Measurement Protocol</dd>
        </dl>
      </section>

      <section>
        <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>
      <!-- [CHECK] The 'Requirements Language' section is optional -->

    </section>


    <section>
      <name>Class of Service TLV</name>
      <t>The STAMP Session-Sender <bcp14>MAY</bcp14> include a CoS TLV in the STAMP test packet.
        The format of the CoS TLV is presented in <xref target="TLV"/>.</t>


    <figure anchor="TLV">
      <name>Class of Service 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|    CoS Type   |           Length              |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   DSCP1   |   DSCP2   |EC2|RPD|EC1|RPE|     Reserved          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            ]]>
        </artwork>
        </artset>
      </figure>

      <t>Where the fields are defined as follows.</t>
      <ul spacing="normal">
        <li>STAMP TLV Flags: eight-bit field; format presented in <xref target="RFC8972" section="4"/>.</li>
        <li>CoS (Class of Service) Type: one-octet field; the value <bcp14>MUST</bcp14> be set to 4.</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>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>RPD (reverse path DSCP): two-bit field indicating whether the Session-Reflector used DSCP1 or DSCP2 as the DSCP value of the reflected test packet; a Session-Sender <bcp14>MUST</bcp14> set the value of the RPD field to 0b00 on transmission.</li>
        <li>EC1: ECN value intended by the Session-Sender to be used as the ECN value of the reflected test packet.</li>
        <li>RPE (reverse path ECN): two-bit field indicating whether the Session-Reflector used EC1 as the ECN value of the reflected test packet; a Session-Sender <bcp14>MUST</bcp14> set the value of the RPE field to 0b00 on transmission.</li>
        <li>Reserved: twelve-bit field; <bcp14>MUST</bcp14> be zeroed on transmission and ignored on receipt.</li>
      </ul>


      <t>A STAMP Session-Reflector that receives a test packet with the CoS
      TLV <bcp14>MUST</bcp14> include the CoS TLV in the reflected test packet.
      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 and EC2
      fields, respectively, in the CoS TLV in the reflected test packet.</t>

      <t>The Session-Reflector <bcp14>MUST</bcp14> use the local policy to verify whether the
      use of the value of the DSCP1 field is permitted in the domain.
      If it is, 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.
      Otherwise, the Session-Reflector <bcp14>MUST</bcp14> use the DSCP value of the received
      STAMP packet and set the value of the RPD field to 0b01.
      Upon receiving the reflected packet, if the value of the RPD field is 0b00,
      the Session-Sender will save the DSCP value for analysis of the CoS in
      the reverse direction.
      If the value of the RPD field in the received reflected packet is 0b01, only
      CoS in the forward direction can be analyzed.</t>

      <t>The Session-Reflector <bcp14>MUST</bcp14> set the ECN value in the IP header of the
      reflected STAMP test packet to the value of the EC1 field.
      The Session-Reflector <bcp14>MUST</bcp14> set the RPE field in the CoS TLV in the
      reflected test packet to the value 0b01.
      As a result, the Session-Sender can detect whether the recommended
      value for ECN field in the reflected packet was used by
      inspecting the value of the RPE field in the received
      reflected test packet.</t>

    <section>
      <name>Interoperability with RFC 8972</name>

      <t> The extended CoS TLV defined in this draft is backward compatible with
      the specification in <xref target="RFC8972" section="4.4"/>.  The handling of the DSCP1, DSCP2, EC2 and RPD fields defined here is identical to the handling defined for the equivalent fields in <xref target="RFC8972" section="4.4"/>.</t>

      <t>Consider a case when an implementation that supports this specification performs
      as Session-Sender, and the intended Session-Reflector's support of the CoS TLV
      is according to <xref target="RFC8972" section="4.4"/>.
      If the operator requires monitoring ECN in the reverse direction, the value
      of the EC1 field will be set to a non-zero value.
      Because the Session-Reflector would treat the EC1 field as part of the
      Reserved field, it would ignore its value as per <xref target="RFC8972"
      section="4.4"/>.
      Further, the Session-Reflector would treat the RPE field as part of the
      Reserved field and thus it would send the value 0b00 in the reflected STAMP
      packet, rather than sending the value 0b01.
      Consequently, the Session-Sender will determine that the ECN value in the
      IP header of the reflected test packet was not set as requested.</t>

      <t>Also, this specification supports the case when the Session-Reflector
      supports the extended CoS TLV as defined in this specification and the
      Session-Sender supports the CoS TLV according to <xref target="RFC8972"
      section="4.4"/>.
      In that scenario, the Session-Sender will set its <xref target="RFC8972"/>
      Reserved field to zeros.
      The Session-Reflector will interpret the first two bits of that field as
      the EC1 field, as shown in <xref target="TLV"/> and thus will set the
      value of the ECN field in the IP header of the reflected packet to
      0b00. Further the Session-Reflector will set the RPE field to 0b01.
      The Session-Sender will treat the RPE field as part of the Reserved field
      and will ignore its value.</t>

    </section>
  </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>This document includes no request to IANA.</t>
    </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 extends the functionality of the CoS TLV (<xref target="RFC8972"/>)
       and inherits all the security considerations applicable to the base
       STAMP specification <xref target="RFC8762"/> and <xref target="RFC8972"/>.</t>

       <t>As this specification defines a mechanism to set ECN values, this
       document inherits all the security considerations discussed in
       <xref target="RFC3168"/> and <xref target="RFC9330"/>.
       Monitoring and optional control of ECN for a reflected
       STAMP test packet using the extended CoS TLV may be used across the
       Internet such that the Session-Sender and the Session-Reflector are
       located in different domains.
      </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"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9330.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">
      <!-- [REPLACE/DELETE] an Acknowledgements section is optional -->
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>

    <section anchor="Contributors" numbered="false">
      <name>Contributors</name>
      <t>Karthik Sundaresan, William Hawkins III</t>
    </section>

 </back>
</rfc>
