<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc [
 <!ENTITY nbsp    "&#160;">
 <!ENTITY zwsp   "&#8203;">
 <!ENTITY nbhy   "&#8209;">
 <!ENTITY wj     "&#8288;">
]> 

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" submissionType="IETF"
     category="std" consensus="true" docName="draft-ietf-trill-ecn-support-07"
     number="9600" ipr="trust200902" obsoletes="" updates="" xml:lang="en"
     symRefs="true" sortRefs="true" tocInclude="true" version="3">

	<front>
    <title abbrev="TRILL ECN Support">TRansparent Interconnection of Lots of Links (TRILL): Explicit Congestion Notification (ECN) Support</title>
<seriesInfo name="RFC" value="9600"/>
    <author initials="D." surname="Eastlake 3rd" fullname="Donald E. Eastlake, 3rd">
      <organization>Independent</organization>
      <address>
        <postal>
          <street>2386 Panoramic Circle</street>
          <city>Apopka</city>
          <region>FL</region>
          <code>32703</code>
          <country>United States of America</country>
        </postal>
        <phone>+1-508-333-2270</phone>
        <email>d3e3e3@gmail.com</email>
      </address>
    </author>
    <author initials="B." surname="Briscoe" fullname="Bob Briscoe">
      <organization>Independent</organization>
      <address>
        <postal>
          <country>United Kingdom</country>
        </postal>
        <email>ietf@bobbriscoe.net</email>
        <uri>http://bobbriscoe.net/</uri>
      </address>
    </author>
    <date year="2024" month="August"/>
    <area>RTG</area>
    <workgroup>TRILL</workgroup>

<keyword>example</keyword>

    <abstract>
      <t>
   Explicit Congestion Notification (ECN) allows a forwarding element to
   notify downstream devices, including the destination, of the onset of
   congestion without having to drop packets. This can improve network
   efficiency through better congestion control without packet drops.
   This document extends ECN to TRansparent Interconnection of
   Lots of Links (TRILL) switches, including integration with IP ECN, and
   provides for ECN marking in the TRILL header extension flags word
   (RFC 7179).</t>
    </abstract>
  </front>
  <middle>
    <section anchor="sect-1" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
   Explicit Congestion Notification (ECN) <xref target="RFC3168"
   format="default"/> <xref target="RFC8311" format="default"/> allows a
   forwarding element (such as a router) to
   notify downstream devices, including the destination, of the onset of
   congestion without having to drop packets. This can improve network
   efficiency through better congestion control without packet drops. The
   forwarding element can explicitly mark a proportion of packets in an ECN
   field instead of dropping packets. For example, a 2-bit field is
   available for ECN marking in IP headers.</t>
      <figure anchor="fig-1">
        <name>Example Path-Forwarding Nodes</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                  .............................
                  .                           .
              +---------+                     .
 +------+     | Ingress |                     .
 |Source|  +->| RBridge |                     .   +----------+
 +---+--+  |  |   RB1   |                     .   |Forwarding|
     |     |  +------+--+  +----------+       .   | Element  |
     v     |      .  |     | Transit  |       .   |    Y     |
   +-------+--+   .  +---->| RBridges |       .   +--------+-+
   |Forwarding|   .        |   RBn    |       .      ^     |
   | Element  |   .        +-------+--+  +---------+ |     v
   |    X     |   .                |     | Egress  | |  +-----------+
   +----------+   .                +---->| RBridge +-+  |Destination|
                  .                      |   RB9   |    +-----------+
                  .  TRILL               +---------+
                  .  campus                   .
                  .............................
]]></artwork>
      </figure>
      <t>
   In <xref target="RFC3168" format="default"/>, it was recognized that tunnels and lower-layer
   protocols would need to support ECN, and ECN markings would need to
   be propagated, as headers were encapsulated and decapsulated.
   <xref target="RFC9599" format="default"/> gives guidelines on the addition of ECN to protocols
   like TRILL that often
   encapsulate IP packets, including propagation of ECN from and to IP.</t>
      <t>
   In <xref target="fig-1"/>, assuming IP traffic, RB1 is an encapsulator and
   RB9 is a decapsulator. Traffic from Source to RB1 might or might not get
   marked as having experienced congestion in forwarding elements, such
   as X, before being encapsulated at ingress RB1. Any such ECN marking
   is encapsulated with a TRILL header <xref target="RFC6325" format="default"/>.</t>
      <t>
   This document specifies how ECN marking in traffic at the ingress is
   copied into the TRILL extension header flags word and requires such
   copying for IP traffic. It also enables congestion marking by a
   congested RBridge (such as RBn or RB1 above) in the TRILL header
   extension flags word <xref target="RFC7179" format="default"/>.</t>
      <t>
   At RB9, the TRILL egress, it specifies how any ECN markings in the
   TRILL header flags word and in the encapsulated traffic are combined
   so that subsequent forwarding elements, such as Y and the
   Destination, can see if congestion was experienced at any previous
   point in the path from the Source.</t>
      <t>
   A large part of the guidelines for adding ECN to lower-layer
   protocols <xref target="RFC9599" format="default"/> concerns safe propagation of congestion
   notifications in scenarios where some of the nodes do not support or
   understand ECN. Such ECN ignorance is not a major problem with
   RBridges using this specification, because the method specified
   assures that, if an egress RBridge is ECN ignorant (so it cannot
   further propagate ECN) and congestion has been encountered, the
   egress RBridge will at least drop the packet, and this drop will
   itself indicate congestion to end stations.</t>
      <section anchor="sect-1.1" numbered="true" toc="default">
        <name>Conventions Used in This Document</name>
        <t>
   The terminology and acronyms defined in <xref target="RFC6325"
   format="default"/> are used herein with the same meaning.</t>
        <t>
   In this documents, "IP" refers to both IPv4 and IPv6.</t>

        <t>
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
    NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
    described in BCP&nbsp;14 <xref target="RFC2119"/> <xref target="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>

        <t>Abbreviations:</t>
<dl>
          <dt>AQM:</dt><dd>Active Queue Management</dd>
          <dt>CCE:</dt><dd>Critical Congestion Experienced</dd>
          <dt>CE:</dt><dd>Congestion Experienced</dd>
          <dt>CItE:</dt><dd>Critical Ingress-to-Egress</dd>
          <dt>ECN:</dt><dd>Explicit Congestion Notification</dd>
          <dt>ECT:</dt><dd>ECN-Capable Transport</dd>
          <dt>L4S:</dt><dd>Low Latency, Low Loss, and Scalable throughput</dd>
          <dt>NCHbH:</dt><dd>Non-Critical Hop-by-Hop</dd>
          <dt>NCCE:</dt><dd>Non-Critical Congestion Experienced</dd>
          <dt>Not-ECT:</dt><dd>Not ECN-Capable Transport</dd>
          <dt>PCN:</dt><dd>Pre-Congestion Notification</dd>
        </dl>
      </section>
    </section>
    <section anchor="sect-2" numbered="true" toc="default">
      <name>The ECN-Specific Extended Header Flags</name>
      <t>
   The extension header fields for ECN in TRILL are defined as a 2-bit TRILL-ECN field and a one-bit CCE field in the 32-bit TRILL
   header extension flags word <xref target="RFC7780" format="default"/>.</t>
      <t>
   These fields are shown in <xref target="fig-2"/> as "ECN" and "CCE". The
   TRILL-ECN field consists of bits 12 and 13, which are in the range reserved
   for NCHbH bits. The CCE field consists of bit 26,
   which is in the range reserved for CItE bits. The CRItE bit is the critical
   Ingress-to-Egress summary bit and will be one if, and only if, any of the
   bits in the CItE range (21-26) are one or there is a critical feature
   invoked in some further extension of the TRILL header after the extension
   flags word.  The other bits and fields shown in <xref target="fig-2"/> are
   not relevant to ECN.  See <xref target="RFC7780" format="default"/>, <xref
   target="RFC7179" format="default"/>, and <xref target="IANAthFlags"
   format="default"/> for the meaning of these other bits and fields.</t>
      <figure anchor="fig-2">
        <name>The TRILL-ECN and CCE TRILL Header Extension Flags Word Fields</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Crit.|  CHbH   |   NCHbH   |CRSV | NCRSV |   CItE    |  NCItE  |
|.....|.........|...........|.....|.......|...........|.........|
|C|C|C|       |C|N|     |   |     |       |         | |   |     |
|R|R|R|       |R|C|     |ECN| Ext |       |         |C|Ext|     |
|H|I|R|       |C|C|     |   | Hop |       |         |C|Clr|     |
|b|t|s|       |A|A|     |   | Cnt |       |         |E|   |     |
|H|E|v|       |F|F|     |   |     |       |         | |   |     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <t>
   <xref target="codepoints"/> shows the meaning of the codepoints in the
   TRILL-ECN field.  The first three have the same meaning as the
   corresponding ECN field codepoints in the IP header, as defined in <xref
   target="RFC3168"/>. However, codepoint 0b11 is called NCEE to distinguish
   it from CE in IP.</t>


<table anchor="codepoints">
  <name>TRILL-ECN Field Codepoints</name> 
  <thead>
    <tr>
      <th>Binary</th> 
      <th>Name</th>
      <th>Meaning</th>
    </tr>
  </thead>
  <tbody>        
    <tr>
      <td align="center">00</td>
      <td>Not-ECT</td>
      <td>Not ECN-Capable Transport </td>
    </tr>
    <tr>
      <td align="center">01</td>
      <td>ECT(1)</td>
      <td>ECN-Capable Transport (1)</td>
    </tr>
    <tr>
      <td align="center">10</td>
      <td>ECT(0)</td>
      <td>ECN-Capable Transport (0)</td>
    </tr>
    <tr>
      <td align="center">11</td>
      <td>NCCE</td>
      <td>Non-Critical Congestion Experienced</td>
    </tr>

  </tbody>
</table>

    </section>
    <section anchor="sect-3" numbered="true" toc="default">
      <name>ECN Support</name>
      <t>
   This section specifies interworking between TRILL and the original
   standardized form of ECN in IP <xref target="RFC3168" format="default"/>.</t>
      <t>
   The subsections below describe the required behavior to support ECN
   at TRILL ingress, transit, and egress. The ingress behavior occurs as
   a native frame is encapsulated with a TRILL header to produce a TRILL
   Data packet. The transit behavior occurs in all RBridges where TRILL
   Data packets are queued, usually at the output port (including the output port of the TRILL ingress).  The egress
   behavior occurs where a TRILL Data packet is decapsulated and output
   as a native frame through an RBridge port.</t>
      <t>
   An RBridge that supports ECN <bcp14>MUST</bcp14> behave as described in the relevant
   subsections below, which correspond to the recommended provisions in
   <xref target="sect-3" format="default"/> of this document and Sections <xref
   target="RFC9599" sectionFormat="bare"
   section="4.2"/> through <xref target="RFC9599"
   sectionFormat="bare" section="4.4"/> of <xref
   target="RFC9599"/>. Nonetheless, the
   scheme is designed to safely propagate some form of congestion
   notification even if some RBridges in the path followed by a TRILL
   Data packet support ECN and others do not.</t>
      <section anchor="sect-3.1" numbered="true" toc="default">
        <name>Ingress ECN Support</name>
        <t>
   The behavior at an ingress RBridge is as follows:</t>
        <ul spacing="normal">
          <li>
            <t>When encapsulating an IP frame, the ingress RBridge <bcp14>MUST</bcp14>:</t>
            <ul spacing="normal">
              <li>set the F flag in the main TRILL header <xref target="RFC7780" format="default"/>;</li>
              <li>create a flags word as part of the TRILL header;</li>
              <li>copy the two ECN bits from the IP header into the TRILL-ECN
         field (flags word bits 12 and 13); and</li>
              <li>ensure the CCE flag is set to zero (flags word bit 26).</li>
            </ul>
          </li>
          <li>When encapsulating a frame for a non-IP protocol (where that
          protocol has a means of indicating that ECN is understood by the
          ingress RBridge), the ingress RBridge <bcp14>MUST</bcp14> follow the guidelines in
          <xref target="RFC9599" sectionFormat="of" section="4.3"/> to add a
          flags word to the TRILL header. For a non-IP protocol with an ECN
          field similar to IP, this would be achieved by copying into the
          TRILL-ECN field from the encapsulated native frame.</li>
        </ul>
      </section>
      <section anchor="sect-3.2" numbered="true" toc="default">
        <name>Transit ECN Support</name>
        <t>
   The transit behavior, shown below, is required at all RBridges where
   TRILL Data packets are queued, usually at the output port.</t>
        <ul spacing="normal">
          <li>An RBridge that supports ECN <bcp14>MUST</bcp14> implement some form of AQM according to the guidelines of <xref target="RFC7567" format="default"/>.
      The RBridge detects congestion either by monitoring its own queue
      depth or by participating in a link-specific protocol.</li>
          <li>If the TRILL header flags word is present, whenever the AQM
      algorithm decides to indicate critical congestion on a TRILL Data packet, it
      <bcp14>MUST</bcp14> set the CCE flag (flags word bit 26). Note that Classic ECN marking <xref target="RFC3168"/> only uses critical congestion indications, but the two variants in <xref target="sect-4.1"/> use a combination of critical and non-critical congestion indications.</li>
          <li>
            <t>If the TRILL header flags word is not present, the RBridge will
            either drop the packet or it <bcp14>MAY</bcp14> do all of the
            following instead to indicate congestion:</t>
            <ul spacing="normal">
              <li>set the F flag in the main TRILL header;</li>
              <li>add a flags word to the TRILL header;</li>
              <li>set the TRILL-ECN field to Not-ECT (00); and</li>
              <li>set the CCE flag and the critical Ingress-to-Egress summary bit (CRItE).</li>
            </ul>
          </li>
        </ul>
        <t>
   Note that a transit RBridge that supports ECN does not refer to the
   TRILL-ECN field before signaling CCE in a packet. It signals CCE
   irrespective of whether the packet indicates that the transport is ECN
   capable. The egress/decapsulation behavior ensures that a CCE indication is
   converted to a drop if the transport is not ECN capable.</t>
      </section>
      <section anchor="sect-3.3" numbered="true" toc="default">
        <name>Egress ECN Support</name>
        <section anchor="sect-3.3.1" numbered="true" toc="default">
          <name>Non-ECN Egress RBridges</name>
          <t>
   If the egress RBridge does not support ECN, that RBridge will ignore
   bits 12 and 13 of any flags word that is present because it does not
   contain any special ECN logic. Nonetheless, if a transit RBridge has
   set the CCE flag, the egress will drop the packet. This is because
   drop is the default behavior for an RBridge decapsulating a CItE flag when it has no specific logic to understand
   it. 
Drop is the intended behavior for such a packet, as required by
   <xref target="RFC9599"
   sectionFormat="of" section="4.4"/>.</t>
        </section>
        <section anchor="sect-3.3.2" numbered="true" toc="default">
          <name>ECN Egress RBridges</name>
          <t>
   If an RBridge supports ECN, for the two cases of an IP and a non-IP
   inner packet, the egress behavior is as follows:

          </t>
          <dl newline="false" spacing="normal" indent="3">
            <dt>Decapsulating an inner IP packet:</dt>
            <dd><t>The RBridge sets the
      ECN field of the outgoing native IP packet using <xref
      target="egress-ecn"/>. It <bcp14>MUST</bcp14> set
      the ECN field of the outgoing IP packet to the codepoint at the
      intersection of the row for the arriving encapsulated IP packet and the
      column for 3-bit ECN codepoint in the arriving outer TRILL Data packet
      TRILL header. If no TRILL header extension flags word is present, the
      3-bit ECN codepoint is assumed to be all zero bits.</t>
            <t>The name of the TRILL 3-bit ECN codepoint used in <xref target="egress-ecn"/> is defined using the
      combination of the TRILL-ECN and CCE fields in <xref target="mapping"/>.  Specifically,
      the TRILL 3-bit ECN codepoint is called CE if either NCCE or CCE is set
      in the TRILL header extension flags word. Otherwise, it has the same name
      as the 2-bit TRILL-ECN codepoint.</t>
            <t>
            In the case where the TRILL 3-bit ECN codepoint indicates CE but
            the encapsulated native IP frame indicates a Not-ECT, it can be
            seen that the RBridge <bcp14>MUST</bcp14> drop the packet.  Such
            packet dropping is necessary because a transport above the IP
            layer that is not ECN capable will have no ECN logic, so it will
            only understand dropped packets as an indication of
            congestion.</t></dd>
          </dl>
          <dl newline="false" spacing="normal" indent="3">
            <dt>Decapsulating a non-IP protocol frame:</dt>
            <dd>If the frame has
	a means of indicating ECN that is understood by the RBridge, it <bcp14>MUST</bcp14>
	follow the guidelines in <xref
	target="RFC9599" sectionFormat="of" section="4.4"/> when
	setting the ECN
	information in the decapsulated native frame.  For a non-IP protocol
	with an ECN field similar to IP, this would be achieved by combining
	the information in the TRILL header flags word with the encapsulated
	non-IP native frame, as specified in <xref target="egress-ecn"/>.</dd>
          </dl>
          <table anchor="mapping" align="center">
            <name>Mapping of TRILL-ECN and CCE Fields to the TRILL 3-Bit ECN Codepoint Name</name>
            <thead>
              <tr>
               <th rowspan ="1" colspan="2">TRILL-ECN</th>
                <th rowspan="2">CCE</th>
                <th rowspan="2">Arriving TRILL 3-Bit ECN Codepoint Name</th>
              </tr>
	      <tr>
		<th>Name</th>
		<th>Bits</th>
	      </tr>
            </thead>
            <tbody>
              <tr>
                <td>Not-ECT</td>
		<td align="center">00</td>
                <td align="center">0</td>
                <td>Not-ECT</td>
              </tr>
              <tr>
                <td>ECT(1)</td>
                <td align="center">01</td>
		<td align="center">0</td>
                <td>ECT(1)</td>
              </tr>
              <tr>
		<td>ECT(0)</td>
                <td align="center">10</td>
                <td align="center">0</td>
                <td>ECT(0)</td>
              </tr>
              <tr>
                <td>NCCE</td>
		<td align="center">11</td>
                <td align="center">0</td>
                <td>CE</td>
              </tr>
              <tr>
                <td>Not-ECT</td>
                <td align="center">00</td>
		<td align="center">1</td>
                <td>CE</td>
              </tr>
              <tr>
                <td>ECT(1)</td>
		<td align="center">01</td>
                <td align="center">1</td>
                <td>CE</td>
              </tr>
              <tr>
                <td>ECT(0)</td>
		<td align="center">10</td>
                <td align="center">1</td>
                <td>CE</td>
              </tr>
              <tr>
                <td>NCCE</td>
		<td align="center"> 11</td>
                <td align="center">1</td>
                <td>CE</td>
              </tr>
            </tbody>
          </table>

<table anchor="egress-ecn">
  <name>Egress ECN Behavior</name>   
  <thead>
    <tr>
      <th rowspan="2" align="center">Inner Native Header</th>
      <th colspan="4" align="center">Arriving TRILL 3-Bit ECN Codepoint Name</th>
    </tr>
    <tr>
      <th align="center">Not-ECT</th>
      <th align="center">ECT(0)</th>
      <th align="center">ECT(1)</th>
      <th align="center">CE</th>
    </tr>
  </thead>
  <tbody>      
    <tr>
      <td align="center">Not-ECT</td>
      <td align="center">Not-ECT</td>
      <td align="center">Not-ECT(*)</td>
      <td align="center">Not-ECT(*)</td>
      <td align="center">&lt;drop&gt;</td>
    </tr>
    <tr>
      <td align="center">ECT(0)</td>
      <td align="center">ECT(0)</td>
      <td align="center">ECT(0)</td>
      <td align="center">ECT(1)</td>
      <td align="center">CE</td>
    </tr>
    <tr>
      <td align="center">ECT(1)</td>
      <td align="center">ECT(1)</td>
      <td align="center">ECT(1)(*)</td>
      <td align="center">ECT(1)</td>
      <td align="center">CE</td>
    </tr>
    <tr>
      <td align="center">CE</td>
      <td align="center">CE</td>
      <td align="center">CE</td>
      <td align="center">CE(*)</td>
      <td align="center">CE</td>
    </tr>
  </tbody>
</table>


          <t>
   An asterisk in <xref target="egress-ecn"/> indicates a combination that is
   currently unused in all variants of ECN marking (see <xref target="sect-4" format="default"/>) and
   therefore <bcp14>SHOULD</bcp14> be logged.</t>
          <t>
   With one exception, the mappings in <xref target="egress-ecn"/> are consistent with those for
   IP-in-IP tunnels <xref target="RFC6040" format="default"/>, which ensures backward
   compatibility with all current and past variants of ECN marking (see <xref target="sect-4" format="default"/>). It also ensures forward compatibility with any future
   form of ECN marking that complies with the guidelines in <xref target="RFC9599" format="default"/>, including cases where
   ECT(1) represents a second level of marking severity below CE.</t>
          <t>
   The one exception is that the drop condition in <xref target="egress-ecn"/> need not be
   logged because, with TRILL, it is the result of a valid combination
   of events.</t>
        </section>
      </section>
    </section>
    <section anchor="sect-4" numbered="true" toc="default">
      <name>TRILL Support for ECN Variants</name>
      <t>
   This section is informative, not normative; it discusses interworking
   between TRILL and variants of the standardized form of ECN in IP
   <xref target="RFC3168" format="default"/>. See also <xref target="RFC8311" format="default"/>.</t>
      <t>
   The ECN wire protocol for TRILL (<xref target="sect-2" format="default"/>)
   and the ingress (<xref target="sect-3.1" format="default"/>) and egress
   (<xref target="sect-3.3" format="default"/>) ECN behaviors have been
   designed to
   support the other known variants of ECN as detailed below. New
   variants of ECN will have to comply with the guidelines for defining
   alternative ECN semantics <xref target="RFC4774" format="default"/>. It is expected that the TRILL
   ECN wire protocol is generic enough to support such potential future
   variants.</t>
      <section anchor="sect-4.1" numbered="true" toc="default">
        <name>Pre-Congestion Notification (PCN)</name>
        <t>
   The PCN wire protocol <xref target="RFC6660" format="default"/> is
   recognized by the use of a
   PCN-compatible Diffserv codepoint in the IP header and a nonzero IP-ECN
   field. For TRILL or any lower-layer protocol, equivalent
   traffic-classification codepoints would have to be defined, but that is
   outside the
   scope of this document.</t>
        <t>
   The PCN wire protocol is similar to ECN, except it indicates
   congestion with two levels of severity. It uses:</t>
        <ul spacing="normal">
          <li>11 (CE) as the most severe, termed the Excess-Traffic-Marked (ETM)
     codepoint</li>
          <li>01 ECT(1) as a lesser severity level, termed the Threshold-Marked
     (ThM) codepoint. This difference between ECT(1) and ECT(0) only
     applies to PCN, not to the classic ECN support specified for TRILL
     in this document before <xref target="sect-4" format="default"/>.</li>
        </ul>
        <t>
   To implement PCN on a transit RBridge would require a detailed
   specification. In brief:</t>
        <ul spacing="normal">
          <li>the TRILL CCE flag would be used
     for the Excess-Traffic-Marked (ETM) codepoint;</li>
          <li>ECT(1) in the TRILL-ECN field would be used for the Threshold-Marked
     codepoint.</li>
        </ul>
        <t>
   Then, the ingress and egress behaviors defined in <xref target="sect-3" format="default"/> would not
   need to be altered to ensure support for PCN as well as ECN.</t>
      </section>
      <section anchor="sect-4.2" numbered="true" toc="default">
        <name>Low Latency, Low Loss, and Scalable Throughput (L4S)</name>
        <t>
   L4S is currently on the IETF's experimental track. An outline of how
   a transit TRILL RBridge would support L4S <xref target="RFC9331" format="default"/> is given in
   <xref target="sect-a"/>.</t>
      </section>
    </section>
    <section anchor="sect-5" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   IANA has updated the "TRILL Extended Header Flags" registry
   by replacing the lines for bits 9-13 and 21-26 with the
   following:</t>

<table anchor="iana">  
  <name>Updated "TRILL Extended Header Flags" Registry</name>    
  <thead>
    <tr>
      <th>Bits</th>
      <th>Purpose</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>          
    <tr>
      <td>9-11</td>
      <td>available non-critical hop-by-hop flags</td>
      <td><xref target="RFC7179"/></td>
    </tr>
    <tr>
      <td>12-13</td>
      <td>TRILL-ECN (Explicit Congestion Notification)</td>
      <td>RFC 9600</td>
    </tr>
    <tr>
      <td>21-25</td>
      <td>available critical ingress-to-egress flags</td>
      <td><xref target="RFC7179"/></td>
    </tr>
    <tr>
      <td>26</td>
      <td>Critical Congestion Experienced (CCE)</td>
      <td>RFC 9600</td>
    </tr>
  </tbody>
</table>
    </section>

    <section anchor="sect-6" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
   TRILL support of ECN is a straightforward combination of previously
   specified ECN and TRILL with no significant new security
   considerations.</t>
      <t>
For general security considerations regarding adding ECN to lower layer protocols, see <xref target="RFC9599"/> and <xref target="RFC6040"/>.</t>
<t>
For general TRILL protocol security considerations, see <xref target="RFC6325"/>.</t>
    </section>
  </middle>
  <back>



    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3168.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4774.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6325.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7179.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7567.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7780.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8311.xml"/>

<reference anchor="RFC9599" target="https://www.rfc-editor.org/info/rfc9599">
<front>
<title>Guidelines for Adding Congestion Notification to Protocols that
Encapsulate IP</title>
<author initials='B.' surname='Briscoe' fullname='Bob Briscoe'>
  <organization>Independent</organization>
</author>
<author initials='J.' surname='Kaippallimalil' fullname='John Kaippallimalil'>
  <organization>Futurewei</organization>
</author>    
<date month='August' year='2024'/>
</front>
<seriesInfo name="RFC" value="9599"/>
<seriesInfo name="DOI" value="10.17487/RFC9599"/>
</reference>


      </references>
      <references>
        <name>Informative References</name>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9331.xml"/>

        <reference anchor="IANAthFlags" target="http://www.iana.org/assignments/trill-parameters/">
          <front>
            <title>TRILL Extended Header Flags</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>

        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6040.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6660.xml"/>
      </references>
    </references>
    <section anchor="sect-a" numbered="true" toc="default">
      <name>TRILL Transit RBridge Behavior to Support L4S</name>
      <t>
   The specification of the Low Latency, Low Loss, and Scalable throughput (L4S) wire protocol for IP is given in <xref target="RFC9331" format="default"/>. L4S is one example
   of the ways TRILL ECN handling may evolve <xref target="RFC8311" format="default"/>. It is similar to
   the original ECN wire protocol for IP <xref target="RFC3168" format="default"/>, except:</t>
      <ul spacing="normal">
        <li>An AQM that supports L4S classifies packets with ECT(1) or CE in
     the IP header into an L4S queue and a "Classic" queue otherwise.</li>
        <li>The meaning of CE markings applied by an L4S queue is not the same
     as the meaning of a drop by a "Classic" queue (contrary to the
     original requirement for ECN <xref target="RFC3168" format="default"/>). Instead, the likelihood
     that the Classic queue drops packets is defined as the square of
     the likelihood that the L4S queue marks packets -- e.g., when there
     is a drop probability of 0.0009 (0.09%), the L4S marking
     probability will be 0.03 (3%).</li>
      </ul>
      <t>
   This seems to present a problem for the way that a transit TRILL RBridge
   defers the choice between marking and dropping to the egress.  Nonetheless,
   the following pseudocode outlines how a transit TRILL RBridge can implement
   L4S marking in such a way that the egress behavior already described in
   <xref target="sect-3.3" format="default"/> for Classic ECN <xref target="RFC3168" format="default"/> will
   produce the desired outcome.</t>
<sourcecode type="pseudocode">
   /* p is an internal variable calculated by any L4S AQM
    *  dependent on the delay being experienced in the Classic queue.
    * bit13 is the least significant bit of the TRILL-ECN field
    */

   % On TRILL transit
   if (bit13 == 0 ) {
         % Classic Queue
         if (p > max(random(), random()) )
            mark(CCE)                         % likelihood: p^2

   } else {
         % L4S Queue
         if (p > random() ) {
            if (p > random() )
               mark(CCE)                      % likelihood: p^2
            else
               mark(NCCE)                     % likelihood: p - p^2
         }
   }
</sourcecode>
      <t>
   With the above transit behavior, an egress that supports ECN (<xref target="sect-3.3" format="default"/>) will drop packets or propagate their ECN markings
   depending on whether the arriving inner header is from an ECN-capable or not ECN-capable transport.</t>
      <t>
   Even if an egress has no L4S-specific logic of its own, it will drop
   packets with the square of the probability that an egress would if it
   did support ECN, for the following reasons:</t>
      <ul spacing="normal">
        <li>
          <t>Egress with ECN support:</t>
          <ul spacing="normal">
            <li>
              <t>L4S: Propagates both the Critical and Non-Critical CE marks
        (CCE and NCCE) as a CE mark.</t>
              <t>
	Likelihood: p<sup>2</sup> + p - p<sup>2</sup> = p
              </t>
            </li>
            <li>
              <t>Classic: Propagates CCE marks as CE or drop, depending on
        the inner header.</t>
              <t>
	Likelihood: p<sup>2</sup>
              </t>
            </li>
          </ul>
        </li>
        <li>
          <t>Egress without ECN support:</t>
          <ul spacing="normal">
            <li>
              <t>L4S: Does not propagate NCCE as a CE mark, but drops CCE marks.</t>
              <t>
	Likelihood: p<sup>2</sup>
              </t>
            </li>
            <li>
              <t>Classic: Drops CCE marks.</t>
              <t>
	Likelihood: p<sup>2</sup>
              </t>
            </li>
          </ul>
        </li>
      </ul>
    </section>
    <section anchor="sect-7" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
   The helpful comments of <contact fullname="Loa Andersson"/> and <contact fullname="Adam Roach"/> are hereby
   acknowledged.</t>
    </section>
  </back>
</rfc>
