home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2481.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  64.4 KB  |  1,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                    K. Ramakrishnan
  8. Request for Comments: 2481                            AT&T Labs Research
  9. Category: Experimental                                          S. Floyd
  10.                                                                     LBNL
  11.                                                             January 1999
  12.  
  13.  
  14.      A Proposal to add Explicit Congestion Notification (ECN) to IP
  15.  
  16. Status of this Memo
  17.  
  18.    This memo defines an Experimental Protocol for the Internet
  19.    community.  It does not specify an Internet standard of any kind.
  20.    Discussion and suggestions for improvement are requested.
  21.    Distribution of this memo is unlimited.
  22.  
  23. Copyright Notice
  24.  
  25.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  26.  
  27. Abstract
  28.  
  29.    This note describes a proposed addition of ECN (Explicit Congestion
  30.    Notification) to IP.  TCP is currently the dominant transport
  31.    protocol used in the Internet. We begin by describing TCP's use of
  32.    packet drops as an indication of congestion.  Next we argue that with
  33.    the addition of active queue management (e.g., RED) to the Internet
  34.    infrastructure, where routers detect congestion before the queue
  35.    overflows, routers are no longer limited to packet drops as an
  36.    indication of congestion.  Routers could instead set a Congestion
  37.    Experienced (CE) bit in the packet header of packets from ECN-capable
  38.    transport protocols.  We describe when the CE bit would be set in the
  39.    routers, and describe what modifications would be needed to TCP to
  40.    make it ECN-capable.  Modifications to other transport protocols
  41.    (e.g., unreliable unicast or multicast, reliable multicast, other
  42.    reliable unicast transport protocols) could be considered as those
  43.    protocols are developed and advance through the standards process.
  44.  
  45. 1.  Conventions and Acronyms
  46.  
  47.    The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
  48.    SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
  49.    document, are to be interpreted as described in [B97].
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Ramakrishnan & Floyd          Experimental                      [Page 1]
  59.  
  60. RFC 2481                       ECN to IP                    January 1999
  61.  
  62.  
  63. 2. Introduction
  64.  
  65.    TCP's congestion control and avoidance algorithms are based on the
  66.    notion that the network is a black-box [Jacobson88, Jacobson90].  The
  67.    network's state of congestion or otherwise is determined by end-
  68.    systems probing for the network state, by gradually increasing the
  69.    load on the network (by increasing the window of packets that are
  70.    outstanding in the network) until the network becomes congested and a
  71.    packet is lost.  Treating the network as a "black-box" and treating
  72.    loss as an indication of congestion in the network is appropriate for
  73.    pure best-effort data carried by TCP which has little or no
  74.    sensitivity to delay or loss of individual packets.  In addition,
  75.    TCP's congestion management algorithms have techniques built-in (such
  76.    as Fast Retransmit and Fast Recovery) to minimize the impact of
  77.    losses from a throughput perspective.
  78.  
  79.    However, these mechanisms are not intended to help applications that
  80.    are in fact sensitive to the delay or loss of one or more individual
  81.    packets.  Interactive traffic such as telnet, web-browsing, and
  82.    transfer of audio and video data can be sensitive to packet losses
  83.    (using an unreliable data delivery transport such as UDP) or to the
  84.    increased latency of the packet caused by the need to retransmit the
  85.    packet after a loss (for reliable data delivery such as TCP).
  86.  
  87.    Since TCP determines the appropriate congestion window to use by
  88.    gradually increasing the window size until it experiences a dropped
  89.    packet, this causes the queues at the bottleneck router to build up.
  90.    With most packet drop policies at the router that are not sensitive
  91.    to the load placed by each individual flow, this means that some of
  92.    the packets of latency-sensitive flows are going to be dropped.
  93.    Active queue management mechanisms detect congestion before the queue
  94.    overflows, and provide an indication of this congestion to the end
  95.    nodes.  The advantages of active queue management are discussed in
  96.    RFC 2309 [RFC2309].  Active queue management avoids some of the bad
  97.    properties of dropping on queue overflow, including the undesirable
  98.    synchronization of loss across multiple flows.  More importantly,
  99.    active queue management means that transport protocols with
  100.    congestion control (e.g., TCP) do not have to rely on buffer overflow
  101.    as the only indication of congestion.  This can reduce unnecessary
  102.    queueing delay for all traffic sharing that queue.
  103.  
  104.    Active queue management mechanisms may use one of several methods for
  105.    indicating congestion to end-nodes. One is to use packet drops, as is
  106.    currently done. However, active queue management allows the router to
  107.    separate policies of queueing or dropping packets from the policies
  108.    for indicating congestion. Thus, active queue management allows
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Ramakrishnan & Floyd          Experimental                      [Page 2]
  115.  
  116. RFC 2481                       ECN to IP                    January 1999
  117.  
  118.  
  119.    routers to use the Congestion Experienced (CE) bit in a packet header
  120.    as an indication of congestion, instead of relying solely on packet
  121.    drops.
  122.  
  123. 3. Assumptions and General Principles
  124.  
  125.    In this section, we describe some of the important design principles
  126.    and assumptions that guided the design choices in this proposal.
  127.  
  128.    (1) Congestion may persist over different time-scales. The time
  129.        scales that we are concerned with are congestion events that may
  130.        last longer than a round-trip time.
  131.    (2) The number of packets in an individual flow (e.g., TCP connection
  132.        or an exchange using UDP) may range from a small number of
  133.        packets to quite a large number. We are interested in managing
  134.        the congestion caused by flows that send enough packets so that
  135.        they are still active when network feedback reaches them.
  136.    (3) New mechanisms for congestion control and avoidance need to co-
  137.        exist and cooperate with existing mechanisms for congestion
  138.        control.  In particular, new mechanisms have to co-exist with
  139.        TCP's current methods of adapting to congestion and with routers'
  140.        current practice of dropping packets in periods of congestion.
  141.    (4) Because ECN is likely to be adopted gradually, accommodating
  142.        migration is essential. Some routers may still only drop packets
  143.        to indicate congestion, and some end-systems may not be ECN-
  144.        capable. The most viable strategy is one that accommodates
  145.        incremental deployment without having to resort to "islands" of
  146.        ECN-capable and non-ECN-capable environments.
  147.    (5) Asymmetric routing is likely to be a normal occurrence in the
  148.        Internet. The path (sequence of links and routers) followed by
  149.        data packets may be different from the path followed by the
  150.        acknowledgment packets in the reverse direction.
  151.    (6) Many routers process the "regular" headers in IP packets more
  152.        efficiently than they process the header information in IP
  153.        options.  This suggests keeping congestion experienced
  154.        information in the regular headers of an IP packet.
  155.    (7) It must be recognized that not all end-systems will cooperate in
  156.        mechanisms for congestion control. However, new mechanisms
  157.        shouldn't make it easier for TCP applications to disable TCP
  158.        congestion control.  The benefit of lying about participating in
  159.        new mechanisms such as ECN-capability should be small.
  160.  
  161. 4. Random Early Detection (RED)
  162.  
  163.    Random Early Detection (RED) is a mechanism for active queue
  164.    management that has been proposed to detect incipient congestion
  165.    [FJ93], and is currently being deployed in the Internet backbone
  166.    [RFC2309].  Although RED is meant to be a general mechanism using one
  167.  
  168.  
  169.  
  170. Ramakrishnan & Floyd          Experimental                      [Page 3]
  171.  
  172. RFC 2481                       ECN to IP                    January 1999
  173.  
  174.  
  175.    of several alternatives for congestion indication, in the current
  176.    environment of the Internet RED is restricted to using packet drops
  177.    as a mechanism for congestion indication.  RED drops packets based on
  178.    the average queue length exceeding a threshold, rather than only when
  179.    the queue overflows.  However, when RED drops packets before the
  180.    queue actually overflows, RED is not forced by memory limitations to
  181.    discard the packet.
  182.  
  183.    RED could set a Congestion Experienced (CE) bit in the packet header
  184.    instead of dropping the packet, if such a bit was provided in the IP
  185.    header and understood by the transport protocol.  The use of the CE
  186.    bit would allow the receiver(s) to receive the packet, avoiding the
  187.    potential for excessive delays due to retransmissions after packet
  188.    losses.  We use the term 'CE packet' to denote a packet that has the
  189.    CE bit set.
  190.  
  191. 5. Explicit Congestion Notification in IP
  192.  
  193.    We propose that the Internet provide a congestion indication for
  194.    incipient congestion (as in RED and earlier work [RJ90]) where the
  195.    notification can sometimes be through marking packets rather than
  196.    dropping them.  This would require an ECN field in the IP header with
  197.    two bits.  The ECN-Capable Transport (ECT) bit would be set by the
  198.    data sender to indicate that the end-points of the transport protocol
  199.    are ECN-capable.  The CE bit would be set by the router to indicate
  200.    congestion to the end nodes.  Routers that have a packet arriving at
  201.    a full queue would drop the packet, just as they do now.
  202.  
  203.    Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field.
  204.    Bit 6 is designated as the ECT bit, and bit 7 is designated as the CE
  205.    bit.  The IPv4 TOS octet corresponds to the Traffic Class octet in
  206.    IPv6.  The definitions for the IPv4 TOS octet [RFC791] and the IPv6
  207.    Traffic Class octet are intended to be superseded by the DS
  208.    (Differentiated Services) Field [DIFFSERV].  Bits 6 and 7 are listed
  209.    in [DIFFSERV] as Currently Unused.  Section 19 gives a brief history
  210.    of the TOS octet.
  211.  
  212.    Because of the unstable history of the TOS octet, the use of the ECN
  213.    field as specified in this document cannot be guaranteed to be
  214.    backwards compatible with all past uses of these two bits.  The
  215.    potential dangers of this lack of backwards compatibility are
  216.    discussed in Section 19.
  217.  
  218.    Upon the receipt by an ECN-Capable transport of a single CE packet,
  219.    the congestion control algorithms followed at the end-systems MUST be
  220.    essentially the same as the congestion control response to a *single*
  221.    dropped packet.  For example, for ECN-Capable TCP the source TCP is
  222.    required to halve its congestion window for any window of data
  223.  
  224.  
  225.  
  226. Ramakrishnan & Floyd          Experimental                      [Page 4]
  227.  
  228. RFC 2481                       ECN to IP                    January 1999
  229.  
  230.  
  231.    containing either a packet drop or an ECN indication.  However, we
  232.    would like to point out some notable exceptions in the reaction of
  233.    the source TCP, related to following the shorter-time-scale details
  234.    of particular implementations of TCP.  For TCP's response to an ECN
  235.    indication, we do not recommend such behavior as the slow-start of
  236.    Tahoe TCP in response to a packet drop, or Reno TCP's wait of roughly
  237.    half a round-trip time during Fast Recovery.
  238.  
  239.    One reason for requiring that the congestion-control response to the
  240.    CE packet be essentially the same as the response to a dropped packet
  241.    is to accommodate the incremental deployment of ECN in both end-
  242.    systems and in routers.  Some routers may drop ECN-Capable packets
  243.    (e.g., using the same RED policies for congestion detection) while
  244.    other routers set the CE bit, for equivalent levels of congestion.
  245.    Similarly, a router might drop a non-ECN-Capable packet but set the
  246.    CE bit in an ECN-Capable packet, for equivalent levels of congestion.
  247.    Different congestion control responses to a CE bit indication and to
  248.    a packet drop could result in unfair treatment for different flows.
  249.  
  250.    An additional requirement is that the end-systems should react to
  251.    congestion at most once per window of data (i.e., at most once per
  252.    roundtrip time), to avoid reacting multiple times to multiple
  253.    indications of congestion within a roundtrip time.
  254.  
  255.    For a router, the CE bit of an ECN-Capable packet should only be set
  256.    if the router would otherwise have dropped the packet as an
  257.    indication of congestion to the end nodes. When the router's buffer
  258.    is not yet full and the router is prepared to drop a packet to inform
  259.    end nodes of incipient congestion, the router should first check to
  260.    see if the ECT bit is set in that packet's IP header.  If so, then
  261.    instead of dropping the packet, the router MAY instead set the CE bit
  262.    in the IP header.
  263.  
  264.    An environment where all end nodes were ECN-Capable could allow new
  265.    criteria to be developed for setting the CE bit, and new congestion
  266.    control mechanisms for end-node reaction to CE packets.  However,
  267.    this is a research issue, and as such is not addressed in this
  268.    document.
  269.  
  270.    When a CE packet is received by a router, the CE bit is left
  271.    unchanged, and the packet transmitted as usual. When severe
  272.    congestion has occurred and the router's queue is full, then the
  273.    router has no choice but to drop some packet when a new packet
  274.    arrives.  We anticipate that such packet losses will become
  275.    relatively infrequent when a majority of end-systems become ECN-
  276.    Capable and participate in TCP or other compatible congestion control
  277.    mechanisms. In an adequately-provisioned network in such an ECN-
  278.    Capable environment, packet losses should occur primarily during
  279.  
  280.  
  281.  
  282. Ramakrishnan & Floyd          Experimental                      [Page 5]
  283.  
  284. RFC 2481                       ECN to IP                    January 1999
  285.  
  286.  
  287.    transients or in the presence of non-cooperating sources.
  288.  
  289.    We expect that routers will set the CE bit in response to incipient
  290.    congestion as indicated by the average queue size, using the RED
  291.    algorithms suggested in [FJ93, RFC2309].  To the best of our
  292.    knowledge, this is the only proposal currently under discussion in
  293.    the IETF for routers to drop packets proactively, before the buffer
  294.    overflows.  However, this document does not attempt to specify a
  295.    particular mechanism for active queue management, leaving that
  296.    endeavor, if needed, to other areas of the IETF.  While ECN is
  297.    inextricably tied up with active queue management at the router, the
  298.    reverse does not hold; active queue management mechanisms have been
  299.    developed and deployed independently from ECN, using packet drops as
  300.    indications of congestion in the absence of ECN in the IP
  301.    architecture.
  302.  
  303. 6. Support from the Transport Protocol
  304.  
  305.    ECN requires support from the transport protocol, in addition to the
  306.    functionality given by the ECN field in the IP packet header. The
  307.    transport protocol might require negotiation between the endpoints
  308.    during setup to determine that all of the endpoints are ECN-capable,
  309.    so that the sender can set the ECT bit in transmitted packets.
  310.    Second, the transport protocol must be capable of reacting
  311.    appropriately to the receipt of CE packets.  This reaction could be
  312.    in the form of the data receiver informing the data sender of the
  313.    received CE packet (e.g., TCP), of the data receiver unsubscribing to
  314.    a layered multicast group (e.g., RLM [MJV96]), or of some other
  315.    action that ultimately reduces the arrival rate of that flow to that
  316.    receiver.
  317.  
  318.    This document only addresses the addition of ECN Capability to TCP,
  319.    leaving issues of ECN and other transport protocols to further
  320.    research.  For TCP, ECN requires three new mechanisms:  negotiation
  321.    between the endpoints during setup to determine if they are both
  322.    ECN-capable; an ECN-Echo flag in the TCP header so that the data
  323.    receiver can inform the data sender when a CE packet has been
  324.    received; and a Congestion Window Reduced (CWR) flag in the TCP
  325.    header so that the data sender can inform the data receiver that the
  326.    congestion window has been reduced. The support required from other
  327.    transport protocols is likely to be different, particular for
  328.    unreliable or reliable multicast transport protocols, and will have
  329.    to be determined as other transport protocols are brought to the IETF
  330.    for standardization.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Ramakrishnan & Floyd          Experimental                      [Page 6]
  339.  
  340. RFC 2481                       ECN to IP                    January 1999
  341.  
  342.  
  343. 6.1. TCP
  344.  
  345.    The following sections describe in detail the proposed use of ECN in
  346.    TCP.  This proposal is described in essentially the same form in
  347.    [Floyd94]. We assume that the source TCP uses the standard congestion
  348.    control algorithms of Slow-start, Fast Retransmit and Fast Recovery
  349.    [RFC 2001].
  350.  
  351.    This proposal specifies two new flags in the Reserved field of the
  352.    TCP header.  The TCP mechanism for negotiating ECN-Capability uses
  353.    the ECN-Echo flag in the TCP header.  (This was called the ECN Notify
  354.    flag in some earlier documents.)  Bit 9 in the Reserved field of the
  355.    TCP header is designated as the ECN-Echo flag.  The location of the
  356.    6-bit Reserved field in the TCP header is shown in Figure 3 of RFC
  357.    793 [RFC793].
  358.  
  359.    To enable the TCP receiver to determine when to stop setting the
  360.    ECN-Echo flag, we introduce a second new flag in the TCP header, the
  361.    Congestion Window Reduced (CWR) flag.  The CWR flag is assigned to
  362.    Bit 8 in the Reserved field of the TCP header.
  363.  
  364.    The use of these flags is described in the sections below.
  365.  
  366. 6.1.1.  TCP Initialization
  367.  
  368.    In the TCP connection setup phase, the source and destination TCPs
  369.    exchange information about their desire and/or capability to use ECN.
  370.    Subsequent to the completion of this negotiation, the TCP sender sets
  371.    the ECT bit in the IP header of data packets to indicate to the
  372.    network that the transport is capable and willing to participate in
  373.    ECN for this packet. This will indicate to the routers that they may
  374.    mark this packet with the CE bit, if they would like to use that as a
  375.    method of congestion notification. If the TCP connection does not
  376.    wish to use ECN notification for a particular packet, the sending TCP
  377.    sets the ECT bit equal to 0 (i.e., not set), and the TCP receiver
  378.    ignores the CE bit in the received packet.
  379.  
  380.    When a node sends a TCP SYN packet, it may set the ECN-Echo and CWR
  381.    flags in the TCP header.  For a SYN packet, the setting of both the
  382.    ECN-Echo and CWR flags are defined as an indication that the sending
  383.    TCP is ECN-Capable, rather than as an indication of congestion or of
  384.    response to congestion. More precisely, a SYN packet with both the
  385.    ECN-Echo and CWR flags set indicates that the TCP implementation
  386.    transmitting the SYN packet will participate in ECN as both a sender
  387.    and receiver.  As a receiver, it will respond to incoming data
  388.    packets that have the CE bit set in the IP header by setting the
  389.    ECN-Echo flag in outgoing TCP Acknowledgement (ACK) packets.  As a
  390.    sender, it will respond to incoming packets that have the ECN-Echo
  391.  
  392.  
  393.  
  394. Ramakrishnan & Floyd          Experimental                      [Page 7]
  395.  
  396. RFC 2481                       ECN to IP                    January 1999
  397.  
  398.  
  399.    flag set by reducing the congestion window when appropriate.
  400.  
  401.    When a node sends a SYN-ACK packet, it may set the ECN-Echo flag, but
  402.    it does not set the CWR flag.  For a SYN-ACK packet, the pattern of
  403.    the ECN-Echo flag set and the CWR flag not set in the TCP header is
  404.    defined as an indication that the TCP transmitting the SYN-ACK packet
  405.    is ECN-Capable.
  406.  
  407.    There is the question of why we chose to have the TCP sending the SYN
  408.    set two ECN-related flags in the Reserved field of the TCP header for
  409.    the SYN packet, while the responding TCP sending the SYN-ACK sets
  410.    only one ECN-related flag in the SYN-ACK packet.  This asymmetry is
  411.    necessary for the robust negotiation of ECN-capability with deployed
  412.    TCP implementations.  There exists at least one TCP implementation in
  413.    which TCP receivers set the Reserved field of the TCP header in ACK
  414.    packets (and hence the SYN-ACK) simply to reflect the Reserved field
  415.    of the TCP header in the received data packet.  Because the TCP SYN
  416.    packet sets the ECN-Echo and CWR flags to indicate ECN-capability,
  417.    while the SYN-ACK packet sets only the ECN-Echo flag, the sending TCP
  418.    correctly interprets a receiver's reflection of its own flags in the
  419.    Reserved field as an indication that the receiver is not ECN-capable.
  420.  
  421. 6.1.2.  The TCP Sender
  422.  
  423.    For a TCP connection using ECN, data packets are transmitted with the
  424.    ECT bit set in the IP header (set to a "1").  If the sender receives
  425.    an ECN-Echo ACK packet (that is, an ACK packet with the ECN-Echo flag
  426.    set in the TCP header), then the sender knows that congestion was
  427.    encountered in the network on the path from the sender to the
  428.    receiver.  The indication of congestion should be treated just as a
  429.    congestion loss in non-ECN-Capable TCP. That is, the TCP source
  430.    halves the congestion window "cwnd" and reduces the slow start
  431.    threshold "ssthresh".  The sending TCP does NOT increase the
  432.    congestion window in response to the receipt of an ECN-Echo ACK
  433.    packet.
  434.  
  435.    A critical condition is that TCP does not react to congestion
  436.    indications more than once every window of data (or more loosely,
  437.    more than once every round-trip time). That is, the TCP sender's
  438.    congestion window should be reduced only once in response to a series
  439.    of dropped and/or CE packets from a single window of data, In
  440.    addition, the TCP source should not decrease the slow-start
  441.    threshold, ssthresh, if it has been decreased within the last round
  442.    trip time.  However, if any retransmitted packets are dropped or have
  443.    the CE bit set, then this is interpreted by the source TCP as a new
  444.    instance of congestion.
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Ramakrishnan & Floyd          Experimental                      [Page 8]
  451.  
  452. RFC 2481                       ECN to IP                    January 1999
  453.  
  454.  
  455.    After the source TCP reduces its congestion window in response to a
  456.    CE packet, incoming acknowledgements that continue to arrive can
  457.    "clock out" outgoing packets as allowed by the reduced congestion
  458.    window.  If the congestion window consists of only one MSS (maximum
  459.    segment size), and the sending TCP receives an ECN-Echo ACK packet,
  460.    then the sending TCP should in principle still reduce its congestion
  461.    window in half. However, the value of the congestion window is
  462.    bounded below by a value of one MSS.  If the sending TCP were to
  463.    continue to send, using a congestion window of 1 MSS, this results in
  464.    the transmission of one packet per round-trip time.  We believe it is
  465.    desirable to still reduce the sending rate of the TCP sender even
  466.    further, on receipt of an ECN-Echo packet when the congestion window
  467.    is one.  We use the retransmit timer as a means to reduce the rate
  468.    further in this circumstance.  Therefore, the sending TCP should also
  469.    reset the retransmit timer on receiving the ECN-Echo packet when the
  470.    congestion window is one.  The sending TCP will then be able to send
  471.    a new packet when the retransmit timer expires.
  472.  
  473.    [Floyd94] discusses TCP's response to ECN in more detail.  [Floyd98]
  474.    discusses the validation test in the ns simulator, which illustrates
  475.    a wide range of ECN scenarios. These scenarios include the following:
  476.    an ECN followed by another ECN, a Fast Retransmit, or a Retransmit
  477.    Timeout; a Retransmit Timeout or a Fast Retransmit followed by an
  478.    ECN, and a congestion window of one packet followed by an ECN.
  479.  
  480.    TCP follows existing algorithms for sending data packets in response
  481.    to incoming ACKs, multiple duplicate acknowledgements, or retransmit
  482.    timeouts [RFC2001].
  483.  
  484. 6.1.3.  The TCP Receiver
  485.  
  486.    When TCP receives a CE data packet at the destination end-system, the
  487.    TCP data receiver sets the ECN-Echo flag in the TCP header of the
  488.    subsequent ACK packet.  If there is any ACK withholding implemented,
  489.    as in current "delayed-ACK" TCP implementations where the TCP
  490.    receiver can send an ACK for two arriving data packets, then the
  491.    ECN-Echo flag in the ACK packet will be set to the OR of the CE bits
  492.    of all of the data packets being acknowledged.  That is, if any of
  493.    the received data packets are CE packets, then the returning ACK has
  494.    the ECN-Echo flag set.
  495.  
  496.    To provide robustness against the possibility of a dropped ACK packet
  497.    carrying an ECN-Echo flag, the TCP receiver must set the ECN-Echo
  498.    flag in a series of ACK packets. The TCP receiver uses the CWR flag
  499.    to determine when to stop setting the ECN-Echo flag.
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Ramakrishnan & Floyd          Experimental                      [Page 9]
  507.  
  508. RFC 2481                       ECN to IP                    January 1999
  509.  
  510.  
  511.    When an ECN-Capable TCP reduces its congestion window for any reason
  512.    (because of a retransmit timeout, a Fast Retransmit, or in response
  513.    to an ECN Notification), the TCP sets the CWR flag in the TCP header
  514.    of the first data packet sent after the window reduction.  If that
  515.    data packet is dropped in the network, then the sending TCP will have
  516.    to reduce the congestion window again and retransmit the dropped
  517.    packet.  Thus, the Congestion Window Reduced message is reliably
  518.    delivered to the data receiver.
  519.  
  520.    After a TCP receiver sends an ACK packet with the ECN-Echo bit set,
  521.    that TCP receiver continues to set the ECN-Echo flag in ACK packets
  522.    until it receives a CWR packet (a packet with the CWR flag set).
  523.    After the receipt of the CWR packet, acknowledgements for subsequent
  524.    non-CE data packets do not have the ECN-Echo flag set. If another CE
  525.    packet is received by the data receiver, the receiver would once
  526.    again send ACK packets with the ECN-Echo flag set.  While the receipt
  527.    of a CWR packet does not guarantee that the data sender received the
  528.    ECN-Echo message, this does indicate that the data sender reduced its
  529.    congestion window at some point *after* it sent the data packet for
  530.    which the CE bit was set.
  531.  
  532.    We have already specified that a TCP sender reduces its congestion
  533.    window at most once per window of data.  This mechanism requires some
  534.    care to make sure that the sender reduces its congestion window at
  535.    most once per ECN indication, and that multiple ECN messages over
  536.    several successive windows of data are properly reported to the ECN
  537.    sender.  This is discussed further in [Floyd98].
  538.  
  539. 6.1.4. Congestion on the ACK-path
  540.  
  541.    For the current generation of TCP congestion control algorithms, pure
  542.    acknowledgement packets (e.g., packets that do not contain any
  543.    accompanying data) should be sent with the ECT bit off. Current TCP
  544.    receivers have no mechanisms for reducing traffic on the ACK-path in
  545.    response to congestion notification.  Mechanisms for responding to
  546.    congestion on the ACK-path are areas for current and future research.
  547.    (One simple possibility would be for the sender to reduce its
  548.    congestion window when it receives a pure ACK packet with the CE bit
  549.    set). For current TCP implementations, a single dropped ACK generally
  550.    has only a very small effect on the TCP's sending rate.
  551.  
  552. 7. Summary of changes required in IP and TCP
  553.  
  554.    Two bits need to be specified in the IP header, the ECN-Capable
  555.    Transport (ECT) bit and the Congestion Experienced (CE) bit.  The ECT
  556.    bit set to "0" indicates that the transport protocol will ignore the
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Ramakrishnan & Floyd          Experimental                     [Page 10]
  563.  
  564. RFC 2481                       ECN to IP                    January 1999
  565.  
  566.  
  567.    CE bit.  This is the default value for the ECT bit.  The ECT bit set
  568.    to "1" indicates that the transport protocol is willing and able to
  569.    participate in ECN.
  570.  
  571.    The default value for the CE bit is "0".  The router sets the CE bit
  572.    to "1" to indicate congestion to the end nodes.  The CE bit in a
  573.    packet header should never be reset by a router from "1" to "0".
  574.  
  575.    TCP requires three changes, a negotiation phase during setup to
  576.    determine if both end nodes are ECN-capable, and two new flags in the
  577.    TCP header, from the "reserved" flags in the TCP flags field.  The
  578.    ECN-Echo flag is used by the data receiver to inform the data sender
  579.    of a received CE packet.  The Congestion Window Reduced flag is used
  580.    by the data sender to inform the data receiver that the congestion
  581.    window has been reduced.
  582.  
  583. 8. Non-relationship to ATM's EFCI indicator or Frame Relay's FECN
  584.  
  585.    Since the ATM and Frame Relay mechanisms for congestion indication
  586.    have typically been defined without any notion of average queue size
  587.    as the basis for determining that an intermediate node is congested,
  588.    we believe that they provide a very noisy signal. The TCP-sender
  589.    reaction specified in this draft for ECN is NOT the appropriate
  590.    reaction for such a noisy signal of congestion notification. It is
  591.    our expectation that ATM's EFCI and Frame Relay's FECN mechanisms
  592.    would be phased out over time within the ATM network.  However, if
  593.    the routers that interface to the ATM network have a way of
  594.    maintaining the average queue at the interface, and use it to come to
  595.    a reliable determination that the ATM subnet is congested, they may
  596.    use the ECN notification that is defined here.
  597.  
  598.    We emphasize that a *single* packet with the CE bit set in an IP
  599.    packet causes the transport layer to respond, in terms of congestion
  600.    control, as it would to a packet drop.  As such, the CE bit is not a
  601.    good match to a transient signal such as one based on the
  602.    instantaneous queue size.  However, experiments in techniques at
  603.    layer 2 (e.g., in ATM switches or Frame Relay switches) should be
  604.    encouraged.  For example, using a scheme such as RED (where packet
  605.    marking is based on the average queue length exceeding a threshold),
  606.    layer 2 devices could provide a reasonably reliable indication of
  607.    congestion.  When all the layer 2 devices in a path set that layer's
  608.    own Congestion Experienced bit (e.g., the EFCI bit for ATM, the FECN
  609.    bit in Frame Relay) in this reliable manner, then the interface
  610.    router to the layer 2 network could copy the state of that layer 2
  611.    Congestion Experienced bit into the CE bit in the IP header.  We
  612.    recognize that this is not the current practice, nor is it in current
  613.    standards. However, encouraging experimentation in this manner may
  614.  
  615.  
  616.  
  617.  
  618. Ramakrishnan & Floyd          Experimental                     [Page 11]
  619.  
  620. RFC 2481                       ECN to IP                    January 1999
  621.  
  622.  
  623.    provide the information needed to enable evolution of existing layer
  624.    2 mechanisms to provide a more reliable means of congestion
  625.    indication, when they use a single bit for indicating congestion.
  626.  
  627. 9. Non-compliance by the End Nodes
  628.  
  629.    This section discusses concerns about the vulnerability of ECN to
  630.    non-compliant end-nodes (i.e., end nodes that set the ECT bit in
  631.    transmitted packets but do not respond to received CE packets).  We
  632.    argue that the addition of ECN to the IP architecture would not
  633.    significantly increase the current vulnerability of the architecture
  634.    to unresponsive flows.
  635.  
  636.    Even for non-ECN environments, there are serious concerns about the
  637.    damage that can be done by non-compliant or unresponsive flows (that
  638.    is, flows that do not respond to congestion control indications by
  639.    reducing their arrival rate at the congested link).  For example, an
  640.    end-node could "turn off congestion control" by not reducing its
  641.    congestion window in response to packet drops. This is a concern for
  642.    the current Internet.  It has been argued that routers will have to
  643.    deploy mechanisms to detect and differentially treat packets from
  644.    non-compliant flows.  It has also been argued that techniques such as
  645.    end-to-end per-flow scheduling and isolation of one flow from
  646.    another, differentiated services, or end-to-end reservations could
  647.    remove some of the more damaging effects of unresponsive flows.
  648.  
  649.    It has been argued that dropping packets in itself may be an adequate
  650.    deterrent for non-compliance, and that the use of ECN removes this
  651.    deterrent.  We would argue in response that (1) ECN-capable routers
  652.    preserve packet-dropping behavior in times of high congestion; and
  653.    (2) even in times of high congestion, dropping packets in itself is
  654.    not an adequate deterrent for non-compliance.
  655.  
  656.    First, ECN-Capable routers will only mark packets (as opposed to
  657.    dropping them) when the packet marking rate is reasonably low. During
  658.    periods where the average queue size exceeds an upper threshold, and
  659.    therefore the potential packet marking rate would be high, our
  660.    recommendation is that routers drop packets rather then set the CE
  661.    bit in packet headers.
  662.  
  663.    During the periods of low or moderate packet marking rates when ECN
  664.    would be deployed, there would be little deterrent effect on
  665.    unresponsive flows of dropping rather than marking those packets. For
  666.    example, delay-insensitive flows using reliable delivery might have
  667.    an incentive to increase rather than to decrease their sending rate
  668.    in the presence of dropped packets.  Similarly, delay-sensitive flows
  669.    using unreliable delivery might increase their use of FEC in response
  670.    to an increased packet drop rate, increasing rather than decreasing
  671.  
  672.  
  673.  
  674. Ramakrishnan & Floyd          Experimental                     [Page 12]
  675.  
  676. RFC 2481                       ECN to IP                    January 1999
  677.  
  678.  
  679.    their sending rate.  For the same reasons, we do not believe that
  680.    packet dropping itself is an effective deterrent for non-compliance
  681.    even in an environment of high packet drop rates.
  682.  
  683.    Several methods have been proposed to identify and restrict non-
  684.    compliant or unresponsive flows. The addition of ECN to the network
  685.    environment would not in any way increase the difficulty of designing
  686.    and deploying such mechanisms. If anything, the addition of ECN to
  687.    the architecture would make the job of identifying unresponsive flows
  688.    slightly easier.  For example, in an ECN-Capable environment routers
  689.    are not limited to information about packets that are dropped or have
  690.    the CE bit set at that router itself; in such an environment routers
  691.    could also take note of arriving CE packets that indicate congestion
  692.    encountered by that packet earlier in the path.
  693.  
  694. 10. Non-compliance in the Network
  695.  
  696.    The breakdown of effective congestion control could be caused not
  697.    only by a non-compliant end-node, but also by the loss of the
  698.    congestion indication in the network itself.  This could happen
  699.    through a rogue or broken router that set the ECT bit in a packet
  700.    from a non-ECN-capable transport, or "erased" the CE bit in arriving
  701.    packets.  As one example, a rogue or broken router that "erased" the
  702.    CE bit in arriving CE packets would prevent that indication of
  703.    congestion from reaching downstream receivers.  This could result in
  704.    the failure of congestion control for that flow and a resulting
  705.    increase in congestion in the network, ultimately resulting in
  706.    subsequent packets dropped for this flow as the average queue size
  707.    increased at the congested gateway.
  708.  
  709.    The actions of a rogue or broken router could also result in an
  710.    unnecessary indication of congestion to the end-nodes.  These actions
  711.    can include a router dropping a packet or setting the CE bit in the
  712.    absence of congestion. From a congestion control point of view,
  713.    setting the CE bit in the absence of congestion by a non-compliant
  714.    router would be no different than a router dropping a packet
  715.    unecessarily. By "erasing" the ECT bit of a packet that is later
  716.    dropped in the network, a router's actions could result in an
  717.    unnecessary packet drop for that packet later in the network.
  718.  
  719.    Concerns regarding the loss of congestion indications from
  720.    encapsulated, dropped, or corrupted packets are discussed below.
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Ramakrishnan & Floyd          Experimental                     [Page 13]
  731.  
  732. RFC 2481                       ECN to IP                    January 1999
  733.  
  734.  
  735. 10.1. Encapsulated packets
  736.  
  737.    Some care is required to handle the CE and ECT bits appropriately
  738.    when packets are encapsulated and de-encapsulated for tunnels.
  739.  
  740.    When a packet is encapsulated, the following rules apply regarding
  741.    the ECT bit.  First, if the ECT bit in the encapsulated ('inside')
  742.    header is a 0, then the ECT bit in the encapsulating ('outside')
  743.    header MUST be a 0.  If the ECT bit in the inside header is a 1, then
  744.    the ECT bit in the outside header SHOULD be a 1.
  745.  
  746.    When a packet is de-encapsulated, the following rules apply regarding
  747.    the CE bit.  If the ECT bit is a 1 in both the inside and the outside
  748.    header, then the CE bit in the outside header MUST be ORed with the
  749.    CE bit in the inside header.  (That is, in this case a CE bit of 1 in
  750.    the outside header must be copied to the inside header.)  If the ECT
  751.    bit in either header is a 0, then the CE bit in the outside header is
  752.    ignored.  This requirement for the treatment of de-encapsulated
  753.    packets does not currently apply to IPsec tunnels.
  754.  
  755.    A specific example of the use of ECN with encapsulation occurs when a
  756.    flow wishes to use ECN-capability to avoid the danger of an
  757.    unnecessary packet drop for the encapsulated packet as a result of
  758.    congestion at an intermediate node in the tunnel.  This functionality
  759.    can be supported by copying the ECN field in the inner IP header to
  760.    the outer IP header upon encapsulation, and using the ECN field in
  761.    the outer IP header to set the ECN field in the inner IP header upon
  762.    decapsulation.  This effectively allows routers along the tunnel to
  763.    cause the CE bit to be set in the ECN field of the unencapsulated IP
  764.    header of an ECN-capable packet when such routers experience
  765.    congestion.
  766.  
  767. 10.2.  IPsec Tunnel Considerations
  768.  
  769.    The IPsec protocol, as defined in [ESP, AH], does not include the IP
  770.    header's ECN field in any of its cryptographic calculations (in the
  771.    case of tunnel mode, the outer IP header's ECN field is not
  772.    included).  Hence modification of the ECN field by a network node has
  773.    no effect on IPsec's end-to-end security, because it cannot cause any
  774.    IPsec integrity check to fail.  As a consequence, IPsec does not
  775.    provide any defense against an adversary's modification of the ECN
  776.    field (i.e., a man-in-the-middle attack), as the adversary's
  777.    modification will also have no effect on IPsec's end-to-end security.
  778.    In some environments, the ability to modify the ECN field without
  779.    affecting IPsec integrity checks may constitute a covert channel; if
  780.    it is necessary to eliminate such a channel or reduce its bandwidth,
  781.    then the outer IP header's ECN field can be zeroed at the tunnel
  782.    ingress and egress nodes.
  783.  
  784.  
  785.  
  786. Ramakrishnan & Floyd          Experimental                     [Page 14]
  787.  
  788. RFC 2481                       ECN to IP                    January 1999
  789.  
  790.  
  791.    The IPsec protocol currently requires that the inner header's ECN
  792.    field not be changed by IPsec decapsulation processing at a tunnel
  793.    egress node.  This ensures that an adversary's modifications to the
  794.    ECN field cannot be used to launch theft- or denial-of-service
  795.    attacks across an IPsec tunnel endpoint, as any such modifications
  796.    will be discarded at the tunnel endpoint.  This document makes no
  797.    change to that IPsec requirement. As a consequence of the current
  798.    specification of the IPsec protocol, we suggest that experiments with
  799.    ECN not be carried out for flows that will undergo IPsec tunneling at
  800.    the present time.
  801.  
  802.    If the IPsec specifications are modified in the future to permit a
  803.    tunnel egress node to modify the ECN field in an inner IP header
  804.    based on the ECN field value in the outer header (e.g., copying part
  805.    or all of the outer ECN field to the inner ECN field), or to permit
  806.    the ECN field of the outer IP header to be zeroed during
  807.    encapsulation, then experiments with ECN may be used in combination
  808.    with IPsec tunneling.
  809.  
  810.    This discussion of ECN and IPsec tunnel considerations draws heavily
  811.    on related discussions and documents from the Differentiated Services
  812.    Working Group.
  813.  
  814. 10.3.  Dropped or Corrupted Packets
  815.  
  816.    An additional issue concerns a packet that has the CE bit set at one
  817.    router and is dropped by a subsequent router.  For the proposed use
  818.    for ECN in this paper (that is, for a transport protocol such as TCP
  819.    for which a dropped data packet is an indication of congestion), end
  820.    nodes detect dropped data packets, and the congestion response of the
  821.    end nodes to a dropped data packet is at least as strong as the
  822.    congestion response to a received CE packet.
  823.  
  824.    However, transport protocols such as TCP do not necessarily detect
  825.    all packet drops, such as the drop of a "pure" ACK packet; for
  826.    example, TCP does not reduce the arrival rate of subsequent ACK
  827.    packets in response to an earlier dropped ACK packet.  Any proposal
  828.    for extending ECN-Capability to such packets would have to address
  829.    concerns raised by CE packets that were later dropped in the network.
  830.  
  831.    Similarly, if a CE packet is dropped later in the network due to
  832.    corruption (bit errors), the end nodes should still invoke congestion
  833.    control, just as TCP would today in response to a dropped data
  834.    packet. This issue of corrupted CE packets would have to be
  835.    considered in any proposal for the network to distinguish between
  836.    packets dropped due to corruption, and packets dropped due to
  837.    congestion or buffer overflow.
  838.  
  839.  
  840.  
  841.  
  842. Ramakrishnan & Floyd          Experimental                     [Page 15]
  843.  
  844. RFC 2481                       ECN to IP                    January 1999
  845.  
  846.  
  847. 11. A summary of related work.
  848.  
  849.    [Floyd94] considers the advantages and drawbacks of adding ECN to the
  850.    TCP/IP architecture.  As shown in the simulation-based comparisons,
  851.    one advantage of ECN is to avoid unnecessary packet drops for short
  852.    or delay-sensitive TCP connections.  A second advantage of ECN is in
  853.    avoiding some unnecessary retransmit timeouts in TCP.  This paper
  854.    discusses in detail the integration of ECN into TCP's congestion
  855.    control mechanisms.  The possible disadvantages of ECN discussed in
  856.    the paper are that a non-compliant TCP connection could falsely
  857.    advertise itself as ECN-capable, and that a TCP ACK packet carrying
  858.    an ECN-Echo message could itself be dropped in the network.  The
  859.    first of these two issues is discussed in Section 8 of this document,
  860.    and the second is addressed by the proposal in Section 5.1.3 for a
  861.    CWR flag in the TCP header.
  862.  
  863.    [CKLTZ97] reports on an experimental implementation of ECN in IPv6.
  864.    The experiments include an implementation of ECN in an existing
  865.    implementation of RED for FreeBSD.  A number of experiments were run
  866.    to demonstrate the control of the average queue size in the router,
  867.    the performance of ECN for a single TCP connection as a congested
  868.    router, and fairness with multiple competing TCP connections.  One
  869.    conclusion of the experiments is that dropping packets from a bulk-
  870.    data transfer can degrade performance much more severely than marking
  871.    packets.
  872.  
  873.    Because the experimental implementation in [CKLTZ97] predates some of
  874.    the developments in this document, the implementation does not
  875.    conform to this document in all respects.  For example, in the
  876.    experimental implementation the CWR flag is not used, but instead the
  877.    TCP receiver sends the ECN-Echo bit on a single ACK packet.
  878.  
  879.    [K98] and [CKLTZ98] build on [CKLTZ97] to further analyze the
  880.    benefits of ECN for TCP. The conclusions are that ECN TCP gets
  881.    moderately better throughput than non-ECN TCP; that ECN TCP flows are
  882.    fair towards non-ECN TCP flows; and that ECN TCP is robust with two-
  883.    way traffic, congestion in both directions, and with multiple
  884.    congested gateways.  Experiments with many short web transfers show
  885.    that, while most of the short connections have similar transfer times
  886.    with or without ECN, a small percentage of the short connections have
  887.    very long transfer times for the non-ECN experiments as compared to
  888.    the ECN experiments.  This increased transfer time is particularly
  889.    dramatic for those short connections that have their first packet
  890.    dropped in the non-ECN experiments, and that therefore have to wait
  891.    six seconds for the retransmit timer to expire.
  892.  
  893.    The ECN Web Page [ECN] has pointers to other implementations of ECN
  894.    in progress.
  895.  
  896.  
  897.  
  898. Ramakrishnan & Floyd          Experimental                     [Page 16]
  899.  
  900. RFC 2481                       ECN to IP                    January 1999
  901.  
  902.  
  903. 12. Conclusions
  904.  
  905.    Given the current effort to implement RED, we believe this is the
  906.    right time for router vendors to examine how to implement congestion
  907.    avoidance mechanisms that do not depend on packet drops alone.  With
  908.    the increased deployment of applications and transports sensitive to
  909.    the delay and loss of a single packet (e.g., realtime traffic, short
  910.    web transfers), depending on packet loss as a normal congestion
  911.    notification mechanism appears to be insufficient (or at the very
  912.    least, non-optimal).
  913.  
  914. 13. Acknowledgements
  915.  
  916.    Many people have made contributions to this RFC.  In particular, we
  917.    would like to thank Kenjiro Cho for the proposal for the TCP
  918.    mechanism for negotiating ECN-Capability, Kevin Fall for the proposal
  919.    of the CWR bit, Steve Blake for material on IPv4 Header Checksum
  920.    Recalculation, Jamal Hadi Salim for discussions of ECN issues, and
  921.    Steve Bellovin, Jim Bound, Brian Carpenter, Paul Ferguson, Stephen
  922.    Kent, Greg Minshall, and Vern Paxson for discussions of security
  923.    issues.  We also thank the Internet End-to-End Research Group for
  924.    ongoing discussions of these issues.
  925.  
  926.  
  927. 14. References
  928.  
  929.    [AH]         Kent, S. and R. Atkinson, "IP Authentication Header",
  930.                 RFC 2402, November 1998.
  931.  
  932.    [B97]        Bradner, S., "Key words for use in RFCs to Indicate
  933.                 Requirement Levels", BCP 14, RFC 2119, March 1997.
  934.  
  935.    [CKLT98]     Chen, C., Krishnan, H., Leung, S., Tang, N., and Zhang,
  936.                 L., "Implementing ECN for TCP/IPv6", presentation to the
  937.                 ECN BOF at the L.A. IETF, March 1998, URL
  938.                 "http://www.cs.ucla.edu/~hari/ecn-ietf.ps".
  939.  
  940.    [DIFFSERV]   Nichols, K., Blake, S., Baker, F. and D.  Black,
  941.                 "Definition of the Differentiated Services Field (DS
  942.                 Field) in the IPv4 and IPv6 Headers", RFC 2474, December
  943.                 1998.
  944.  
  945.    [ECN]        "The ECN Web Page", URL "http://www-
  946.                 nrg.ee.lbl.gov/floyd/ecn.html".
  947.  
  948.    [ESP]        Kent, S. and R. Atkinson, "IP Encapsulating Security
  949.                 Payload", RFC 2406, November 1998.
  950.  
  951.  
  952.  
  953.  
  954. Ramakrishnan & Floyd          Experimental                     [Page 17]
  955.  
  956. RFC 2481                       ECN to IP                    January 1999
  957.  
  958.  
  959.    [FJ93]       Floyd, S., and Jacobson, V., "Random Early Detection
  960.                 gateways for Congestion Avoidance", IEEE/ACM
  961.                 Transactions on Networking, V.1 N.4, August 1993, p.
  962.                 397-413.  URL "ftp://ftp.ee.lbl.gov/papers/early.pdf".
  963.  
  964.    [Floyd94]    Floyd, S., "TCP and Explicit Congestion Notification",
  965.                 ACM Computer Communication Review, V. 24 N. 5, October
  966.                 1994, p. 10-23.  URL
  967.                 "ftp://ftp.ee.lbl.gov/papers/tcp_ecn.4.ps.Z".
  968.  
  969.    [Floyd97]    Floyd, S., and Fall, K., "Router Mechanisms to Support
  970.                 End-to-End Congestion Control", Technical report,
  971.                 February 1997.  URL "http://www-
  972.                 nrg.ee.lbl.gov/floyd/end2end-paper.html".
  973.  
  974.    [Floyd98]    Floyd, S., "The ECN Validation Test in the NS
  975.                 Simulator", URL "http://www-mash.cs.berkeley.edu/ns/",
  976.                 test tcl/test/test-all-ecn.
  977.  
  978.    [K98]        Krishnan, H., "Analyzing Explicit Congestion
  979.                 Notification (ECN) benefits for TCP", Master's thesis,
  980.                 UCLA, 1998, URL
  981.                 "http://www.cs.ucla.edu/~hari/software/ecn/
  982.                 ecn_report.ps.gz".
  983.  
  984.    [FRED]       Lin, D., and Morris, R., "Dynamics of Random Early
  985.                 Detection", SIGCOMM '97, September 1997.  URL
  986.                 "http://www.inria.fr/rodeo/sigcomm97/program.html#ab078".
  987.  
  988.    [Jacobson88] V. Jacobson, "Congestion Avoidance and Control", Proc.
  989.                 ACM SIGCOMM '88, pp. 314-329.  URL
  990.                 "ftp://ftp.ee.lbl.gov/papers/congavoid.ps.Z".
  991.  
  992.    [Jacobson90] V. Jacobson, "Modified TCP Congestion Avoidance
  993.                 Algorithm", Message to end2end-interest mailing list,
  994.                 April 1990.  URL
  995.                 "ftp://ftp.ee.lbl.gov/email/vanj.90apr30.txt".
  996.  
  997.    [MJV96]      S. McCanne, V. Jacobson, and M. Vetterli, "Receiver-
  998.                 driven Layered Multicast", SIGCOMM '96, August 1996, pp.
  999.                 117-130.
  1000.  
  1001.    [RFC791]     Postel, J., "Internet Protocol", STD 5, RFC 791,
  1002.                 September 1981.
  1003.  
  1004.    [RFC793]     Postel, J., "Transmission Control Protocol", STD 7, RFC
  1005.                 793, September 1981.
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Ramakrishnan & Floyd          Experimental                     [Page 18]
  1011.  
  1012. RFC 2481                       ECN to IP                    January 1999
  1013.  
  1014.  
  1015.    [RFC1141]    Mallory, T. and A. Kullberg, "Incremental Updating of
  1016.                 the Internet Checksum", RFC 1141, January 1990.
  1017.  
  1018.    [RFC1349]    Almquist, P., "Type of Service in the Internet Protocol
  1019.                 Suite", RFC 1349, July 1992.
  1020.  
  1021.    [RFC1455]    Eastlake, D., "Physical Link Security Type of Service",
  1022.                 RFC 1455, May 1993.
  1023.  
  1024.    [RFC2001]    Stevens, W., "TCP Slow Start, Congestion Avoidance, Fast
  1025.                 Retransmit, and Fast Recovery Algorithms", RFC 2001,
  1026.                 January 1997.
  1027.  
  1028.    [RFC2309]    Braden, B., Clark, D., Crowcroft, J., Davie, B.,
  1029.                 Deering, S., Estrin, D., Floyd, S., Jacobson, V.,
  1030.                 Minshall, G., Partridge, C., Peterson, L., Ramakrishnan,
  1031.                 K., Shenker, S., Wroclawski, J. and L. Zhang,
  1032.                 "Recommendations on Queue Management and Congestion
  1033.                 Avoidance in the Internet", RFC 2309, April 1998.
  1034.  
  1035.    [RJ90]       K. K. Ramakrishnan and Raj Jain, "A Binary Feedback
  1036.                 Scheme for Congestion Avoidance in Computer Networks",
  1037.                 ACM Transactions on Computer Systems, Vol.8, No.2, pp.
  1038.                 158-181, May 1990.
  1039.  
  1040. 15. Security Considerations
  1041.  
  1042.    Security considerations have been discussed in Section 9.
  1043.  
  1044. 16. IPv4 Header Checksum Recalculation
  1045.  
  1046.    IPv4 header checksum recalculation is an issue with some high-end
  1047.    router architectures using an output-buffered switch, since most if
  1048.    not all of the header manipulation is performed on the input side of
  1049.    the switch, while the ECN decision would need to be made local to the
  1050.    output buffer. This is not an issue for IPv6, since there is no IPv6
  1051.    header checksum. The IPv4 TOS octet is the last byte of a 16-bit
  1052.    half-word.
  1053.  
  1054.    RFC 1141 [RFC1141] discusses the incremental updating of the IPv4
  1055.    checksum after the TTL field is decremented.  The incremental
  1056.    updating of the IPv4 checksum after the CE bit was set would work as
  1057.    follows: Let HC be the original header checksum, and let HC' be the
  1058.    new header checksum after the CE bit has been set.  Then for header
  1059.    checksums calculated with one's complement subtraction, HC' would be
  1060.    recalculated as follows:
  1061.  
  1062.  
  1063.  
  1064.  
  1065.  
  1066. Ramakrishnan & Floyd          Experimental                     [Page 19]
  1067.  
  1068. RFC 2481                       ECN to IP                    January 1999
  1069.  
  1070.  
  1071.       HC' = { HC - 1     HC > 1
  1072.             { 0x0000     HC = 1
  1073.  
  1074.    For header checksums calculated on two's complement machines, HC'
  1075.    would be recalculated as follows after the CE bit was set:
  1076.  
  1077.        HC' = { HC - 1     HC > 0
  1078.              { 0xFFFE     HC = 0
  1079.  
  1080. 17. The motivation for the ECT bit.
  1081.  
  1082.    The need for the ECT bit is motivated by the fact that ECN will be
  1083.    deployed incrementally in an Internet where some transport protocols
  1084.    and routers understand ECN and some do not. With the ECT bit, the
  1085.    router can drop packets from flows that are not ECN-capable, but can
  1086.    *instead* set the CE bit in flows that *are* ECN-capable. Because the
  1087.    ECT bit allows an end node to have the CE bit set in a packet
  1088.    *instead* of having the packet dropped, an end node might have some
  1089.    incentive to deploy ECN.
  1090.  
  1091.    If there was no ECT indication, then the router would have to set the
  1092.    CE bit for packets from both ECN-capable and non-ECN-capable flows.
  1093.    In this case, there would be no incentive for end-nodes to deploy
  1094.    ECN, and no viable path of incremental deployment from a non-ECN
  1095.    world to an ECN-capable world.  Consider the first stages of such an
  1096.    incremental deployment, where a subset of the flows are ECN-capable.
  1097.    At the onset of congestion, when the packet dropping/marking rate
  1098.    would be low, routers would only set CE bits, rather than dropping
  1099.    packets.  However, only those flows that are ECN-capable would
  1100.    understand and respond to CE packets. The result is that the ECN-
  1101.    capable flows would back off, and the non-ECN-capable flows would be
  1102.    unaware of the ECN signals and would continue to open their
  1103.    congestion windows.
  1104.  
  1105.    In this case, there are two possible outcomes: (1) the ECN-capable
  1106.    flows back off, the non-ECN-capable flows get all of the bandwidth,
  1107.    and congestion remains mild, or (2) the ECN-capable flows back off,
  1108.    the non-ECN-capable flows don't, and congestion increases until the
  1109.    router transitions from setting the CE bit to dropping packets.
  1110.    While this second outcome evens out the fairness, the ECN-capable
  1111.    flows would still receive little benefit from being ECN-capable,
  1112.    because the increased congestion would drive the router to packet-
  1113.    dropping behavior.
  1114.  
  1115.    A flow that advertised itself as ECN-Capable but does not respond to
  1116.    CE bits is functionally equivalent to a flow that turns off
  1117.    congestion control, as discussed in Sections 8 and 9.
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Ramakrishnan & Floyd          Experimental                     [Page 20]
  1123.  
  1124. RFC 2481                       ECN to IP                    January 1999
  1125.  
  1126.  
  1127.    Thus, in a world when a subset of the flows are ECN-capable, but
  1128.    where ECN-capable flows have no mechanism for indicating that fact to
  1129.    the routers, there would be less effective and less fair congestion
  1130.    control in the Internet, resulting in a strong incentive for end
  1131.    nodes not to deploy ECN.
  1132.  
  1133. 18. Why use two bits in the IP header?
  1134.  
  1135.    Given the need for an ECT indication in the IP header, there still
  1136.    remains the question of whether the ECT (ECN-Capable Transport) and
  1137.    CE (Congestion Experienced) indications should be overloaded on a
  1138.    single bit.  This overloaded-one-bit alternative, explored in
  1139.    [Floyd94], would involve a single bit with two values.  One value,
  1140.    "ECT and not CE", would represent an ECN-Capable Transport, and the
  1141.    other value, "CE or not ECT", would represent either Congestion
  1142.    Experienced or a non-ECN-Capable transport.
  1143.  
  1144.    One difference between the one-bit and two-bit implementations
  1145.    concerns packets that traverse multiple congested routers.  Consider
  1146.    a CE packet that arrives at a second congested router, and is
  1147.    selected by the active queue management at that router for either
  1148.    marking or dropping.  In the one-bit implementation, the second
  1149.    congested router has no choice but to drop the CE packet, because it
  1150.    cannot distinguish between a CE packet and a non-ECT packet.  In the
  1151.    two-bit implementation, the second congested router has the choice of
  1152.    either dropping the CE packet, or of leaving it alone with the CE bit
  1153.    set.
  1154.  
  1155.    Another difference between the one-bit and two-bit implementations
  1156.    comes from the fact that with the one-bit implementation, receivers
  1157.    in a single flow cannot distinguish between CE and non-ECT packets.
  1158.    Thus, in the one-bit implementation an ECN-capable data sender would
  1159.    have to unambiguously indicate to the receiver or receivers whether
  1160.    each packet had been sent as ECN-Capable or as non-ECN-Capable.  One
  1161.    possibility would be for the sender to indicate in the transport
  1162.    header whether the packet was sent as ECN-Capable.  A second
  1163.    possibility that would involve a functional limitation for the one-
  1164.    bit implementation would be for the sender to unambiguously indicate
  1165.    that it was going to send *all* of its packets as ECN-Capable or as
  1166.    non-ECN-Capable.  For a multicast transport protocol, this
  1167.    unambiguous indication would have to be apparent to receivers joining
  1168.    an on-going multicast session.
  1169.  
  1170.    Another advantage of the two-bit approach is that it is somewhat more
  1171.    robust.  The most critical issue, discussed in Section 8, is that the
  1172.    default indication should be that of a non-ECN-Capable transport.  In
  1173.    a two-bit implementation, this requirement for the default value
  1174.    simply means that the ECT bit should be `OFF' by default.  In the
  1175.  
  1176.  
  1177.  
  1178. Ramakrishnan & Floyd          Experimental                     [Page 21]
  1179.  
  1180. RFC 2481                       ECN to IP                    January 1999
  1181.  
  1182.  
  1183.    one-bit implementation, this means that the single overloaded bit
  1184.    should by default be in the "CE or not ECT" position.  This is less
  1185.    clear and straightforward, and possibly more open to incorrect
  1186.    implementations either in the end nodes or in the routers.
  1187.  
  1188.    In summary, while the one-bit implementation could be a possible
  1189.    implementation, it has the following significant limitations relative
  1190.    to the two-bit implementation.  First, the one-bit implementation has
  1191.    more limited functionality for the treatment of CE packets at a
  1192.    second congested router.  Second, the one-bit implementation requires
  1193.    either that extra information be carried in the transport header of
  1194.    packets from ECN-Capable flows (to convey the functionality of the
  1195.    second bit elsewhere, namely in the transport header), or that
  1196.    senders in ECN-Capable flows accept the limitation that receivers
  1197.    must be able to determine a priori which packets are ECN-Capable and
  1198.    which are not ECN-Capable. Third, the one-bit implementation is
  1199.    possibly more open to errors from faulty implementations that choose
  1200.    the wrong default value for the ECN bit.  We believe that the use of
  1201.    the extra bit in the IP header for the ECT-bit is extremely valuable
  1202.    to overcome these limitations.
  1203.  
  1204. 19.  Historical definitions for the IPv4 TOS octet
  1205.  
  1206.    RFC 791 [RFC791] defined the ToS (Type of Service) octet in the IP
  1207.    header.  In RFC 791, bits 6 and 7 of the ToS octet are listed as
  1208.    "Reserved for Future Use", and are shown set to zero.  The first two
  1209.    fields of the ToS octet were defined as the Precedence and Type of
  1210.    Service (TOS) fields.
  1211.  
  1212.             0     1     2     3     4     5     6     7
  1213.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1214.          |   PRECEDENCE    |       TOS       |  0  |  0  |    RFC 791
  1215.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1216.  
  1217.    RFC 1122 included bits 6 and 7 in the TOS field, though it did not
  1218.    discuss any specific use for those two bits:
  1219.  
  1220.             0     1     2     3     4     5     6     7
  1221.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1222.          |   PRECEDENCE    |       TOS                   |    RFC 1122
  1223.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1224.  
  1225.    The IPv4 TOS octet was redefined in RFC 1349 [RFC1349] as follows:
  1226.  
  1227.             0     1     2     3     4     5     6     7
  1228.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1229.          |   PRECEDENCE    |       TOS             | MBZ |    RFC 1349
  1230.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1231.  
  1232.  
  1233.  
  1234. Ramakrishnan & Floyd          Experimental                     [Page 22]
  1235.  
  1236. RFC 2481                       ECN to IP                    January 1999
  1237.  
  1238.  
  1239.    Bit 6 in the TOS field was defined in RFC 1349 for "Minimize Monetary
  1240.    Cost".  In addition to the Precedence and Type of Service (TOS)
  1241.    fields, the last field, MBZ (for "must be zero") was defined as
  1242.    currently unused.  RFC 1349 stated that "The originator of a datagram
  1243.    sets [the MBZ] field to zero (unless participating in an Internet
  1244.    protocol experiment which makes use of that bit)."
  1245.  
  1246.    RFC 1455 [RFC 1455] defined an experimental standard that used all
  1247.    four bits in the TOS field to request a guaranteed level of link
  1248.    security.
  1249.  
  1250.    RFC 1349 is obsoleted by "Definition of the Differentiated Services
  1251.    Field (DS Field) in the IPv4 and IPv6 Headers" [DIFFSERV], in which
  1252.    bits 6 and 7 of the DS field are listed as Currently Unused (CU).
  1253.    The first six bits of the DS field are defined as the Differentiated
  1254.    Services CodePoint (DSCP):
  1255.  
  1256.             0     1     2     3     4     5     6     7
  1257.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1258.          |               DSCP                |    CU     |
  1259.          +-----+-----+-----+-----+-----+-----+-----+-----+
  1260.  
  1261.    Because of this unstable history, the definition of the ECN field in
  1262.    this document cannot be guaranteed to be backwards compatible with
  1263.    all past uses of these two bits.  The damage that could be done by a
  1264.    non-ECN-capable router would be to "erase" the CE bit for an ECN-
  1265.    capable packet that arrived at the router with the CE bit set, or set
  1266.    the CE bit even in the absence of congestion.  This has been
  1267.    discussed in Section 10 on "Non-compliance in the Network".
  1268.  
  1269.    The damage that could be done in an ECN-capable environment by a
  1270.    non-ECN-capable end-node transmitting packets with the ECT bit set
  1271.    has been discussed in Section 9 on "Non-compliance by the End Nodes".
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290. Ramakrishnan & Floyd          Experimental                     [Page 23]
  1291.  
  1292. RFC 2481                       ECN to IP                    January 1999
  1293.  
  1294.  
  1295. AUTHORS' ADDRESSES
  1296.  
  1297.    K. K. Ramakrishnan
  1298.    AT&T Labs. Research
  1299.  
  1300.    Phone: +1 (973) 360-8766
  1301.    EMail: kkrama@research.att.com
  1302.    URL: http://www.research.att.com/info/kkrama
  1303.  
  1304.  
  1305.    Sally Floyd
  1306.    Lawrence Berkeley National Laboratory
  1307.  
  1308.    Phone: +1 (510) 486-7518
  1309.    EMail: floyd@ee.lbl.gov
  1310.    URL: http://www-nrg.ee.lbl.gov/floyd/
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346. Ramakrishnan & Floyd          Experimental                     [Page 24]
  1347.  
  1348. RFC 2481                       ECN to IP                    January 1999
  1349.  
  1350.  
  1351. Full Copyright Statement
  1352.  
  1353.    Copyright (C) The Internet Society (1999).  All Rights Reserved.
  1354.  
  1355.    This document and translations of it may be copied and furnished to
  1356.    others, and derivative works that comment on or otherwise explain it
  1357.    or assist in its implementation may be prepared, copied, published
  1358.    and distributed, in whole or in part, without restriction of any
  1359.    kind, provided that the above copyright notice and this paragraph are
  1360.    included on all such copies and derivative works.  However, this
  1361.    document itself may not be modified in any way, such as by removing
  1362.    the copyright notice or references to the Internet Society or other
  1363.    Internet organizations, except as needed for the purpose of
  1364.    developing Internet standards in which case the procedures for
  1365.    copyrights defined in the Internet Standards process must be
  1366.    followed, or as required to translate it into languages other than
  1367.    English.
  1368.  
  1369.    The limited permissions granted above are perpetual and will not be
  1370.    revoked by the Internet Society or its successors or assigns.
  1371.  
  1372.    This document and the information contained herein is provided on an
  1373.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1374.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1375.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  1376.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1377.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402. Ramakrishnan & Floyd          Experimental                     [Page 25]
  1403.  
  1404.