idnits 2.17.1 draft-ietf-tcpm-2140bis-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 308 has weird spacing: '...sthresh old_...' == Line 310 has weird spacing: '...endcwnd old_...' == Line 337 has weird spacing: '... MSSopt curr_...' == Line 347 has weird spacing: '...sthresh curr...' == Line 349 has weird spacing: '...endcwnd curr...' == (5 more instances...) == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 29, 2020) is 1455 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) -- Obsolete informational reference (is this intentional?): RFC 1644 (Obsoleted by RFC 6247) -- Obsolete informational reference (is this intentional?): RFC 1379 (Obsoleted by RFC 6247) -- Obsolete informational reference (is this intentional?): RFC 2001 (Obsoleted by RFC 2581) -- Obsolete informational reference (is this intentional?): RFC 2140 (Obsoleted by RFC 9040) -- Obsolete informational reference (is this intentional?): RFC 2414 (Obsoleted by RFC 3390) -- Obsolete informational reference (is this intentional?): RFC 4960 (Obsoleted by RFC 9260) -- Obsolete informational reference (is this intentional?): RFC 6824 (Obsoleted by RFC 8684) -- Obsolete informational reference (is this intentional?): RFC 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7540 (Obsoleted by RFC 9113) Summary: 1 error (**), 0 flaws (~~), 8 warnings (==), 11 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 TCPM WG J. Touch 2 Internet Draft Independent 3 Intended status: Informational M. Welzl 4 Obsoletes: 2140 S. Islam 5 Expires: October 2020 University of Oslo 6 April 29, 2020 8 TCP Control Block Interdependence 9 draft-ietf-tcpm-2140bis-05.txt 11 Status of this Memo 13 This Internet-Draft is submitted in full conformance with the 14 provisions of BCP 78 and BCP 79. 16 This document may contain material from IETF Documents or IETF 17 Contributions published or made publicly available before November 18 10, 2008. The person(s) controlling the copyright in some of this 19 material may not have granted the IETF Trust the right to allow 20 modifications of such material outside the IETF Standards Process. 21 Without obtaining an adequate license from the person(s) controlling 22 the copyright in such materials, this document may not be modified 23 outside the IETF Standards Process, and derivative works of it may 24 not be created outside the IETF Standards Process, except to format 25 it for publication as an RFC or to translate it into languages other 26 than English. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six 34 months and may be updated, replaced, or obsoleted by other documents 35 at any time. It is inappropriate to use Internet-Drafts as 36 reference material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html 44 This Internet-Draft will expire on October 29, 2020. 46 Copyright Notice 48 Copyright (c) 2020 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents 53 (https://trustee.ietf.org/license-info) in effect on the date of 54 publication of this document. Please review these documents 55 carefully, as they describe your rights and restrictions with 56 respect to this document. Code Components extracted from this 57 document must include Simplified BSD License text as described in 58 Section 4.e of the Trust Legal Provisions and are provided 59 without warranty as described in the Simplified BSD License. 61 Abstract 63 This memo provides guidance to TCP implementers that are intended to 64 help improve convergence to steady-state operation without affecting 65 interoperability. It updates and replaces RFC 2140's description of 66 interdependent TCP control blocks and the ways that part of TCP 67 state can be shared among similar concurrent or consecutive 68 connections. TCP state includes a combination of parameters, such as 69 connection state, current round-trip time estimates, congestion 70 control information, and process information. Most of this state is 71 maintained on a per-connection basis in the TCP Control Block (TCB), 72 but implementations can (and do) share certain TCB information 73 across connections to the same host. Such sharing is intended to 74 improve overall transient transport performance, while maintaining 75 backward-compatibility with existing implementations. The sharing 76 described herein is limited to only the TCB initialization and so 77 has no effect on the long-term behavior of TCP after a connection 78 has been established. 80 Table of Contents 82 1. Introduction...................................................3 83 2. Conventions Used in This Document..............................4 84 3. Terminology....................................................4 85 4. The TCP Control Block (TCB)....................................6 86 5. TCB Interdependence............................................6 87 6. Temporal Sharing...............................................7 88 6.1. Initialization of the new TCB................................7 89 6.2. Updates to the new TCB.......................................8 90 6.3. Discussion...................................................9 91 7. Ensemble Sharing..............................................10 92 7.1. Initialization of a new TCB.................................10 93 7.2. Updates to the new TCB......................................11 94 7.3. Discussion..................................................12 95 8. Compatibility Issues..........................................13 96 8.1. Traversing the same network path............................14 97 8.2. State dependence............................................14 98 8.3. Problems with IP sharing....................................15 99 9. Implications..................................................15 100 9.1. Layering....................................................15 101 9.2. Other possibilities.........................................16 102 10. Implementation Observations..................................16 103 11. Updates to RFC 2140..........................................17 104 12. Security Considerations......................................18 105 13. IANA Considerations..........................................18 106 14. References...................................................19 107 14.1. Normative References....................................19 108 14.2. Informative References..................................19 109 15. Acknowledgments..............................................21 110 16. Change log...................................................22 111 Appendix A : TCB Sharing History.................................25 112 Appendix B : TCP Option Sharing and Caching......................26 113 Appendix C : Automating the Initial Window in TCP over Long 114 Timescales.......................................................28 115 C.1. Introduction.............................................28 116 C.2. Design Considerations....................................28 117 C.3. Proposed IW Algorithm....................................29 118 C.4. Discussion...............................................32 119 C.5. Observations.............................................33 121 1. Introduction 123 TCP is a connection-oriented reliable transport protocol layered 124 over IP [RFC793]. Each TCP connection maintains state, usually in a 125 data structure called the TCP Control Block (TCB). The TCB contains 126 information about the connection state, its associated local 127 process, and feedback parameters about the connection's transmission 128 properties. As originally specified and usually implemented, most 129 TCB information is maintained on a per-connection basis. Some 130 implementations can (and now do) share certain TCB information 131 across connections to the same host [RFC2140]. Such sharing is 132 intended to lead to better overall transient performance, especially 133 for numerous short-lived and simultaneous connections, as often used 134 in the World-Wide Web [Be94][Br02]. This sharing of state is 135 intended to help TCP connections converge to steady-state behavior 136 more quickly without affecting TCP interoperability. 138 This document updates RFC 2140's discussion of TCB state sharing and 139 provides a complete replacement for that document. This state 140 sharing affects only TCB initialization [RFC2140] and thus has no 141 effect on the long-term behavior of TCP after a connection has been 142 established nor on interoperability. Path information shared across 143 SYN destination port numbers assumes that TCP segments having the 144 same host-pair experience the same path properties, irrespective of 145 TCP port numbers. The observations about TCB sharing in this 146 document apply similarly to any protocol with congestion state, 147 including SCTP [RFC4960] and DCCP [RFC4340], as well as for 148 individual subflows in Multipath TCP [RFC6824]. 150 2. Conventions Used in This Document 152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 154 "OPTIONAL" in this document are to be interpreted as described in 155 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 156 capitals, as shown here. 158 However, this document is intended to describe behavior that is 159 already permitted by TCP standards. As a result, it provides 160 informative guidance but does not use such normative language, 161 except when quoting other documents. 163 3. Terminology 165 The following terminology is used frequently in this document. Items 166 preceded with a "+" may be part of the state maintained as TCP 167 connection state in the associated connections TCB and are the focus 168 of sharing as described in this document. 170 +cwnd - the TCP congestion window size [RFC5681] 172 Host - a source or sink of TCP segments associated with a single IP 173 address 175 Host-pair - a pair of hosts and their corresponding IP addresses 177 +MMS_R - the maximum message size that can be received, the largest 178 received transport payload of an IP datagram [RFC1122] 180 +MMS_S - the maximum message size that can be sent, the largest 181 transmitted transport payload of an IP datagram [RFC1122] 183 Path - an Internet path between the IP addresses of two hosts 184 PCB - protocol control block, the data associated with a protocol as 185 maintained by an endpoint; a TCP PCB is called a TCB 187 PLPMTUD - packetization-layer path MTU discovery, a mechanism that 188 uses transport packets to discovery the PMTU [RFC4821] 190 +PMTU - the largest IP datagram that can traverse a path 191 [RFC1191][RFC8201] 193 PMTUD - path-layer MTU discovery, a mechanism that relies on ICMP 194 error messages to discover the PMTU [RFC1191][RFC8201] 196 +RTT - the round-trip time of a TCP packet exchange [RFC793] 198 +RTTvar - the variance of the round-trip times of a TCP packet 199 exchange [RFC6298] 201 +RWIN - the TCP receive window size [RFC793] 203 +sendcwnd - the TCP send-side congestion window (cwnd) size 204 [RFC5681] 206 +sendMSS - the TCP maximum segment size, a value transmitted in a 207 TCP option that represents the largest TCP user data payload that 208 can be received [RFC793] 210 +ssthresh - the TCP slow-start threshold [RFC5681] 212 TCB - TCP Control Block, the data associated with a TCP connection 213 as maintained by an endpoint 215 TCP-AO - the TCP Authentication Option [RFC5925] 217 TFO - TCP Fast Open option [RFC7413] 219 +TFO_cookie - the TCP Fast Open cookie, state that is used as part 220 of the TFO mechanism, when TFO is supported [RFC7413] 222 +TFO_failure - an indication of when TFO option negotiation failed, 223 when TFO is supported 225 +TFOinfo - information cached when a TFO connection is established, 226 which includes the TFO_cookie [RFC7413] 228 4. The TCP Control Block (TCB) 230 A TCB describes the data associated with each connection, i.e., with 231 each association of a pair of applications across the network. The 232 TCB contains at least the following information [RFC793]: 234 Local process state 235 pointers to send and receive buffers 236 pointers to retransmission queue and current segment 237 pointers to Internet Protocol (IP) PCB 238 Per-connection shared state 239 macro-state 240 connection state 241 timers 242 flags 243 local and remote host numbers and ports 244 TCP option state 245 micro-state 246 send and receive window state (size*, current number) 247 cong. window size (snd_cwnd)* 248 cong. window size threshold (ssthresh)* 249 max window size seen* 250 sendMSS# 251 MMS_S# 252 MMS_R# 253 PMTU# 254 round-trip time and variance# 256 The per-connection information is shown as split into macro-state 257 and micro-state, terminology borrowed from [Co91]. Macro-state 258 describes the protocol for establishing the initial shared state 259 about the connection; we include the endpoint numbers and components 260 (timers, flags) required upon commencement that are later used to 261 help maintain that state. Micro-state describes the protocol after a 262 connection has been established, to maintain the reliability and 263 congestion control of the data transferred in the connection. 265 We further distinguish two other classes of shared micro-state that 266 are associated more with host-pairs than with application pairs. One 267 class is clearly host-pair dependent (#, e.g., MSS, MMS, PMTU, RTT), 268 and the other is host-pair dependent in its aggregate (*, e.g., 269 congestion window information, current window sizes, etc.). 271 5. TCB Interdependence 273 There are two cases of TCB interdependence. Temporal sharing occurs 274 when the TCB of an earlier (now CLOSED) connection to a host is used 275 to initialize some parameters of a new connection to that same host, 276 i.e., in sequence. Ensemble sharing occurs when a currently active 277 connection to a host is used to initialize another (concurrent) 278 connection to that host. 280 6. Temporal Sharing 282 The TCB data cache is accessed in two ways: it is read to initialize 283 new TCBs and written when more current per-host state is available. 285 6.1. Initialization of the new TCB 287 TCBs for new connections can be initialized using context from past 288 connections as follows: 290 TEMPORAL SHARING - TCB Initialization 292 Cached TCB New TCB 293 -------------------------------------- 294 old_MMS_S old_MMS_S or not cached 296 old_MMS_R old_MMS_R or not cached 298 old_sendMSS old_sendMSS 300 old_PMTU old_PMTU 302 old_RTT old_RTT 304 old_RTTvar old_RTTvar 306 old_option (option specific) 308 old_ssthresh old_ssthresh 310 old_sendcwnd old_sendcwnd 312 The table below gives an overview of option-specific information 313 that can be shared. Additional information on some specific TCP 314 options and sharing is provided in Appendix B. 316 TEMPORAL SHARING - Option Info Initialization 318 Cached New 319 ------------------------------------ 320 old_TFO_cookie old_TFO_cookie 322 old_TFO_failure old_TFO_failure 324 6.2. Updates to the new TCB 326 During the connection, the associated TCB can be updated based on 327 particular events, as shown below: 329 TEMPORAL SHARING - Cache Updates 331 Cached TCB Current TCB when? New Cached TCB 332 ---------------------------------------------------------- 333 old_MMS_S curr_MMS_S OPEN curr_MMS_S 335 old_MMS_R curr_MMS_R OPEN curr_MMS_R 337 old_sendMSS curr_sendMSS MSSopt curr_sendMSS 339 old_PMTU curr_PMTU PMTUD curr_PMTU 341 old_RTT curr_RTT CLOSE merge(curr,old) 343 old_RTTvar curr_RTTvar CLOSE merge(curr,old) 345 old_option curr_option ESTAB (depends on option) 347 old_ssthresh curr_ssthresh CLOSE merge(curr,old) 349 old_sendcwnd curr_sendcwnd CLOSE merge(curr,old) 351 The table below gives an overview of option-specific information 352 that can be similarly shared. 354 TEMPORAL SHARING - Option Info Updates 356 Cached Current when? New Cached 357 --------------------------------------------------------- 358 old_TFO_cookie old_TFO_cookie ESTAB old_TFO_cookie 360 old_TFO_failure old_TFO_failure ESTAB old_TFO_failure 362 6.3. Discussion 364 There is no particular benefit to caching MMS_S and MMS_R as these 365 are reported by the local IP stack. Caching sendMSS and PMTU is 366 trivial; reported values are cached, and the most recent values are 367 used. The cache is updated when the MSS option is received in a SYN 368 or after PMTUD (i.e., when an ICMPv4 Fraqmentation Needed [RFC1191] 369 or ICMPv6 Packet Too Big message is received [RFC8201] or the 370 equivalent is inferred, e.g. as from PLPMTUD [RFC4821]), 371 respectively, so the cache always has the most recent values from 372 any connection. For sendMSS, the cache is consulted only at 373 connection establishment and not otherwise updated, which means that 374 MSS options do not affect current connections. The default sendMSS 375 is never saved; only reported MSS values update the cache, so an 376 explicit override is required to reduce the sendMSS. 378 RTT values are updated by formulae that merge the old and new 379 values. Dynamic RTT estimation requires a sequence of RTT 380 measurements. As a result, the cached RTT (and its variance) is an 381 average of its previous value with the contents of the currently 382 active TCB for that host, when a TCB is closed. RTT values are 383 updated only when a connection is closed. The method for merging old 384 and current values needs to attempt to reduce the transient effects 385 of the new connections. 387 The updates for RTT, RTTvar and ssthresh rely on existing 388 information, i.e., old values. Should no such values exist, the 389 current values are cached instead. 391 TCP options are copied or merged depending on the details of each 392 option, where "merge" is some function that combines the values of 393 "curr" and "old". E.g., TFO state is updated when a connection is 394 established and read before establishing a new connection. 396 Sections 8 and 9 discuss compatibility issues and implications of 397 sharing the specific information listed above. Section 10 gives an 398 overview of known implementations. 400 Most cached TCB values are updated when a connection closes. The 401 exceptions are MMS_R and MMS_S, which are reported by IP [RFC1122], 402 PMTU which is updated after Path MTU Discovery 403 [RFC1191][RFC4821][RFC8201], and sendMSS, which is updated if the 404 MSS option is received in the TCP SYN header. 406 Sharing sendMSS information affects only data in the SYN of the next 407 connection, because sendMSS information is typically included in 408 most TCP SYN segments. Caching PMTU can accelerate the efficiency of 409 PMTUD, but can also result in black-holing until corrected if in 410 error. Caching MMS_R and MMS_S may be of little direct value as they 411 are reported by the local IP stack anyway. 413 The way in which other TCP option state can be shared depends on the 414 details of that option. E.g., TFO state includes the TCP Fast Open 415 Cookie [RFC7413] or, in case TFO fails, a negative TCP Fast Open 416 response. RFC 7413 states, "The client MUST cache negative responses 417 from the server in order to avoid potential connection failures. 418 Negative responses include the server not acknowledging the data in 419 the SYN, ICMP error messages, and (most importantly) no response 420 (SYN-ACK) from the server at all, i.e., connection timeout." [RFC 421 7413]. TFOinfo is cached when a connection is established. 423 Other TCP option state might not be as readily cached. E.g., TCP-AO 424 [RFC5925] success or failure between a host pair for a single SYN 425 destination port might be usefully cached. TCP-AO success or failure 426 to other SYN destination ports on that host pair is never useful to 427 cache because TCP-AO security parameters can vary per service. 429 7. Ensemble Sharing 431 Sharing cached TCB data across concurrent connections requires 432 attention to the aggregate nature of some of the shared state. For 433 example, although MSS and RTT values can be shared by copying, it 434 may not be appropriate to simply copy congestion window or ssthresh 435 information; instead, the new values can be a function (f) of the 436 cumulative values and the number of connections (N). 438 7.1. Initialization of a new TCB 440 TCBs for new connections can be initialized using context from 441 concurrent connections as follows: 443 ENSEMBLE SHARING - TCB Initialization 445 Cached TCB New TCB 446 ------------------------------------------ 447 old_MMS_S old_MMS_S 449 old_MMS_R old_MMS_R 451 old_sendMSS old_sendMSS 453 old_PMTU old_PMTU 455 old_RTT old_RTT 457 old_RTTvar old_RTTvar 459 sum(old_ssthresh) f(sum(old_ssthresh), N) 461 sum(old_sendcwnd) f(sum(old_sendcwnd), N) 462 _ 463 old_option (option specific) 465 The table below gives an overview of option-specific information 466 that can be similarly shared. 468 ENSEMBLE SHARING - Option Info Initialization 470 Cached New 471 ------------------------------------ 472 old_TFO_cookie old_TFO_cookie 474 old_TFO_failure old_TFO_failure 476 7.2. Updates to the new TCB 478 During the connection, the associated TCB can be updated based on 479 changes to concurrent connections, as shown below: 481 ENSEMBLE SHARING - Cache Updates 483 Cached TCB Current TCB when? New Cached TCB 484 --------------------------------------------------------------- 485 old_MMS_S curr_MMS_S OPEN curr_MMS_S 487 old_MMS_R curr_MMS_R OPEN curr_MMS_R 489 old_sendMSS curr_sendMSS MSSopt curr_sendMSS 491 old_PMTU curr_PMTU PMTUD / curr_PMTU 492 PLPMTUD 494 old_RTT curr_RTT update rtt_update(old,curr) 496 old_RTTvar curr_RTTvar update rtt_update(old,curr) 498 old_ssthresh curr_ssthresh update adjust sum as appropriate 500 old_sendcwnd curr_sendcwnd update adjust sum as appropriate 502 old_option curr_option (depends) (option specific) 504 The table below gives an overview of option-specific information 505 that can be similarly shared. 507 ENSEMBLE SHARING - Option Info Updates 509 Cached Current when? New Cached 510 ---------------------------------------------------------- 511 old_TFO_cookie old_TFO_cookie ESTAB old_TFO_cookie 513 old_TFO_failure old_TFO_failure ESTAB old_TFO_failure 515 7.3. Discussion 517 For ensemble sharing, TCB information should be cached as early as 518 possible, sometimes before a connection is closed. Otherwise, 519 opening multiple concurrent connections may not result in TCB data 520 sharing if no connection closes before others open. The amount of 521 work involved in updating the aggregate average should be minimized, 522 but the resulting value should be equivalent to having all values 523 measured within a single connection. The function "rtt_update" in 524 the ensemble sharing table indicates this operation, which occurs 525 whenever the RTT would have been updated in the individual TCP 526 connection. As a result, the cache contains the shared RTT 527 variables, which no longer need to reside in the TCB. 529 Congestion window size and ssthresh aggregation are more complicated 530 in the concurrent case. When there is an ensemble of connections, we 531 need to decide how that ensemble would have shared these variables, 532 in order to derive initial values for new TCBs. 534 Sections 8 and 9 discuss compatibility issues and implications of 535 sharing the specific information listed above. 537 Any assumption of TCB information sharing can be incorrect because 538 identical endpoint address pairs may not share network paths. In 539 current implementations, new congestion windows are set at an 540 initial value of 4-10 segments [RFC3390][RFC6928], so that the sum 541 of the current windows is increased for any new connection. This can 542 have detrimental consequences where several connections share a 543 highly congested link. 545 There are several ways to initialize the congestion window in a new 546 TCB among an ensemble of current connections to a host. Current TCP 547 implementations initialize it to four segments as standard [rfc3390] 548 and 10 segments experimentally [RFC6928]. These approaches assume 549 that new connections should behave as conservatively as possible. 550 The algorithm described in [Ba12] adjusts the initial cwnd depending 551 on the cwnd values of ongoing connections. There have also been 552 suggestions to use the kind of sharing mechanisms described in this 553 document over long timescales to adapt TCP's initial window 554 automatically, as described further in Appendix A [To12]. 556 8. Compatibility Issues 558 Here, we discuss various types of problems that may arise with TCB 559 information sharing. 561 For the congestion and current window information, the initial 562 values computed by TCB interdependence may not be consistent with 563 the long-term aggregate behavior of a set of concurrent connections 564 between the same endpoints. Under conventional TCP congestion 565 control, if a single existing connection has converged to a 566 congestion window of 40 segments, two newly joining concurrent 567 connections assume initial windows of 10 segments [RFC6928], and the 568 current connection's window doesn't decrease to accommodate this 569 additional load and connections can mutually interfere. One example 570 of this is seen on low-bandwidth, high-delay links, where concurrent 571 connections supporting Web traffic can collide because their initial 572 windows were too large, even when set at one segment. 574 The authors of [Hu12] recommend caching ssthresh for temporal 575 sharing only when flows are long. Some studies suggest that sharing 576 ssthresh between short flows can deteriorate the performance of 577 individual connections [Hu12, Du16], although this may benefit 578 aggregate network performance. 580 8.1. Traversing the same network path 582 TCP is sometimes used in situations where packets of the same host- 583 pair do not always take the same path. Multipath routing that relies 584 on examining transport headers, such as ECMP and LAG [RFC7424], may 585 not result in repeatable path selection when TCP segments are 586 encapsulated, encrypted, or altered - for example, in some Virtual 587 Private Network (VPN) tunnels that rely on proprietary 588 encapsulation. Similarly, such approaches cannot operate 589 deterministically when the TCP header is encrypted, e.g., when using 590 IPsec ESP (although TCB interdependence among the entire set sharing 591 the same endpoint IP addresses should work without problems when the 592 TCP header is encrypted). Measures to increase the probability that 593 connections use the same path could be applied: e.g., the 594 connections could be given the same IPv6 flow label. TCB 595 interdependence can also be extended to sets of host IP address 596 pairs that share the same network path conditions, such as when a 597 group of addresses is on the same LAN (see Section 9). 599 Traversing the same path is not important for host-specific 600 information such as RWIN and TCP option state, such as TFOinfo. When 601 TCB information is shared across different SYN destination ports, 602 path-related information can be incorrect; however, the impact of 603 this error is potentially diminished if (as discussed here) TCB 604 sharing affects only the transient event of a connection start or if 605 TCB information is shared only within connections to the same SYN 606 destination port. In case of Temporal Sharing, TCB information could 607 also become invalid over time. Because this is similar to the case 608 when a connection becomes idle, mechanisms that address idle TCP 609 connections (e.g., [RFC7661]) could also be applied to TCB cache 610 management, especially when TCP Fast Open is used [RFC7413]. 612 8.2. State dependence 614 There may be additional considerations to the way in which TCB 615 interdependence rebalances congestion feedback among the current 616 connections, e.g., it may be appropriate to consider the impact of a 617 connection being in Fast Recovery [RFC5681] or some other similar 618 unusual feedback state, e.g., as inhibiting or affecting the 619 calculations described herein. 621 8.3. Problems with IP sharing 623 It can be wrong to share TCB information between TCP connections on 624 the same host as identified by the IP address if an IP address is 625 assigned to a new host (e.g., IP address spinning, as is used by 626 ISPs to inhibit running servers). It can be wrong if Network Address 627 (and Port) Translation (NA(P)T) [RFC2663] or any other IP sharing 628 mechanism is used. Such mechanisms are less likely to be used with 629 IPv6. Other methods to identify a host could also be considered to 630 make correct TCB sharing more likely. Moreover, some TCB information 631 is about dominant path properties rather than the specific host. IP 632 addresses may differ, yet the relevant part of the path may be the 633 same. 635 9. Implications 637 There are several implications to incorporating TCB interdependence 638 in TCP implementations. First, it may reduce the need for 639 application-layer multiplexing for performance enhancement 640 [RFC7231]. Protocols like HTTP/2 [RFC7540] avoid connection 641 reestablishment costs by serializing or multiplexing a set of per- 642 host connections across a single TCP connection. This avoids TCP's 643 per-connection OPEN handshake and also avoids recomputing the MSS, 644 RTT, and congestion window values. By avoiding the so-called, "slow- 645 start restart," performance can be optimized [Hu01]. TCB 646 interdependence can provide the "slow-start restart avoidance" of 647 multiplexing, without requiring a multiplexing mechanism at the 648 application layer. 650 Like the initial version of this document [RFC2140], this update's 651 approach to TCB interdependence focuses on sharing a set of TCBs by 652 updating the TCB state to reduce the impact of transients when 653 connections begin or end. Other mechanisms have since been proposed 654 to continuously share information between all ongoing communication 655 (including connectionless protocols), updating the congestion state 656 during any congestion-related event (e.g., timeout, loss 657 confirmation, etc.) [RFC3124]. By dealing exclusively with 658 transients, TCB interdependence is more likely to exhibit the same 659 behavior as unmodified, independent TCP connections. 661 9.1. Layering 663 TCB interdependence pushes some of the TCP implementation from the 664 traditional transport layer (in the ISO model), to the network 665 layer. This acknowledges that some state is in fact per-host-pair or 666 can be per-path as indicated solely by that host-pair. Transport 667 protocols typically manage per-application-pair associations (per 668 stream), and network protocols manage per-host-pair and path 669 associations (routing). Round-trip time, MSS, and congestion 670 information could be more appropriately handled in a network-layer 671 fashion, aggregated among concurrent connections, and shared across 672 connection instances [RFC3124]. 674 An earlier version of RTT sharing suggested implementing RTT state 675 at the IP layer, rather than at the TCP layer. Our observations 676 describe sharing state among TCP connections, which avoids some of 677 the difficulties in an IP-layer solution. One such problem of an IP 678 layer solution is determining the correspondence between packet 679 exchanges using IP header information alone, where such 680 correspondence is needed to compute RTT. Because TCB sharing 681 computes RTTs inside the TCP layer using TCP header information, it 682 can be implemented more directly and simply than at the IP layer. 683 This is a case where information should be computed at the transport 684 layer but could be shared at the network layer. 686 9.2. Other possibilities 688 Per-host-pair associations are not the limit of these techniques. It 689 is possible that TCBs could be similarly shared between hosts on a 690 subnet or within a cluster, because the predominant path can be 691 subnet-subnet, rather than host-host. Additionally, TCB 692 interdependence can be applied to any protocol with congestion 693 state, including SCTP [RFC4960] and DCCP [RFC4340], as well as for 694 individual subflows in Multipath TCP [RFC6824]. 696 There may be other information that can be shared between concurrent 697 connections. For example, knowing that another connection has just 698 tried to expand its window size and failed, a connection may not 699 attempt to do the same for some period. The idea is that existing 700 TCP implementations infer the behavior of all competing connections, 701 including those within the same host or subnet. One possible 702 optimization is to make that implicit feedback explicit, via 703 extended information associated with the endpoint IP address and its 704 TCP implementation, rather than per-connection state in the TCB. 706 10. Implementation Observations 708 The observation that some TCB state is host-pair specific rather 709 than application-pair dependent is not new and is a common 710 engineering decision in layered protocol implementations. Although 711 now deprecated, T/TCP [RFC1644] was the first to propose using 712 caches in order to maintain TCB states (see Appendix A). 714 The table below describes the current implementation status for some 715 TCB temporal sharing in Linux kernel version 4.6, FreeBSD 10 and 716 Windows as of October 2016. Ensemble sharing is not yet implemented. 718 CURRENT IMPLEMENTATION STATUS (as of 2016) 720 TCB data Status 721 ------------------------------------------------------------ 722 old_MMS_S Not shared 724 old_MMS_R Not shared 726 old_sendMSS Cached and shared in Linux (MSS) 728 old_PMTU Cached and shared in FreeBSD and Windows (PMTU) 730 old_RTT Cached and shared in FreeBSD and Linux 732 old_RTTvar Cached and shared in FreeBSD 734 old_TFOinfo Cached and shared in Linux and Windows 736 old_sendcwnd Not shared 738 old_ssthresh Cached and shared in FreeBSD and Linux* 740 *Note: In FreeBSD, new ssthresh is the mean of curr_ssthresh and 741 previous value if a previous value exists; in Linux, the calculation 742 depends on state and is max(curr_cwnd/2, old_ssthresh) in most 743 cases. 745 11. Updates to RFC 2140 747 This document updates the description of TCB sharing in RFC 2140 and 748 its associated impact on existing and new connection state, 749 providing a complete replacement for that document [RFC2140]. It 750 clarifies the previous description and terminology and extends the 751 mechanism to its impact on new protocols and mechanisms, including 752 multipath TCP, fast open, PLPMTUD, NAT, and the TCP Authentication 753 Option. 755 The detailed impact on TCB state addresses TCB parameters in greater 756 detail, addressing RSS in both the send and receive direction, MSS 757 and send-MSS separately, adds path MTU and ssthresh, and addresses 758 the impact on TCP option state. 760 New sections have been added to address compatibility issues and 761 implementation observations. The relation of this work to T/TCP has 762 been moved to Appendix A on history, partly to reflect the 763 deprecation of that protocol. 765 Appendix C has been added to discuss the potential to use temporal 766 sharing over long timescales to adapt TCP's initial window 767 automatically, largely imported from [To12]. 769 Finally, this document updates and significantly expands the 770 referenced literature. 772 12. Security Considerations 774 These presented implementation methods do not have additional 775 ramifications for explicit attacks. They may be susceptible to 776 denial-of-service attacks if not otherwise secured. 778 TCB sharing may be susceptible to denial-of-service attacks, 779 wherever the TCB is shared, between connections in a single host, or 780 between hosts if TCB sharing is implemented within a subnet (see 781 Implications section). Some shared TCB parameters are used only to 782 create new TCBs, others are shared among the TCBs of ongoing 783 connections. New connections can join the ongoing set, e.g., to 784 optimize send window size among a set of connections to the same 785 host. 787 Attacks on parameters used only for initialization affect only the 788 transient performance of a TCP connection. For short connections, 789 the performance ramification can approach that of a denial-of- 790 service attack. E.g., if an application changes its TCB to have a 791 false and small window size, subsequent connections would experience 792 performance degradation until their window grew appropriately. 794 TCB sharing reuses and mixes information from past and current 795 connections. Although reusing information could create a potential 796 for fingerprinting to identify hosts, the mixing reduces that 797 potential. There has been no evidence of fingerprinting based on 798 this technique and it is currently considered safe in that regard. 800 13. IANA Considerations 802 There are no IANA implications or requests in this document. 804 This section should be removed upon final publication as an RFC. 806 14. References 808 14.1. Normative References 810 [RFC793] Postel, Jon, "Transmission Control Protocol," Network 811 Working Group RFC-793/STD-7, ISI, Sept. 1981. 813 [RFC1122] Braden, R. (ed), "Requirements for Internet Hosts -- 814 Communication Layers", RFC-1122, Oct. 1989. 816 [RFC1191] Mogul, J., Deering, S., "Path MTU Discovery," RFC 1191, 817 Nov. 1990. 819 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 820 Requirement Levels", BCP 14, RFC 2119, March 1997. 822 [RFC4821] Mathis, M., Heffner, J., "Packetization Layer Path MTU 823 Discovery," RFC 4821, Mar. 2007. 825 [RFC5681] Allman, M., Paxson, V., Blanton, E., "TCP Congestion 826 Control," RFC 5681 (Standards Track), Sep. 2009. 828 [RFC6298] Paxson, V., Allman, M., Chu, J., Sargent, M., "Computing 829 TCP's Retransmission Timer," RFC 6298, June 2011. 831 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., Jain, A., "TCP Fast 832 Open", RFC 7413, Dec. 2014. 834 [RFC8174] Leiba., B., "Ambiguity of Uppercase vs Lowercase in RFC 835 2119 Key Words", RFC 8174, May 2017. 837 [RFC8201] McCann, J., Deering. S., Mogul, J., Hinden, R. (Ed.), 838 "Path MTU Discovery for IP version 6," RFC 8201, Jul. 839 2017. 841 14.2. Informative References 843 [Al10] Allman, M., "Initial Congestion Window Specification", 844 (work in progress), draft-allman-tcpm-bump-initcwnd-00, 845 Nov. 2010. 847 [Ba12] Barik, R., Welzl, M., Ferlin, S., Alay, O., " LISA: A 848 Linked Slow-Start Algorithm for MPTCP", IEEE ICC, Kuala 849 Lumpur, Malaysia, May 23-27 2016. 851 [Be94] Berners-Lee, T., et al., "The World-Wide Web," 852 Communications of the ACM, V37, Aug. 1994, pp. 76-82. 854 [Br94] Braden, B., "T/TCP -- Transaction TCP: Source Changes for 855 Sun OS 4.1.3,", Release 1.0, USC/ISI, September 14, 1994. 857 [Br02] Brownlee, N. and K. Claffy, "Understanding Internet 858 Traffic Streams: Dragonflies and Tortoises", IEEE 859 Communications Magazine p110-117, 2002. 861 [Co91] Comer, D., Stevens, D., Internetworking with TCP/IP, V2, 862 Prentice-Hall, NJ, 1991. 864 [Du16] Dukkipati, N., Yuchung C., and Amin V., "Research 865 Impacting the Practice of Congestion Control." ACM SIGCOMM 866 CCR (editorial), on-line post, July 2016. 868 [FreeBSD] FreeBSD source code, Release 2.10, http://www.freebsd.org/ 870 [Hu01] Hugues, A., Touch, J., Heidemann, J., "Issues in Slow- 871 Start Restart After Idle", draft-hughes-restart-00 872 (expired), Dec. 2001. 874 [Hu12] Hurtig, P., Brunstrom, A., "Enhanced metric caching for 875 short TCP flows," 2012 IEEE International Conference on 876 Communications (ICC), Ottawa, ON, 2012, pp. 1209-1213. 878 [Ja88] Jacobson, V., M. Karels, "Congestion Avoidance and 879 Control", Proc. Sigcomm 1988. 881 [RFC1644] Braden, R., "T/TCP -- TCP Extensions for Transactions 882 Functional Specification," RFC-1644, July 1994. 884 [RFC1379] Braden, R., "Transaction TCP -- Concepts," RFC-1379, 885 September 1992. 887 [RFC2001] Stevens, W., "TCP Slow Start, Congestion Avoidance, Fast 888 Retransmit, and Fast Recovery Algorithms", RFC2001 889 (Standards Track), Jan. 1997. 891 [RFC2140] Touch, J., "TCP Control Block Interdependence", RFC 2140, 892 April 1997. 894 [RFC2414] Allman, M., Floyd, S., Partridge, C., "Increasing TCP's 895 Initial Window", RFC 2414 (Experimental), Sept. 1998. 897 [RFC2663] Srisuresh, P., Holdrege, M., "IP Network Address 898 Translator (NAT) Terminology and Considerations", RFC- 899 2663, August 1999. 901 [RFC3390] Allman, M., Floyd, S., Partridge, C., "Increasing TCP's 902 Initial Window," RFC 3390, Oct. 2002. 904 [RFC3124] Balakrishnan, H., Seshan, S., "The Congestion Manager," 905 RFC 3124, June 2001. 907 [RFC4340] Kohler, E., Handley, M., Floyd, S., "Datagram Congestion 908 Control Protocol (DCCP)," RFC 4340, Mar. 2006. 910 [RFC4960] Stewart, R., (Ed.), "Stream Control Transmission 911 Protocol," RFC4960, Sept. 2007. 913 [RFC5925] Touch, J., Mankin, A., Bonica, R., "The TCP Authentication 914 Option," RFC 5925, June 2010. 916 [RFC6824] Ford, A., Raiciu, C., Handley, M., Bonaventure, O., "TCP 917 Extensions for Multipath Operation with Multiple 918 Addresses," RFC 6824, Jan. 2013. 920 [RFC6928] Chu, J., Dukkipati, N., Cheng, Y., Mathis, M., "Increasing 921 TCP's Initial Window," RFC 6928, Apr. 2013. 923 [RFC7231] Fielding, R., J. Reshke, Eds., "HTTP/1.1 Semantics and 924 Content," RFC-7231, June 2014. 926 [RFC7323] Borman, D., B. Braden, V. Jacobson, R. Scheffenegger 927 (Ed.), "TCP Extensions for High Performance," RFC 7323, 928 Sept. 2014. 930 [RFC7424] Krishnan, R., Yong, L., Ghanwani, A., So, N., Khasnabish, 931 B., "Mechanisms for Optimizing Link Aggregation Group 932 (LAG) and Equal-Cost Multipath (ECMP) Component Link 933 Utilization in Networks", RFC 7424, Jan. 2015 935 [RFC7540] Belshe, M., Peon, R., Thomson, M., "Hypertext Transfer 936 Protocol Version 2 (HTTP/2)", RFC 7540, May 2015. 938 [RFC7661] Fairhurst, G., Sathiaseelan, A., Secchi, R., "Updating TCP 939 to Support Rate-Limited Traffic", RFC 7661, Oct. 2015. 941 [To12] Touch, J., "Automating the Initial Window in TCP," draft- 942 touch-tcpm-automatic-iw-03 (expired), July 2012. 944 15. Acknowledgments 946 The authors would like to thank for Praveen Balasubramanian for 947 information regarding TCB sharing in Windows, and Yuchung Cheng, 948 Lars Eggert, Ilpo Jarvinen and Michael Scharf for comments on 949 earlier versions of the draft. Earlier revisions of this work 950 received funding from a collaborative research project between the 951 University of Oslo and Huawei Technologies Co., Ltd. and were partly 952 supported by USC/ISI's Postel Center. 954 This document was prepared using 2-Word-v2.0.template.dot. 956 16. Change log 958 This section should be removed upon final publication as an RFC. 960 ietf-04: 962 - Fix internal cross-reference errors that appeared in ietf-02 963 - Updated tables to re-center; clarified text 965 ietf-03: 967 - Correction of typographic errors, minor rewording in appendices 969 ietf-02: 971 - Minor reorganization and correction of typographic errors 972 - Added text to address fingerprinting in Security section 973 - Now retains Appendix B and body option tables upon publication 975 ietf-01: 977 - Added Appendix C to address long-timescale temporal adaptation 979 ietf-00: 981 - Re-issued as draft-ietf-tcpm-2140bis due to WG adoption. 982 - Cleaned orphan references to T/TCP, removed incomplete refs 983 - Moved references to informative section and updated Sec 2 984 - Updated to clarify no impact to interoperability 985 - Updated appendix B to avoid 2119 language 987 06: 989 - Changed to update 2140, cite it normatively, and summarize the 990 updates in a separate section 992 05: 994 - Fixed some TBDs. 996 04: 998 - Removed BCP-style recommendations and fixed some TBDs. 1000 03: 1002 - Updated Touch's affiliation and address information 1004 02: 1006 - Stated that our OS implementation overview table only covers 1007 temporal sharing. 1009 - Correctly reflected sharing of old_RTT in Linux in the 1010 implementation overview table. 1012 - Marked entries that are considered safe to share with an 1013 asterisk (suggestion was to split the table) 1015 - Discussed correct host identification: NATs may make IP 1016 addresses the wrong input, could e.g. use HTTP cookie. 1018 - Included MMS_S and MMS_R from RFC1122; fixed the use of MSS and 1019 MTU 1021 - Added information about option sharing, listed options in 1022 Appendix B 1024 Authors' Addresses 1026 Joe Touch 1027 Manhattan Beach, CA 90266 1028 USA 1030 Phone: +1 (310) 560-0334 1031 Email: touch@strayalpha.com 1032 Michael Welzl 1033 University of Oslo 1034 PO Box 1080 Blindern 1035 Oslo N-0316 1036 Norway 1038 Phone: +47 22 85 24 20 1039 Email: michawe@ifi.uio.no 1041 Safiqul Islam 1042 University of Oslo 1043 PO Box 1080 Blindern 1044 Oslo N-0316 1045 Norway 1047 Phone: +47 22 84 08 37 1048 Email: safiquli@ifi.uio.no 1050 Appendix A: TCB Sharing History 1052 T/TCP proposed using caches to maintain TCB information across 1053 instances (temporal sharing), e.g., smoothed RTT, RTT variance, 1054 congestion avoidance threshold, and MSS [RFC1644]. These values were 1055 in addition to connection counts used by T/TCP to accelerate data 1056 delivery prior to the full three-way handshake during an OPEN. The 1057 goal was to aggregate TCB components where they reflect one 1058 association - that of the host-pair, rather than artificially 1059 separating those components by connection. 1061 At least one T/TCP implementation saved the MSS and aggregated the 1062 RTT parameters across multiple connections but omitted caching the 1063 congestion window information [Br94], as originally specified in 1064 [RFC1379]. Some T/TCP implementations immediately updated MSS when 1065 the TCP MSS header option was received [Br94], although this was not 1066 addressed specifically in the concepts or functional specification 1067 [RFC1379][RFC1644]. In later T/TCP implementations, RTT values were 1068 updated only after a CLOSE, which does not benefit concurrent 1069 sessions. 1071 Temporal sharing of cached TCB data was originally implemented in 1072 the SunOS 4.1.3 T/TCP extensions [Br94] and the FreeBSD port of same 1073 [FreeBSD]. As mentioned before, only the MSS and RTT parameters were 1074 cached, as originally specified in [RFC1379]. Later discussion of 1075 T/TCP suggested including congestion control parameters in this 1076 cache; for example, [RFC1644] (Section 3.1) hints at initializing 1077 the congestion window to the old window size. 1079 Appendix B: TCP Option Sharing and Caching 1081 In addition to the options that can be cached and shared, this memo 1082 also lists known options for which state is unsafe to be kept. This 1083 list is not intended to be authoritative or exhaustive. 1085 Obsolete (unsafe to keep state): 1087 ECHO 1089 ECHO REPLY 1091 PO Conn permitted 1093 PO service profile 1095 CC 1097 CC.NEW 1099 CC.ECHO 1101 Alt CS req 1103 Alt CS data 1105 No state to keep: 1107 EOL 1109 NOP 1111 WS 1113 SACK 1115 TS 1117 MD5 1119 TCP-AO 1121 EXP1 1123 EXP2 1125 Unsafe to keep state: 1127 Skeeter (DH exchange, known to be vulnerable) 1129 Bubba (DH exchange, known to be vulnerable) 1131 Trailer CS 1133 SCPS capabilities 1135 S-NACK 1137 Records boundaries 1139 Corruption experienced 1141 SNAP 1143 TCP Compression 1145 Quickstart response 1147 UTO 1149 MPTCP negotiation success (see below for negotiation failure) 1151 TFO negotiation success (see below for negotiation failure) 1153 Safe but optional to keep state: 1155 MPTCP negotiation failure (to avoid negotiation retries) 1157 MSS 1159 TFO negotiation failure (to avoid negotiation retries) 1161 Safe and necessary to keep state: 1163 TFP cookie (if TFO succeeded in the past) 1165 Appendix C: Automating the Initial Window in TCP over Long Timescales 1167 Note: this section is imported from [To12], updated only to refer to 1168 itself as an appendix. 1170 C.1. Introduction 1172 TCP's congestion control algorithm uses an initial window value 1173 (IW), both as a starting point for new connections and after one RTO 1174 or more [RFC5681][RFC7661]. This value has evolved over time, 1175 originally one maximum segment size (MSS), and increased to the 1176 lesser of four MSS or 4,380 bytes [RFC3390][RFC5681]. For typical 1177 Internet connections with an maximum transmission units (MTUs) of 1178 1500 bytes, this permits three segments of 1,460 bytes each. 1180 The IW value was originally implied in the original TCP congestion 1181 control description, and documented as a standard in 1997 1182 [RFC2001][Ja88]. The value was last updated in 1998 experimentally, 1183 and moved to the standards track in 2002 [RFC2414][RFC3390]. There 1184 have been recent proposals to update the IW based on further 1185 increases in host and router capabilities and network capacity, some 1186 focusing on specific values (e.g., IW=10), and others prescribing a 1187 schedule for increases over time (e.g., IW=6 for 2011, increasing by 1188 1-2 MSS per year). 1190 This appendix discusses how TCP can objectively measure when an IW 1191 is too large, and that such feedback should be used over long 1192 timescales to adjust the IW automatically. The result should be 1193 safer to deploy and might avoid the need to repeatedly revisit IW 1194 size over time. 1196 Note that this mechanism attempts to make the IW more adaptive over 1197 time. It can increase the IW beyond that which is currently 1198 recommended for widescale deployment, and so its use should be 1199 carefully monitored. 1201 C.2. Design Considerations 1203 TCP's IW value has existed statically for over two decades, so any 1204 solution to adjusting the IW dynamically should have similarly 1205 stable, non-invasive effects on the performance and complexity of 1206 TCP. In order to be fair, the IW should be similar for most machines 1207 on the public Internet. Finally, a desirable goal is to develop a 1208 self-correcting algorithm, so that IW values that cause network 1209 problems can be avoided. To that end, we propose the following list 1210 of design goals: 1212 o Impart little to no impact to TCP in the absence of loss, i.e., 1213 it should not increase the complexity of default packet 1214 processing in the normal case. 1216 o Adapt to network feedback over long timescales, avoiding values 1217 that persistently cause network problems. 1219 o Decrease the IW in the presence of sustained loss of IW segments, 1220 as determined over a number of different connections. 1222 o Increase the IW in the absence of sustained loss of IW segments, 1223 as determined over a number of different connections. 1225 o Operate conservatively, i.e., tend towards leaving the IW the 1226 same in the absence of sufficient information, and give greater 1227 consideration to IW segment loss than IW segment success. 1229 We expect that, without other context, a good IW algorithm will 1230 converge to a single value, but this is not required. An endpoint 1231 with additional context or information, or deployed in a constrained 1232 environment, can always use a different value. In specific, 1233 information from previous connections, or sets of connections with a 1234 similar path, can already be used as context for such decisions (as 1235 noted in the core of this document). 1237 However, if a given IW value persistently causes packet loss during 1238 the initial burst of packets, it is clearly inappropriate and could 1239 be inducing unnecessary loss in other competing connections. This 1240 might happen for sites behind very slow boxes with small buffers, 1241 which may or may not be the first hop. 1243 C.3. Proposed IW Algorithm 1245 Below is a simple description of the proposed IW algorithm. It 1246 relies on the following parameters: 1248 o MinIW = 3 MSS or 4,380 bytes (as per RFC3390] 1250 o MaxIW = 10 1252 o MulDecr = 0.5 1254 o AddIncr = 2 MSS 1256 o Threshold = 0.05 1257 We assume that the minimum IW (MinIW) should be as currently 1258 specified [RFC3390]. The maximum IW can be set to a fixed value 1259 [RFC6928], or set based on a schedule if trusted time references are 1260 available [Al10]; here we prefer a fixed value. We also propose to 1261 use an AIMD algorithm, with increase and decreases as noted. 1263 Although these parameters are somewhat arbitrary, their initial 1264 values are not important except that the algorithm is AIMD and the 1265 MaxIW should not exceed that recommended for other systems on the 1266 Internet. Current proposals, including default current operation, 1267 are degenerate cases of the algorithm below for given parameters - 1268 notably MulDec = 1.0 and AddIncr = 0 MSS, thus disabling the 1269 automatic part of the algorithm. 1271 The proposed algorithm is as follows: 1273 1. On boot: 1275 IW = MaxIW; # assume this is in bytes, and an even number of MSS 1277 2. Upon starting a new connection 1279 CWND = IW; 1280 conncount++; 1281 IWnotchecked = 1; # true 1283 3. During a connection's SYN-ACK processing, if SYN-ACK includes 1284 ECN, treat as if the IW is too large 1286 if (IWnotchecked && (synackecn == 1)) { 1287 losscount++; 1288 IWnotchecked = 0; # never check again 1289 } 1291 4. During a connection, if retransmission occurs, check the seqno of 1292 the outgoing packet (in bytes) to see if the resent segment fixes 1293 an IW loss: 1295 if (Retransmitting && IWnotchecked && ((ISN - seqno) < IW))) { 1296 losscount++; 1297 IWnotchecked = 0; # never do this entire "if" again 1298 } else { 1299 IWnotchecked = 0; # you're beyond the IW so stop checking 1300 } 1302 5. Once every 1000 conections, as a separate process (i.e., not as 1303 part of processing a given connection): 1305 if (conncount > 1000) { 1306 if (losscount/conncount > threshold) { 1307 # the number of connections with errors is too high 1308 IW = IW * MulDecr; 1309 } else { 1310 IW = IW + AddIncr; 1311 } 1312 } 1314 We recognize that this algorithm can yield a false positive when the 1315 sequence number wraps around. This can be avoided using either PAWS 1316 [RFC7323] context or 64-bit internal sequence numbers (as in TCP-AO 1317 [RFC5925]). Alternately, false positives can be allowed since they 1318 are expected to be infrequent and thus will not affect the overall 1319 statistics of the algorithm. 1321 The following additional constraints are imposed: 1323 >> The automatic IW algorithm MUST initialize to MaxIW, in the 1324 absence of other context information. 1326 If there are too few connections to make a decision or if there is 1327 otherwise insufficient information to increase the IW, then the 1328 MaxIW defaults to the current recommended value. 1330 >> An implementation may allow the MaxIW to grow beyond the 1331 currently recommended Internet default, but not more than 2 segments 1332 per calendar year. 1334 If an endpoint has a persistent history of successfully transmitting 1335 IW segments without loss, then it is allowed to probe the Internet 1336 to determine if larger IW values have similar success. This probing 1337 is limited and requires a trusted time source, otherwise the MaxIW 1338 remains constant. 1340 >> An implementation MUST adjust the IW based on loss statistics at 1341 least once every 1000 connections. 1343 An endpoint needs to be sufficiently reactive to IW loss. 1345 >> An implementation MUST decrease the IW by at least one MSS when 1346 indicated during an evaluation interval. 1348 An endpoint that detects loss needs to decrease its IW by at least 1349 one MSS, otherwise it is not participating in an automatic reactive 1350 algorithm. 1352 >> An implementation MUST increase by no more than 2 MSS per 1353 evaluation interval. 1355 An endpoint that does not experience IW loss needs to probe the 1356 network incrementally. 1358 >> An implementation SHOULD use an IW that is an integer multiple of 1359 2 MSS. 1361 The IW should remain a multiple of 2 MSS segments, to enable 1362 efficient ACK compression without incurring unnecessary timeouts. 1364 >> An implementation MUST decrease the IW if more than 95% of 1365 connections have IW losses. 1367 Again, this is to ensure an implementation is sufficiently reactive. 1369 >> An implementation MAY group IW values and statistics within 1370 subsets of connections. Such grouping MAY use any information about 1371 connections to form groups except loss statistics. 1373 There are some TCP connections which might not be counted at all, 1374 such as those to/from loopback addresses, or those within the same 1375 subnet as that of a local interface (for which congestion control is 1376 sometimes disabled anyway). This may also include connections that 1377 terminate before the IW is full, i.e., as a separate check at the 1378 time of the connection closing. 1380 The period over which the IW is updated is intended to be a long 1381 timescale, e.g., a month or so, or 1,000 connections, whichever is 1382 longer. An implementation might check the IW once a month, and 1383 simply not update the IW or clear the connection counts in months 1384 where the number of connections is too small. 1386 C.4. Discussion 1388 There are numerous parameters to the above algorithm that are 1389 compliant with the given requirements; this is intended to allow 1390 variation in configuration and implementation while ensuring that 1391 all such algorithms are reactive and safe. 1393 This algorithm continues to assume segments because that is the 1394 basis of most TCP implementations. It might be useful to consider 1395 revising the specifications to allow byte-based congestion given 1396 sufficient experience. 1398 The algorithm checks for IW losses only during the first IW after a 1399 connection start; it does not check for IW losses elsewhere the IW 1400 is used, e.g., during slow-start restarts. 1402 >> An implementation MAY detect IW losses during slow-start restarts 1403 in addition to losses during the first IW of a connection. In this 1404 case, the implementation MUST count each restart as a "connection" 1405 for the purposes of connection counts and periodic rechecking of the 1406 IW value. 1408 False positives can occur during some kinds of segment reordering, 1409 e.g., that might trigger spurious retransmissions even without a 1410 true segment loss. These are not expected to be sufficiently common 1411 to dominate the algorithm and its conclusions. 1413 This mechanism does require additional per-connection state which is 1414 currently common in some implementations, and is useful for other 1415 reasons (e.g., the ISN is used in TCP-AO [RFC5925]). The mechanism 1416 also benefits from persistent state kept across reboots, as would be 1417 other state sharing mechanisms (e.g., TCP Control Block Sharing 1418 [RFC2140]). The mechanism is inspired by RFC 2140's use of 1419 information across connections. 1421 The receive window (RWIN) is not involved in this calculation. The 1422 size of RWIN is determined by receiver resources, and provides space 1423 to accommodate segment reordering. It is not involved with 1424 congestion control, which is the focus of this document and its 1425 management of the IW. 1427 C.5. Observations 1429 The IW may not converge to a single, global value. It also may not 1430 converge at all, but rather may oscillate by a few MSS as it 1431 repeatedly probes the Internet for larger IWs and fails. Both 1432 properties are consistent with TCP behavior during each individual 1433 connection. 1435 This mechanism assumes that losses during the IW are due to IW size. 1436 Persistent errors that drop packets for other reasons - e.g., OS 1437 bugs, can cause false positives. Again, this is consistent with 1438 TCP's basic assumption that loss is caused by congestion and 1439 requires backoff. This algorithm treats the IW of new connections as 1440 a long-timescale backoff system.