home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.lbl.gov / 2014.05.ftp.ee.lbl.gov.tar / ftp.ee.lbl.gov / ECN / README.ECN < prev   
Text File  |  1998-12-07  |  6KB  |  200 lines

  1. This package contains two kernels. 
  2. 2.1.129 (patched) to use as a router with RED + ECN  
  3. capability and 2.0.32 to be used for an End system
  4. capable of ECN.
  5.  
  6. INSTALLING:
  7. ----------
  8.  
  9. A: END SYSTEM
  10. ==============
  11.  
  12. Two ways to get started:
  13. 1) Grab the 2.0.32 kernel from 
  14. http://www.kernel.org/pub/linux/kernel/v2.0/
  15. and patch as follows (after untarring the kernel source):
  16. a) go to one directory above the 2.0.32 source
  17. b) cat patch-ecn | patch -p0
  18.  
  19. or 
  20.  
  21. 2) You can retrieve a patched tar gzipped source included.
  22. File linux-2.0.32-ecn.tgz.
  23.  
  24. Compiling ECN support in TCP:
  25. ----------------------------
  26. The assumption is you know how to compile the kernel.
  27. [You can get help on how to compile the kernel on many
  28. Linux web sites. A good place to start is htttp://www.linuxhq.com]
  29.  
  30. At kernel configuration time make sure you select Network configuration.
  31. When configuring network Options you will be presented with an option to 
  32. select ECN; make sure you select it. You will also be able to select 
  33. some ECN debugging if you wish to see some out put (intentionaly minimalized).
  34. The debug output goes to /var/log/messages (you can also see view via the
  35. dmesg command or on the console).
  36.  
  37.  
  38. B: Router SYSTEM
  39. ================
  40. You will need an RED+ECN enabled router in the middle.
  41. You can either use:
  42.  
  43. 1)A BSD box with patches from Kenjiro Cho at:
  44. http://www.csl.sony.co.jp/person/kjc/red/perf.html
  45.  
  46. 2) a) A linux box with at least kernel 2.1.129 with RED+ECN
  47. turned on.
  48. Since 2.1.* is an experimental kernel it is safer to use the
  49. kernel sources i supply. They are other patches other than
  50. ECN which are included.
  51. [Included tarred gzipped file: linux21.ecn-router.tgz]
  52.  
  53. b) the tc utility to configure the kernel 
  54. It is safer to also use the tc utility supplied in the package
  55. since i dont remember what else i changed.
  56. [A simple setup script is included for RED+CBQ with ECN implied;
  57. File tc.script.sample]
  58.  
  59. POST-INSTALLATION
  60. ===================
  61.  
  62. Included also are patched sources for tcpdump which will dump
  63. ECN related bits for debugging.
  64. You may also want to edit (2.0.32) the files linux-kernel/net/ipv4/ :
  65. tcp.c, tcp_input.c, tcp_output.c
  66. and define CONFIG_ECN_DEB2 to 1 for more debug outputs.
  67.  
  68. GENERAL COMMENTS:
  69. ----------------
  70.  
  71. I am planning to port this code to the 2.1.* kernels Real Soon Now
  72. (i have already started looking at it).
  73. [Thats why it is not in even the latest 2.0.* kernel]
  74. *** For any comments, queries, feedback email hadi@nortelnetworks.com
  75.  
  76.  
  77. CONFORMANCE TO THE DRAFT/IRFC
  78. =============================
  79.  
  80. Section 6.1.1: TCP initialization
  81. ==================================
  82.  
  83. 1) When a node sends a TCP SYN packet, it may set the ECN-Echo and CWR
  84.    flags in the TCP header.
  85.  
  86. DONE: 
  87.  
  88. 2) When a node sends a SYN-ACK packet, it may set the ECN-Echo flag, but
  89.    it does not set the CWR flag.
  90.  
  91. DONE: set the CWR flag as well.
  92.  
  93. 3) If you receive a SYN-ACK packet with both ECN-Echo and CWR flags
  94. set you know that the other side is "lying" that it is capable
  95. of ECN. 
  96.  
  97. DONE.
  98.  
  99. Section 6.1.2: TCP sender
  100. ==================================
  101.  
  102. 1) If the sender receives an ECN-Echo ACK packet  ...
  103. it halves the congestion window "cwnd" and reduces the slow start
  104. threshold "ssthresh". 
  105.  
  106. DONE:
  107.  
  108. -set ssthresh to max( 2, min(cwnd,packets-in-flight/2))
  109. -half cwnd to a minimum of 1
  110.  
  111. 2) The sending TCP does NOT increase the
  112.    congestion window in response to the receipt of an ECN-Echo ACK
  113.    packet.
  114.  
  115. DONE
  116.  
  117. 3) The TCP sender's congestion window should be reduced only once 
  118.    in response to a series of dropped and/or CE packets from a single 
  119.    window of data.
  120.  
  121. DONE:
  122.  
  123. All ECEs are ignored untill all inflight packets are ACKed.
  124.  
  125. 4) The TCP source should not decrease the slow-start
  126.    threshold, ssthresh, if it has been decreased within the last round
  127.    trip time.  
  128.  
  129. DONE: 
  130. Conformance in the FR only (even when we retransmit a packet even
  131. when we retarnsmit after 3 dupACKs). 
  132. Probably not quiet to the spec in the draft.
  133. The RTO code would still cut the ssthresh.
  134.  
  135.  
  136. 5) If any retransmitted packets are dropped or have the CE bit set, 
  137.    then this is interpreted by the source TCP as a new
  138.    instance of congestion.
  139.  
  140. DONE: 
  141. Affects both the case of a FR or a retransmit due to an RTO.
  142. - if a packet is retransmitted as a result of a timeout or FR, set
  143. the marker of "next response to ECE" to be at the receipt of an ACK 
  144. covering  the retransmitted packet(i.e ACK# >= retransmitted-seq-no). 
  145. This way if an ECE is received in that ACK, we are able to react again.
  146.  
  147. Section 6.1.3: The TCP receiver
  148. ==================================
  149.  
  150. 1) When TCP receives a CE data packet at the destination end-system, the
  151.    TCP data receiver sets the ECN-Echo flag in the TCP header of the
  152.    subsequent ACK packet.
  153.  
  154. DONE:
  155.  
  156. 2) After the receipt of the CWR packet, acknowledgements for subsequent
  157.    non-CE data packets do not have the ECN-Echo flag set.
  158.  
  159. DONE:
  160.  
  161. 3) If there is any ACK withholding implemented,
  162.    as in current "delayed-ACK" TCP implementations where the TCP
  163.    receiver can send an ACK for two arriving data packets, then the
  164.    ECN-Echo flag in the ACK packet will be set to the OR of the CE bits
  165.    of all of the data packets being acknowledged.
  166.  
  167. DONE: 
  168.  
  169. 4) When an ECN-Capable TCP reduces its congestion window for any reason
  170. the TCP sets the CWR flag in the TCP header of the first data packet sent 
  171. after the window reduction.
  172.  
  173. This happens in three locations of the sender code:
  174. i) RTO ii) Fast recovery iii) Receipt of a new ECE
  175.  
  176.  
  177. DONE:
  178.  
  179.  
  180. 5) If that (CWR) data packet is dropped in the network, then the sending TCP 
  181. will have to reduce the congestion window again and retransmit the dropped
  182. packet.  Thus, the Congestion Window Reduced message is reliably
  183.    delivered to the data receiver.
  184.  
  185.  
  186. DONE: 
  187.  
  188. CWR is sent only in packets with data. The retransmission effect of
  189. RTO takes care of reducing the congestion window. 
  190.  
  191. 6) If another CE packet is received by the data receiver, the receiver 
  192. would once again send ACK packets with the ECN-Echo flag set.
  193.  
  194. DONE: Kind of a redundant statement since it re-iterates 1)
  195. Here just for clarity.
  196.  
  197. 7) When sending pure ACKS turn off the ECT bit.
  198.  
  199. DONE:
  200.