home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / email / sf.97nov19.txt < prev    next >
Text File  |  1997-11-19  |  7KB  |  144 lines

  1. To: ipng@sunroof.eng.sun.com
  2. cc: bound@zk3.dec.com, kkrama@research.att.com
  3. Subject: ECN - one bit or two?
  4. Date: Wed, 19 Nov 1997 17:45:56 PST
  5. From: Sally Floyd <floyd>
  6.  
  7. Jim -
  8.  
  9. >The only issue is
  10. >that you say you can do it with one bit but its easier to explain with
  11. >two bits.  I don't mind using up two bits if it will make the
  12. >implementation and execution clearer and better, but not just for
  13. >clarity of explaining the behavior.
  14.  
  15. Fair enough.
  16.  
  17. (My original assumption had been that this one-bit or two-bit
  18. discussion would happen on end2end-interest, but it seems that the
  19. people who most want to have this discussion are on ipng, so I will try
  20. to have this discussion there.  Clearly any detailed discussion about
  21. allocating bits for ECN in IPv6 should happen on this list, and any
  22. detailed discussion about allocating bits for ECN in IPv4 would happen
  23. on the int-serv list, and detailed discussions about adding ECN to TCP
  24. will happen on either tcplw or tcp-impl.  I am hoping that more
  25. general research discussions related to ECN will happen on
  26. end2end-interest.)
  27.  
  28. THE TWO-BIT APPROACH:
  29.  
  30. The recent internet draft submitted by KK and myself discusses a
  31. two-bit approach to ECN:  an ECN-Capable bit set by the sender,
  32. indicating to the router that the session is ECN-capable: and an ECN
  33. bit set by the router to indicate congestion to the receiver.
  34.  
  35. THE ONE-BIT APPROACH:
  36.  
  37. Section 9.2 of the 1994 ECN paper discusses a one-bit approach as well,
  38. where the ECN-Capable bit and the ECN bit are overloaded in a single
  39. bit.  This single bit would have two values:  one value to indicate
  40. "ECN-Capable", and the other value to indicate "either not ECN-Capable,
  41. or Congestion Notification".  My own opinion is that that the two-bit
  42. approach is preferable to the one-bit approach, for reasons discussed
  43. below, and that the one-bit approach is preferable to no ECN at all.
  44.  
  45. WHY THE ECN-CAPABLE INDICATION IS NEEDED:
  46.  
  47. The need for both bits is motivated by the fact that ECN will be
  48. deployed incrementally in an Internet where some transport protocols
  49. understand ECN and some do not.  With the ECN-capable bit, the router
  50. can drop packets from flows that are not ECN-capable, but can
  51. **instead** set the ECN bit in flows that **are** ECN-capable.  Because
  52. ECN means that an end node can have the ECN bit set in packets instead
  53. of having the packet dropped, an end node might have some incentive to
  54. deploy ECN.  A flow that advertised itself as ECN-Capable but does not
  55. respond to ECN bits is functionally equivalent to a flow that turns off
  56. congestion control;  this is discussed in Section 8 of the ECN internet
  57. draft.
  58.  
  59. If there is no ECN-Capable indication, and the router simply 
  60. sets the ECN bit whether or not the transport protocol is
  61. ECN-Capable, then there is no incentive for end-nodes to deploy
  62. ECN, and no viable path of incremental deployment from a non-ECN
  63. world to an ECN-capable world.  Consider the first stages of such
  64. an incremental deployment, where a subset of the TCP flows have
  65. end-node pairs that understand ECN.  Then when there is mild congestion,
  66. the routers will only set ECN bits, rather than dropping packets.
  67. However, only those flows that are ECN-capable will respond to those
  68. ECN bits.  The result is that the ECN-capable flows will back off,
  69. and the non-ECN-capable flows will be unaware of the ECN signals and
  70. will continue to open their congestion windows.  
  71.  
  72. In this case, there are two possible outcomes:  
  73. (1) the ECN-capable flows back off, the non-ECN-capable flows
  74. get all of the bandwidth, and congestion remains mild, or
  75. (2) the ECN-capable flows back off, the non-ECN-capable flows
  76. don't, and congestion increases until the router transitions from
  77. setting the ECN bit to dropping packets.  While this evens out 
  78. the fairness, this means that the ECN-capable flows get no
  79. benefit from being ECN-capable, because the router has no choice
  80. but to resort to packet-dropping instead.
  81.  
  82. In this world when a subset of the flows are ECN-capable,
  83. but where ECN-capable flows have no mechanism for indicating that
  84. fact to the routers, there would be less effective and less
  85. fair congestion control in the Internet, and a strong incentive
  86. for end nodes not to deploy ECN.
  87.  
  88. ASSUMING THAT THE ECN-CAPABLE INDICATION IS NEEDED, THE RELATIVE 
  89. ADVANTAGES OF ONE AND TWO BITS:
  90.  
  91. Functionally, the one-bit approach and the two-bit approach are
  92. similar.  The one-bit approach has the functional limitation that if
  93. one router sets the ECN bit in a packet that is "ECN-Capable", so that
  94. the ECN bit now represents "either not ECN-Capable, or Congestion
  95. Notification", then a second router has to assume that that packet is
  96. not ECN-Capable, and has to drop that packet if it also wants to
  97. indicate congestion to the end nodes.  This seems to me like a rather
  98. minor limitation.
  99.  
  100. A critical issue in the implementation of ECN is that by default, the
  101. IP header should indicate that the packet is **not** ECN-capable.  (If
  102. the IP header indicates that a packet is ECN-capable while the
  103. underlying transport protocol ignores the ECN bit in received packets,
  104. this is roughly equivalent to the transport protocol "turning off"
  105. congestion control.  Not acceptable behavior.)  So in the two-bit
  106. approach, the requirement is that by default, the ECN-Capable bit be in
  107. the "off" position, or set to "0".  This seems relatively clear and
  108. straightforward, and not likely to get mixed up, and the router should
  109. never change the value of the ECN-Capable bit in any case.  In the
  110. one-bit approach, the requirement is that by default, the ECN bit be in
  111. the "either not ECN-Capable, or Congestion Notification" position.
  112. Less clear, robust, and straightforward.  I assumed that it was not a
  113. show-stopper...
  114.  
  115. A second issue lies in the danger that the receiver will misinterpret
  116. the received ECN signal.  In the two-bit approach, an ECN-capable
  117. receiver has to respond if it receives a packet with both the
  118. ECN-Capable and the ECN bits set.  This is clear.  In the one-bit
  119. approach, ECN should only be used when the receiver knows in advance
  120. that the sender is sending all of its packets with the ECN bit set to
  121. "ECN-Capable".  In this case, if the receiver receives a packet with
  122. the ECN bit set to "either not ECN-Capable, or Congestion
  123. Notification",  then the receiver knows to interpret that as
  124. "Congestion Notification", and to respond appropriately.  While this is
  125. not a problem if all ECN-capable transport protocols are implemented
  126. carefully and correctly, it is clearly less robust than the two-bit
  127. approach.  In addition, the one-bit approach does not allow the sender
  128. to selectively set the ECN-Capable bit on some packets but not others,
  129. because the receiver has no way to distinguish between a packet that
  130. was sent as "not ECN-Capable", and a packet whose ECN bit was set by
  131. the router to "Congestion Notification".
  132.  
  133. CONCLUSION:
  134.  
  135. My conclusion would be that the two-bit approach is more robust
  136. than the one-bit approach.  As far as I know, there is consensus that
  137. the two-bit approach is viable;  I don't know that there is rough
  138. consensus that the one-bit approach is viable.
  139.  
  140. - Sally
  141.  
  142. I am putting a copy of this note on the newly-created ECN web page at:
  143. http://www-nrg.ee.lbl.gov/floyd/ecn.html
  144.