home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / papers / draft-ipsec-ecn-00.txt < prev    next >
Text File  |  1999-02-25  |  57KB  |  1,321 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Internet Engineering Task Force       Floyd, Black, and Ramakrishnan
  8.  
  9. INTERNET DRAFT
  10. draft-ipsec-ecn-00.txt                                  February 1999
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                       IPsec Interactions with ECN
  17.  
  18.  
  19.                 DRAFT - February 24 - NOT YET SUBMITTED
  20. Status of this Memo
  21.  
  22.  
  23.    This document is an Internet-Draft and is in full conformance with
  24.    all provisions of Section 10 of RFC2026.
  25.  
  26.    Internet-Drafts are working documents of the Internet Engineering
  27.    Task Force (IETF), its areas, and its working groups.  Note that
  28.    other groups may also distribute working documents as Internet-
  29.    Drafts.
  30.  
  31.    Internet-Drafts are draft documents valid for a maximum of six months
  32.    and may be updated, replaced, or obsoleted by other documents at any
  33.    time.  It is inappropriate to use Internet- Drafts as reference
  34.    material or to cite them other than as "work in progress."
  35.  
  36.    The list of current Internet-Drafts can be accessed at
  37.    http://www.ietf.org/ietf/1id-abstracts.txt
  38.  
  39.    The list of Internet-Draft Shadow Directories can be accessed at
  40.    http://www.ietf.org/shadow.html.
  41.  
  42. Abstract
  43.  
  44.    IPsec supports secure communication over potentially insecure network
  45.    components such as intermediate routers.  IPsec protocols support two
  46.    operating modes, transport mode and tunnel mode.  Explicit Congestion
  47.    Notification (ECN) is an experimental addition to the IP architecture
  48.    that provides indication of onset of congestion to delay- or loss-
  49.    sensitive applications.  ECN provides the congestion indication so as
  50.    to enable adaptation to network conditions without the impact of
  51.    dropped packets [RFC 2481].  Currently, the way ECN is specified does
  52.    not conform to the manner in which IPsec tunnels are defined to be
  53.    used.  This document considers issues related to interactions between
  54.    ECN and IPsec tunnel mode, and proposes two alternative solutions.
  55.  
  56.  
  57.  
  58. Floyd, Black, and Ramakrishnan                                  [Page 1]
  59.  
  60.  
  61.  
  62.  
  63.  
  64. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  65.  
  66.  
  67. 1.  Introduction.
  68.  
  69.    IPsec supports secure communication over potentially insecure network
  70.    components such as intermediate routers.  IPsec protocols support two
  71.    operating modes, transport mode and tunnel mode that span a wide
  72.    range of security requirements and operating environments.  Transport
  73.    mode security protocol header(s) are inserted between the IP (IPv4 or
  74.    IPv6) header and higher layer protocol headers (e.g., TCP), and hence
  75.    transport mode can only be used for end-to-end security on a
  76.    connection.  IPsec tunnel mode is based on adding a new "outer" IP
  77.    header that encapsulates the original, or "inner" IP header and its
  78.    associated packet.  Tunnel mode security headers are inserted between
  79.    these two IP headers.  In contrast to transport mode, the new "outer"
  80.    IP header and tunnel mode security headers may be added and removed
  81.    at intermediate points along a connection, enabling security gateways
  82.    to secure vulnerable portions of a connection without requiring
  83.    endpoint participation in the security protocols.  An important
  84.    aspect of tunnel mode security is that the outer header is discarded
  85.    at tunnel egress, ensuring that security threats based on modifying
  86.    the IP header do not propagate beyond that tunnel endpoint.  Further
  87.    discussion of IPsec can be found in [RFC 2401].
  88.  
  89.    Explicit Congestion Notification (ECN) is an experimental addition to
  90.    the IP architecture that provides congestion indication to delay- or
  91.    loss-sensitive applications to enable them to adapt to network
  92.    conditions without the impact of dropped packets [RFC 2481].  An ECN-
  93.    capable router uses the ECN mechanism to signal congestion to
  94.    connection endpoints by setting a bit in the IP header.  These
  95.    endpoints then react as if a packet had been dropped (e.g., TCP
  96.    halves its congestion window).  This ability to avoid dropping
  97.    packets in response to congestion is supported by the use of active
  98.    queue management mechanisms (e.g., RED) in routers; such mechanisms
  99.    begin to mark or drop packets as a consequence of congestion before a
  100.    congested router queue is completely full.  ECN is defined to be used
  101.    as an optimization -- routers are not required to support ECN, and
  102.    even an ECN-capable router may drop packets from ECN-capable
  103.    connections when necessary.  The advantage to a router of not
  104.    dropping such packets is that ECN can provide a more timely reaction
  105.    to congestion than reactions based on drop detection via duplicate
  106.    ACKs or timeout.
  107.  
  108.    Currently, the way ECN is specified does not conform to the manner in
  109.    which IPsec tunnels are defined to be used.  Current use of ECN over
  110.    an IPsec tunnel results in routers attempting to use the outer IP
  111.    header to signal congestion to endpoints, but those congestion
  112.    warnings never arrive because the outer header is discarded.  RFC
  113.    2481 currently recommends that ECN not be used with IPsec tunnels in
  114.    order to avoid this behavior and its consequences.
  115.  
  116.  
  117.  
  118. Floyd, Black, and Ramakrishnan                                  [Page 2]
  119.  
  120.  
  121.  
  122.  
  123.  
  124. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  125.  
  126.  
  127.    This document considers issues related to interactions between ECN
  128.    and IPsec tunnel mode.  In principle the use of ECN in the outer
  129.    header of an IPsec tunnel raises security concerns because an
  130.    adversary could tamper with the ECN information that propagates
  131.    beyond the tunnel endpoint.  Based on an analysis (included in this
  132.    document) of these concerns and the resultant risks, our overall
  133.    approach is to make support for ECN a configurable part of an IPsec
  134.    tunnel mode Security Association (SA), so that ECN can be disabled
  135.    for an IPsec tunnel in situations where the risks of using ECN are
  136.    judged to outweigh its benefits.  The result is that the security
  137.    administrator is presented with two options for the behavior of ECN-
  138.    capable connections over an IPsec tunnel:
  139.       - A limited-functionality option in which ECN is preserved in the
  140.       inner header, but disabled in the outer header.  The only
  141.       mechanism available for signaling congestion occurring within the
  142.       tunnel in this case is dropped packets.
  143.       - A full functionality option that supports ECN in both the inner
  144.       and outer headers, and propagates congestion warnings from nodes
  145.       within the tunnel to endpoints.
  146.  
  147.    Support for these options requires changes to IP header processing at
  148.    tunnel ingress and egress.  A subset of these changes sufficient to
  149.    support only the limited-functionality option SHOULD be applied to
  150.    all IPsec implementations in order to eliminate the current
  151.    incompatibility between ECN and IPsec tunnels.
  152.  
  153.    The main goal of this document is to give guidance about the
  154.    tradeoffs between the limited-functionality and full-functionality
  155.    options.  This includes a full discussion of the potential effects of
  156.    an adversary's modifications of the CE and ECT bits.
  157.  
  158. 2.  Architecture.
  159.  
  160.    ECN uses two bits in the IP header (ECT - ECN Capable Transport, CE -
  161.    Congestion Experienced) for signaling between routers and connection
  162.    endpoints, and uses two flags in the TCP header (ECN-Echo - Echo ECN
  163.    bit in IP header, CWR - Congestion Window Reduced) for TCP-endpoint
  164.    to TCP-endpoint signaling.  For a TCP connection, a typical sequence
  165.    of events in an ECN-based reaction to congestion is as follows:
  166.       - The ECT bit is set in all packets transmitted by the sender to
  167.       indicate that ECN is supported on this TCP connection.
  168.       - An ECN-capable router detects impending congestion and detects
  169.       that the ECT bit is set in the packet it is about to drop.
  170.       Instead of dropping the packet, the router sets the CE bit and
  171.       forwards the packet.
  172.       - The receiver receives the packet with CE set, and sets the ECN-
  173.       Echo flag in its next TCP ACK sent to the sender.
  174.       - The sender receives the TCP ACK with ECN-Echo set, and reacts to
  175.  
  176.  
  177.  
  178. Floyd, Black, and Ramakrishnan                                  [Page 3]
  179.  
  180.  
  181.  
  182.  
  183.  
  184. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  185.  
  186.  
  187.       the congestion as if a packet had been dropped.
  188.       - The sender sets the CWR flag in the TCP header of the next
  189.       packet sent to the receiver to acknowledge its receipt of and
  190.       reaction to the ECN-Echo flag.
  191.  
  192.    Further details on ECN functionality including negotiation of ECN-
  193.    capability as part of connection setup as well as the
  194.    responsibilities and requirements of ECN-capable routers and
  195.    transports can be found in [RFC2481].
  196.  
  197.    ECN interacts with IPsec tunnels because the two ECN bits in the IP
  198.    header are in what IPsec refers to as the IPv4 TOS octet or IPv6
  199.    Traffic Class octet; this field is copied or mapped from the inner IP
  200.    header to the outer IP header at IPsec tunnel ingress, and the outer
  201.    header's copy of this field is discarded at IPsec tunnel egress
  202.    [RFC2401].  If an ECN-capable router were to set the CE (Congestion
  203.    Experienced) bit in an IPsec-tunneled packet, this indication would
  204.    be discarded at tunnel egress, losing the indication of congestion.
  205.    As a consequence of this behavior, ECN usage over IPsec tunnels is
  206.    not currently recommended [RFC2481].
  207.  
  208.    The IPsec limited-functionality option for ECN encapsulation is for
  209.    the ECT bit in the outside (encapsulating) header to be off (i.e.,
  210.    set to 0), regardless of the value of the ECT bit in the inside
  211.    (encapsulated) header.  With this option, the ECN field in the inner
  212.    header is not altered upon de-capsulation.  The disadvantage of this
  213.    approach is that the flow does not have ECN support for that part of
  214.    the path that is using IPsec tunneling, even if the encapsulated
  215.    packet is ECN-Capable.  That is, if the encapsulated packet arrives
  216.    at a congested router that is ECN-capable, and the router decides to
  217.    drop or mark the packet as an indication of congestion to the end
  218.    nodes, the router will not be permitted to set the CE bit in the
  219.    packet header, but instead will have to drop the packet.
  220.  
  221.    The IPsec full-functionality option for ECN encapsulation follows the
  222.    description in Section 10.1 of RFC 2481 of tunneling with ECN.  This
  223.    option is to copy the ECT bit of the inside header to the outside
  224.    header on encapsulation, and to OR the CE bit from the outer header
  225.    with the CE bit of the inside header on decapsulation.  With the
  226.    full-functionality option, a flow can take advantage of ECN for those
  227.    parts of the path that might use IPsec tunneling.  The disadvantage
  228.    of the full-functionality option is that IPsec cannot protect the
  229.    flow from certain modifications to the ECN bits in the IP header
  230.    within the tunnel.  The potential dangers from modifications to the
  231.    ECN bits in the IP header are described in detail in Section 4 below.
  232.  
  233.    This document proposes minor changes to IPsec in order to enable ECN
  234.    experimentation over IPsec tunnels, and avoid losing congestion
  235.  
  236.  
  237.  
  238. Floyd, Black, and Ramakrishnan                                  [Page 4]
  239.  
  240.  
  241.  
  242.  
  243.  
  244. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  245.  
  246.  
  247.    indications in the case that an ECN-capable router or routers are
  248.    traversed by an IPsec tunnel carrying ECN-capable connections.  In
  249.    summary, two changes are proposed to IPsec functionality:
  250.  
  251.       (1) Modify the handling of the IPv4 TOS octet and IPv6 Traffic
  252.       Class octet at IPsec tunnel endpoints to prevent loss of
  253.       congestion indications when an IPsec tunnel traverses an ECN-
  254.       capable router.
  255.  
  256.       (2) Enable the endpoints of an IPsec tunnel to negotiate the usage
  257.       of ECN in the outer headers of that tunnel based on security
  258.       policy.  ECN is only used in the outer header of packets from
  259.       connections that support ECN.
  260.  
  261.    The minimum required to make ECN usable with IPsec tunnels is a
  262.    simplified version of the first change that prevents ECN from being
  263.    enabled in the outer header of an IPsec tunnel.  Full support for ECN
  264.    requires the ability to negotiate ECN usage between tunnel endpoints,
  265.    including the ability of a security administrator to disable ECN in
  266.    situations where she believes the risks (e.g., of lost congestion
  267.    notifications) outweigh the benefits of ECN.
  268.  
  269. 3.  IPsec Changes for ECN support
  270.  
  271.    This section describes the detailed changes for support of ECN over
  272.    IPsec tunnels, including the negotiation of ECN support between
  273.    tunnel endpoints.  In order to avoid the loss of congestion
  274.    indication at tunnel egress, full ECN functionality for an IPsec
  275.    tunnel requires that both ends of the tunnel agree that ECN is being
  276.    used.  This is supported by three changes to IPsec:
  277.       - A Security Association Database (SAD) field indicating whether
  278.       tunnel encapsulation and decapsulation processing should allow or
  279.       forbid ECN usage in the outer IP header.
  280.       - A Security Association Attribute for negotiation of this SAD
  281.       field between the two endpoints of an SA that supports tunnel
  282.       mode.
  283.       - Changes to tunnel mode encapsulation and decapsulation
  284.       processing to allow or forbid ECN usage in the outer IP header
  285.       based on the value of the SAD field.  When ECN usage is allowed in
  286.       the outer IP header, ECT is set in the outer header for ECN-
  287.       capable connections and congestion indications (CE bit) from such
  288.       connections are propagated to the inner header at tunnel egress.
  289.  
  290.    The first two changes are OPTIONAL.  The encapsulation and
  291.    decapsulation processing changes are RECOMMENDED, but MAY be
  292.    implemented without the other two changes by assuming that ECN usage
  293.    is always forbidden. These changes are covered in the following three
  294.    subsections.
  295.  
  296.  
  297.  
  298. Floyd, Black, and Ramakrishnan                                  [Page 5]
  299.  
  300.  
  301.  
  302.  
  303.  
  304. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  305.  
  306.  
  307. 3.1.1.  ECN Tunnel Security Association Database Field
  308.  
  309.    Full ECN functionality requires a new field be added to the SAD (see
  310.    [RFC2401]):
  311.  
  312.       ECN Tunnel: allowed or forbidden.
  313.       Indicates whether ECN-capable connections using this SA in tunnel
  314.       mode may receive ECN congestion notifications for congestion
  315.       occurring within the tunnel.  The allowed value enables ECN
  316.       congestion notifications.  The forbidden value disables such
  317.       notifications, causing all congestion to be indicated via dropped
  318.       packets.
  319.  
  320.       [OPTIONAL.  The value of this field SHOULD be assumed to be
  321.       forbidden in implementations that do not support it.]
  322.  
  323.    Support for this attribute REQUIRES that the SA specification in a
  324.    Security Policy Database (SPD) entry support a corresponding
  325.    attribute, and that this SPD attribute be covered by the SPD
  326.    administrative interface described in Section 4.4.1 of [RFC2401].
  327.  
  328. 3.1.2.  ECN Tunnel Security Association Attribute
  329.  
  330.    A new IPsec Security Association Attribute is defined to enable the
  331.    use of ECN for IPsec tunnels to be negotiated (see [RFC2407]).  This
  332.    attribute is OPTIONAL, although any implementation that supports it
  333.    SHOULD also support the SAD field defined in Section 3.1.1.
  334.  
  335.    Attribute Type
  336.  
  337.            class               value           type
  338.      -------------------------------------------------
  339.      ECN Tunnel                TBD             Basic
  340.  
  341.    NB: The attribute identification value will be determined by IANA.
  342.  
  343.    Class Values
  344.  
  345.      ECN Tunnel
  346.  
  347.        Specifies whether ECN may be used with Tunnel Encapsulation Mode.
  348.        This affects tunnel encapsulation and decapsulation processing -
  349.        see Section 3.1.3.
  350.  
  351.        RESERVED          0
  352.        Allowed           1
  353.        Forbidden         2
  354.  
  355.  
  356.  
  357.  
  358. Floyd, Black, and Ramakrishnan                                  [Page 6]
  359.  
  360.  
  361.  
  362.  
  363.  
  364. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  365.  
  366.  
  367.        Values 3-61439 are reserved to IANA.  Values 61440-65535 are for
  368.        private use.
  369.  
  370.        If unspecified, the default shall be assumed to be Forbidden.
  371.  
  372. 3.1.3. Changes to IPsec Tunnel Header Processing
  373.  
  374.    Subsequent to the publication of the IPsec RFCs, the TOS octet of
  375.    IPv4 and the Traffic Class octet of IPv6 have been superseded by the
  376.    DS Field octet as defined in [RFC2474].  The two ECN bits in the IP
  377.    header, ECT and CE, occupy bits 6 and 7 of the DS Field octet
  378.    [RFC2481].  For full ECN support the encapsulation and decapsulation
  379.    processing for the IPv4 TOS field and the IPv6 Traffic Class field
  380.    are changed from what is specified in [RFC2401] to the following:
  381.  
  382.                            <-- How Outer Hdr Relates to Inner Hdr -->
  383.                            Outer Hdr at                 Inner Hdr at
  384.       IPv4                 Encapsulator                 Decapsulator
  385.         Header fields:     --------------------         ------------
  386.           DS Field         constructed (5)              constructed (7)
  387.  
  388.       IPv6
  389.         Header fields:
  390.           DS Field         constructed (6)              constructed (7)
  391.  
  392.       (5)(6) Copy the Differentiated Services Codepoint (DSCP, bits
  393.       0-5).  If the value of the ECN Tunnel field in the SAD entry for
  394.       this SA is "allowed" and the value of ECT (bit 6) is 1 in the
  395.       inner header, set ECT to 1 in the outer header, else set ECT to 0
  396.       in the outer header.  Set CE (bit 7) to 0 in the outer header.
  397.  
  398.       (7) If the value of the ECN tunnel field in the SAD entry for this
  399.       SA is "allowed" and the value of ECT (bit 6) in the inner header
  400.       is 1, and the value of CE (bit 7) in the outer header is 1, then
  401.       set CE to 1 in the inner header, else make no change to this field
  402.       of the inner header.
  403.  
  404.    NB: (5) and (6) are identical to match usage in [RFC2401] where they
  405.    are different.
  406.  
  407.    This description applies to implementations that support the ECN
  408.    Tunnel field in the SAD; such implementations MUST implement this
  409.    processing of the DS field instead of the processing of the IPv4 TOS
  410.    octet and IPv6 Traffic Class octet defined in [RFC2401].  This
  411.    constitutes complete ECN support for IPsec tunnels.
  412.  
  413.    An implementation that does not support the ECN Tunnel field in the
  414.    SAD SHOULD implement processing of the DS Field by assuming that the
  415.  
  416.  
  417.  
  418. Floyd, Black, and Ramakrishnan                                  [Page 7]
  419.  
  420.  
  421.  
  422.  
  423.  
  424. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  425.  
  426.  
  427.    value of the ECN Tunnel field of the SAD is "forbidden" for every SA.
  428.    In this case, the RECOMMENDED processing reduces to:
  429.  
  430.       (5)(6) Copy the Differentiated Services Codepoint (DSCP, bits
  431.       0-5).  Set bits 6 and 7 (ECT and CE) of the DS field to zero.
  432.       (7) Make no change to DS field in the inner header.
  433.  
  434.    This constitutes partial ECN support for IPsec tunnels.
  435.  
  436.    In addition, it is RECOMMENDED for that packets with ECN and CE both
  437.    set to 1 in the outer header be dropped if they arrive on an SA that
  438.    forbids or is assumed to forbid ECN usage in tunnel mode.  This
  439.    applies to both the complete ECN support and partial ECN support
  440.    implementation approaches.  This is motivated by backwards
  441.    compatibility and is discussed further in Section 6.
  442.  
  443. 4.  Possible Changes to the ECN Field
  444.  
  445.    This section considers the issues when a router is operating,
  446.    possibly maliciously, to modify either of the bits in the ECN field.
  447.    In this section we represent the ECN field in the IP header by the
  448.    tuple (ECT bit, CE bit).  The ECT bit, when set to 1, indicates an
  449.    ECN-Capable Transport.  The CE bit, when set to 1, indicates that
  450.    Congestion was Experienced in the path.
  451.  
  452.    By tampering with the bits in the ECN field, an adversary (or a
  453.    broken router) could do one or more of the following: erase the ECN
  454.    congestion indication, falsely report congestion, disable ECN-
  455.    Capability for an individual packet, or falsely indicate ECN-
  456.    Capability.  We systematically examine the various cases by which the
  457.    ECN field could be modified.  The important criterion we consider in
  458.    determining the consequences of such modifications is whether it is
  459.    likely to lead to poorer behavior in any dimension (throughput,
  460.    delay, fairness or functionality) than if a router were to drop a
  461.    packet.
  462.  
  463. 4.1.  Erasing the Congestion Indication
  464.  
  465.    First, we consider the changes that a router could make that would
  466.    result in effectively erasing the congestion indication after it had
  467.    been set by a router upstream.  The convention followed is:
  468.    (ECT, CE) of received packet -> (ECT, CE) of packet transmitted.
  469.  
  470.    (1, 1) -> (1, 0):  erase only the CE bit that was set.
  471.    (1, 1) -> (0, 0): erase both the ECT bit and the CE bit.
  472.    (1, 1) -> (0, 1): erase the ECT bit
  473.  
  474.    The first change turns off the CE bit after it has been set by some
  475.  
  476.  
  477.  
  478. Floyd, Black, and Ramakrishnan                                  [Page 8]
  479.  
  480.  
  481.  
  482.  
  483.  
  484. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  485.  
  486.  
  487.    upstream router along the path.  The consequence for the upstream
  488.    router is that there is a potential for congestion to build for a
  489.    time, because the congestion indication does not reach the source.
  490.    However, the packet would be received and acknowledged.
  491.  
  492.    The potential effect of erasing the congestion indication is complex,
  493.    and is discussed in depth in Section 5 below.  Note that the effect
  494.    of erasing the congestion indication is different from dropping a
  495.    packet in the network.  When a data packet is dropped, the drop is
  496.    detected by the TCP sender, and interpreted as an indication of
  497.    congestion.  Similarly, if a sufficient number of consecutive
  498.    acknowledgement packets are dropped, causing the cumulative
  499.    acknowledgement field not to be advanced at the sender, the sender is
  500.    limited by the congestion window from sending additional packets, and
  501.    ultimately the retransmit timer expires.
  502.  
  503.    In contrast, a systematic erasure of the CE bit by a downstream
  504.    router can have the effect of causing a queue buildup at an upstream
  505.    router, including the possible loss of packets due to buffer
  506.    overflow.  There is a potential of unfairness in that another flow
  507.    that goes through the congested router may react to the CE bit set
  508.    while the flow that has the CE bit erased may see better performance.
  509.    The limitations on this potential unfairness are discussed in more
  510.    detail in Section 5 below.
  511.  
  512.    The second change is to turn off both the ECT and the CE bits, thus
  513.    erasing the congestion indication and disabling ECN-Capability at the
  514.    same time.  The third change turns off only the ECT bit, disabling
  515.    ECN-Capability.  The proposal in this Internet Draft is for the
  516.    receiver at the end of a tunnel to copy the CE bit, if set, from the
  517.    outer header to the inner header during decapsulation, if the ECT bit
  518.    in the inner header is set and the tunnel provides full ECN support.
  519.    In this case, the third change within an IPsec tunnel would not erase
  520.    the congestion indication, but would only disable ECN-Capability for
  521.    that packet within the rest of the tunnel.  However, when performed
  522.    outside of an IPsec tunnel, the third change would also effectively
  523.    erase the congestion indication, because, from RFC 2481, an ECN field
  524.    of (0, 1) is undefined.
  525.  
  526.    The `erasure' of the congestion indication is only effective if the
  527.    packet does not end up being marked or dropped again by a downstream
  528.    router.  With the first change, the packet remains ECN-Capable, and
  529.    could be either marked or dropped by a downstream router as an
  530.    indication of congestion.  With the second and third changes, the
  531.    packet is no longer ECN-capable, and can therefore be dropped but not
  532.    marked by a downstream router as an indication of congestion.
  533.  
  534.  
  535.  
  536.  
  537.  
  538. Floyd, Black, and Ramakrishnan                                  [Page 9]
  539.  
  540.  
  541.  
  542.  
  543.  
  544. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  545.  
  546.  
  547. 4.2.  Falsely Reporting Congestion
  548.  
  549.    (1, 0) -> (1, 1)
  550.  
  551.    This change is to set the CE bit when the ECT bit was already set,
  552.    even though there was no congestion.  This change does not affect the
  553.    treatment of that packet along the rest of the path.  In particular,
  554.    a router does not examine the CE bit in deciding whether to drop or
  555.    mark an arriving packet.
  556.  
  557.    However, this could result in the application unnecessarily invoking
  558.    end-to-end congestion control, and reducing its arrival rate.  By
  559.    itself, this is no worse (for the application or for the network)
  560.    than if the tampering router had actually dropped the packet.
  561.  
  562. 4.3.  Disabling ECN-Capability
  563.  
  564.    (1, 0) -> (0, *)
  565.  
  566.    This change is to turn off the ECT bit of a packet that does not have
  567.    the CE bit set.  (Section 4.1 discussed the case of turning off the
  568.    ECT bit of a packet that does have the CE bit set.)  This means that
  569.    if the packet later encounters congestion (e.g., by arriving to a RED
  570.    queue with a moderate average queue size), it will be dropped instead
  571.    of being marked.  By itself, this is no worse (for the application)
  572.    than if the tampering router had actually dropped the packet.  The
  573.    saving grace in this particular case is that there is no congested
  574.    router upstream expecting a reaction from setting the CE bit.
  575.  
  576. 4.4.  Falsely Indicating ECN-Capability
  577.  
  578.    This change is to incorrectly label a packet as ECN-Capable.
  579.  
  580.    (0, *) -> (1, 0);
  581.    (0, *) -> (1, 1);
  582.  
  583.    If the packet later encounters moderate congestion at an ECN-Capable
  584.    router, the router could set the CE bit instead of dropping the
  585.    packet.  If the transport protocol in fact is not ECN-Capable, then
  586.    the transport will never receive this indication of congestion, and
  587.    will not reduce its sending rate in response.  The potential
  588.    consequences of falsely indicating ECN-capability are discussed
  589.    further in Section 5 below.
  590.  
  591.    If the packet never later encounters congestion at an ECN-Capable
  592.    router, then the first of these two changes would have no effect.
  593.    The second change, however, would have the effect of giving false
  594.    reports of congestion to a monitoring device along the path.  If the
  595.  
  596.  
  597.  
  598. Floyd, Black, and Ramakrishnan                                 [Page 10]
  599.  
  600.  
  601.  
  602.  
  603.  
  604. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  605.  
  606.  
  607.    transport protocol is ECN-Capable, then the second of these two
  608.    changes (when, for example, (0,0) was changed to (1,1)) could also
  609.    have an effect at the transport level, by combining falsely
  610.    indicating ECN-Capability with falsely reporting congestion.  For an
  611.    ECN-capable transport, this would cause the transport to
  612.    unnecessarily react to congestion.  In this particular case, the
  613.    router that is incorrectly changing the ECN field could have dropped
  614.    the packet. Thus for this case of an ECN-capable transport, the
  615.    consequence of this change to the ECN field is no worse than dropping
  616.    the packet.
  617.  
  618. 4.5.   Changes with No Functional Effect
  619.  
  620.    (0, *) -> (0, *)
  621.  
  622.    The CE bit is ignored in a packet that does not have the ECT bit set.
  623.    Thus, this change would have no effect, in terms of ECN.
  624.  
  625. 4.6.  Information carried in the Transport Header
  626.  
  627.    For TCP, an ECN-capable TCP receiver informs its TCP peer that it is
  628.    ECN-capable at the TCP level, using information in the TCP header at
  629.    the time the connection is setup.  This document does not consider
  630.    potential dangers introduced by changes in the transport header
  631.    because the IPsec tunnel protects the transport header.
  632.  
  633. 5.  Implications of Subverting End-to-End Congestion Control
  634.  
  635.    This section focuses on the potential repercussions of subverting
  636.    end-to-end congestion control by either falsely indicating ECN-
  637.    Capability, or by erasing the congestion indication in ECN (the CE-
  638.    bit).  Subverting end-to-end congestion control by either of these
  639.    two methods can have consequences both for the application and for
  640.    the network.  We discuss these separately below.
  641.  
  642.    The first method to subvert end-to-end congestion control, falsely
  643.    indicating ECN-Capability, effectively subverts end-to-end congestion
  644.    control only if the packet later encounters congestion that results
  645.    in the setting of the CE bit.  In this case, the transport protocol
  646.    does not receive the indication of congestion from these downstream
  647.    congested routers.
  648.  
  649.    The second method to subvert end-to-end congestion control, `erasing'
  650.    the (set) CE bit in a packet, effectively subverts end-to-end
  651.    congestion control only when the CE bit in the packet was set earlier
  652.    by a congested router.  In this case, the transport protocol does not
  653.    receive the indication of congestion from the upstream congested
  654.    routers.
  655.  
  656.  
  657.  
  658. Floyd, Black, and Ramakrishnan                                 [Page 11]
  659.  
  660.  
  661.  
  662.  
  663.  
  664. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  665.  
  666.  
  667.    Either of these two methods of subverting end-to-end congestion
  668.    control can potentially introduce more damage to the network (and
  669.    possibly to the flow itself) than if the adversary had simply dropped
  670.    packets from that flow.  However, as we discuss later in this section
  671.    and in Section 7, this potential damage is limited.
  672.  
  673. 5.1.  Implications for the Network and for Competing Flows
  674.  
  675.    The CE bit of the ECN field is only used by routers as an indication
  676.    of congestion during periods of *moderate* congestion.  From RFC
  677.    2481: "When severe congestion has occurred and the router's queue is
  678.    full, then the router has no choice but to drop some packet when a
  679.    new packet arrives." Although it is not explicitly mandated by RFC
  680.    2481, the general guidelines are that a router should drop rather
  681.    than mark packets during heavy congestion even if the router's queue
  682.    is not yet full.  For example, for routers using active queue
  683.    management based on RED, the router should drop rather than mark
  684.    packets that arrive while the average queue sizes exceed the RED
  685.    queue's maximum threshold.
  686.  
  687.    One consequence for the network of subverting end-to-end congestion
  688.    control is that flows that do not receive the congestion indications
  689.    from the network might increase their sending rate until they drive
  690.    the network into heavier congestion.  Then, the congested router
  691.    could begin to drop rather than mark arriving packets.  For flows
  692.    that are not isolated by some form of per-flow scheduling or other
  693.    per-flow mechanisms, but that are instead aggregated with other flows
  694.    in a single queue in an undifferentiated fashion, this packet-
  695.    dropping at the congested router would apply to all flows that share
  696.    that queue.  Thus, the consequences would be to increase the level of
  697.    congestion in the network.
  698.  
  699.    In some cases, the increase in the level of congestion will lead to a
  700.    substantial buffer buildup at the congested queue that will be
  701.    sufficient to drive the congested queue from the packet-marking to
  702.    the packet-dropping regime.  This transition could occur either
  703.    because of buffer overflow, or because of the active queue management
  704.    policy described above that drops packets when the average queue is
  705.    above RED's maximum threshold.  At this point, all flows, including
  706.    the subverted flow, will begin to see packet drops instead of packet
  707.    marks, and a malicious or broken router will no longer be able to
  708.    `erase' these indications of congestion in the network.  If the end
  709.    nodes are deploying appropriate end-to-end congestion control, then
  710.    the subverted flow will reduce its arrival rate in response to
  711.    congestion.  When the level of congestion is sufficiently reduced,
  712.    the congested queue can return from the packet-dropping regime to the
  713.    packet-marking regime.  The steady-state pattern could be one of the
  714.    congested queue oscillating between these two regimes.
  715.  
  716.  
  717.  
  718. Floyd, Black, and Ramakrishnan                                 [Page 12]
  719.  
  720.  
  721.  
  722.  
  723.  
  724. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  725.  
  726.  
  727.    In other cases, the consequences of subverting end-to-end congestion
  728.    control will not be severe enough to drive the congested link into
  729.    sufficiently-heavy congestion that packets are dropped instead of
  730.    being marked.  In this case, the implications for competing flows in
  731.    the network will be a slightly-increased rate of packet marking or
  732.    dropping, and a corresponding decrease in the bandwidth available to
  733.    those flows.  This can be a stable state if the arrival rate of the
  734.    subverted flow is sufficiently small, relative to the link bandwidth,
  735.    that the average queue size at the congested router remains under
  736.    control.  In particular, the subverted flow could have a limited
  737.    bandwidth demand on the link at this router, while still getting more
  738.    than its "fair" share of the link.  This limited demand could be due
  739.    to a limited demand from the data source; a limitation from the TCP
  740.    advertised window; a lower-bandwidth access pipe; or other factors.
  741.    Thus the subversion of ECN-based congestion control can still lead to
  742.    unfairness, which we believe is appropriate to note here.
  743.  
  744.    The threat to the network posed by the subversion of ECN-based
  745.    congestion control in the network is essentially the same as the
  746.    threat posed by an end-system that intentionally fails to cooperate
  747.    with end-to-end congestion control.  The deployment of mechanisms in
  748.    routers to address this threat is an open research question, and is
  749.    discussed further in Section 7.
  750.  
  751.    Let us take the example described in Section 4.1, where the CE bit
  752.    that was set in a packet is erased by the tunnel: {(1, 1) -> (1, 0)}.
  753.    The consequence for the congested upstream router that set the CE bit
  754.    is that this congestion indication does not reach the end nodes for
  755.    that flow. The source (even one which is completely cooperative and
  756.    not malicious) is thus allowed to continue to increase its sending
  757.    rate (if it is a TCP flow, by increasing its congestion window).  The
  758.    flow potentially achieves better throughput than the other flows that
  759.    also share the congested router, especially if there are no policing
  760.    mechanisms or per-flow queueing mechanisms at that router.  Consider
  761.    the behavior of the other flows, especially if they are cooperative:
  762.    that is, the flows that do not experience subverted end-to-end
  763.    congestion control.  They are likely to reduce their load (e.g., by
  764.    reducing their window size) on the congested router, thus benefiting
  765.    our subverted flow. This results in unfairness.  As we discussed
  766.    above, this unfairness could either be transient (because the
  767.    congested queue is driven into the packet-marking regime),
  768.    oscillatory (because the congested queue oscillated between the
  769.    packet marking and the packet dropping regime), or more moderate but
  770.    a persistent stable state (because the congested queue is never
  771.    driven to the packet dropping regime).
  772.  
  773.    The results would be similar if the subverted flow was intentionally
  774.    avoiding end-to-end congestion control.  One difference is that a
  775.  
  776.  
  777.  
  778. Floyd, Black, and Ramakrishnan                                 [Page 13]
  779.  
  780.  
  781.  
  782.  
  783.  
  784. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  785.  
  786.  
  787.    flow that is intentionally avoiding end-to-end congestion control at
  788.    the end nodes can avoid end-to-end congestion control even when the
  789.    congested queue is in packet-dropping mode, by refusing to reduce its
  790.    sending rate in response to packet drops in the network.  Thus the
  791.    problems for the network of the subversion of ECN-based congestion
  792.    control are less severe than the problems caused by the intentional
  793.    avoidance of end-to-end congestion control in the end nodes.  It is
  794.    also the case that it is considerably more difficult to control the
  795.    behavior of the end nodes than it is to control the behavior of the
  796.    infrastructure itself.  This is not to say that the problems for the
  797.    network posed by the network's subversion of ECN-based congestion
  798.    control are small; just that they are dwarfed by the problems for the
  799.    network posed by the subversion of either ECN-based or packet-based
  800.    congestion control by the end nodes.
  801.  
  802. 5.2.  Implications for the Subverted Flow
  803.  
  804.    When a source indicates that it is ECN-capable, there is an
  805.    expectation that the routers in the network that are capable of
  806.    participating in ECN will use the CE bit for indication of
  807.    congestion. There is the potential benefit of using ECN in reducing
  808.    the amount of packet loss (in addition to the reduced queueing delays
  809.    because of active queue management policies).  When the packet flows
  810.    through a tunnel where the nodes that the tunneled packets traverse
  811.    are untrusted in some way, the expectation is that IPsec will protect
  812.    the flow from subversion that results in undesirable consequences.
  813.  
  814.    In many cases, a subverted flow will benefit from the subversion of
  815.    end-to-end congestion control for that flow in the network, by
  816.    receiving more bandwidth that it would have otherwise, relative to
  817.    competing non-subverted flows.  If the congested queue reaches the
  818.    packet-dropping stage, then the subversion of end-to-end congestion
  819.    control might or might not be of overall benefit to the subverted
  820.    flow, depending on that flow's relative tradeoffs between throughput,
  821.    loss, and delay.
  822.  
  823.    One form of subverting end-to-end congestion control is to falsely
  824.    indicate ECN-capability by setting the ECT bit.  This has the
  825.    consequence of downstream congested routers setting the CE bit in
  826.    vain.  However, as we describe in the section below, if the ECT bit
  827.    is changed in the IPsec tunnel, this can be detected at the egress
  828.    point of the tunnel.
  829.  
  830.    The second form of subverting end-to-end congestion control is to
  831.    erase the congestion indication, either by erasing the CE bit
  832.    directly, or by erasing the ECT bit when the CE bit is already set.
  833.    In this case, it is the upstream congested routers that set the CE
  834.    bit in vain.  There are several possible scenarios for this
  835.  
  836.  
  837.  
  838. Floyd, Black, and Ramakrishnan                                 [Page 14]
  839.  
  840.  
  841.  
  842.  
  843.  
  844. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  845.  
  846.  
  847.    subversion of end-to-end congestion control within an IPsec tunnel.
  848.    If the ECT bit is erased within an IPsec tunnel, then this can be
  849.    detected at the egress point of the tunnel.  If the CE bit is set
  850.    upstream of the IPsec tunnel, then any erasure of the outer header's
  851.    CE bit within the tunnel will have no effect because the inner header
  852.    preserves the set value of the CE bit.  However, if the CE bit is set
  853.    within the tunnel, and erased either within or downstream of the
  854.    tunnel, this is not necessarily detected at the egress point of the
  855.    tunnel.
  856.  
  857.    With this subversion of end-to-end congestion control, an end-system
  858.    transport does not respond to the congestion indication.  Along with
  859.    the increased unfairness for the non-subverted flows described in the
  860.    previous section, the congested router's queue could continue to
  861.    build, resulting in packet loss at the congested router - which is a
  862.    means for indicating congestion to the transport in any case.  In the
  863.    interim, the flow might experience higher queueing delays, possibly
  864.    along with an increased bandwidth relative to other non-subverted
  865.    flows.  But transports do not inherently make assumptions of
  866.    consistently experiencing carefully managed queueing in the path.  We
  867.    believe that these forms of subverting end-to-end congestion control
  868.    are no worse for the subverted flow than if the adversary had simply
  869.    dropped the packets of that flow itself.
  870.  
  871. 5.3.  Non-ECN-Based Methods of Subverting End-to-end Congestion Control
  872.  
  873.    We have shown that, in many cases, a malicious or broken router that
  874.    is able to change the bits in the ECN field can do no more damage
  875.    than if it had simply dropped the packet in question.  However, this
  876.    is not true in all cases, in particular in the cases where the broken
  877.    router subverted end-to-end congestion control by either falsely
  878.    indicating ECN-Capability or by erasing the ECN congestion indication
  879.    (in the CE-bit).  While there are many ways that a router can harm a
  880.    flow by dropping packets, a router cannot subvert end-to-end
  881.    congestion control by dropping packets.  As an example, a router
  882.    cannot subvert TCP congestion control by dropping data packets,
  883.    acknowledgement packets, or control packets.
  884.  
  885.    Even though packet-dropping cannot be used to subvert end-to-end
  886.    congestion control, there *are* non-ECN-based methods for subverting
  887.    end-to-end congestion control that a broken or malicious router could
  888.    use.  For example, a broken router could duplicate data packets, thus
  889.    effectively negating the effects of end-to-end congestion control
  890.    along some portion of the path.  (For a router that duplicated
  891.    packets within an IPsec tunnel, the security administrator can cause
  892.    the duplicate packets to be discarded by configuring anti-replay
  893.    protection for the tunnel.)  This duplication of packets within the
  894.    network would have similar implications for the network and for the
  895.  
  896.  
  897.  
  898. Floyd, Black, and Ramakrishnan                                 [Page 15]
  899.  
  900.  
  901.  
  902.  
  903.  
  904. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  905.  
  906.  
  907.    subverted flow as those described in Sections 5.1 and 5.2 above.
  908.  
  909. 6.   Changes to the ECN Field within an IPsec Tunnel.
  910.  
  911.    The presence of a copy of the ECN field in the inner header of an
  912.    IPsec tunnel mode packet provides an opportunity for detection of
  913.    modifications to the ECT bit in the outer header.  Comparison of the
  914.    ECT bits in the inner and outer headers falls into two categories for
  915.    implementations that conform to this document:
  916.       (a) If the SA allows ECN usage within the tunnel, then the values
  917.       of the ECT bits in the inner and outer headers should be
  918.       identical.
  919.       (b) If the SA disallows ECN usage within the tunnel, then the ECT
  920.       bit in the outer header should be 0.
  921.  
  922.    Receipt of a packet not satisfying the appropriate condition for its
  923.    SA is an auditable event, but an implementation MAY create audit
  924.    records with per-SA counts of incorrect packets over some time period
  925.    rather than creating an audit record for each erroneous packet.  Any
  926.    such audit record SHOULD contain the headers from at least one
  927.    erroneous packet, but need not contain the headers from every packet
  928.    represented by the entry.
  929.  
  930.    An important and likely situation involves an IPsec implementation
  931.    not updated to this document's requirements serving as tunnel ingress
  932.    for a tunnel egress at an implementation that has been updated.  The
  933.    ECN Tunnel attribute cannot be negotiated in this case because the
  934.    tunnel ingress implementation does not support it.  If packets from
  935.    an ECN-capable connection use this tunnel, ECT will be set in the
  936.    outer header independent of the SA.  Congestion along the route may
  937.    then result in ECN-capable routers setting CE in the outer header.
  938.    All packets arriving at the tunnel egress on this SA will appear to
  939.    be case (b) errors, but should be processed according to whether CE
  940.    was set.  Therefore it is RECOMMENDED that packets violating the
  941.    condition for case (b) above be dropped if CE is set to 1 in the
  942.    outer header and forwarded if CE is 0 in the outer header.
  943.  
  944.    An IPsec tunnel cannot provide protection against erasure of
  945.    congestion indications or false reports of congestion based on
  946.    flipping the value of the CE bit in packets for which ECT is set in
  947.    the outer header.  As described in Section 5, false reports of
  948.    congestion are equivalent to dropping the packet, an action against
  949.    which IPsec also provides no protection.  On the other hand, erasure
  950.    of congestion indications may impact the network and other flows in
  951.    ways that would not be possible in the absence of ECN.  It is
  952.    important to note that erasure of congestion indications can only be
  953.    performed to congestion indications placed by nodes within the
  954.    tunnel; the copy of the CE bit in the inner header preserves
  955.  
  956.  
  957.  
  958. Floyd, Black, and Ramakrishnan                                 [Page 16]
  959.  
  960.  
  961.  
  962.  
  963.  
  964. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  965.  
  966.  
  967.    congestion notifications from nodes upstream of the tunnel ingress.
  968.    If erasure of congestion notifications is judged to be a security
  969.    risk that exceeds the congestion management benefits of ECN, the
  970.    security administrator should configure the appropriate tunnel SAs to
  971.    forbid ECN usage in the outer header.
  972.  
  973. 7.  Issues Raised by Monitoring and Policing Devices
  974.  
  975.    One possibility is that monitoring and policing devices (or more
  976.    informally, ``penalty boxes'') will be installed in the network to
  977.    monitor whether best-effort flows are appropriately responding to
  978.    congestion, and to preferentially drop packets from flows determined
  979.    not to be using adequate end-to-end congestion control procedures.
  980.    [FF98] proposes three potential classifications for high-bandwidth
  981.    flows in times in congestion:  (1)  flows that are not TCP-friendly,
  982.    in that the arrival rate from that flow exceeds the arrival rate of a
  983.    conformant TCP connection under the same conditions; (2) flows that
  984.    are unresponsive, in that they do not decrease their arrival rate
  985.    appropriately in response to an increase in congestion;  and (3)
  986.    flows using disproportionate bandwidth, defined as flows using a
  987.    significantly larger share of bandwidth than other flows in times of
  988.    high congestion.  The methods of identifying and classifying flows to
  989.    be in one of these three categories is outside the scope of this
  990.    discussion.
  991.  
  992.    [FF98] proposes that flows that are simply determined to be using
  993.    disproportionate bandwidth could have their bandwidth restricted, in
  994.    much the same way that a round-robin per-flow scheduling algorithm
  995.    would restrict the bandwidth received by individual flows, while
  996.    flows determined to be unresponsive or not TCP-friendly in times of
  997.    congestion could have their bandwidth even more strongly reduced, as
  998.    a concrete incentive to end nodes to use end-to-end congestion
  999.    control.
  1000.  
  1001.    For an ECN-capable flow, an `ideal' penalty box at a router would be
  1002.    a device that, when it detected that a flow was not responding to ECN
  1003.    indications, would switch to dropping, instead of marking, those
  1004.    packets of a flow that would otherwise have been chosen to carry
  1005.    indications of congestion.  In this way, these congestion indications
  1006.    could not be `erased' later in the network, and at the same time
  1007.    there would be no change in the router's treatment of packets of
  1008.    other flows.  If a router determines that a flow is still not
  1009.    responding to congestion indications, when the congestion indications
  1010.    consist of packet drops, then the router could take whatever action
  1011.    it deems appropriate for that flow.
  1012.  
  1013.    We recommend that any ``penalty box'' that detects a flow or an
  1014.    aggregate of flows that is not responding to end-to-end congestion
  1015.  
  1016.  
  1017.  
  1018. Floyd, Black, and Ramakrishnan                                 [Page 17]
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  1025.  
  1026.  
  1027.    control first change from marking to dropping packets from that flow,
  1028.    before taking any additional action to restrict the bandwidth
  1029.    available to that flow.  Thus, initially, the router may drop packets
  1030.    in which the router would otherwise would have set the CE bit.  This
  1031.    could include dropping those arriving packets for that flow that are
  1032.    ECN-Capable and that already have the CE bit set.  In this way, any
  1033.    congestion indications seen by that router for that flow will be
  1034.    guaranteed to also be seen by the end nodes, even in the presence of
  1035.    malicious or broken routers elsewhere in the path.  If we assume that
  1036.    the first action taken at any ``penalty box'' for an ECN-capable flow
  1037.    will be to drop packets instead of marking them, then there is no way
  1038.    that an adversary that subverts ECN-based end-to-end congestion
  1039.    control can cause a flow to be characterized as being non-cooperative
  1040.    and placed into a more severe action within the ``penalty box''.
  1041.  
  1042.    The monitoring and policing devices that are actually deployed could
  1043.    fall short of the `ideal' monitoring device described above, in that
  1044.    the monitoring is applied not to a single flow or to a single IPsec
  1045.    tunnel, but to an aggregate of flows.  In this case, the switch from
  1046.    marking to dropping would apply to all of the flows in that
  1047.    aggregate, denying the benefits of ECN to the other flows in the
  1048.    aggregate also.  At the highest level of aggregation, another form of
  1049.    the disabling of ECN happens even in the absence of monitoring and
  1050.    policing devices, when ECN-Capable RED queues switch from marking to
  1051.    dropping packets as an indication of congestion when the average
  1052.    queue size has exceeded some threshold.
  1053.  
  1054. 7.1. Complications Introduced by Split Paths
  1055.  
  1056.    If a router or other network element has access to all of the packets
  1057.    of a flow, then that router could do no more damage to a flow by
  1058.    altering the ECN field that it could by simply dropping all of the
  1059.    packets from that flow.  However, in some cases, a malicious or
  1060.    broken router might have access to only a subset of the packets from
  1061.    a flow.  The question is as follows:  can this router, by altering
  1062.    the ECN field in this subset of the packets, do more damage to that
  1063.    flow than if it has simply dropped that set of the packets?
  1064.  
  1065.    We will classify the packets in the flow as A packets and B packets,
  1066.    and assume that the adversary only has access to A packets.  Assume
  1067.    that the adversary is subverting end-to-end congestion control along
  1068.    the path traveled by A packets only, by either falsely indicating
  1069.    ECN-Capability upstream of the point where congestion occurs, or
  1070.    erasing the congestion indication downstream.  Consider also that
  1071.    there exists a monitoring device that sees both the A and B packets,
  1072.    and will "punish" both the A and B packets if the total flow is
  1073.    determined not to be properly responding to indications of
  1074.    congestion.  Another key characteristic that we believe is likely to
  1075.  
  1076.  
  1077.  
  1078. Floyd, Black, and Ramakrishnan                                 [Page 18]
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  1085.  
  1086.  
  1087.    be true is that the monitoring device, before ``punishing'' the A&B
  1088.    flow, will first drop packets instead of setting the CE bit, and will
  1089.    drop arriving packets of that flow that already have the ECT and CE
  1090.    bits set.  If the end nodes are in fact using end-to-end congestion
  1091.    control, they will see all of the indications of congestion seen by
  1092.    the monitoring device, and will begin to respond to these indications
  1093.    of congestion. Thus, the monitoring device is successful in providing
  1094.    the indications to the flow at an early stage.
  1095.  
  1096.    It is true that the adversary that has access only to the A packets
  1097.    might, by subverting ECN-based congestion control, be able to deny
  1098.    the benefits of ECN to the other packets in the A&B aggregate.  While
  1099.    this is unfortunate, this is not a reason disable ECN within an IPsec
  1100.    tunnel.
  1101.  
  1102.    A variant of falsely reporting congestion occurs when there are two
  1103.    adversaries along a path, where the first adversary falsely reports
  1104.    congestion, and the second adversary `erases' those reports.  (Unlike
  1105.    packet drops, ECN congestion reports can be `reversed' later in the
  1106.    network by a malicious or broken router.)  While this would be
  1107.    transparent to the end node, it is possible that a monitoring device
  1108.    between the first and second adversaries would see the false
  1109.    indications of congestion.  Given our recommendation in this
  1110.    document, before `punishing' a flow for not responding appropriately
  1111.    to congestion, the router will first switch to dropping rather than
  1112.    marking as an indication of congestion, for that flow.  When this
  1113.    includes dropping arriving packets from that flow that have the CE
  1114.    bit set, this ensures that these indications of congestion are being
  1115.    seen by the end nodes.  Thus, there is no additional harm that we are
  1116.    able to postulate as a result of multiple conflicting adversaries.
  1117.  
  1118. 8.  Conclusions.
  1119.  
  1120.    When ECN (Explicit Congestion Notification [RFC2481]) is used, it is
  1121.    desirable that congestion indications generated within an IPsec
  1122.    tunnel not be lost at the tunnel egress.  We propose a minor
  1123.    modification to the IPsec protocol's handling of the ECN field during
  1124.    encapsulation and de-capsulation to allow flows that will undergo
  1125.    IPsec tunneling to use ECN.
  1126.  
  1127.    Two options were proposed:
  1128.    1) A preferred alternative, which is the full-functionality option as
  1129.    described in RFC 2481. This copies the ECT bit of the inner header to
  1130.    the encapsulating header. At decapsulation, if the ECT bit is set in
  1131.    the inner header, the CE bit on the outer header is ORed with the CE
  1132.    bit of the inner header to update the CE bit of the packet.  2) A
  1133.    limited-functionality option that does not use ECN inside the IPsec
  1134.    tunnel, by turning the ECT bit in the outer header off, and not
  1135.  
  1136.  
  1137.  
  1138. Floyd, Black, and Ramakrishnan                                 [Page 19]
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  1145.  
  1146.  
  1147.    altering the inner header at the time of decapsulation.
  1148.  
  1149.    We also proposed a new IPsec SA attribute to support negotiation of
  1150.    ECN support for tunnels between tunnel end-points and a new field in
  1151.    the Security Association database to indicate whether ECN is
  1152.    supported in tunnel mode on a SA.
  1153.  
  1154.    We examined the consequence of modifications of the ECN field within
  1155.    the tunnel, analyzing all the opportunities for an adversary to
  1156.    change the ECN field.  In many cases, the change to the ECN field is
  1157.    no worse than dropping a packet. However, we noted that some changes
  1158.    have the more serious consequence of subverting end-to-end congestion
  1159.    control.  However, we point out that even then the potential damage
  1160.    is limited, and is similar to the threat posed by an end-system
  1161.    intentionally failing to cooperate with end-to-end congestion
  1162.    control.
  1163.  
  1164.    We therefore believe that with these changes it is reasonable to use
  1165.    ECN with IPsec tunnels, as described in RFC 2481.
  1166.  
  1167. 9. Acknowledgements
  1168.  
  1169.    We thank Steve Bellovin and Vern Paxson for discussions of these
  1170.    matters.
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198. Floyd, Black, and Ramakrishnan                                 [Page 20]
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  1205.  
  1206.  
  1207. 10. References
  1208.  
  1209.    [FF98] Floyd, S., and Fall, K., Promoting the Use of End-to-End
  1210.    Congestion Control in the Internet. Under submission, February 1998.
  1211.    URL "http://www-nrg.ee.lbl.gov/floyd/end2end-paper.html".
  1212.  
  1213.    [RFC 2401] S. Kent, R. Atkinson, Security Architecture for the
  1214.    Internet Protocol, RFC 2401, November 1998.
  1215.  
  1216.    [RFC2407] D. Piper, The Internet IP Security Domain of Interpretation
  1217.    for ISAKMP, RFC 2407, November 1998.
  1218.  
  1219.    [RFC2474] K. Nichols, S. Blake, F. Baker, D. Black, Definition of the
  1220.    Differentiated Services Field (DS Field) in the IPv4 and IPv6
  1221.    Headers, RFC 2474, December 1998.
  1222.  
  1223.    [RFC2481] K. Ramakrishnan, S. Floyd, A Proposal to add Explicit
  1224.    Congestion Notification (ECN) to IP, RFC 2481, January 1999.
  1225.  
  1226. 11. Security Considerations
  1227.  
  1228.    Security considerations have been addressed in the main body of the
  1229.    document.
  1230.  
  1231. AUTHORS' ADDRESSES
  1232.  
  1233.  
  1234.    Sally Floyd
  1235.    AT&T Center for Internet Research at ICSI (ACIRI)
  1236.    Phone: +1 (510) 642-4274 x189
  1237.    Email: floyd@aciri.org
  1238.    URL: http://www-nrg.ee.lbl.gov/floyd/
  1239.  
  1240.    David L. Black
  1241.    EMC Corporation
  1242.    42 South St.
  1243.    Hopkinton, MA  01748
  1244.    Phone:  +1-508-435-1000 x75140
  1245.    EMail: black_david@emc.com
  1246.  
  1247.    K. K. Ramakrishnan
  1248.    AT&T Labs. Research
  1249.    Phone: +1 (973) 360-8766
  1250.    Email: kkrama@research.att.com
  1251.    URL: http://www.research.att.com/info/kkrama
  1252.  
  1253.    This draft was created in February 1999.
  1254.    It expires August 1999.
  1255.  
  1256.  
  1257.  
  1258. Floyd, Black, and Ramakrishnan                                 [Page 21]
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264. draft-ipsec-ecn        IPsec Interactions with ECN         February 1999
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318. Floyd, Black, and Ramakrishnan                                 [Page 22]
  1319.  
  1320.  
  1321.