idnits 2.17.1 draft-allman-tcp-sack-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-26) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 2 instances of too long lines in the document, the longest one being 1 character in excess of 72. ** There are 19 instances of lines with control characters in the document. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 102: '...d in this document the scoreboard MUST...' RFC 2119 keyword, line 116: '... MUST NOT be removed from TCP's...' RFC 2119 keyword, line 121: '...s sent, the scoreboard MUST be updated...' RFC 2119 keyword, line 129: '... This routine MUST return the seque...' RFC 2119 keyword, line 135: '...``S'' exists, this routine MUST return...' (21 more instances...) Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'ABF00' is mentioned on line 189, but not defined == Unused Reference: 'RFC3042' is defined on line 337, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'AHKO97' -- Possible downref: Non-RFC (?) normative reference: ref. 'All00' -- Possible downref: Non-RFC (?) normative reference: ref. 'FF96' -- Possible downref: Non-RFC (?) normative reference: ref. 'Jac90' -- Possible downref: Non-RFC (?) normative reference: ref. 'PF00' ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Obsolete normative reference: RFC 2581 (Obsoleted by RFC 5681) ** Obsolete normative reference: RFC 2582 (Obsoleted by RFC 3782) Summary: 10 errors (**), 0 flaws (~~), 3 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Engineering Task Force Ethan Blanton 2 INTERNET DRAFT Ohio university 3 File: draft-allman-tcp-sack-03.txt Mark Allman 4 BBN/NASA GRC 5 February, 2001 6 Expires: August, 2001 8 A Conservative SACK-based Loss Recovery Algorithm for TCP 10 Status of this Memo 12 This document is an Internet-Draft and is in full conformance with 13 all provisions of Section 10 of [RFC2026]. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that 17 other groups may also distribute working documents as 18 Internet-Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six 21 months and may be updated, replaced, or obsoleted by other documents 22 at any time. It is inappropriate to use Internet- Drafts as 23 reference material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.txt 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 Abstract 33 This document presents a conservative loss recovery algorithm for 34 TCP that is based on the use of the selective acknowledgment TCP 35 option. The algorithm presented in this document conforms to the 36 spirit of the current congestion control specification, but allows 37 TCP senders to recover more effectively when multiple segments are 38 lost from a single flight of data. 40 1 Introduction 42 This document presents a conservative loss recovery algorithm for 43 TCP that is based on the use of the selective acknowledgment TCP 44 option. While the TCP selective acknowledgment (SACK) option 45 [RFC2018] is being steadily deployed in the Internet [All00] there 46 is evidence that hosts are not using the SACK information when 47 making retransmission and congestion control decisions [PF00]. The 48 goal of this document is to outline one straightforward method for 49 TCP implementations to use SACK information to increase performance. 51 [RFC2581] allows advanced loss recovery algorithms to be used by TCP 52 [RFC793] provided that they follow the spirit of TCP's congestion 53 control algorithms [RFC2581,RFC2914]. [RFC2582] outlines one such 54 advanced recovery algorithm called NewReno. This document outlines 55 a loss recovery algorithm that uses the selective acknowledgment 56 (SACK) [RFC2018] TCP option to enhance TCP's loss recovery. The 57 algorithm outlined in this document, heavily based on the algorithm 58 detailed in [FF96], is a conservative replacement of the fast 59 recovery algorithm [Jac90,RFC2581]. The algorithm specified in this 60 document is a straightforward SACK-based loss recovery strategy that 61 follows the guidelines set in [RFC2581] and can safely be used in 62 TCP implementations. Alternate SACK-based loss recovery methods can 63 be used in TCP as implementers see fit (as long as the alternate 64 algorithms follow the guidelines provided in [RFC2581]). Please 65 note, however, that the SACK-based decisions in this document (such 66 as what segments are to be sent at what time) are largely decoupled 67 from the congestion control algorithms, and as such can be treated 68 as separate issues if so desired. 70 2 Definitions 72 The reader is expected to be familiar with the definitions given in 73 [RFC2581]. 75 For the purposes of explaining the SACK-based loss recovery 76 algorithm we define two variables that a TCP sender stores: 78 ``HighACK'' is the sequence number of the highest cumulative ACK 79 received at a given point. 81 ``HighData'' is the highest sequence number transmitted at a 82 given point. 84 For the purposes of this specification we define a ``duplicate 85 acknowledgment'' as an acknowledgment (ACK) whose cumulative ACK 86 number is equal to the current value of HighACK and also conveys new 87 selective acknowledgment information for segment(s) above HighACK. 89 We define a variable ``DupThresh'' that holds the number of 90 duplicate acknowledgments required to trigger a retransmission. Per 91 [RFC2581] this threshold is defined to be 3 duplicate 92 acknowledgments. However, implementers should consult any updates 93 to [RFC2581] to determine the current value for DupThresh (or method 94 for determining its value). 96 3 Keeping Track of SACK Information 98 For a TCP sender to implement the algorithm defined in the next 99 section it must keep a data structure to store incoming selective 100 acknowledgment information on a per connection basis. Such a data 101 structure is commonly called the ``scoreboard''. For the purposes 102 of the algorithm defined in this document the scoreboard MUST 103 implement the following functions: 105 Update (): 107 Each octet that is cumulatively ACKed or SACKed should be marked 108 accordingly in the scoreboard data structure, and the total number 109 of octets SACKed should be recorded. For each octet that has not 110 been cumulatively acknowledged, a ``DupSACK'' counter is kept 111 indicating how many times an octet of greater sequence number has 112 been SACKed. Record the number of octets whose DupSACK counter is 113 incremented to (or past) DupThresh during this process. 115 Note: SACK information is advisory and therefore SACKed data 116 MUST NOT be removed from TCP's retransmission buffer until the 117 data is cumulatively acknowledged [RFC2018]. 119 MarkRetran (): 121 When a retransmission is sent, the scoreboard MUST be updated 122 with this information so that data is not repeatedly 123 retransmitted by the SACK-based algorithm outlined in this 124 document. Note: If a retransmission is lost it will be repaired 125 using TCP's retransmission timer. 127 NextSeg (): 129 This routine MUST return the sequence number range of the oldest 130 segment that has not been cumulatively ACKed or SACKed and not 131 been retransmitted, per the following rules: 133 (1) Look for the lowest sequence number that is not ACKed or 134 SACKed, but has a DupSACK counter of at least DupThresh. If 135 such a sequence number ``S'' exists, this routine MUST return 136 a sequence number range starting at octet S. 138 (2) If we fail to find a segment per rule 1, but the connection 139 has unsent data available to be transmitted, NextSeg () MUST 140 return a sequence number range corresponding to one segment of 141 this new data. 143 (3) If rules 1 and 2 fail, this routine MUST return a segment 144 that has not been ACKed or SACKed but may not meet the 145 DupThresh requirement in 1. 147 (4) Finally, if rules 1-3 fail, NextSeg () MUST indicate this 148 and no data will be sent. 150 AmountSACKed (): 152 This routine MUST return the number of octets selectively 153 acknowledged by the receiver. 155 LeftNetwork (): 157 This function MUST return the number of octets in the given 158 sequence number range that have left the network. The algorithm 159 checks each octet in the given range and separately keeps track 160 of the number of retransmitted octets and the number of octets 161 that are cumulatively ACKed but were not SACKed. Note: it is 162 possible to have octets that fit both categories. In this case, 163 the octets MUST be counted in both categories. After checking 164 the sequence number range given this routine returns the sum of 165 the two counters. 167 Keeping track of SACK information depends on the TCP sender having 168 an accurate measure of the current state of the network, the 169 conditions of this connection, and the state of the receiver's 170 buffer. Due to these limitations, [RFC2018] suggests that a TCP 171 sender SHOULD expunge the SACK information gathered from a receiver 172 upon a retransmission timeout; the assumption here being that the 173 receiver may have reneged on its SACK information for some reason. 175 Note: The SACK-based loss recovery algorithm outlined in this 176 document requires more computational resources than previous TCP 177 loss recovery strategies. However, we believe the scoreboard data 178 structure can be implemented in a reasonably efficient manner (both 179 in terms of computation complexity and memory usage) in most TCP 180 implementations. 182 4 Algorithm Details 184 Upon the receipt of the first DupThresh - 1 duplicate ACKs, the 185 scoreboard MUST be updated per the selective acknowledgment 186 information contained in the ACK (via the Update () routine). Note: 187 The first and second duplicate ACKs can also be used to trigger the 188 transmission of previously unsent segments using the Limited 189 Transmit mechanism [ABF00]. 191 When a TCP sender receives the duplicate ACK corresponding to 192 DupThresh ACKs, the scoreboard MUST be updated with the new SACK 193 information (via Update ()) and a loss recovery phase SHOULD be 194 initiated, per the fast retransmit algorithm outlined in [RFC2581], 195 and the following steps MUST be taken: 197 (1) Set a ``pipe'' variable to the number of outstanding octets 198 (i.e., octets that have been sent but not yet acknowledged), per 199 the following equation: 201 pipe = HighData - HighACK - AmountSACKed () 203 (2) Set a ``RecoveryPoint'' variable to HighData. When the TCP 204 sender receives a cumulative ACK for this data octet the loss 205 recovery phase is terminated. 207 (3) The congestion window (cwnd) is reduced to half its current 208 value. The value of the slow start threshold (ssthresh) is set 209 to the halved value of cwnd. 211 (4) Retransmit the first data segment not covered by HighACK. Use 212 the MarkRetran () function to mark the sequence number range as 213 having been retransmitted in the scoreboard. In order to take 214 advantage of potential additional available cwnd, proceed to step 215 (D) below. 217 Once a TCP is in the loss recovery phase the following procedure 218 MUST be used for each arriving ACK: 220 (A) An incoming cumulative ACK for a sequence number greater than or 221 equal to RecoveryPoint signals the end of loss recovery and the 222 loss recovery phase MUST be terminated. 224 (B) Upon receipt of a duplicate ACK the following actions MUST be 225 taken: 227 (B.1) Use Update () to record the new SACK information conveyed 228 by the incoming ACK. 230 (B.2) The pipe variable is decremented by the number of newly 231 SACKed data octets conveyed in the incoming ACK plus the 232 number of octets which whose DupSACK counter exceeded 233 DupThresh, as that is the amount of new data presumed to have 234 left the network. 236 (C) When a ``partial ACK'' (an ACK that increases the HighACK point, 237 but does not terminate loss recovery) arrives, the following 238 actions MUST be performed: 240 (C.1) Before updating HighACK based on the received cumulative 241 ACK, save HighACK as OldHighACK. 243 (C.2) The scoreboard MUST be updated based on the cumulative ACK 244 and any new SACK information that is included in the ACK via 245 the Update () routine. 247 (C.3) The value of pipe MUST be decremented by the number of 248 octets returned by the LeftNetwork () routine when given the 249 sequence number range OldHighACK-HighACK. 251 (D) While pipe is less than cwnd and the receiver's advertised window 252 permits, the TCP sender SHOULD transmit one or more segments 253 as follows: 255 (D.1) The scoreboard MUST be queried via NextSeg () for the 256 sequence number range of the next segment to transmit, and 257 the given segment is sent. 259 (D.2) The pipe variable MUST be incremented by the number of 260 data octets sent in (D.1). 262 (D.3) If any of the data octets sent in (D.1) are below HighData, 263 they MUST be marked as retransmitted via Update (). 265 (D.4) If cwnd - pipe is greater than 1 SMSS, return to (D.1) 267 5 Research 269 The algorithm specified in this document is analyzed in [FF96], 270 which shows that the above algorithm is effective in reducing 271 transfer time over standard TCP Reno [RFC2581] when multiple 272 segments are dropped from a window of data (especially as the number 273 of drops increases). [AHKO97] shows that the algorithm defined in 274 this document can greatly improve throughput in connections 275 traversing satellite channels. 277 6 Security Considerations 279 The algorithm presented in this paper shares security considerations 280 with [RFC2581]. A key difference is that an algorithm based on 281 SACKs is more robust against attackers forging duplicate ACKs to 282 force the TCP sender to reduce cwnd. With SACKs TCP senders have an 283 additional check on whether the ACK is legitimate or not. While not 284 fool-proof, SACK provides some amount of protection in this area. 286 Acknowledgments 288 The authors wish to thank Sally Floyd for encouraging this document 289 and commenting on an early draft. The algorithm described in this 290 document is largely based on an algorithm outlined by Kevin Fall and 291 Sally Floyd in [FF96] (although the authors of this document assume 292 responsibility for any mistakes in the above). Murali Bashyam, 293 Jamshid Mahdavi, Matt Mathis, Vern Paxson and Venkat Venkatsubra 294 provided valuable feedback on earlier versions of this document. 295 Finally, we thank Matt Mathis and Jamshid Mahdavi for implementing 296 the scoreboard in ns and hence guiding our thinking in keeping track 297 of SACK state. 299 References 301 [AHKO97] Mark Allman, Chris Hayes, Hans Kruse, Shawn Ostermann. TCP 302 Performance Over Satellite Links. Proceedings of the Fifth 303 International Conference on Telecommunications Systems, 304 Nashville, TN, March, 1997. 306 [All00] Mark Allman. A Web Server's View of the Transport Layer. ACM 307 Computer Communication Review, 30(5), October 2000. 309 [FF96] Kevin Fall and Sally Floyd. Simulation-based Comparisons of 310 Tahoe, Reno and SACK TCP. Computer Communication Review, July 311 1996. 313 [Jac90] Van Jacobson. Modified TCP Congestion Avoidance Algorithm. 314 Technical Report, LBL, April 1990. 316 [PF00] Jitendra Padhye, Sally Floyd. TBIT, the TCP Behavior 317 Inference Tool, October 2000. http://www.aciri.org/tbit/. 319 [RFC793] Jon Postel, Transmission Control Protocol, STD 7, RFC 793, 320 September 1981. 322 [RFC2018] M. Mathis, J. Mahdavi, S. Floyd, A. Romanow. TCP Selective 323 Acknowledgement Options. RFC 2018, October 1996 325 [RFC2026] Scott Bradner. The Internet Standards Process -- Revision 326 3, RFC 2026, October 1996 328 [RFC2581] Mark Allman, Vern Paxson, W. Richard Stevens, TCP 329 Congestion Control, RFC 2581, April 1999. 331 [RFC2582] Sally Floyd and Tom Henderson. The NewReno Modification 332 to TCP's Fast Recovery Algorithm, RFC 2582, April 1999. 334 [RFC2914] Sally Floyd. Congestion Control Principles, RFC 2914, 335 September 2000. 337 [RFC3042] Mark Allman, Hari Balkrishnan, Sally Floyd. Enhancing 338 TCP's Loss Recovery Using Limited Transmit. RFC 3042, 339 January 2001 341 Author's Addresses: 343 Ethan Blanton 344 Ohio University Internetworking Research Lab 345 Stocker Center 346 Athens, OH 45701 347 eblanton@cs.ohiou.edu 349 Mark Allman 350 BBN Technologies/NASA Glenn Research Center 351 Lewis Field 352 21000 Brookpark Rd. MS 54-5 353 Cleveland, OH 44135 354 Phone: 216-433-6586 355 Fax: 216-433-8705 356 mallman@bbn.com 357 http://roland.grc.nasa.gov/~mallman