idnits 2.17.1 draft-ietf-tcpm-2140bis-07.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 309 has weird spacing: '...sthresh old_...' == Line 311 has weird spacing: '...endcwnd old_...' == Line 338 has weird spacing: '... MSSopt curr_...' == Line 348 has weird spacing: '...sthresh curr...' == Line 350 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 (December 28, 2020) is 1215 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) == Outdated reference: A later version (-15) exists of draft-ietf-tcpm-generalized-ecn-06 -- 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 7231 (Obsoleted by RFC 9110) -- Obsolete informational reference (is this intentional?): RFC 7540 (Obsoleted by RFC 9113) Summary: 1 error (**), 0 flaws (~~), 9 warnings (==), 10 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: June 2021 University of Oslo 6 December 28, 2020 8 TCP Control Block Interdependence 9 draft-ietf-tcpm-2140bis-07.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 June 28, 2021. 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..............................................22 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...............................................33 119 C.5. Observations.............................................34 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 [RFC8684]. 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 The core of this document describes behavior that is already 159 permitted by TCP standards. As a result, it provides informative 160 guidance but does not use normative language, except when quoting 161 other documents. Normative language is used in Appendix C as 162 examples of requirements for future consideration. 164 3. Terminology 166 The following terminology is used frequently in this document. Items 167 preceded with a "+" may be part of the state maintained as TCP 168 connection state in the associated connections TCB and are the focus 169 of sharing as described in this document. 171 +cwnd - the TCP congestion window size [RFC5681] 173 Host - a source or sink of TCP segments associated with a single IP 174 address 176 Host-pair - a pair of hosts and their corresponding IP addresses 178 +MMS_R - the maximum message size that can be received, the largest 179 received transport payload of an IP datagram [RFC1122] 181 +MMS_S - the maximum message size that can be sent, the largest 182 transmitted transport payload of an IP datagram [RFC1122] 184 Path - an Internet path between the IP addresses of two hosts 185 PCB - protocol control block, the data associated with a protocol as 186 maintained by an endpoint; a TCP PCB is called a TCB 188 PLPMTUD - packetization-layer path MTU discovery, a mechanism that 189 uses transport packets to discovery the PMTU [RFC4821] 191 +PMTU - the largest IP datagram that can traverse a path 192 [RFC1191][RFC8201] 194 PMTUD - path-layer MTU discovery, a mechanism that relies on ICMP 195 error messages to discover the PMTU [RFC1191][RFC8201] 197 +RTT - the round-trip time of a TCP packet exchange [RFC793] 199 +RTTvar - the variance of the round-trip times of a TCP packet 200 exchange [RFC6298] 202 +RWIN - the TCP receive window size [RFC793] 204 +sendcwnd - the TCP send-side congestion window (cwnd) size 205 [RFC5681] 207 +sendMSS - the TCP maximum segment size, a value transmitted in a 208 TCP option that represents the largest TCP user data payload that 209 can be received [RFC793] 211 +ssthresh - the TCP slow-start threshold [RFC5681] 213 TCB - TCP Control Block, the data associated with a TCP connection 214 as maintained by an endpoint 216 TCP-AO - the TCP Authentication Option [RFC5925] 218 TFO - TCP Fast Open option [RFC7413] 220 +TFO_cookie - the TCP Fast Open cookie, state that is used as part 221 of the TFO mechanism, when TFO is supported [RFC7413] 223 +TFO_failure - an indication of when TFO option negotiation failed, 224 when TFO is supported 226 +TFOinfo - information cached when a TFO connection is established, 227 which includes the TFO_cookie [RFC7413] 229 4. The TCP Control Block (TCB) 231 A TCB describes the data associated with each connection, i.e., with 232 each association of a pair of applications across the network. The 233 TCB contains at least the following information [RFC793]: 235 Local process state 236 pointers to send and receive buffers 237 pointers to retransmission queue and current segment 238 pointers to Internet Protocol (IP) PCB 239 Per-connection shared state 240 macro-state 241 connection state 242 timers 243 flags 244 local and remote host numbers and ports 245 TCP option state 246 micro-state 247 send and receive window state (size*, current number) 248 cong. window size (snd_cwnd)* 249 cong. window size threshold (ssthresh)* 250 max window size seen* 251 sendMSS# 252 MMS_S# 253 MMS_R# 254 PMTU# 255 round-trip time and variance# 257 The per-connection information is shown as split into macro-state 258 and micro-state, terminology borrowed from [Co91]. Macro-state 259 describes the protocol for establishing the initial shared state 260 about the connection; we include the endpoint numbers and components 261 (timers, flags) required upon commencement that are later used to 262 help maintain that state. Micro-state describes the protocol after a 263 connection has been established, to maintain the reliability and 264 congestion control of the data transferred in the connection. 266 We further distinguish two other classes of shared micro-state that 267 are associated more with host-pairs than with application pairs. One 268 class is clearly host-pair dependent (#, e.g., MSS, MMS, PMTU, RTT), 269 and the other is host-pair dependent in its aggregate (*, e.g., 270 congestion window information, current window sizes, etc.). 272 5. TCB Interdependence 274 There are two cases of TCB interdependence. Temporal sharing occurs 275 when the TCB of an earlier (now CLOSED) connection to a host is used 276 to initialize some parameters of a new connection to that same host, 277 i.e., in sequence. Ensemble sharing occurs when a currently active 278 connection to a host is used to initialize another (concurrent) 279 connection to that host. 281 6. Temporal Sharing 283 The TCB data cache is accessed in two ways: it is read to initialize 284 new TCBs and written when more current per-host state is available. 286 6.1. Initialization of the new TCB 288 TCBs for new connections can be initialized using context from past 289 connections as follows: 291 TEMPORAL SHARING - TCB Initialization 293 Cached TCB New TCB 294 -------------------------------------- 295 old_MMS_S old_MMS_S or not cached 297 old_MMS_R old_MMS_R or not cached 299 old_sendMSS old_sendMSS 301 old_PMTU old_PMTU 303 old_RTT old_RTT 305 old_RTTvar old_RTTvar 307 old_option (option specific) 309 old_ssthresh old_ssthresh 311 old_sendcwnd old_sendcwnd 313 The table below gives an overview of option-specific information 314 that can be shared. Additional information on some specific TCP 315 options and sharing is provided in Appendix B. 317 TEMPORAL SHARING - Option Info Initialization 319 Cached New 320 ------------------------------------ 321 old_TFO_cookie old_TFO_cookie 323 old_TFO_failure old_TFO_failure 325 6.2. Updates to the new TCB 327 During the connection, the associated TCB can be updated based on 328 particular events, as shown below: 330 TEMPORAL SHARING - Cache Updates 332 Cached TCB Current TCB when? New Cached TCB 333 ---------------------------------------------------------- 334 old_MMS_S curr_MMS_S OPEN curr_MMS_S 336 old_MMS_R curr_MMS_R OPEN curr_MMS_R 338 old_sendMSS curr_sendMSS MSSopt curr_sendMSS 340 old_PMTU curr_PMTU PMTUD curr_PMTU 342 old_RTT curr_RTT CLOSE merge(curr,old) 344 old_RTTvar curr_RTTvar CLOSE merge(curr,old) 346 old_option curr_option ESTAB (depends on option) 348 old_ssthresh curr_ssthresh CLOSE merge(curr,old) 350 old_sendcwnd curr_sendcwnd CLOSE merge(curr,old) 352 The table below gives an overview of option-specific information 353 that can be similarly shared. 355 TEMPORAL SHARING - Option Info Updates 357 Cached Current when? New Cached 358 --------------------------------------------------------- 359 old_TFO_cookie old_TFO_cookie ESTAB old_TFO_cookie 361 old_TFO_failure old_TFO_failure ESTAB old_TFO_failure 363 6.3. Discussion 365 There is no particular benefit to caching MMS_S and MMS_R as these 366 are reported by the local IP stack. Caching sendMSS and PMTU is 367 trivial; reported values are cached, and the most recent values are 368 used. The cache is updated when the MSS option is received in a SYN 369 or after PMTUD (i.e., when an ICMPv4 Fraqmentation Needed [RFC1191] 370 or ICMPv6 Packet Too Big message is received [RFC8201] or the 371 equivalent is inferred, e.g., as from PLPMTUD [RFC4821]), 372 respectively, so the cache always has the most recent values from 373 any connection. For sendMSS, the cache is consulted only at 374 connection establishment and not otherwise updated, which means that 375 MSS options do not affect current connections. The default sendMSS 376 is never saved; only reported MSS values update the cache, so an 377 explicit override is required to reduce the sendMSS. 379 RTT values are updated by formulae that merge the old and new 380 values. Dynamic RTT estimation requires a sequence of RTT 381 measurements. As a result, the cached RTT (and its variance) is an 382 average of its previous value with the contents of the currently 383 active TCB for that host, when a TCB is closed. RTT values are 384 updated only when a connection is closed. The method for merging old 385 and current values needs to attempt to reduce the transient effects 386 of the new connections. 388 The updates for RTT, RTTvar and ssthresh rely on existing 389 information, i.e., old values. Should no such values exist, the 390 current values are cached instead. 392 TCP options are copied or merged depending on the details of each 393 option, where "merge" is some function that combines the values of 394 "curr" and "old". E.g., TFO state is updated when a connection is 395 established and read before establishing a new connection. 397 Sections 8 and 9 discuss compatibility issues and implications of 398 sharing the specific information listed above. Section 10 gives an 399 overview of known implementations. 401 Most cached TCB values are updated when a connection closes. The 402 exceptions are MMS_R and MMS_S, which are reported by IP [RFC1122], 403 PMTU which is updated after Path MTU Discovery 404 [RFC1191][RFC4821][RFC8201], and sendMSS, which is updated if the 405 MSS option is received in the TCP SYN header. 407 Sharing sendMSS information affects only data in the SYN of the next 408 connection, because sendMSS information is typically included in 409 most TCP SYN segments. Caching PMTU can accelerate the efficiency of 410 PMTUD but can also result in black-holing until corrected if in 411 error. Caching MMS_R and MMS_S may be of little direct value as they 412 are reported by the local IP stack anyway. 414 The way in which other TCP option state can be shared depends on the 415 details of that option. E.g., TFO state includes the TCP Fast Open 416 Cookie [RFC7413] or, in case TFO fails, a negative TCP Fast Open 417 response. RFC 7413 states, "The client MUST cache negative responses 418 from the server in order to avoid potential connection failures. 419 Negative responses include the server not acknowledging the data in 420 the SYN, ICMP error messages, and (most importantly) no response 421 (SYN-ACK) from the server at all, i.e., connection timeout." [RFC 422 7413]. TFOinfo is cached when a connection is established. 424 Other TCP option state might not be as readily cached. E.g., TCP-AO 425 [RFC5925] success or failure between a host pair for a single SYN 426 destination port might be usefully cached. TCP-AO success or failure 427 to other SYN destination ports on that host pair is never useful to 428 cache because TCP-AO security parameters can vary per service. 430 7. Ensemble Sharing 432 Sharing cached TCB data across concurrent connections requires 433 attention to the aggregate nature of some of the shared state. For 434 example, although MSS and RTT values can be shared by copying, it 435 may not be appropriate to simply copy congestion window or ssthresh 436 information; instead, the new values can be a function (f) of the 437 cumulative values and the number of connections (N). 439 7.1. Initialization of a new TCB 441 TCBs for new connections can be initialized using context from 442 concurrent connections as follows: 444 ENSEMBLE SHARING - TCB Initialization 446 Cached TCB New TCB 447 ------------------------------------------ 448 old_MMS_S old_MMS_S 450 old_MMS_R old_MMS_R 452 old_sendMSS old_sendMSS 454 old_PMTU old_PMTU 456 old_RTT old_RTT 458 old_RTTvar old_RTTvar 460 sum(old_ssthresh) f(sum(old_ssthresh), N) 462 sum(old_sendcwnd) f(sum(old_sendcwnd), N) 463 _ 464 old_option (option specific) 466 The table below gives an overview of option-specific information 467 that can be similarly shared. 469 ENSEMBLE SHARING - Option Info Initialization 471 Cached New 472 ------------------------------------ 473 old_TFO_cookie old_TFO_cookie 475 old_TFO_failure old_TFO_failure 477 7.2. Updates to the new TCB 479 During the connection, the associated TCB can be updated based on 480 changes to concurrent connections, as shown below: 482 ENSEMBLE SHARING - Cache Updates 484 Cached TCB Current TCB when? New Cached TCB 485 --------------------------------------------------------------- 486 old_MMS_S curr_MMS_S OPEN curr_MMS_S 488 old_MMS_R curr_MMS_R OPEN curr_MMS_R 490 old_sendMSS curr_sendMSS MSSopt curr_sendMSS 492 old_PMTU curr_PMTU PMTUD / curr_PMTU 493 PLPMTUD 495 old_RTT curr_RTT update rtt_update(old,curr) 497 old_RTTvar curr_RTTvar update rtt_update(old,curr) 499 old_ssthresh curr_ssthresh update adjust sum as appropriate 501 old_sendcwnd curr_sendcwnd update adjust sum as appropriate 503 old_option curr_option (depends) (option specific) 505 The table below gives an overview of option-specific information 506 that can be similarly shared. 508 ENSEMBLE SHARING - Option Info Updates 510 Cached Current when? New Cached 511 ---------------------------------------------------------- 512 old_TFO_cookie old_TFO_cookie ESTAB old_TFO_cookie 514 old_TFO_failure old_TFO_failure ESTAB old_TFO_failure 516 7.3. Discussion 518 For ensemble sharing, TCB information should be cached as early as 519 possible, sometimes before a connection is closed. Otherwise, 520 opening multiple concurrent connections may not result in TCB data 521 sharing if no connection closes before others open. The amount of 522 work involved in updating the aggregate average should be minimized, 523 but the resulting value should be equivalent to having all values 524 measured within a single connection. The function "rtt_update" in 525 the ensemble sharing table indicates this operation, which occurs 526 whenever the RTT would have been updated in the individual TCP 527 connection. As a result, the cache contains the shared RTT 528 variables, which no longer need to reside in the TCB. 530 Congestion window size and ssthresh aggregation are more complicated 531 in the concurrent case. When there is an ensemble of connections, we 532 need to decide how that ensemble would have shared these variables, 533 in order to derive initial values for new TCBs. 535 Sections 8 and 9 discuss compatibility issues and implications of 536 sharing the specific information listed above. 538 Any assumption of TCB information sharing can be incorrect because 539 identical endpoint address pairs may not share network paths. In 540 current implementations, new congestion windows are set at an 541 initial value of 4-10 segments [RFC3390][RFC6928], so that the sum 542 of the current windows is increased for any new connection. This can 543 have detrimental consequences where several connections share a 544 highly congested link. 546 There are several ways to initialize the congestion window in a new 547 TCB among an ensemble of current connections to a host. Current TCP 548 implementations initialize it to four segments as standard [rfc3390] 549 and 10 segments experimentally [RFC6928]. These approaches assume 550 that new connections should behave as conservatively as possible. 551 The algorithm described in [Ba12] adjusts the initial cwnd depending 552 on the cwnd values of ongoing connections. It is also possible to 553 use sharing mechanisms over long timescales to adapt TCP's initial 554 window automatically, as described further in Appendix C. 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 [RFC8684]. 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 KNOWN IMPLEMENTATION STATUS 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, avoiding the need to periodically revise a single 768 global constant value. 770 Finally, this document updates and significantly expands the 771 referenced literature. 773 12. Security Considerations 775 These presented implementation methods do not have additional 776 ramifications for explicit attacks. They may be susceptible to 777 denial-of-service attacks if not otherwise secured. 779 TCB sharing may be susceptible to denial-of-service attacks, 780 wherever the TCB is shared, between connections in a single host, or 781 between hosts if TCB sharing is implemented within a subnet (see 782 Implications section). Some shared TCB parameters are used only to 783 create new TCBs, others are shared among the TCBs of ongoing 784 connections. New connections can join the ongoing set, e.g., to 785 optimize send window size among a set of connections to the same 786 host. 788 Attacks on parameters used only for initialization affect only the 789 transient performance of a TCP connection. For short connections, 790 the performance ramification can approach that of a denial-of- 791 service attack. E.g., if an application changes its TCB to have a 792 false and small window size, subsequent connections will experience 793 performance degradation until their window grew appropriately. 795 TCB sharing reuses and mixes information from past and current 796 connections. Although reusing information could create a potential 797 for fingerprinting to identify hosts, the mixing reduces that 798 potential. There has been no evidence of fingerprinting based on 799 this technique and it is currently considered safe in that regard. 801 13. IANA Considerations 803 There are no IANA implications or requests in this document. 805 This section should be removed upon final publication as an RFC. 807 14. References 809 14.1. Normative References 811 [RFC793] Postel, Jon, "Transmission Control Protocol," Network 812 Working Group RFC-793/STD-7, ISI, Sept. 1981. 814 [RFC1122] Braden, R. (ed), "Requirements for Internet Hosts -- 815 Communication Layers", RFC-1122, Oct. 1989. 817 [RFC1191] Mogul, J., Deering, S., "Path MTU Discovery," RFC 1191, 818 Nov. 1990. 820 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 821 Requirement Levels", BCP 14, RFC 2119, March 1997. 823 [RFC4821] Mathis, M., Heffner, J., "Packetization Layer Path MTU 824 Discovery," RFC 4821, Mar. 2007. 826 [RFC5681] Allman, M., Paxson, V., Blanton, E., "TCP Congestion 827 Control," RFC 5681 (Standards Track), Sep. 2009. 829 [RFC6298] Paxson, V., Allman, M., Chu, J., Sargent, M., "Computing 830 TCP's Retransmission Timer," RFC 6298, June 2011. 832 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., Jain, A., "TCP Fast 833 Open", RFC 7413, Dec. 2014. 835 [RFC8174] Leiba., B., "Ambiguity of Uppercase vs Lowercase in RFC 836 2119 Key Words", RFC 8174, May 2017. 838 [RFC8201] McCann, J., Deering. S., Mogul, J., Hinden, R. (Ed.), 839 "Path MTU Discovery for IP version 6," RFC 8201, Jul. 840 2017. 842 14.2. Informative References 844 [Al10] Allman, M., "Initial Congestion Window Specification", 845 (work in progress), draft-allman-tcpm-bump-initcwnd-00, 846 Nov. 2010. 848 [Ba12] Barik, R., Welzl, M., Ferlin, S., Alay, O., " LISA: A 849 Linked Slow-Start Algorithm for MPTCP", IEEE ICC, Kuala 850 Lumpur, Malaysia, May 23-27 2016. 852 [Ba20] Bagnulo, M., Briscoe, B., "ECN++: Adding Explicit 853 Congestion Notification (ECN) to TCP Control Packets", 854 draft-ietf-tcpm-generalized-ecn-06, Oct. 2020. 856 [Be94] Berners-Lee, T., et al., "The World-Wide Web," 857 Communications of the ACM, V37, Aug. 1994, pp. 76-82. 859 [Br94] Braden, B., "T/TCP -- Transaction TCP: Source Changes for 860 Sun OS 4.1.3,", Release 1.0, USC/ISI, September 14, 1994. 862 [Br02] Brownlee, N. and K. Claffy, "Understanding Internet 863 Traffic Streams: Dragonflies and Tortoises", IEEE 864 Communications Magazine p110-117, 2002. 866 [Co91] Comer, D., Stevens, D., Internetworking with TCP/IP, V2, 867 Prentice-Hall, NJ, 1991. 869 [Du16] Dukkipati, N., Yuchung C., and Amin V., "Research 870 Impacting the Practice of Congestion Control." ACM SIGCOMM 871 CCR (editorial), on-line post, July 2016. 873 [FreeBSD] FreeBSD source code, Release 2.10, http://www.freebsd.org/ 875 [Hu01] Hugues, A., Touch, J., Heidemann, J., "Issues in Slow- 876 Start Restart After Idle", draft-hughes-restart-00 877 (expired), Dec. 2001. 879 [Hu12] Hurtig, P., Brunstrom, A., "Enhanced metric caching for 880 short TCP flows," 2012 IEEE International Conference on 881 Communications (ICC), Ottawa, ON, 2012, pp. 1209-1213. 883 [Ja88] Jacobson, V., M. Karels, "Congestion Avoidance and 884 Control", Proc. Sigcomm 1988. 886 [RFC1644] Braden, R., "T/TCP -- TCP Extensions for Transactions 887 Functional Specification," RFC-1644, July 1994. 889 [RFC1379] Braden, R., "Transaction TCP -- Concepts," RFC-1379, 890 September 1992. 892 [RFC2001] Stevens, W., "TCP Slow Start, Congestion Avoidance, Fast 893 Retransmit, and Fast Recovery Algorithms", RFC2001 894 (Standards Track), Jan. 1997. 896 [RFC2140] Touch, J., "TCP Control Block Interdependence", RFC 2140, 897 April 1997. 899 [RFC2414] Allman, M., Floyd, S., Partridge, C., "Increasing TCP's 900 Initial Window", RFC 2414 (Experimental), Sept. 1998. 902 [RFC2663] Srisuresh, P., Holdrege, M., "IP Network Address 903 Translator (NAT) Terminology and Considerations", RFC- 904 2663, August 1999. 906 [RFC3390] Allman, M., Floyd, S., Partridge, C., "Increasing TCP's 907 Initial Window," RFC 3390, Oct. 2002. 909 [RFC3124] Balakrishnan, H., Seshan, S., "The Congestion Manager," 910 RFC 3124, June 2001. 912 [RFC4340] Kohler, E., Handley, M., Floyd, S., "Datagram Congestion 913 Control Protocol (DCCP)," RFC 4340, Mar. 2006. 915 [RFC4960] Stewart, R., (Ed.), "Stream Control Transmission 916 Protocol," RFC4960, Sept. 2007. 918 [RFC5925] Touch, J., Mankin, A., Bonica, R., "The TCP Authentication 919 Option," RFC 5925, June 2010. 921 [RFC6928] Chu, J., Dukkipati, N., Cheng, Y., Mathis, M., "Increasing 922 TCP's Initial Window," RFC 6928, Apr. 2013. 924 [RFC7231] Fielding, R., J. Reshke, Eds., "HTTP/1.1 Semantics and 925 Content," RFC-7231, June 2014. 927 [RFC7323] Borman, D., B. Braden, V. Jacobson, R. Scheffenegger 928 (Ed.), "TCP Extensions for High Performance," RFC 7323, 929 Sept. 2014. 931 [RFC7424] Krishnan, R., Yong, L., Ghanwani, A., So, N., Khasnabish, 932 B., "Mechanisms for Optimizing Link Aggregation Group 933 (LAG) and Equal-Cost Multipath (ECMP) Component Link 934 Utilization in Networks", RFC 7424, Jan. 2015 936 [RFC7540] Belshe, M., Peon, R., Thomson, M., "Hypertext Transfer 937 Protocol Version 2 (HTTP/2)", RFC 7540, May 2015. 939 [RFC7661] Fairhurst, G., Sathiaseelan, A., Secchi, R., "Updating TCP 940 to Support Rate-Limited Traffic", RFC 7661, Oct. 2015. 942 [RFC8684] Ford, A., Raiciu, C., Handley, M., Bonaventure, O., 943 Paasch, C., "TCP Extensions for Multipath Operation with 944 Multiple Addresses," RFC 8684, Mar. 2020. 946 15. Acknowledgments 948 The authors would like to thank for Praveen Balasubramanian for 949 information regarding TCB sharing in Windows, and Yuchung Cheng, 950 Lars Eggert, Ilpo Jarvinen and Michael Scharf for comments on 951 earlier versions of the draft. Earlier revisions of this work 952 received funding from a collaborative research project between the 953 University of Oslo and Huawei Technologies Co., Ltd. and were partly 954 supported by USC/ISI's Postel Center. 956 This document was prepared using 2-Word-v2.0.template.dot. 958 16. Change log 960 This section should be removed upon final publication as an RFC. 962 ietf-07: 964 - Update per id-nits and normative language for consistency 966 ietf-06: 968 - Address WGLC comments 970 ietf-05: 972 - Correction of typographic errors, expansion of terminology 974 ietf-04: 976 - Fix internal cross-reference errors that appeared in ietf-02 977 - Updated tables to re-center; clarified text 979 ietf-03: 981 - Correction of typographic errors, minor rewording in appendices 983 ietf-02: 985 - Minor reorganization and correction of typographic errors 986 - Added text to address fingerprinting in Security section 987 - Now retains Appendix B and body option tables upon publication 989 ietf-01: 991 - Added Appendix C to address long-timescale temporal adaptation 993 ietf-00: 995 - Re-issued as draft-ietf-tcpm-2140bis due to WG adoption. 996 - Cleaned orphan references to T/TCP, removed incomplete refs 997 - Moved references to informative section and updated Sec 2 998 - Updated to clarify no impact to interoperability 999 - Updated appendix B to avoid 2119 language 1001 06: 1003 - Changed to update 2140, cite it normatively, and summarize the 1004 updates in a separate section 1006 05: 1008 - Fixed some TBDs. 1010 04: 1012 - Removed BCP-style recommendations and fixed some TBDs. 1014 03: 1016 - Updated Touch's affiliation and address information 1018 02: 1020 - Stated that our OS implementation overview table only covers 1021 temporal sharing. 1023 - Correctly reflected sharing of old_RTT in Linux in the 1024 implementation overview table. 1026 - Marked entries that are considered safe to share with an 1027 asterisk (suggestion was to split the table) 1029 - Discussed correct host identification: NATs may make IP 1030 addresses the wrong input, could e.g., use HTTP cookie. 1032 - Included MMS_S and MMS_R from RFC1122; fixed the use of MSS and 1033 MTU 1035 - Added information about option sharing, listed options in 1036 Appendix B 1038 Authors' Addresses 1040 Joe Touch 1041 Manhattan Beach, CA 90266 1042 USA 1044 Phone: +1 (310) 560-0334 1045 Email: touch@strayalpha.com 1047 Michael Welzl 1048 University of Oslo 1049 PO Box 1080 Blindern 1050 Oslo N-0316 1051 Norway 1053 Phone: +47 22 85 24 20 1054 Email: michawe@ifi.uio.no 1056 Safiqul Islam 1057 University of Oslo 1058 PO Box 1080 Blindern 1059 Oslo N-0316 1060 Norway 1062 Phone: +47 22 84 08 37 1063 Email: safiquli@ifi.uio.no 1065 Appendix A: TCB Sharing History 1067 T/TCP proposed using caches to maintain TCB information across 1068 instances (temporal sharing), e.g., smoothed RTT, RTT variance, 1069 congestion avoidance threshold, and MSS [RFC1644]. These values were 1070 in addition to connection counts used by T/TCP to accelerate data 1071 delivery prior to the full three-way handshake during an OPEN. The 1072 goal was to aggregate TCB components where they reflect one 1073 association - that of the host-pair, rather than artificially 1074 separating those components by connection. 1076 At least one T/TCP implementation saved the MSS and aggregated the 1077 RTT parameters across multiple connections but omitted caching the 1078 congestion window information [Br94], as originally specified in 1079 [RFC1379]. Some T/TCP implementations immediately updated MSS when 1080 the TCP MSS header option was received [Br94], although this was not 1081 addressed specifically in the concepts or functional specification 1082 [RFC1379][RFC1644]. In later T/TCP implementations, RTT values were 1083 updated only after a CLOSE, which does not benefit concurrent 1084 sessions. 1086 Temporal sharing of cached TCB data was originally implemented in 1087 the SunOS 4.1.3 T/TCP extensions [Br94] and the FreeBSD port of same 1088 [FreeBSD]. As mentioned before, only the MSS and RTT parameters were 1089 cached, as originally specified in [RFC1379]. Later discussion of 1090 T/TCP suggested including congestion control parameters in this 1091 cache; for example, [RFC1644] (Section 3.1) hints at initializing 1092 the congestion window to the old window size. 1094 Appendix B: TCP Option Sharing and Caching 1096 In addition to the options that can be cached and shared, this memo 1097 also lists known options for which state is unsafe to be kept. This 1098 list is not intended to be authoritative or exhaustive. 1100 Obsolete (unsafe to keep state): 1102 ECHO 1104 ECHO REPLY 1106 PO Conn permitted 1108 PO service profile 1110 CC 1112 CC.NEW 1114 CC.ECHO 1116 Alt CS req 1118 Alt CS data 1120 No state to keep: 1122 EOL 1124 NOP 1126 WS 1128 SACK 1130 TS 1132 MD5 1134 TCP-AO 1136 EXP1 1138 EXP2 1140 Unsafe to keep state: 1142 Skeeter (DH exchange, known to be vulnerable) 1144 Bubba (DH exchange, known to be vulnerable) 1146 Trailer CS 1148 SCPS capabilities 1150 S-NACK 1152 Records boundaries 1154 Corruption experienced 1156 SNAP 1158 TCP Compression 1160 Quickstart response 1162 UTO 1164 MPTCP negotiation success (see below for negotiation failure) 1166 TFO negotiation success (see below for negotiation failure) 1168 Safe but optional to keep state: 1170 MPTCP negotiation failure (to avoid negotiation retries) 1172 MSS 1174 TFO negotiation failure (to avoid negotiation retries) 1176 Safe and necessary to keep state: 1178 TFP cookie (if TFO succeeded in the past) 1180 Appendix C: Automating the Initial Window in TCP over Long Timescales 1182 C.1. Introduction 1184 Temporal sharing, as described earlier in this document, builds on 1185 the assumption that multiple consecutive connections between the 1186 same host pair are somewhat likely to be exposed to similar 1187 environment characteristics. The stored information can therefore 1188 become invalid over time, and suitable precautions should be taken 1189 (this is discussed further in section 8.1). However, there are also 1190 cases where it can make sense to use much longer-term measurements 1191 of TCP connections to gradually influence TCP parameters. This 1192 appendix describes an example of such a case. 1194 TCP's congestion control algorithm uses an initial window value 1195 (IW), both as a starting point for new connections and as an upper 1196 limit for restarting after an idle period [RFC5681][RFC7661]. This 1197 value has evolved over time, originally one maximum segment size 1198 (MSS), and increased to the lesser of four MSS or 4,380 bytes 1199 [RFC3390][RFC5681]. For a typical Internet connection with a maximum 1200 transmission unit (MTU) of 1500 bytes, this permits three segments 1201 of 1,460 bytes each. 1203 The IW value was originally implied in the original TCP congestion 1204 control description and documented as a standard in 1997 1205 [RFC2001][Ja88]. The value was updated in 1998 experimentally and 1206 moved to the standards track in 2002 [RFC2414][RFC3390]. In 2013, it 1207 was experimentally increased to 10 [RFC6928]. 1209 This appendix discusses how TCP can objectively measure when an IW 1210 is too large, and that such feedback should be used over long 1211 timescales to adjust the IW automatically. The result should be 1212 safer to deploy and might avoid the need to repeatedly revisit IW 1213 over time. 1215 Note that this mechanism attempts to make the IW more adaptive over 1216 time. It can increase the IW beyond that which is currently 1217 recommended for widescale deployment, and so its use should be 1218 carefully monitored. 1220 C.2. Design Considerations 1222 TCP's IW value has existed statically for over two decades, so any 1223 solution to adjusting the IW dynamically should have similarly 1224 stable, non-invasive effects on the performance and complexity of 1225 TCP. In order to be fair, the IW should be similar for most machines 1226 on the public Internet. Finally, a desirable goal is to develop a 1227 self-correcting algorithm, so that IW values that cause network 1228 problems can be avoided. To that end, we propose the following 1229 design goals: 1231 o Impart little to no impact to TCP in the absence of loss, i.e., 1232 it should not increase the complexity of default packet 1233 processing in the normal case. 1235 o Adapt to network feedback over long timescales, avoiding values 1236 that persistently cause network problems. 1238 o Decrease the IW in the presence of sustained loss of IW segments, 1239 as determined over a number of different connections. 1241 o Increase the IW in the absence of sustained loss of IW segments, 1242 as determined over a number of different connections. 1244 o Operate conservatively, i.e., tend towards leaving the IW the 1245 same in the absence of sufficient information, and give greater 1246 consideration to IW segment loss than IW segment success. 1248 We expect that, without other context, a good IW algorithm will 1249 converge to a single value, but this is not required. An endpoint 1250 with additional context or information, or deployed in a constrained 1251 environment, can always use a different value. In specific, 1252 information from previous connections, or sets of connections with a 1253 similar path, can already be used as context for such decisions (as 1254 noted in the core of this document). 1256 However, if a given IW value persistently causes packet loss during 1257 the initial burst of packets, it is clearly inappropriate and could 1258 be inducing unnecessary loss in other competing connections. This 1259 might happen for sites behind very slow boxes with small buffers, 1260 which may or may not be the first hop. 1262 C.3. Proposed IW Algorithm 1264 Below is a simple description of the proposed IW algorithm. It 1265 relies on the following parameters: 1267 o MinIW = 3 MSS or 4,380 bytes (as per [RFC3390]) 1269 o MaxIW = 10 MSS (as per [RFC6928]) 1271 o MulDecr = 0.5 1273 o AddIncr = 2 MSS 1274 o Threshold = 0.05 1276 We assume that the minimum IW (MinIW) should be as currently 1277 specified [RFC3390]. The maximum IW can be set to a fixed value (as 1278 recommended in [RFC6928]) or set based on a schedule if trusted time 1279 references are available [Al10]; here we prefer a fixed value. We 1280 also propose to use an AIMD algorithm, with increase and decreases 1281 as noted. 1283 Although these parameters are somewhat arbitrary, their initial 1284 values are not important except that the algorithm is AIMD and the 1285 MaxIW should not exceed that recommended for other systems on the 1286 Internet. Current proposals, including default current operation, 1287 are degenerate cases of the algorithm below for given parameters - 1288 notably MulDec = 1.0 and AddIncr = 0 MSS, thus disabling the 1289 automatic part of the algorithm. 1291 The proposed algorithm is as follows: 1293 1. On boot: 1295 IW = MaxIW; # assume this is in bytes, and an even number of MSS 1297 2. Upon starting a new connection: 1299 CWND = IW; 1300 conncount++; 1301 IWnotchecked = 1; # true 1303 3. During a connection's SYN-ACK processing, if SYN-ACK includes ECN 1304 (as similarly addressed in Sec 5 of ECN++ for TCP [Ba20]), treat 1305 as if the IW is too large: 1307 if (IWnotchecked && (synackecn == 1)) { 1308 losscount++; 1309 IWnotchecked = 0; # never check again 1310 } 1312 4. During a connection, if retransmission occurs, check the seqno of 1313 the outgoing packet (in bytes) to see if the resent segment fixes 1314 an IW loss: 1316 if (Retransmitting && IWnotchecked && ((ISN - seqno) < IW))) { 1317 losscount++; 1318 IWnotchecked = 0; # never do this entire "if" again 1319 } else { 1320 IWnotchecked = 0; # you're beyond the IW so stop checking 1321 } 1323 5. Once every 1000 connections, as a separate process (i.e., not as 1324 part of processing a given connection): 1326 if (conncount > 1000) { 1327 if (losscount/conncount > threshold) { 1328 # the number of connections with errors is too high 1329 IW = IW * MulDecr; 1330 } else { 1331 IW = IW + AddIncr; 1332 } 1333 } 1335 As presented, this algorithm can yield a false positive when the 1336 sequence number wraps around, e.g., the code might increment 1337 losscount in step 4 when no loss occurred or fail to increment 1338 losscount when a loss did occur. This can be avoided using either 1339 PAWS [RFC7323] context or internal extended sequence number 1340 representations (as in TCP-AO [RFC5925]). Alternately, false 1341 positives can be tolerated because they are expected to be 1342 infrequent and thus will not significantly impact the algorithm. 1344 A number of additional constraints need to be imposed if this 1345 mechanism is implemented to ensure that it defaults values that 1346 comply with current Internet standards, is conservative in how it 1347 extends those values, and returns to those values in the absence of 1348 positive feedback (i.e., success). To that end, we recommend the 1349 following list of example constraints: 1351 >> The automatic IW algorithm MUST initialize MaxIW a value no 1352 larger than the currently recommended Internet default, in the 1353 absence of other context information. 1355 Thus, if there are too few connections to make a decision or if 1356 there is otherwise insufficient information to increase the IW, then 1357 the MaxIW defaults to the current recommended value. 1359 >> An implementation MAY allow the MaxIW to grow beyond the 1360 currently recommended Internet default, but not more than 2 segments 1361 per calendar year. 1363 Thus, if an endpoint has a persistent history of successfully 1364 transmitting IW segments without loss, then it is allowed to probe 1365 the Internet to determine if larger IW values have similar success. 1366 This probing is limited and requires a trusted time source, 1367 otherwise the MaxIW remains constant. 1369 >> An implementation MUST adjust the IW based on loss statistics at 1370 least once every 1000 connections. 1372 An endpoint needs to be sufficiently reactive to IW loss. 1374 >> An implementation MUST decrease the IW by at least one MSS when 1375 indicated during an evaluation interval. 1377 An endpoint that detects loss needs to decrease its IW by at least 1378 one MSS, otherwise it is not participating in an automatic reactive 1379 algorithm. 1381 >> An implementation MUST increase by no more than 2 MSS per 1382 evaluation interval. 1384 An endpoint that does not experience IW loss needs to probe the 1385 network incrementally. 1387 >> An implementation SHOULD use an IW that is an integer multiple of 1388 2 MSS. 1390 The IW should remain a multiple of 2 MSS segments, to enable 1391 efficient ACK compression without incurring unnecessary timeouts. 1393 >> An implementation MUST decrease the IW if more than 95% of 1394 connections have IW losses. 1396 Again, this is to ensure an implementation is sufficiently reactive. 1398 >> An implementation MAY group IW values and statistics within 1399 subsets of connections. Such grouping MAY use any information about 1400 connections to form groups except loss statistics. 1402 There are some TCP connections which might not be counted at all, 1403 such as those to/from loopback addresses, or those within the same 1404 subnet as that of a local interface (for which congestion control is 1405 sometimes disabled anyway). This may also include connections that 1406 terminate before the IW is full, i.e., as a separate check at the 1407 time of the connection closing. 1409 The period over which the IW is updated is intended to be a long 1410 timescale, e.g., a month or so, or 1,000 connections, whichever is 1411 longer. An implementation might check the IW once a month, and 1412 simply not update the IW or clear the connection counts in months 1413 where the number of connections is too small. 1415 C.4. Discussion 1417 There are numerous parameters to the above algorithm that are 1418 compliant with the given requirements; this is intended to allow 1419 variation in configuration and implementation while ensuring that 1420 all such algorithms are reactive and safe. 1422 This algorithm continues to assume segments because that is the 1423 basis of most TCP implementations. It might be useful to consider 1424 revising the specifications to allow byte-based congestion given 1425 sufficient experience. 1427 The algorithm checks for IW losses only during the first IW after a 1428 connection start; it does not check for IW losses elsewhere the IW 1429 is used, e.g., during slow-start restarts. 1431 >> An implementation MAY detect IW losses during slow-start restarts 1432 in addition to losses during the first IW of a connection. In this 1433 case, the implementation MUST count each restart as a "connection" 1434 for the purposes of connection counts and periodic rechecking of the 1435 IW value. 1437 False positives can occur during some kinds of segment reordering, 1438 e.g., that might trigger spurious retransmissions even without a 1439 true segment loss. These are not expected to be sufficiently common 1440 to dominate the algorithm and its conclusions. 1442 This mechanism does require additional per-connection state, which 1443 is currently common in some implementations, and is useful for other 1444 reasons (e.g., the ISN is used in TCP-AO [RFC5925]). The mechanism 1445 also benefits from persistent state kept across reboots, as would be 1446 other state sharing mechanisms (e.g., TCP Control Block Sharing 1447 [RFC2140]). The mechanism is inspired by RFC 2140's use of 1448 information across connections. 1450 The receive window (RWIN) is not involved in this calculation. The 1451 size of RWIN is determined by receiver resources and provides space 1452 to accommodate segment reordering. It is not involved with 1453 congestion control, which is the focus of this document and its 1454 management of the IW. 1456 C.5. Observations 1458 The IW may not converge to a single, global value. It also may not 1459 converge at all, but rather may oscillate by a few MSS as it 1460 repeatedly probes the Internet for larger IWs and fails. Both 1461 properties are consistent with TCP behavior during each individual 1462 connection. 1464 This mechanism assumes that losses during the IW are due to IW size. 1465 Persistent errors that drop packets for other reasons - e.g., OS 1466 bugs, can cause false positives. Again, this is consistent with 1467 TCP's basic assumption that loss is caused by congestion and 1468 requires backoff. This algorithm treats the IW of new connections as 1469 a long-timescale backoff system.