<?xml version="1.0" encoding="utf-8"?>
<?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="info"
  docName="draft-hu-rtgwg-pre-ecn-wan-00"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="draft-hu-rtgwg-pre-ecn-wan-00"> Precise ECN in WAN
    </title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-hu-rtgwg-pre-ecn-wan-00"/>
   
    <author fullname="Jiayuan Hu" initials="Jiayuan" role="editor" surname="Hu">
      <organization>China Telecom</organization>
      <address>
        <postal>
          <street>109, West Zhongshan Road, Tianhe District</street>
          <city>Guangzhou</city>
          <region>Guangzhou</region>
          <code>510000</code>
          <country>CN</country>
        </postal>
        <email>hujy5@chinatelecom.cn</email>
      </address>
    </author>

    <date year="2025"/>

    <area>Routing</area>
    <workgroup>Routing Area Working Group</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>RFC</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This draft defines the precise ECN during used in WAN. With the growing demand for AI computing power,
          the computational capacity of a single Artificial Intelligence Data Center (AIDC) can no longer meet the
          requirements of large-scale model training. This has led to the emergence of cross-AIDC distributed model
          training, driving the need for transmitting RoCEv2 packets over WAN networks. AI training is highly sensitive
          to network packet loss, where even minimal packet loss can significantly degrade training efficiency.
          Additionally, elephant flows and extreme concurrent traffic impose higher demands on network performance.</t>
      <t>
          ECN achieves active feedback of network congestion by setting ECN flag bits in the header of IP packets, which
          is an effective traffic control method. RFC6040 introduces the application of ECN in WAN.
          However, due to the much higher end-to-end delay in WAN than in DC, and the frequent occurrence
          of instantaneous traffic bursts in WAN, it is easy to trigger ECN at the wrong time. This draft
          focuses on the precise use of ECN in WAN, by introducing different reactions of ECN in different WAN
          transmission scenarios</t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>
        The rapid growth of AI computing power, particularly for large-scale model training, has necessitated
          distributed training across multiple Artificial Intelligence Data Centers (AIDCs). This shift has increased
          the demand for reliable and high-performance transmission of RoCEv2 (RDMA over Converged Ethernet version 2)
          traffic over the WAN. However, AI workloads are highly sensitive to network congestion and packet loss, even
          minor packet drops can significantly degrade training efficiency. Due to the long links and significant
          end-to-end latency in wide area networks, traditional congestion control mechanisms may not be effective in a
          timely manner. They are insufficient for AI workloads due to their reactive nature and inability to guarantee
          zero packet loss.
      </t>
      <t>
        To address these challenges, this draft explores the precise utilization of Explicit Congestion Notification (ECN)
          in WAN environments, particularly for RoCEv2 over IP tunnels. ECN enables proactive congestion signaling by
          marking packets instead of dropping them, allowing endpoints to adjust transmission rates before congestion
          escalates. However, traditional ECN implementations face challenges in WAN scenarios, including inconsistent
          ECN propagation across tunnel boundaries and inefficient congestion response mechanisms. This work focuses on
          optimizing ECN for lossless RoCEv2 transmission in WANs by:
      </t>
      <t>
        1. Ensuring Accurate ECN Propagation: Defining rules for consistent ECN field handling across IP-in-IP tunnels to
          prevent packet loss.
      </t>
      <t>
        2. Enhancing Congestion Feedback: Adjust the sending rate within a small range of the wide area network to
          reduce the impact of latency on end-to-end communication.
      </t>
      <t>
        3. Supporting Multi-Level Congestion Signaling: Extending ECN to differentiate between varying congestion
        severities, improving responsiveness for AI traffic.
      </t>
      <t>
        By refining ECN mechanisms for WAN environments, this approach enhances network efficiency for distributed AI
        training while maintaining backward compatibility with existing protocols. The proposed framework provides a
        scalable and reliable solution for future large-scale distributed computing applications.
      </t>
    </section>
      
    <section title="Conventions Used in This Document">
      <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>

      <section title="Abbreviations">
        <t> AIDC: Artificial Intelligence Data Center</t>
        <t> RoCEv2: RDMA over Converged Ethernet version 2</t>
        <t> ECN: Explicit Congestion Notification</t>
        <t> CNP: Congestion Notification Packet</t>
      </section>
    </section>
      <!-- [CHECK] The 'Requirements Language' section is optional -->

    <section title="ECN for WAN">
      <section>
        <name>ECN Mechanism for WANs</name>
        <t>
          In WANs, tunneling is a fundamental technique used to encapsulate and transport data
          packets across different network domains while maintaining security, performance, and compatibility. Tunneling
          works by embedding an original packet (the inner payload) within a new packet (the outer header), allowing it
          to traverse intermediate networks that may not natively support the original protocol.
        </t>
        <t>
          ECN, as a traditional congestion notification mechanism, has also been extended from DC to WAN. <xref target="RFC6040"/>
          introduces how to label and use ECN mechanisms in tunnels, which are divided into tunnel ingress behavior and
          tunnel egress behavior. each behavior contain two encapsulation modes: a "compatibility mode," which is for
            backward compatibility with tunnel decapsulators that do not comprehend ECN, and a REQUIRED "normal mode."
            The detail of ingress behavior is shown below:
        </t>
        <figure>
          <name>New IP in IP Encapsulation Behaviours</name>
          <artwork align="center"><![CDATA[
+-----------------+------------------------------+
| Incoming Header |    Departing Outer Header    |
| (also equal to  +---------------+--------------+
| departing Inner | Compatibility |    Normal    |
|      Header)    |       Mode    |     Mode     |
+-----------------+---------------+--------------+
|     Not-ECT     |      Not-ECT  |    Not-ECT   |
|      ECT(0)     |      Not-ECT  |     ECT(0)   |
|      ECT(1)     |      Not-ECT  |     ECT(1)   |
|       CE        |      Not-ECT  |      CE      |
+-----------------+---------------+--------------+
            ]]>
          </artwork>
        </figure>
        <t>
          For the decapsulation behaviour, detail is shown below:
        </t>
          <figure>
            <name>New IP in IP Decapsulation Behaviour</name>
            <artwork align="center"><![CDATA[
+---------+----------------------------------------------+
|Arriving |              Arriving Outer Header           |
| Inner   +---------+------------+------------+----------+
| Header  | Not-ECT |   ECT(0)   |   ECT(1)   |    CE    |
+---------+---------+------------+------------+----------+
| Not-ECT | Not-ECT |Not-ECT(!!!)|Not-ECT(!!!)|drop (!!!)|
|   drop  | ECT(0)  |  ECT(0)    |  light CE  |    CE    |
|   drop  |  ECT(1) | ECT(1) (!) |  light CE  |    CE    |
|    CE   |    CE   |     CE     |    CE(!!!) |    CE    |
+---------+---------+------------+------------+----------+
          ]]>
            </artwork>
          </figure>
        <t>
            ECT(0) and ECT(1) can both indicate the same degree of congestion marking (such as "not congestion marked")
            according to the reasoning above. However, it also makes it possible to construct future schemes in which
            ECT(1) can represent other situation in WAN scenario.
          </t>
      </section>
        <section>
          <name>Two-Threshold ECN Mechanism for WAM</name>
          <t>
            To address the issue of delayed congestion transmission caused by high notification latency in wide area
              networks, this draft proposes the Two Threshold ECN Mechanism. Devices that support ECN in WANs will set
              two thresholds, with different thresholds representing different queue congestion situations. The supported
              devices will respond differently when different thresholds are reached. Here, the outer IP packet
              encapsulation behavior and decapsulation behavior have no change, the meaning of the ECT(1) codepoint has
            change from indicate ECN enable to indicate light congestion happen, detail procedure is as follows:
          </t>
          <t>
            1. When queue occupancy reaches T1 (lower threshold): devices mark packets with ECT(1) codepoint, marking probability increases
              linearly with queue length and intended as early warning signal, then send a CNP packet to the PE which is tunnel
              ingress point. When the ingress PE receive the CNP packet, it will reduce the transmission rate or reroute
            the packet to other path. In this situation, ingress PE will not copy the ECN code to the inner packet header.
          </t>
          <t>
            2. When queue  occupancy reaches T2 (higher threshold): devices mark packets with CE codepoint, marking
            probability follows RED-like curve and need indicates immediate congestion requiring rate reduction. then
            send a CNP packet to the PE which is tunnel ingress point. When the ingress PE receive the CNP packet, it will
            copy the ECN code to the inner packet header and send the packet to the sender. When the sender receive the
            notification, it will reduce the transmission rate.
          </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>TBC</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>TBC</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.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6040.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
    </references>
    
    <section anchor="Contributors" numbered="false">
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
      <name>Contributors</name>
      <t>Thanks to all the contributors.</t>
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
    </section>
    
 </back>
</rfc>
