idnits 2.17.1 draft-ietf-mptcp-rfc6824bis-18.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 : ---------------------------------------------------------------------------- -- The draft header indicates that this document obsoletes RFC6824, but the abstract doesn't seem to directly say this. It does mention RFC6824 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 8, 2019) is 1783 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'Data ACK' is mentioned on line 577, but not defined == Missing Reference: 'Checksum' is mentioned on line 544, but not defined == Missing Reference: 'Data FIN' is mentioned on line 575, but not defined == Missing Reference: 'DFIN' is mentioned on line 3604, but not defined ** Obsolete normative reference: RFC 793 (Obsoleted by RFC 9293) ** Downref: Normative reference to an Informational RFC: RFC 2104 ** Downref: Normative reference to an Informational RFC: RFC 6234 -- Obsolete informational reference (is this intentional?): RFC 6528 (Obsoleted by RFC 9293) Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Engineering Task Force A. Ford 3 Internet-Draft Pexip 4 Obsoletes: 6824 (if approved) C. Raiciu 5 Intended status: Standards Track U. Politechnica of Bucharest 6 Expires: December 10, 2019 M. Handley 7 U. College London 8 O. Bonaventure 9 U. catholique de Louvain 10 C. Paasch 11 Apple, Inc. 12 June 8, 2019 14 TCP Extensions for Multipath Operation with Multiple Addresses 15 draft-ietf-mptcp-rfc6824bis-18 17 Abstract 19 TCP/IP communication is currently restricted to a single path per 20 connection, yet multiple paths often exist between peers. The 21 simultaneous use of these multiple paths for a TCP/IP session would 22 improve resource usage within the network and, thus, improve user 23 experience through higher throughput and improved resilience to 24 network failure. 26 Multipath TCP provides the ability to simultaneously use multiple 27 paths between peers. This document presents a set of extensions to 28 traditional TCP to support multipath operation. The protocol offers 29 the same type of service to applications as TCP (i.e., reliable 30 bytestream), and it provides the components necessary to establish 31 and use multiple TCP flows across potentially disjoint paths. 33 This document specifies v1 of Multipath TCP, obsoleting v0 as 34 specified in RFC6824, through clarifications and modifications 35 primarily driven by deployment experience. 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at http://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on December 10, 2019. 54 Copyright Notice 56 Copyright (c) 2019 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents 61 (http://trustee.ietf.org/license-info) in effect on the date of 62 publication of this document. Please review these documents 63 carefully, as they describe your rights and restrictions with respect 64 to this document. Code Components extracted from this document must 65 include Simplified BSD License text as described in Section 4.e of 66 the Trust Legal Provisions and are provided without warranty as 67 described in the Simplified BSD License. 69 Table of Contents 71 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 72 1.1. Design Assumptions . . . . . . . . . . . . . . . . . . . 4 73 1.2. Multipath TCP in the Networking Stack . . . . . . . . . . 5 74 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 6 75 1.4. MPTCP Concept . . . . . . . . . . . . . . . . . . . . . . 7 76 1.5. Requirements Language . . . . . . . . . . . . . . . . . . 8 77 2. Operation Overview . . . . . . . . . . . . . . . . . . . . . 8 78 2.1. Initiating an MPTCP Connection . . . . . . . . . . . . . 9 79 2.2. Associating a New Subflow with an Existing MPTCP 80 Connection . . . . . . . . . . . . . . . . . . . . . . . 10 81 2.3. Informing the Other Host about Another Potential Address 11 82 2.4. Data Transfer Using MPTCP . . . . . . . . . . . . . . . . 12 83 2.5. Requesting a Change in a Path's Priority . . . . . . . . 13 84 2.6. Closing an MPTCP Connection . . . . . . . . . . . . . . . 13 85 2.7. Notable Features . . . . . . . . . . . . . . . . . . . . 14 86 3. MPTCP Protocol . . . . . . . . . . . . . . . . . . . . . . . 15 87 3.1. Connection Initiation . . . . . . . . . . . . . . . . . . 16 88 3.2. Starting a New Subflow . . . . . . . . . . . . . . . . . 23 89 3.3. General MPTCP Operation . . . . . . . . . . . . . . . . . 28 90 3.3.1. Data Sequence Mapping . . . . . . . . . . . . . . . . 30 91 3.3.2. Data Acknowledgments . . . . . . . . . . . . . . . . 33 92 3.3.3. Closing a Connection . . . . . . . . . . . . . . . . 34 93 3.3.4. Receiver Considerations . . . . . . . . . . . . . . . 36 94 3.3.5. Sender Considerations . . . . . . . . . . . . . . . . 37 95 3.3.6. Reliability and Retransmissions . . . . . . . . . . . 38 96 3.3.7. Congestion Control Considerations . . . . . . . . . . 39 97 3.3.8. Subflow Policy . . . . . . . . . . . . . . . . . . . 39 98 3.4. Address Knowledge Exchange (Path Management) . . . . . . 40 99 3.4.1. Address Advertisement . . . . . . . . . . . . . . . . 42 100 3.4.2. Remove Address . . . . . . . . . . . . . . . . . . . 45 101 3.5. Fast Close . . . . . . . . . . . . . . . . . . . . . . . 46 102 3.6. Subflow Reset . . . . . . . . . . . . . . . . . . . . . . 48 103 3.7. Fallback . . . . . . . . . . . . . . . . . . . . . . . . 49 104 3.8. Error Handling . . . . . . . . . . . . . . . . . . . . . 53 105 3.9. Heuristics . . . . . . . . . . . . . . . . . . . . . . . 53 106 3.9.1. Port Usage . . . . . . . . . . . . . . . . . . . . . 54 107 3.9.2. Delayed Subflow Start and Subflow Symmetry . . . . . 54 108 3.9.3. Failure Handling . . . . . . . . . . . . . . . . . . 55 109 4. Semantic Issues . . . . . . . . . . . . . . . . . . . . . . . 56 110 5. Security Considerations . . . . . . . . . . . . . . . . . . . 57 111 6. Interactions with Middleboxes . . . . . . . . . . . . . . . . 60 112 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 63 113 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 64 114 8.1. MPTCP Option Subtypes . . . . . . . . . . . . . . . . . . 64 115 8.2. MPTCP Handshake Algorithms . . . . . . . . . . . . . . . 65 116 8.3. MP_TCPRST Reason Codes . . . . . . . . . . . . . . . . . 66 117 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 67 118 9.1. Normative References . . . . . . . . . . . . . . . . . . 67 119 9.2. Informative References . . . . . . . . . . . . . . . . . 68 120 Appendix A. Notes on Use of TCP Options . . . . . . . . . . . . 71 121 Appendix B. TCP Fast Open and MPTCP . . . . . . . . . . . . . . 72 122 B.1. TFO cookie request with MPTCP . . . . . . . . . . . . . . 72 123 B.2. Data sequence mapping under TFO . . . . . . . . . . . . . 73 124 B.3. Connection establishment examples . . . . . . . . . . . . 74 125 Appendix C. Control Blocks . . . . . . . . . . . . . . . . . . . 76 126 C.1. MPTCP Control Block . . . . . . . . . . . . . . . . . . . 76 127 C.1.1. Authentication and Metadata . . . . . . . . . . . . . 76 128 C.1.2. Sending Side . . . . . . . . . . . . . . . . . . . . 77 129 C.1.3. Receiving Side . . . . . . . . . . . . . . . . . . . 77 130 C.2. TCP Control Blocks . . . . . . . . . . . . . . . . . . . 77 131 C.2.1. Sending Side . . . . . . . . . . . . . . . . . . . . 78 132 C.2.2. Receiving Side . . . . . . . . . . . . . . . . . . . 78 133 Appendix D. Finite State Machine . . . . . . . . . . . . . . . . 78 134 Appendix E. Changes from RFC6824 . . . . . . . . . . . . . . . . 79 135 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 81 137 1. Introduction 139 Multipath TCP (MPTCP) is a set of extensions to regular TCP [RFC0793] 140 to provide a Multipath TCP [RFC6182] service, which enables a 141 transport connection to operate across multiple paths simultaneously. 142 This document presents the protocol changes required to add multipath 143 capability to TCP; specifically, those for signaling and setting up 144 multiple paths ("subflows"), managing these subflows, reassembly of 145 data, and termination of sessions. This is not the only information 146 required to create a Multipath TCP implementation, however. This 147 document is complemented by three others: 149 o Architecture [RFC6182], which explains the motivations behind 150 Multipath TCP, contains a discussion of high-level design 151 decisions on which this design is based, and an explanation of a 152 functional separation through which an extensible MPTCP 153 implementation can be developed. 155 o Congestion control [RFC6356] presents a safe congestion control 156 algorithm for coupling the behavior of the multiple paths in order 157 to "do no harm" to other network users. 159 o Application considerations [RFC6897] discusses what impact MPTCP 160 will have on applications, what applications will want to do with 161 MPTCP, and as a consequence of these factors, what API extensions 162 an MPTCP implementation should present. 164 This document is an update to, and obsoletes, the v0 specification of 165 Multipath TCP (RFC6824). This document specifies MPTCP v1, which is 166 not backward compatible with MPTCP v0. This document additionally 167 defines version negotiation procedures for implementations that 168 support both versions. 170 1.1. Design Assumptions 172 In order to limit the potentially huge design space, the mptcp 173 working group imposed two key constraints on the Multipath TCP design 174 presented in this document: 176 o It must be backwards-compatible with current, regular TCP, to 177 increase its chances of deployment. 179 o It can be assumed that one or both hosts are multihomed and 180 multiaddressed. 182 To simplify the design, we assume that the presence of multiple 183 addresses at a host is sufficient to indicate the existence of 184 multiple paths. These paths need not be entirely disjoint: they may 185 share one or many routers between them. Even in such a situation, 186 making use of multiple paths is beneficial, improving resource 187 utilization and resilience to a subset of node failures. The 188 congestion control algorithms defined in [RFC6356] ensure this does 189 not act detrimentally. Furthermore, there may be some scenarios 190 where different TCP ports on a single host can provide disjoint paths 191 (such as through certain Equal-Cost Multipath (ECMP) implementations 193 [RFC2992]), and so the MPTCP design also supports the use of ports in 194 path identifiers. 196 There are three aspects to the backwards-compatibility listed above 197 (discussed in more detail in [RFC6182]): 199 External Constraints: The protocol must function through the vast 200 majority of existing middleboxes such as NATs, firewalls, and 201 proxies, and as such must resemble existing TCP as far as possible 202 on the wire. Furthermore, the protocol must not assume the 203 segments it sends on the wire arrive unmodified at the 204 destination: they may be split or coalesced; TCP options may be 205 removed or duplicated. 207 Application Constraints: The protocol must be usable with no change 208 to existing applications that use the common TCP API (although it 209 is reasonable that not all features would be available to such 210 legacy applications). Furthermore, the protocol must provide the 211 same service model as regular TCP to the application. 213 Fallback: The protocol should be able to fall back to standard TCP 214 with no interference from the user, to be able to communicate with 215 legacy hosts. 217 The complementary application considerations document [RFC6897] 218 discusses the necessary features of an API to provide backwards- 219 compatibility, as well as API extensions to convey the behavior of 220 MPTCP at a level of control and information equivalent to that 221 available with regular, single-path TCP. 223 Further discussion of the design constraints and associated design 224 decisions are given in the MPTCP Architecture document [RFC6182] and 225 in [howhard]. 227 1.2. Multipath TCP in the Networking Stack 229 MPTCP operates at the transport layer and aims to be transparent to 230 both higher and lower layers. It is a set of additional features on 231 top of standard TCP; Figure 1 illustrates this layering. MPTCP is 232 designed to be usable by legacy applications with no changes; 233 detailed discussion of its interactions with applications is given in 234 [RFC6897]. 236 +-------------------------------+ 237 | Application | 238 +---------------+ +-------------------------------+ 239 | Application | | MPTCP | 240 +---------------+ + - - - - - - - + - - - - - - - + 241 | TCP | | Subflow (TCP) | Subflow (TCP) | 242 +---------------+ +-------------------------------+ 243 | IP | | IP | IP | 244 +---------------+ +-------------------------------+ 246 Figure 1: Comparison of Standard TCP and MPTCP Protocol Stacks 248 1.3. Terminology 250 This document makes use of a number of terms that are either MPTCP- 251 specific or have defined meaning in the context of MPTCP, as follows: 253 Path: A sequence of links between a sender and a receiver, defined 254 in this context by a 4-tuple of source and destination address/ 255 port pairs. 257 Subflow: A flow of TCP segments operating over an individual path, 258 which forms part of a larger MPTCP connection. A subflow is 259 started and terminated similar to a regular TCP connection. 261 (MPTCP) Connection: A set of one or more subflows, over which an 262 application can communicate between two hosts. There is a one-to- 263 one mapping between a connection and an application socket. 265 Data-level: The payload data is nominally transferred over a 266 connection, which in turn is transported over subflows. Thus, the 267 term "data-level" is synonymous with "connection level", in 268 contrast to "subflow-level", which refers to properties of an 269 individual subflow. 271 Token: A locally unique identifier given to a multipath connection 272 by a host. May also be referred to as a "Connection ID". 274 Host: An end host operating an MPTCP implementation, and either 275 initiating or accepting an MPTCP connection. 277 In addition to these terms, note that MPTCP's interpretation of, and 278 effect on, regular single-path TCP semantics are discussed in 279 Section 4. 281 1.4. MPTCP Concept 283 This section provides a high-level summary of normal operation of 284 MPTCP, and is illustrated by the scenario shown in Figure 2. A 285 detailed description of operation is given in Section 3. 287 o To a non-MPTCP-aware application, MPTCP will behave the same as 288 normal TCP. Extended APIs could provide additional control to 289 MPTCP-aware applications [RFC6897]. An application begins by 290 opening a TCP socket in the normal way. MPTCP signaling and 291 operation are handled by the MPTCP implementation. 293 o An MPTCP connection begins similarly to a regular TCP connection. 294 This is illustrated in Figure 2 where an MPTCP connection is 295 established between addresses A1 and B1 on Hosts A and B, 296 respectively. 298 o If extra paths are available, additional TCP sessions (termed 299 MPTCP "subflows") are created on these paths, and are combined 300 with the existing session, which continues to appear as a single 301 connection to the applications at both ends. The creation of the 302 additional TCP session is illustrated between Address A2 on Host A 303 and Address B1 on Host B. 305 o MPTCP identifies multiple paths by the presence of multiple 306 addresses at hosts. Combinations of these multiple addresses 307 equate to the additional paths. In the example, other potential 308 paths that could be set up are A1<->B2 and A2<->B2. Although this 309 additional session is shown as being initiated from A2, it could 310 equally have been initiated from B1 or B2. 312 o The discovery and setup of additional subflows will be achieved 313 through a path management method; this document describes a 314 mechanism by which a host can initiate new subflows by using its 315 own additional addresses, or by signaling its available addresses 316 to the other host. 318 o MPTCP adds connection-level sequence numbers to allow the 319 reassembly of segments arriving on multiple subflows with 320 differing network delays. 322 o Subflows are terminated as regular TCP connections, with a four- 323 way FIN handshake. The MPTCP connection is terminated by a 324 connection-level FIN. 326 Host A Host B 327 ------------------------ ------------------------ 328 Address A1 Address A2 Address B1 Address B2 329 ---------- ---------- ---------- ---------- 330 | | | | 331 | (initial connection setup) | | 332 |----------------------------------->| | 333 |<-----------------------------------| | 334 | | | | 335 | (additional subflow setup) | 336 | |--------------------->| | 337 | |<---------------------| | 338 | | | | 339 | | | | 341 Figure 2: Example MPTCP Usage Scenario 343 1.5. Requirements Language 345 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 346 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 347 "OPTIONAL" in this document are to be interpreted as described in 348 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 349 capitals, as shown here. 351 2. Operation Overview 353 This section presents a single description of common MPTCP operation, 354 with reference to the protocol operation. This is a high-level 355 overview of the key functions; the full specification follows in 356 Section 3. Extensibility and negotiated features are not discussed 357 here. Considerable reference is made to symbolic names of MPTCP 358 options throughout this section -- these are subtypes of the IANA- 359 assigned MPTCP option (see Section 8), and their formats are defined 360 in the detailed protocol specification that follows in Section 3. 362 A Multipath TCP connection provides a bidirectional bytestream 363 between two hosts communicating like normal TCP and, thus, does not 364 require any change to the applications. However, Multipath TCP 365 enables the hosts to use different paths with different IP addresses 366 to exchange packets belonging to the MPTCP connection. A Multipath 367 TCP connection appears like a normal TCP connection to an 368 application. However, to the network layer, each MPTCP subflow looks 369 like a regular TCP flow whose segments carry a new TCP option type. 370 Multipath TCP manages the creation, removal, and utilization of these 371 subflows to send data. The number of subflows that are managed 372 within a Multipath TCP connection is not fixed and it can fluctuate 373 during the lifetime of the Multipath TCP connection. 375 All MPTCP operations are signaled with a TCP option -- a single 376 numerical type for MPTCP, with "sub-types" for each MPTCP message. 377 What follows is a summary of the purpose and rationale of these 378 messages. 380 2.1. Initiating an MPTCP Connection 382 This is the same signaling as for initiating a normal TCP connection, 383 but the SYN, SYN/ACK, and initial ACK (and data) packets also carry 384 the MP_CAPABLE option. This option has a variable length and serves 385 multiple purposes. Firstly, it verifies whether the remote host 386 supports Multipath TCP; secondly, this option allows the hosts to 387 exchange some information to authenticate the establishment of 388 additional subflows. Further details are given in Section 3.1. 390 Host A Host B 391 ------ ------ 392 MP_CAPABLE -> 393 [flags] 394 <- MP_CAPABLE 395 [B's key, flags] 396 ACK + MP_CAPABLE (+ data) -> 397 [A's key, B's key, flags, (data-level details)] 399 Retransmission of the ACK + MP_CAPABLE can occur if it is not known 400 if it has been received. The following diagrams show all possible 401 exchanges for the initial subflow setup to ensure this reliability. 403 Host A (with data to send immediately) Host B 404 ------ ------ 405 MP_CAPABLE -> 406 [flags] 407 <- MP_CAPABLE 408 [B's key, flags] 409 ACK + MP_CAPABLE + data -> 410 [A's key, B's key, flags, data-level details] 412 Host A (with data to send later) Host B 413 ------ ------ 414 MP_CAPABLE -> 415 [flags] 416 <- MP_CAPABLE 417 [B's key, flags] 418 ACK + MP_CAPABLE -> 419 [A's key, B's key, flags] 421 ACK + MP_CAPABLE + data -> 422 [A's key, B's key, flags, data-level details] 424 Host A Host B (sending first) 425 ------ ------ 426 MP_CAPABLE -> 427 [flags] 428 <- MP_CAPABLE 429 [B's key, flags] 430 ACK + MP_CAPABLE -> 431 [A's key, B's key, flags] 433 <- ACK + DSS + data 434 [data-level details] 436 2.2. Associating a New Subflow with an Existing MPTCP Connection 438 The exchange of keys in the MP_CAPABLE handshake provides material 439 that can be used to authenticate the endpoints when new subflows will 440 be set up. Additional subflows begin in the same way as initiating a 441 normal TCP connection, but the SYN, SYN/ACK, and ACK packets also 442 carry the MP_JOIN option. 444 Host A initiates a new subflow between one of its addresses and one 445 of Host B's addresses. The token -- generated from the key -- is 446 used to identify which MPTCP connection it is joining, and the HMAC 447 is used for authentication. The Hash-based Message Authentication 448 Code (HMAC) uses the keys exchanged in the MP_CAPABLE handshake, and 449 the random numbers (nonces) exchanged in these MP_JOIN options. 450 MP_JOIN also contains flags and an Address ID that can be used to 451 refer to the source address without the sender needing to know if it 452 has been changed by a NAT. Further details are in Section 3.2. 454 Host A Host B 455 ------ ------ 456 MP_JOIN -> 457 [B's token, A's nonce, 458 A's Address ID, flags] 459 <- MP_JOIN 460 [B's HMAC, B's nonce, 461 B's Address ID, flags] 462 ACK + MP_JOIN -> 463 [A's HMAC] 465 <- ACK 467 2.3. Informing the Other Host about Another Potential Address 469 The set of IP addresses associated to a multihomed host may change 470 during the lifetime of an MPTCP connection. MPTCP supports the 471 addition and removal of addresses on a host both implicitly and 472 explicitly. If Host A has established a subflow starting at address/ 473 port pair IP#-A1 and wants to open a second subflow starting at 474 address/port pair IP#-A2, it simply initiates the establishment of 475 the subflow as explained above. The remote host will then be 476 implicitly informed about the new address. 478 In some circumstances, a host may want to advertise to the remote 479 host the availability of an address without establishing a new 480 subflow, for example, when a NAT prevents setup in one direction. In 481 the example below, Host A informs Host B about its alternative IP 482 address/port pair (IP#-A2). Host B may later send an MP_JOIN to this 483 new address. The ADD_ADDR option contains a HMAC to authenticate the 484 address as having been sent from the originator of the connection. 485 The receiver of this option echoes it back to the client to indicate 486 successful receipt. Further details are in Section 3.4.1. 488 Host A Host B 489 ------ ------ 490 ADD_ADDR -> 491 [Echo-flag=0, 492 IP#-A2, 493 IP#-A2's Address ID, 494 HMAC of IP#-A2] 496 <- ADD_ADDR 497 [Echo-flag=1, 498 IP#-A2, 499 IP#-A2's Address ID, 500 HMAC of IP#-A2] 502 There is a corresponding signal for address removal, making use of 503 the Address ID that is signaled in the add address handshake. 504 Further details in Section 3.4.2. 506 Host A Host B 507 ------ ------ 508 REMOVE_ADDR -> 509 [IP#-A2's Address ID] 511 2.4. Data Transfer Using MPTCP 513 To ensure reliable, in-order delivery of data over subflows that may 514 appear and disappear at any time, MPTCP uses a 64-bit data sequence 515 number (DSN) to number all data sent over the MPTCP connection. Each 516 subflow has its own 32-bit sequence number space, utilising the 517 regular TCP sequence number header, and an MPTCP option maps the 518 subflow sequence space to the data sequence space. In this way, data 519 can be retransmitted on different subflows (mapped to the same DSN) 520 in the event of failure. 522 The Data Sequence Signal (DSS) carries the Data Sequence Mapping. 523 The Data Sequence Mapping consists of the subflow sequence number, 524 data sequence number, and length for which this mapping is valid. 525 This option can also carry a connection-level acknowledgment (the 526 "Data ACK") for the received DSN. 528 With MPTCP, all subflows share the same receive buffer and advertise 529 the same receive window. There are two levels of acknowledgment in 530 MPTCP. Regular TCP acknowledgments are used on each subflow to 531 acknowledge the reception of the segments sent over the subflow 532 independently of their DSN. In addition, there are connection-level 533 acknowledgments for the data sequence space. These acknowledgments 534 track the advancement of the bytestream and slide the receiving 535 window. 537 Further details are in Section 3.3. 539 Host A Host B 540 ------ ------ 541 DSS -> 542 [Data Sequence Mapping] 543 [Data ACK] 544 [Checksum] 546 2.5. Requesting a Change in a Path's Priority 548 Hosts can indicate at initial subflow setup whether they wish the 549 subflow to be used as a regular or backup path -- a backup path only 550 being used if there are no regular paths available. During a 551 connection, Host A can request a change in the priority of a subflow 552 through the MP_PRIO signal to Host B. Further details are in 553 Section 3.3.8. 555 Host A Host B 556 ------ ------ 557 MP_PRIO -> 559 2.6. Closing an MPTCP Connection 561 When a host wants to close an existing subflow, but not the whole 562 connection, it can initiate a regular TCP FIN/ACK exchange. 564 When Host A wants to inform Host B that it has no more data to send, 565 it signals this "Data FIN" as part of the Data Sequence Signal (see 566 above). It has the same semantics and behavior as a regular TCP FIN, 567 but at the connection level. Once all the data on the MPTCP 568 connection has been successfully received, then this message is 569 acknowledged at the connection level with a Data ACK. Further 570 details are in Section 3.3.3. 572 Host A Host B 573 ------ ------ 574 DSS -> 575 [Data FIN] 576 <- DSS 577 [Data ACK] 579 There is an additional method of connection closure, referred to as 580 "Fast Close", which is analogous to closing a single-path TCP 581 connection with a RST signal. The MP_FASTCLOSE signal is used to 582 indicate to the peer that the connection will be abruptly closed and 583 no data will be accepted anymore. This can be used on an ACK 584 (ensuring reliability of the signal), or a RST (which is not). Both 585 examples are shown in the following diagrams. Further details are in 586 Section 3.5. 588 Host A Host B 589 ------ ------ 590 ACK + MP_FASTCLOSE -> 591 [B's key] 593 [RST on all other subflows] -> 595 <- [RST on all subflows] 597 Host A Host B 598 ------ ------ 599 RST + MP_FASTCLOSE -> 600 [B's key] [on all subflows] 602 <- [RST on all subflows] 604 2.7. Notable Features 606 It is worth highlighting that MPTCP's signaling has been designed 607 with several key requirements in mind: 609 o To cope with NATs on the path, addresses are referred to by 610 Address IDs, in case the IP packet's source address gets changed 611 by a NAT. Setting up a new TCP flow is not possible if the 612 receiver of the SYN is behind a NAT; to allow subflows to be 613 created when either end is behind a NAT, MPTCP uses the ADD_ADDR 614 message. 616 o MPTCP falls back to ordinary TCP if MPTCP operation is not 617 possible, for example, if one host is not MPTCP capable or if a 618 middlebox alters the payload. This is discussed in Section 3.7. 620 o To address the threats identified in [RFC6181], the following 621 steps are taken: keys are sent in the clear in the MP_CAPABLE 622 messages; MP_JOIN messages are secured with HMAC-SHA256 623 ([RFC2104], [RFC6234]) using those keys; and standard TCP validity 624 checks are made on the other messages (ensuring sequence numbers 625 are in-window [RFC5961]). Residual threats to MPTCP v0 were 626 identified in [RFC7430], and those affecting the protocol (i.e. 627 modification to ADD_ADDR) have been incorporated in this document. 628 Further discussion of security can be found in Section 5. 630 3. MPTCP Protocol 632 This section describes the operation of the MPTCP protocol, and is 633 subdivided into sections for each key part of the protocol operation. 635 All MPTCP operations are signaled using optional TCP header fields. 636 A single TCP option number ("Kind") has been assigned by IANA for 637 MPTCP (see Section 8), and then individual messages will be 638 determined by a "subtype", the values of which are also stored in an 639 IANA registry (and are also listed in Section 8). As with all TCP 640 options, the Length field is specified in bytes, and includes the 2 641 bytes of Kind and Length. 643 Throughout this document, when reference is made to an MPTCP option 644 by symbolic name, such as "MP_CAPABLE", this refers to a TCP option 645 with the single MPTCP option type, and with the subtype value of the 646 symbolic name as defined in Section 8. This subtype is a 4-bit field 647 -- the first 4 bits of the option payload, as shown in Figure 3. The 648 MPTCP messages are defined in the following sections. 650 1 2 3 651 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 652 +---------------+---------------+-------+-----------------------+ 653 | Kind | Length |Subtype| | 654 +---------------+---------------+-------+ | 655 | Subtype-specific data | 656 | (variable length) | 657 +---------------------------------------------------------------+ 659 Figure 3: MPTCP Option Format 661 Those MPTCP options associated with subflow initiation are used on 662 packets with the SYN flag set. Additionally, there is one MPTCP 663 option for signaling metadata to ensure segmented data can be 664 recombined for delivery to the application. 666 The remaining options, however, are signals that do not need to be on 667 a specific packet, such as those for signaling additional addresses. 668 Whilst an implementation may desire to send MPTCP options as soon as 669 possible, it may not be possible to combine all desired options (both 670 those for MPTCP and for regular TCP, such as SACK (selective 671 acknowledgment) [RFC2018]) on a single packet. Therefore, an 672 implementation may choose to send duplicate ACKs containing the 673 additional signaling information. This changes the semantics of a 674 duplicate ACK; these are usually only sent as a signal of a lost 675 segment [RFC5681] in regular TCP. Therefore, an MPTCP implementation 676 receiving a duplicate ACK that contains an MPTCP option MUST NOT 677 treat it as a signal of congestion. Additionally, an MPTCP 678 implementation SHOULD NOT send more than two duplicate ACKs in a row 679 for the purposes of sending MPTCP options alone, in order to ensure 680 no middleboxes misinterpret this as a sign of congestion. 682 Furthermore, standard TCP validity checks (such as ensuring the 683 sequence number and acknowledgment number are within window) MUST be 684 undertaken before processing any MPTCP signals, as described in 685 [RFC5961], and initial subflow sequence numbers SHOULD be generated 686 according to the recommendations in [RFC6528]. 688 3.1. Connection Initiation 690 Connection initiation begins with a SYN, SYN/ACK, ACK exchange on a 691 single path. Each packet contains the Multipath Capable (MP_CAPABLE) 692 MPTCP option (Figure 4). This option declares its sender is capable 693 of performing Multipath TCP and wishes to do so on this particular 694 connection. 696 The MP_CAPABLE exchange in this specification (v1) is different to 697 that specified in v0. If a host supports multiple versions of MPTCP, 698 the sender of the MP_CAPABLE option SHOULD signal the highest version 699 number it supports. In return, in its MP_CAPABLE option, the 700 receiver will signal the version number it wishes to use, which MUST 701 be equal to or lower than the version number indicated in the initial 702 MP_CAPABLE. There is a caveat though with respect to this version 703 negotiation with old listeners that only support v0. A listener that 704 supports v0 expects that the MP_CAPABLE option in the SYN-segment 705 includes the initiator's key. If the initiator however already 706 upgraded to v1, it won't include the key in the SYN-segment. Thus, 707 the listener will ignore the MP_CAPABLE of this SYN-segment and reply 708 with a SYN/ACK that does not include an MP_CAPABLE. The initiator 709 MAY choose to immediately fall back to TCP or MAY choose to attempt a 710 connection using MPTCP v0 (if the initiator supports v0), in order to 711 discover whether the listener supports the earlier version of MPTCP. 712 In general a MPTCP v0 connection is likely to be preferred to a TCP 713 one, however in a particular deployment scenario it may be known that 714 the listener is unlikely to support MPTCPv0 and so the initiator may 715 prefer not to attempt a v0 connection. An initiator MAY cache 716 information for a peer about what version of MPTCP it supports if 717 any, and use this information for future connection attempts. 719 The MP_CAPABLE option is variable-length, with different fields 720 included depending on which packet the option is used on. The full 721 MP_CAPABLE option is shown in Figure 4. 723 1 2 3 724 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 725 +---------------+---------------+-------+-------+---------------+ 726 | Kind | Length |Subtype|Version|A|B|C|D|E|F|G|H| 727 +---------------+---------------+-------+-------+---------------+ 728 | Option Sender's Key (64 bits) | 729 | (if option Length > 4) | 730 | | 731 +---------------------------------------------------------------+ 732 | Option Receiver's Key (64 bits) | 733 | (if option Length > 12) | 734 | | 735 +-------------------------------+-------------------------------+ 736 | Data-Level Length (16 bits) | Checksum (16 bits, optional) | 737 +-------------------------------+-------------------------------+ 739 Figure 4: Multipath Capable (MP_CAPABLE) Option 741 The MP_CAPABLE option is carried on the SYN, SYN/ACK, and ACK packets 742 that start the first subflow of an MPTCP connection, as well as the 743 first packet that carries data, if the initiator wishes to send 744 first. The data carried by each option is as follows, where A = 745 initiator and B = listener. 747 o SYN (A->B): only the first four octets (Length = 4). 749 o SYN/ACK (B->A): B's Key for this connection (Length = 12). 751 o ACK (no data) (A->B): A's Key followed by B's Key (Length = 20). 753 o ACK (with first data) (A->B): A's Key followed by B's Key followed 754 by Data-Level Length, and optional Checksum (Length = 22 or 24). 756 The contents of the option is determined by the SYN and ACK flags of 757 the packet, along with the option's length field. For the diagram 758 shown in Figure 4, "sender" and "receiver" refer to the sender or 759 receiver of the TCP packet (which can be either host). 761 The initial SYN, containing just the MP_CAPABLE header, is used to 762 define the version of MPTCP being requested, as well as exchanging 763 flags to negotiate connection features, described later. 765 This option is used to declare the 64-bit keys that the end hosts 766 have generated for this MPTCP connection. These keys are used to 767 authenticate the addition of future subflows to this connection. 768 This is the only time the key will be sent in clear on the wire 769 (unless "fast close", Section 3.5, is used); all future subflows will 770 identify the connection using a 32-bit "token". This token is a 771 cryptographic hash of this key. The algorithm for this process is 772 dependent on the authentication algorithm selected; the method of 773 selection is defined later in this section. 775 Upon reception of the initial SYN-segment, a stateful server 776 generates a random key and replies with a SYN/ACK. The key's method 777 of generation is implementation specific. The key MUST be hard to 778 guess, and it MUST be unique for the sending host across all its 779 current MPTCP connections. Recommendations for generating random 780 numbers for use in keys are given in [RFC4086]. Connections will be 781 indexed at each host by the token (a one-way hash of the key). 782 Therefore, an implementation will require a mapping from each token 783 to the corresponding connection, and in turn to the keys for the 784 connection. 786 There is a risk that two different keys will hash to the same token. 787 The risk of hash collisions is usually small, unless the host is 788 handling many tens of thousands of connections. Therefore, an 789 implementation SHOULD check its list of connection tokens to ensure 790 there is no collision before sending its key, and if there is, then 791 it should generate a new key. This would, however, be costly for a 792 server with thousands of connections. The subflow handshake 793 mechanism (Section 3.2) will ensure that new subflows only join the 794 correct connection, however, through the cryptographic handshake, as 795 well as checking the connection tokens in both directions, and 796 ensuring sequence numbers are in-window. So in the worst case if 797 there was a token collision, the new subflow would not succeed, but 798 the MPTCP connection would continue to provide a regular TCP service. 800 Since key generation is implementation-specific, there is no 801 requirement that they be simply random numbers. An implementation is 802 free to exchange cryptographic material out-of-band and generate 803 these keys from this, in order to provide additional mechanisms by 804 which to verify the identity of the communicating entities. For 805 example, an implementation could choose to link its MPTCP keys to 806 those used in higher-layer TLS or SSH connections. 808 If the server behaves in a stateless manner, it has to generate its 809 own key in a verifiable fashion. This verifiable way of generating 810 the key can be done by using a hash of the 4-tuple, sequence number 811 and a local secret (similar to what is done for the TCP-sequence 812 number [RFC4987]). It will thus be able to verify whether it is 813 indeed the originator of the key echoed back in the later MP_CAPABLE 814 option. As for a stateful server, the tokens SHOULD be checked for 815 uniqueness, however if uniqueness is not met, and there is no way to 816 generate an alternative verifiable key, then the connection MUST fall 817 back to using regular TCP by not sending a MP_CAPABLE in the SYN/ACK. 819 The ACK carries both A's key and B's key. This is the first time 820 that A's key is seen on the wire, although it is expected that A will 821 have generated a key locally before the initial SYN. The echoing of 822 B's key allows B to operate statelessly, as described above. 823 Therefore, A's key must be delivered reliably to B, and in order to 824 do this, the transmission of this packet must be made reliable. 826 If B has data to send first, then the reliable delivery of the 827 ACK+MP_CAPABLE can be inferred by the receipt of this data with a 828 MPTCP Data Sequence Signal (DSS) option (Section 3.3). If, however, 829 A wishes to send data first, it has two options to ensure the 830 reliable delivery of the ACK+MP_CAPABLE. If it immediately has data 831 to send, then the third ACK (with data) would also contain an 832 MP_CAPABLE option with additional data parameters (the Data-Level 833 Length and optional Checksum as shown in Figure 4). If A does not 834 immediately have data to send, it MUST include the MP_CAPABLE on the 835 third ACK, but without the additional data parameters. When A does 836 have data to send, it must repeat the sending of the MP_CAPABLE 837 option from the third ACK, with additional data parameters. This 838 MP_CAPABLE option is in place of the DSS, and simply specifies the 839 data-level length of the payload, and the checksum (if the use of 840 checksums is negotiated). This is the minimal data required to 841 establish a MPTCP connection - it allows validation of the payload, 842 and given it is the first data, the Initial Data Sequence Number 843 (IDSN) is also known (as it is generated from the key, as described 844 below). Conveying the keys on the first data packet allows the TCP 845 reliability mechanisms to ensure the packet is successfully 846 delivered. The receiver will acknowledge this data at the connection 847 level with a Data ACK, as if a DSS option has been received. 849 There could be situations where both A and B attempt to transmit 850 initial data at the same time. For example, if A did not initially 851 have data to send, but then needed to transmit data before it had 852 received anything from B, it would use a MP_CAPABLE option with data 853 parameters (since it would not know if the MP_CAPABLE on the ACK was 854 received). In such a situation, B may also have transmitted data 855 with a DSS option, but it had not yet been received at A. Therefore, 856 B has received data with a MP_CAPABLE mapping after it has sent data 857 with a DSS option. To ensure these situations can be handled, it 858 follows that the data parameters in a MP_CAPABLE are semantically 859 equivalent to those in a DSS option and can be used interchangeably. 860 Similar situations could occur when the MP_CAPABLE with data is lost 861 and retransmitted. Furthermore, in the case of TCP Segmentation 862 Offloading, the MP_CAPABLE with data parameters may be duplicated 863 across multiple packets, and implementations must also be able to 864 cope with duplicate MP_CAPABLE mappings as well as duplicate DSS 865 mappings. 867 Additionally, the MP_CAPABLE exchange allows the safe passage of 868 MPTCP options on SYN packets to be determined. If any of these 869 options are dropped, MPTCP will gracefully fall back to regular 870 single-path TCP, as documented in Section 3.7. If at any point in 871 the handshake either party thinks the MPTCP negotiation is 872 compromised, for example by a middlebox corrupting the TCP options, 873 or unexpected ACK numbers being present, the host MUST stop using 874 MPTCP and no longer include MPTCP options in future TCP packets. The 875 other host will then also fall back to regular TCP using the fall 876 back mechanism. Note that new subflows MUST NOT be established 877 (using the process documented in Section 3.2) until a Data Sequence 878 Signal (DSS) option has been successfully received across the path 879 (as documented in Section 3.3). 881 Like all MPTCP options, the MP_CAPABLE option starts with the Kind 882 and Length to specify the TCP-option kind and its length. Followed 883 by that is the MP_CAPABLE option. The first 4 bits of the first 884 octet in the MP_CAPABLE option (Figure 4) define the MPTCP option 885 subtype (see Section 8; for MP_CAPABLE, this is 0x0), and the 886 remaining 4 bits of this octet specify the MPTCP version in use (for 887 this specification, this is 1). 889 The second octet is reserved for flags, allocated as follows: 891 A: The leftmost bit, labeled "A", SHOULD be set to 1 to indicate 892 "Checksum Required", unless the system administrator has decided 893 that checksums are not required (for example, if the environment 894 is controlled and no middleboxes exist that might adjust the 895 payload). 897 B: The second bit, labeled "B", is an extensibility flag, and MUST be 898 set to 0 for current implementations. This will be used for an 899 extensibility mechanism in a future specification, and the impact 900 of this flag will be defined at a later date. It is expected, but 901 not mandated, that this flag would be used as part of an 902 alternative security mechanism that does not require a full 903 version upgrade of the protocol, but does require redefining some 904 elements of the handshake. If receiving a message with the 'B' 905 flag set to 1, and this is not understood, then the MP_CAPABLE in 906 this SYN MUST be silently ignored, which triggers a fallback to 907 regular TCP; the sender is expected to retry with a format 908 compatible with this legacy specification. Note that the length 909 of the MP_CAPABLE option, and the meanings of bits "D" through 910 "H", may be altered by setting B=1. 912 C: The third bit, labeled "C", is set to "1" to indicate that the 913 sender of this option will not accept additional MPTCP subflows to 914 the source address and port, and therefore the receiver MUST NOT 915 try to open any additional subflows towards this address and port. 916 This is an efficiency improvement for situations where the sender 917 knows a restriction is in place, for example if the sender is 918 behind a strict NAT, or operating behind a legacy Layer 4 load 919 balancer. 921 D through H: The remaining bits, labeled "D" through "H", are used 922 for crypto algorithm negotiation. In this specification only the 923 rightmost bit, labeled "H", is assigned. Bit "H" indicates the 924 use of HMAC-SHA256 (as defined in Section 3.2). An implementation 925 that only supports this method MUST set bit "H" to 1, and bits "D" 926 through "G" to 0. 928 A crypto algorithm MUST be specified. If flag bits D through H are 929 all 0, the MP_CAPABLE option MUST be treated as invalid and ignored 930 (that is, it must be treated as a regular TCP handshake). 932 The selection of the authentication algorithm also impacts the 933 algorithm used to generate the token and the Initial Data Sequence 934 Number (IDSN). In this specification, with only the SHA-256 935 algorithm (bit "H") specified and selected, the token MUST be a 936 truncated (most significant 32 bits) SHA-256 hash ([RFC6234]) of the 937 key. A different, 64-bit truncation (the least significant 64 bits) 938 of the SHA-256 hash of the key MUST be used as the IDSN. Note that 939 the key MUST be hashed in network byte order. Also note that the 940 "least significant" bits MUST be the rightmost bits of the SHA-256 941 digest, as per [RFC6234]. Future specifications of the use of the 942 crypto bits may choose to specify different algorithms for token and 943 IDSN generation. 945 Both the crypto and checksum bits negotiate capabilities in similar 946 ways. For the Checksum Required bit (labeled "A"), if either host 947 requires the use of checksums, checksums MUST be used. In other 948 words, the only way for checksums not to be used is if both hosts in 949 their SYNs set A=0. This decision is confirmed by the setting of the 950 "A" bit in the third packet (the ACK) of the handshake. For example, 951 if the initiator sets A=0 in the SYN, but the responder sets A=1 in 952 the SYN/ACK, checksums MUST be used in both directions, and the 953 initiator will set A=1 in the ACK. The decision whether to use 954 checksums will be stored by an implementation in a per-connection 955 binary state variable. If A=1 is received by a host that does not 956 want to use checksums, it MUST fall back to regular TCP by ignoring 957 the MP_CAPABLE option as if it was invalid. 959 For crypto negotiation, the responder has the choice. The initiator 960 creates a proposal setting a bit for each algorithm it supports to 1 961 (in this version of the specification, there is only one proposal, so 962 bit "H" will be always set to 1). The responder responds with only 1 963 bit set -- this is the chosen algorithm. The rationale for this 964 behavior is that the responder will typically be a server with 965 potentially many thousands of connections, so it may wish to choose 966 an algorithm with minimal computational complexity, depending on the 967 load. If a responder does not support (or does not want to support) 968 any of the initiator's proposals, it MUST respond without an 969 MP_CAPABLE option, thus forcing a fallback to regular TCP. 971 The MP_CAPABLE option is only used in the first subflow of a 972 connection, in order to identify the connection; all following 973 subflows will use the "Join" option (see Section 3.2) to join the 974 existing connection. 976 If a SYN contains an MP_CAPABLE option but the SYN/ACK does not, it 977 is assumed that sender of the SYN/ACK is not multipath capable; thus, 978 the MPTCP session MUST operate as a regular, single-path TCP. If a 979 SYN does not contain a MP_CAPABLE option, the SYN/ACK MUST NOT 980 contain one in response. If the third packet (the ACK) does not 981 contain the MP_CAPABLE option, then the session MUST fall back to 982 operating as a regular, single-path TCP. This is to maintain 983 compatibility with middleboxes on the path that drop some or all TCP 984 options. Note that an implementation MAY choose to attempt sending 985 MPTCP options more than one time before making this decision to 986 operate as regular TCP (see Section 3.9). 988 If the SYN packets are unacknowledged, it is up to local policy to 989 decide how to respond. It is expected that a sender will eventually 990 fall back to single-path TCP (i.e., without the MP_CAPABLE option) in 991 order to work around middleboxes that may drop packets with unknown 992 options; however, the number of multipath-capable attempts that are 993 made first will be up to local policy. It is possible that MPTCP and 994 non-MPTCP SYNs could get reordered in the network. Therefore, the 995 final state is inferred from the presence or absence of the 996 MP_CAPABLE option in the third packet of the TCP handshake. If this 997 option is not present, the connection SHOULD fall back to regular 998 TCP, as documented in Section 3.7. 1000 The initial data sequence number on an MPTCP connection is generated 1001 from the key. The algorithm for IDSN generation is also determined 1002 from the negotiated authentication algorithm. In this specification, 1003 with only the SHA-256 algorithm specified and selected, the IDSN of a 1004 host MUST be the least significant 64 bits of the SHA-256 hash of its 1005 key, i.e., IDSN-A = Hash(Key-A) and IDSN-B = Hash(Key-B). This 1006 deterministic generation of the IDSN allows a receiver to ensure that 1007 there are no gaps in sequence space at the start of the connection. 1008 The SYN with MP_CAPABLE occupies the first octet of data sequence 1009 space, although this does not need to be acknowledged at the 1010 connection level until the first data is sent (see Section 3.3). 1012 3.2. Starting a New Subflow 1014 Once an MPTCP connection has begun with the MP_CAPABLE exchange, 1015 further subflows can be added to the connection. Hosts have 1016 knowledge of their own address(es), and can become aware of the other 1017 host's addresses through signaling exchanges as described in 1018 Section 3.4. Using this knowledge, a host can initiate a new subflow 1019 over a currently unused pair of addresses. It is permitted for 1020 either host in a connection to initiate the creation of a new 1021 subflow, but it is expected that this will normally be the original 1022 connection initiator (see Section 3.9 for heuristics). 1024 A new subflow is started as a normal TCP SYN/ACK exchange. The Join 1025 Connection (MP_JOIN) MPTCP option is used to identify the connection 1026 to be joined by the new subflow. It uses keying material that was 1027 exchanged in the initial MP_CAPABLE handshake (Section 3.1), and that 1028 handshake also negotiates the crypto algorithm in use for the MP_JOIN 1029 handshake. 1031 This section specifies the behavior of MP_JOIN using the HMAC-SHA256 1032 algorithm. An MP_JOIN option is present in the SYN, SYN/ACK, and ACK 1033 of the three-way handshake, although in each case with a different 1034 format. 1036 In the first MP_JOIN on the SYN packet, illustrated in Figure 5, the 1037 initiator sends a token, random number, and address ID. 1039 The token is used to identify the MPTCP connection and is a 1040 cryptographic hash of the receiver's key, as exchanged in the initial 1041 MP_CAPABLE handshake (Section 3.1). In this specification, the 1042 tokens presented in this option are generated by the SHA-256 1043 [RFC6234] algorithm, truncated to the most significant 32 bits. The 1044 token included in the MP_JOIN option is the token that the receiver 1045 of the packet uses to identify this connection; i.e., Host A will 1046 send Token-B (which is generated from Key-B). Note that the hash 1047 generation algorithm can be overridden by the choice of cryptographic 1048 handshake algorithm, as defined in Section 3.1. 1050 The MP_JOIN SYN sends not only the token (which is static for a 1051 connection) but also random numbers (nonces) that are used to prevent 1052 replay attacks on the authentication method. Recommendations for the 1053 generation of random numbers for this purpose are given in [RFC4086]. 1055 The MP_JOIN option includes an "Address ID". This is an identifier 1056 generated by the sender of the option, used to identify the source 1057 address of this packet, even if the IP header has been changed in 1058 transit by a middlebox. The numeric value of this field is generated 1059 by the sender and must map uniquely to a source IP address for the 1060 sending host. The Address ID allows address removal (Section 3.4.2) 1061 without needing to know what the source address at the receiver is, 1062 thus allowing address removal through NATs. The Address ID also 1063 allows correlation between new subflow setup attempts and address 1064 signaling (Section 3.4.1), to prevent setting up duplicate subflows 1065 on the same path, if an MP_JOIN and ADD_ADDR are sent at the same 1066 time. 1068 The Address IDs of the subflow used in the initial SYN exchange of 1069 the first subflow in the connection are implicit, and have the value 1070 zero. A host MUST store the mappings between Address IDs and 1071 addresses both for itself and the remote host. An implementation 1072 will also need to know which local and remote Address IDs are 1073 associated with which established subflows, for when addresses are 1074 removed from a local or remote host. 1076 The MP_JOIN option on packets with the SYN flag set also includes 4 1077 bits of flags, 3 of which are currently reserved and MUST be set to 1078 zero by the sender. The final bit, labeled "B", indicates whether 1079 the sender of this option wishes this subflow to be used as a backup 1080 path (B=1) in the event of failure of other paths, or whether it 1081 wants it to be used as part of the connection immediately. By 1082 setting B=1, the sender of the option is requesting the other host to 1083 only send data on this subflow if there are no available subflows 1084 where B=0. Subflow policy is discussed in more detail in 1085 Section 3.3.8. 1087 1 2 3 1088 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1089 +---------------+---------------+-------+-----+-+---------------+ 1090 | Kind | Length = 12 |Subtype|(rsv)|B| Address ID | 1091 +---------------+---------------+-------+-----+-+---------------+ 1092 | Receiver's Token (32 bits) | 1093 +---------------------------------------------------------------+ 1094 | Sender's Random Number (32 bits) | 1095 +---------------------------------------------------------------+ 1097 Figure 5: Join Connection (MP_JOIN) Option (for Initial SYN) 1099 When receiving a SYN with an MP_JOIN option that contains a valid 1100 token for an existing MPTCP connection, the recipient SHOULD respond 1101 with a SYN/ACK also containing an MP_JOIN option containing a random 1102 number and a truncated (leftmost 64 bits) Hash-based Message 1103 Authentication Code (HMAC). This version of the option is shown in 1104 Figure 6. If the token is unknown, or the host wants to refuse 1105 subflow establishment (for example, due to a limit on the number of 1106 subflows it will permit), the receiver will send back a reset (RST) 1107 signal, analogous to an unknown port in TCP, containing a MP_TCPRST 1108 option (Section 3.6) with a "MPTCP specific error" reason code. 1109 Although calculating an HMAC requires cryptographic operations, it is 1110 believed that the 32-bit token in the MP_JOIN SYN gives sufficient 1111 protection against blind state exhaustion attacks; therefore, there 1112 is no need to provide mechanisms to allow a responder to operate 1113 statelessly at the MP_JOIN stage. 1115 An HMAC is sent by both hosts -- by the initiator (Host A) in the 1116 third packet (the ACK) and by the responder (Host B) in the second 1117 packet (the SYN/ACK). Doing the HMAC exchange at this stage allows 1118 both hosts to have first exchanged random data (in the first two SYN 1119 packets) that is used as the "message". This specification defines 1120 that HMAC as defined in [RFC2104] is used, along with the SHA-256 1121 hash algorithm [RFC6234], and that the output is truncated to the 1122 leftmost 160 bits (20 octets). Due to option space limitations, the 1123 HMAC included in the SYN/ACK is truncated to the leftmost 64 bits, 1124 but this is acceptable since random numbers are used; thus, an 1125 attacker only has one chance to correctly guess the HMAC that matches 1126 the random number previously sent by the peer (if the HMAC is 1127 incorrect, the TCP connection is closed, so a new MP_JOIN negotiation 1128 with a new random number is required). 1130 The initiator's authentication information is sent in its first ACK 1131 (the third packet of the handshake), as shown in Figure 7. This data 1132 needs to be sent reliably, since it is the only time this HMAC is 1133 sent; therefore, receipt of this packet MUST trigger a regular TCP 1134 ACK in response, and the packet MUST be retransmitted if this ACK is 1135 not received. In other words, sending the ACK/MP_JOIN packet places 1136 the subflow in the PRE_ESTABLISHED state, and it moves to the 1137 ESTABLISHED state only on receipt of an ACK from the receiver. It is 1138 not permitted to send data while in the PRE_ESTABLISHED state. The 1139 reserved bits in this option MUST be set to zero by the sender. 1141 The key for the HMAC algorithm, in the case of the message 1142 transmitted by Host A, will be Key-A followed by Key-B, and in the 1143 case of Host B, Key-B followed by Key-A. These are the keys that 1144 were exchanged in the original MP_CAPABLE handshake. The "message" 1145 for the HMAC algorithm in each case is the concatenations of random 1146 number for each host (denoted by R): for Host A, R-A followed by R-B; 1147 and for Host B, R-B followed by R-A. 1149 1 2 3 1150 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1151 +---------------+---------------+-------+-----+-+---------------+ 1152 | Kind | Length = 16 |Subtype|(rsv)|B| Address ID | 1153 +---------------+---------------+-------+-----+-+---------------+ 1154 | | 1155 | Sender's Truncated HMAC (64 bits) | 1156 | | 1157 +---------------------------------------------------------------+ 1158 | Sender's Random Number (32 bits) | 1159 +---------------------------------------------------------------+ 1161 Figure 6: Join Connection (MP_JOIN) Option (for Responding SYN/ACK) 1163 1 2 3 1164 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1165 +---------------+---------------+-------+-----------------------+ 1166 | Kind | Length = 24 |Subtype| (reserved) | 1167 +---------------+---------------+-------+-----------------------+ 1168 | | 1169 | | 1170 | Sender's Truncated HMAC (160 bits) | 1171 | | 1172 | | 1173 +---------------------------------------------------------------+ 1175 Figure 7: Join Connection (MP_JOIN) Option (for Third ACK) 1177 These various MPTCP options fit together to enable authenticated 1178 subflow setup as illustrated in Figure 8. 1180 Host A Host B 1181 ------------------------ ---------- 1182 Address A1 Address A2 Address B1 1183 ---------- ---------- ---------- 1184 | | | 1185 | | SYN + MP_CAPABLE | 1186 |--------------------------------------------->| 1187 |<---------------------------------------------| 1188 | SYN/ACK + MP_CAPABLE(Key-B) | 1189 | | | 1190 | ACK + MP_CAPABLE(Key-A, Key-B) | 1191 |--------------------------------------------->| 1192 | | | 1193 | | SYN + MP_JOIN(Token-B, R-A) | 1194 | |------------------------------->| 1195 | |<-------------------------------| 1196 | | SYN/ACK + MP_JOIN(HMAC-B, R-B) | 1197 | | | 1198 | | ACK + MP_JOIN(HMAC-A) | 1199 | |------------------------------->| 1200 | |<-------------------------------| 1201 | | ACK | 1203 HMAC-A = HMAC(Key=(Key-A+Key-B), Msg=(R-A+R-B)) 1204 HMAC-B = HMAC(Key=(Key-B+Key-A), Msg=(R-B+R-A)) 1206 Figure 8: Example Use of MPTCP Authentication 1208 If the token received at Host B is unknown or local policy prohibits 1209 the acceptance of the new subflow, the recipient MUST respond with a 1210 TCP RST for the subflow. If appropriate, a MP_TCPRST option with a 1211 "Administratively prohibited" reason code (Section 3.6) should be 1212 included. 1214 If the token is accepted at Host B, but the HMAC returned to Host A 1215 does not match the one expected, Host A MUST close the subflow with a 1216 TCP RST. In this, and all following cases of sending a RST in this 1217 section, the sender SHOULD send a MP_TCPRST option (Section 3.6) on 1218 this RST packet with the reason code for a "MPTCP specific error". 1220 If Host B does not receive the expected HMAC, or the MP_JOIN option 1221 is missing from the ACK, it MUST close the subflow with a TCP RST. 1223 If the HMACs are verified as correct, then both hosts have verified 1224 each other as being the same peers as existed at the start of the 1225 connection, and they have agreed of which connection this subflow 1226 will become a part. 1228 If the SYN/ACK as received at Host A does not have an MP_JOIN option, 1229 Host A MUST close the subflow with a TCP RST. 1231 This covers all cases of the loss of an MP_JOIN. In more detail, if 1232 MP_JOIN is stripped from the SYN on the path from A to B, and Host B 1233 does not have a listener on the relevant port, it will respond with a 1234 RST in the normal way. If in response to a SYN with an MP_JOIN 1235 option, a SYN/ACK is received without the MP_JOIN option (either 1236 since it was stripped on the return path, or it was stripped on the 1237 outgoing path but Host B responded as if it were a new regular TCP 1238 session), then the subflow is unusable and Host A MUST close it with 1239 a RST. 1241 Note that additional subflows can be created between any pair of 1242 ports (but see Section 3.9 for heuristics); no explicit application- 1243 level accept calls or bind calls are required to open additional 1244 subflows. To associate a new subflow with an existing connection, 1245 the token supplied in the subflow's SYN exchange is used for 1246 demultiplexing. This then binds the 5-tuple of the TCP subflow to 1247 the local token of the connection. A consequence is that it is 1248 possible to allow any port pairs to be used for a connection. 1250 Demultiplexing subflow SYNs MUST be done using the token; this is 1251 unlike traditional TCP, where the destination port is used for 1252 demultiplexing SYN packets. Once a subflow is set up, demultiplexing 1253 packets is done using the 5-tuple, as in traditional TCP. The 1254 5-tuples will be mapped to the local connection identifier (token). 1255 Note that Host A will know its local token for the subflow even 1256 though it is not sent on the wire -- only the responder's token is 1257 sent. 1259 3.3. General MPTCP Operation 1261 This section discusses operation of MPTCP for data transfer. At a 1262 high level, an MPTCP implementation will take one input data stream 1263 from an application, and split it into one or more subflows, with 1264 sufficient control information to allow it to be reassembled and 1265 delivered reliably and in order to the recipient application. The 1266 following subsections define this behavior in detail. 1268 The data sequence mapping and the Data ACK are signaled in the Data 1269 Sequence Signal (DSS) option (Figure 9). Either or both can be 1270 signaled in one DSS, depending on the flags set. The data sequence 1271 mapping defines how the sequence space on the subflow maps to the 1272 connection level, and the Data ACK acknowledges receipt of data at 1273 the connection level. These functions are described in more detail 1274 in the following two subsections. 1276 1 2 3 1277 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1278 +---------------+---------------+-------+----------------------+ 1279 | Kind | Length |Subtype| (reserved) |F|m|M|a|A| 1280 +---------------+---------------+-------+----------------------+ 1281 | Data ACK (4 or 8 octets, depending on flags) | 1282 +--------------------------------------------------------------+ 1283 | Data sequence number (4 or 8 octets, depending on flags) | 1284 +--------------------------------------------------------------+ 1285 | Subflow Sequence Number (4 octets) | 1286 +-------------------------------+------------------------------+ 1287 | Data-Level Length (2 octets) | Checksum (2 octets) | 1288 +-------------------------------+------------------------------+ 1290 Figure 9: Data Sequence Signal (DSS) Option 1292 The flags, when set, define the contents of this option, as follows: 1294 o A = Data ACK present 1296 o a = Data ACK is 8 octets (if not set, Data ACK is 4 octets) 1298 o M = Data Sequence Number (DSN), Subflow Sequence Number (SSN), 1299 Data-Level Length, and Checksum (if negotiated) present 1301 o m = Data sequence number is 8 octets (if not set, DSN is 4 octets) 1303 The flags 'a' and 'm' only have meaning if the corresponding 'A' or 1304 'M' flags are set; otherwise, they will be ignored. The maximum 1305 length of this option, with all flags set, is 28 octets. 1307 The 'F' flag indicates "Data FIN". If present, this means that this 1308 mapping covers the final data from the sender. This is the 1309 connection-level equivalent to the FIN flag in single-path TCP. A 1310 connection is not closed unless there has been a Data FIN exchange, a 1311 MP_FASTCLOSE (Section 3.5) message, or an implementation-specific, 1312 connection-level send timeout. The purpose of the Data FIN and the 1313 interactions between this flag, the subflow-level FIN flag, and the 1314 data sequence mapping are described in Section 3.3.3. The remaining 1315 reserved bits MUST be set to zero by an implementation of this 1316 specification. 1318 Note that the checksum is only present in this option if the use of 1319 MPTCP checksumming has been negotiated at the MP_CAPABLE handshake 1320 (see Section 3.1). The presence of the checksum can be inferred from 1321 the length of the option. If a checksum is present, but its use had 1322 not been negotiated in the MP_CAPABLE handshake, the receiver MUST 1323 close the subflow with a RST as it not behaving as negotiated. If a 1324 checksum is not present when its use has been negotiated, the 1325 receiver MUST close the subflow with a RST as it is considered 1326 broken. In both cases, this RST SHOULD be accompanied with a 1327 MP_TCPRST option (Section 3.6) with the reason code for a "MPTCP 1328 specific error". 1330 3.3.1. Data Sequence Mapping 1332 The data stream as a whole can be reassembled through the use of the 1333 data sequence mapping components of the DSS option (Figure 9), which 1334 define the mapping from the subflow sequence number to the data 1335 sequence number. This is used by the receiver to ensure in-order 1336 delivery to the application layer. Meanwhile, the subflow-level 1337 sequence numbers (i.e., the regular sequence numbers in the TCP 1338 header) have subflow-only relevance. It is expected (but not 1339 mandated) that SACK [RFC2018] is used at the subflow level to improve 1340 efficiency. 1342 The data sequence mapping specifies a mapping from subflow sequence 1343 space to data sequence space. This is expressed in terms of starting 1344 sequence numbers for the subflow and the data level, and a length of 1345 bytes for which this mapping is valid. This explicit mapping for a 1346 range of data was chosen rather than per-packet signaling to assist 1347 with compatibility with situations where TCP/IP segmentation or 1348 coalescing is undertaken separately from the stack that is generating 1349 the data flow (e.g., through the use of TCP segmentation offloading 1350 on network interface cards, or by middleboxes such as performance 1351 enhancing proxies). It also allows a single mapping to cover many 1352 packets, which may be useful in bulk transfer situations. 1354 A mapping is fixed, in that the subflow sequence number is bound to 1355 the data sequence number after the mapping has been processed. A 1356 sender MUST NOT change this mapping after it has been declared; 1357 however, the same data sequence number can be mapped to by different 1358 subflows for retransmission purposes (see Section 3.3.6). This would 1359 also permit the same data to be sent simultaneously on multiple 1360 subflows for resilience or efficiency purposes, especially in the 1361 case of lossy links. Although the detailed specification of such 1362 operation is outside the scope of this document, an implementation 1363 SHOULD treat the first data that is received at a subflow for the 1364 data sequence space as that which should be delivered to the 1365 application, and any later data for that sequence space SHOULD be 1366 ignored. 1368 The data sequence number is specified as an absolute value, whereas 1369 the subflow sequence numbering is relative (the SYN at the start of 1370 the subflow has relative subflow sequence number 0). This is to 1371 allow middleboxes to change the initial sequence number of a subflow, 1372 such as firewalls that undertake Initial Sequence Number (ISN) 1373 randomization. 1375 The data sequence mapping also contains a checksum of the data that 1376 this mapping covers, if use of checksums has been negotiated at the 1377 MP_CAPABLE exchange. Checksums are used to detect if the payload has 1378 been adjusted in any way by a non-MPTCP-aware middlebox. If this 1379 checksum fails, it will trigger a failure of the subflow, or a 1380 fallback to regular TCP, as documented in Section 3.7, since MPTCP 1381 can no longer reliably know the subflow sequence space at the 1382 receiver to build data sequence mappings. Without checksumming 1383 enabled, corrupt data may be delivered to the application if a 1384 middlebox alters segment boundaries, alters content, or does not 1385 deliver all segments covered by a data sequence mapping. It is 1386 therefore RECOMMENDED to use checksumming unless it is known the 1387 network path contains no such devices. 1389 The checksum algorithm used is the standard TCP checksum [RFC0793], 1390 operating over the data covered by this mapping, along with a pseudo- 1391 header as shown in Figure 10. 1393 1 2 3 1394 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1395 +--------------------------------------------------------------+ 1396 | | 1397 | Data Sequence Number (8 octets) | 1398 | | 1399 +--------------------------------------------------------------+ 1400 | Subflow Sequence Number (4 octets) | 1401 +-------------------------------+------------------------------+ 1402 | Data-Level Length (2 octets) | Zeros (2 octets) | 1403 +-------------------------------+------------------------------+ 1405 Figure 10: Pseudo-Header for DSS Checksum 1407 Note that the data sequence number used in the pseudo-header is 1408 always the 64-bit value, irrespective of what length is used in the 1409 DSS option itself. The standard TCP checksum algorithm has been 1410 chosen since it will be calculated anyway for the TCP subflow, and if 1411 calculated first over the data before adding the pseudo-headers, it 1412 only needs to be calculated once. Furthermore, since the TCP 1413 checksum is additive, the checksum for a DSN_MAP can be constructed 1414 by simply adding together the checksums for the data of each 1415 constituent TCP segment, and adding the checksum for the DSS pseudo- 1416 header. 1418 Note that checksumming relies on the TCP subflow containing 1419 contiguous data; therefore, a TCP subflow MUST NOT use the Urgent 1420 Pointer to interrupt an existing mapping. Further note, however, 1421 that if Urgent data is received on a subflow, it SHOULD be mapped to 1422 the data sequence space and delivered to the application analogous to 1423 Urgent data in regular TCP. 1425 To avoid possible deadlock scenarios, subflow-level processing should 1426 be undertaken separately from that at connection level. Therefore, 1427 even if a mapping does not exist from the subflow space to the data- 1428 level space, the data SHOULD still be ACKed at the subflow (if it is 1429 in-window). This data cannot, however, be acknowledged at the data 1430 level (Section 3.3.2) because its data sequence numbers are unknown. 1431 Implementations MAY hold onto such unmapped data for a short while in 1432 the expectation that a mapping will arrive shortly. Such unmapped 1433 data cannot be counted as being within the connection level receive 1434 window because this is relative to the data sequence numbers, so if 1435 the receiver runs out of memory to hold this data, it will have to be 1436 discarded. If a mapping for that subflow-level sequence space does 1437 not arrive within a receive window of data, that subflow SHOULD be 1438 treated as broken, closed with a RST, and any unmapped data silently 1439 discarded. 1441 Data sequence numbers are always 64-bit quantities, and MUST be 1442 maintained as such in implementations. If a connection is 1443 progressing at a slow rate, so protection against wrapped sequence 1444 numbers is not required, then an implementation MAY include just the 1445 lower 32 bits of the data sequence number in the data sequence 1446 mapping and/or Data ACK as an optimization, and an implementation can 1447 make this choice independently for each packet. An implementation 1448 MUST be able to receive and process both 64-bit or 32-bit sequence 1449 number values, but it is not required that an implementation is able 1450 to send both. 1452 An implementation MUST send the full 64-bit data sequence number if 1453 it is transmitting at a sufficiently high rate that the 32-bit value 1454 could wrap within the Maximum Segment Lifetime (MSL) [RFC7323]. The 1455 lengths of the DSNs used in these values (which may be different) are 1456 declared with flags in the DSS option. Implementations MUST accept a 1457 32-bit DSN and implicitly promote it to a 64-bit quantity by 1458 incrementing the upper 32 bits of sequence number each time the lower 1459 32 bits wrap. A sanity check MUST be implemented to ensure that a 1460 wrap occurs at an expected time (e.g., the sequence number jumps from 1461 a very high number to a very low number) and is not triggered by out- 1462 of-order packets. 1464 As with the standard TCP sequence number, the data sequence number 1465 should not start at zero, but at a random value to make blind session 1466 hijacking harder. This specification requires setting the initial 1467 data sequence number (IDSN) of each host to the least significant 64 1468 bits of the SHA-256 hash of the host's key, as described in 1469 Section 3.1. This is required also in order for the receiver to know 1470 what the expected IDSN is, and thus determine if any initial 1471 connection-level packets are missing; this is particularly relevant 1472 if two subflows start transmitting simultaneously. 1474 A data sequence mapping does not need to be included in every MPTCP 1475 packet, as long as the subflow sequence space in that packet is 1476 covered by a mapping known at the receiver. This can be used to 1477 reduce overhead in cases where the mapping is known in advance; one 1478 such case is when there is a single subflow between the hosts, 1479 another is when segments of data are scheduled in larger than packet- 1480 sized chunks. 1482 An "infinite" mapping can be used to fall back to regular TCP by 1483 mapping the subflow-level data to the connection-level data for the 1484 remainder of the connection (see Section 3.7). This is achieved by 1485 setting the Data-Level Length field of the DSS option to the reserved 1486 value of 0. The checksum, in such a case, will also be set to zero. 1488 3.3.2. Data Acknowledgments 1490 To provide full end-to-end resilience, MPTCP provides a connection- 1491 level acknowledgment, to act as a cumulative ACK for the connection 1492 as a whole. This is the "Data ACK" field of the DSS option 1493 (Figure 9). The Data ACK is analogous to the behavior of the 1494 standard TCP cumulative ACK -- indicating how much data has been 1495 successfully received (with no holes). This is in comparison to the 1496 subflow-level ACK, which acts analogous to TCP SACK, given that there 1497 may still be holes in the data stream at the connection level. The 1498 Data ACK specifies the next data sequence number it expects to 1499 receive. 1501 The Data ACK, as for the DSN, can be sent as the full 64-bit value, 1502 or as the lower 32 bits. If data is received with a 64-bit DSN, it 1503 MUST be acknowledged with a 64-bit Data ACK. If the DSN received is 1504 32 bits, an implementation can choose whether to send a 32-bit or 1505 64-bit Data ACK, and an implementation MUST accept either in this 1506 situation. 1508 The Data ACK proves that the data, and all required MPTCP signaling, 1509 has been received and accepted by the remote end. One key use of the 1510 Data ACK signal is that it is used to indicate the left edge of the 1511 advertised receive window. As explained in Section 3.3.4, the 1512 receive window is shared by all subflows and is relative to the Data 1513 ACK. Because of this, an implementation MUST NOT use the RCV.WND 1514 field of a TCP segment at the connection level if it does not also 1515 carry a DSS option with a Data ACK field. Furthermore, separating 1516 the connection-level acknowledgments from the subflow level allows 1517 processing to be done separately, and a receiver has the freedom to 1518 drop segments after acknowledgment at the subflow level, for example, 1519 due to memory constraints when many segments arrive out of order. 1521 An MPTCP sender MUST NOT free data from the send buffer until it has 1522 been acknowledged by both a Data ACK received on any subflow and at 1523 the subflow level by all subflows on which the data was sent. The 1524 former condition ensures liveness of the connection and the latter 1525 condition ensures liveness and self-consistence of a subflow when 1526 data needs to be retransmitted. Note, however, that if some data 1527 needs to be retransmitted multiple times over a subflow, there is a 1528 risk of blocking the sending window. In this case, the MPTCP sender 1529 can decide to terminate the subflow that is behaving badly by sending 1530 a RST, using an appropriate MP_TCPRST (Section 3.6) error code. 1532 The Data ACK MAY be included in all segments; however, optimizations 1533 SHOULD be considered in more advanced implementations, where the Data 1534 ACK is present in segments only when the Data ACK value advances, and 1535 this behavior MUST be treated as valid. This behavior ensures the 1536 sender buffer is freed, while reducing overhead when the data 1537 transfer is unidirectional. 1539 3.3.3. Closing a Connection 1541 In regular TCP, a FIN announces the receiver that the sender has no 1542 more data to send. In order to allow subflows to operate 1543 independently and to keep the appearance of TCP over the wire, a FIN 1544 in MPTCP only affects the subflow on which it is sent. This allows 1545 nodes to exercise considerable freedom over which paths are in use at 1546 any one time. The semantics of a FIN remain as for regular TCP; 1547 i.e., it is not until both sides have ACKed each other's FINs that 1548 the subflow is fully closed. 1550 When an application calls close() on a socket, this indicates that it 1551 has no more data to send; for regular TCP, this would result in a FIN 1552 on the connection. For MPTCP, an equivalent mechanism is needed, and 1553 this is referred to as the DATA_FIN. 1555 A DATA_FIN is an indication that the sender has no more data to send, 1556 and as such can be used to verify that all data has been successfully 1557 received. A DATA_FIN, as with the FIN on a regular TCP connection, 1558 is a unidirectional signal. 1560 The DATA_FIN is signaled by setting the 'F' flag in the Data Sequence 1561 Signal option (Figure 9) to 1. A DATA_FIN occupies 1 octet (the 1562 final octet) of the connection-level sequence space. Note that the 1563 DATA_FIN is included in the Data-Level Length, but not at the subflow 1564 level: for example, a segment with DSN 80, and Data-Level Length 11, 1565 with DATA_FIN set, would map 10 octets from the subflow into data 1566 sequence space 80-89, the DATA_FIN is DSN 90; therefore, this segment 1567 including DATA_FIN would be acknowledged with a DATA_ACK of 91. 1569 Note that when the DATA_FIN is not attached to a TCP segment 1570 containing data, the Data Sequence Signal MUST have a subflow 1571 sequence number of 0, a Data-Level Length of 1, and the data sequence 1572 number that corresponds with the DATA_FIN itself. The checksum in 1573 this case will only cover the pseudo-header. 1575 A DATA_FIN has the semantics and behavior as a regular TCP FIN, but 1576 at the connection level. Notably, it is only DATA_ACKed once all 1577 data has been successfully received at the connection level. Note, 1578 therefore, that a DATA_FIN is decoupled from a subflow FIN. It is 1579 only permissible to combine these signals on one subflow if there is 1580 no data outstanding on other subflows. Otherwise, it may be 1581 necessary to retransmit data on different subflows. Essentially, a 1582 host MUST NOT close all functioning subflows unless it is safe to do 1583 so, i.e., until all outstanding data has been DATA_ACKed, or until 1584 the segment with the DATA_FIN flag set is the only outstanding 1585 segment. 1587 Once a DATA_FIN has been acknowledged, all remaining subflows MUST be 1588 closed with standard FIN exchanges. Both hosts SHOULD send FINs on 1589 all subflows, as a courtesy to allow middleboxes to clean up state 1590 even if an individual subflow has failed. It is also encouraged to 1591 reduce the timeouts (Maximum Segment Lifetime) on subflows at end 1592 hosts after receiving a DATA_FIN. In particular, any subflows where 1593 there is still outstanding data queued (which has been retransmitted 1594 on other subflows in order to get the DATA_FIN acknowledged) MAY be 1595 closed with a RST with MP_TCPRST (Section 3.6) error code for "too 1596 much outstanding data". 1598 A connection is considered closed once both hosts' DATA_FINs have 1599 been acknowledged by DATA_ACKs. 1601 As specified above, a standard TCP FIN on an individual subflow only 1602 shuts down the subflow on which it was sent. If all subflows have 1603 been closed with a FIN exchange, but no DATA_FIN has been received 1604 and acknowledged, the MPTCP connection is treated as closed only 1605 after a timeout. This implies that an implementation will have 1606 TIME_WAIT states at both the subflow and connection levels (see 1607 Appendix D). This permits "break-before-make" scenarios where 1608 connectivity is lost on all subflows before a new one can be re- 1609 established. 1611 3.3.4. Receiver Considerations 1613 Regular TCP advertises a receive window in each packet, telling the 1614 sender how much data the receiver is willing to accept past the 1615 cumulative ack. The receive window is used to implement flow 1616 control, throttling down fast senders when receivers cannot keep up. 1618 MPTCP also uses a unique receive window, shared between the subflows. 1619 The idea is to allow any subflow to send data as long as the receiver 1620 is willing to accept it. The alternative, maintaining per subflow 1621 receive windows, could end up stalling some subflows while others 1622 would not use up their window. 1624 The receive window is relative to the DATA_ACK. As in TCP, a 1625 receiver MUST NOT shrink the right edge of the receive window (i.e., 1626 DATA_ACK + receive window). The receiver will use the data sequence 1627 number to tell if a packet should be accepted at the connection 1628 level. 1630 When deciding to accept packets at subflow level, regular TCP checks 1631 the sequence number in the packet against the allowed receive window. 1632 With multipath, such a check is done using only the connection-level 1633 window. A sanity check SHOULD be performed at subflow level to 1634 ensure that the subflow and mapped sequence numbers meet the 1635 following test: SSN - SUBFLOW_ACK <= DSN - DATA_ACK, where SSN is the 1636 subflow sequence number of the received packet and SUBFLOW_ACK is the 1637 RCV.NXT (next expected sequence number) of the subflow (with the 1638 equivalent connection-level definitions for DSN and DATA_ACK). 1640 In regular TCP, once a segment is deemed in-window, it is put either 1641 in the in-order receive queue or in the out-of-order queue. In 1642 Multipath TCP, the same happens but at the connection level: a 1643 segment is placed in the connection level in-order or out-of-order 1644 queue if it is in-window at both connection and subflow levels. The 1645 stack still has to remember, for each subflow, which segments were 1646 received successfully so that it can ACK them at subflow level 1647 appropriately. Typically, this will be implemented by keeping per 1648 subflow out-of-order queues (containing only message headers, not the 1649 payloads) and remembering the value of the cumulative ACK. 1651 It is important for implementers to understand how large a receiver 1652 buffer is appropriate. The lower bound for full network utilization 1653 is the maximum bandwidth-delay product of any one of the paths. 1654 However, this might be insufficient when a packet is lost on a slower 1655 subflow and needs to be retransmitted (see Section 3.3.6). A tight 1656 upper bound would be the maximum round-trip time (RTT) of any path 1657 multiplied by the total bandwidth available across all paths. This 1658 permits all subflows to continue at full speed while a packet is 1659 fast-retransmitted on the maximum RTT path. Even this might be 1660 insufficient to maintain full performance in the event of a 1661 retransmit timeout on the maximum RTT path. It is for future study 1662 to determine the relationship between retransmission strategies and 1663 receive buffer sizing. 1665 3.3.5. Sender Considerations 1667 The sender remembers receiver window advertisements from the 1668 receiver. It should only update its local receive window values when 1669 the largest sequence number allowed (i.e., DATA_ACK + receive window) 1670 increases, on the receipt of a DATA_ACK. This is important to allow 1671 using paths with different RTTs, and thus different feedback loops. 1673 MPTCP uses a single receive window across all subflows, and if the 1674 receive window was guaranteed to be unchanged end-to-end, a host 1675 could always read the most recent receive window value. However, 1676 some classes of middleboxes may alter the TCP-level receive window. 1677 Typically, these will shrink the offered window, although for short 1678 periods of time it may be possible for the window to be larger 1679 (however, note that this would not continue for long periods since 1680 ultimately the middlebox must keep up with delivering data to the 1681 receiver). Therefore, if receive window sizes differ on multiple 1682 subflows, when sending data MPTCP SHOULD take the largest of the most 1683 recent window sizes as the one to use in calculations. This rule is 1684 implicit in the requirement not to reduce the right edge of the 1685 window. 1687 The sender MUST also remember the receive windows advertised by each 1688 subflow. The allowed window for subflow i is (ack_i, ack_i + 1689 rcv_wnd_i), where ack_i is the subflow-level cumulative ACK of 1690 subflow i. This ensures data will not be sent to a middlebox unless 1691 there is enough buffering for the data. 1693 Putting the two rules together, we get the following: a sender is 1694 allowed to send data segments with data-level sequence numbers 1695 between (DATA_ACK, DATA_ACK + receive_window). Each of these 1696 segments will be mapped onto subflows, as long as subflow sequence 1697 numbers are in the allowed windows for those subflows. Note that 1698 subflow sequence numbers do not generally affect flow control if the 1699 same receive window is advertised across all subflows. They will 1700 perform flow control for those subflows with a smaller advertised 1701 receive window. 1703 The send buffer MUST, at a minimum, be as big as the receive buffer, 1704 to enable the sender to reach maximum throughput. 1706 3.3.6. Reliability and Retransmissions 1708 The data sequence mapping allows senders to resend data with the same 1709 data sequence number on a different subflow. When doing this, a host 1710 MUST still retransmit the original data on the original subflow, in 1711 order to preserve the subflow integrity (middleboxes could replay old 1712 data, and/or could reject holes in subflows), and a receiver will 1713 ignore these retransmissions. While this is clearly suboptimal, for 1714 compatibility reasons this is sensible behavior. Optimizations could 1715 be negotiated in future versions of this protocol. Note also that 1716 this property would also permit a sender to always send the same 1717 data, with the same data sequence number, on multiple subflows, if 1718 desired for reliability reasons. 1720 This protocol specification does not mandate any mechanisms for 1721 handling retransmissions, and much will be dependent upon local 1722 policy (as discussed in Section 3.3.8). One can imagine aggressive 1723 connection-level retransmissions policies where every packet lost at 1724 subflow level is retransmitted on a different subflow (hence, wasting 1725 bandwidth but possibly reducing application-to-application delays), 1726 or conservative retransmission policies where connection-level 1727 retransmits are only used after a few subflow-level retransmission 1728 timeouts occur. 1730 It is envisaged that a standard connection-level retransmission 1731 mechanism would be implemented around a connection-level data queue: 1732 all segments that haven't been DATA_ACKed are stored. A timer is set 1733 when the head of the connection-level is ACKed at subflow level but 1734 its corresponding data is not ACKed at data level. This timer will 1735 guard against failures in retransmission by middleboxes that 1736 proactively ACK data. 1738 The sender MUST keep data in its send buffer as long as the data has 1739 not been acknowledged at both connection level and on all subflows on 1740 which it has been sent. In this way, the sender can always 1741 retransmit the data if needed, on the same subflow or on a different 1742 one. A special case is when a subflow fails: the sender will 1743 typically resend the data on other working subflows after a timeout, 1744 and will keep trying to retransmit the data on the failed subflow 1745 too. The sender will declare the subflow failed after a predefined 1746 upper bound on retransmissions is reached (which MAY be lower than 1747 the usual TCP limits of the Maximum Segment Life), or on the receipt 1748 of an ICMP error, and only then delete the outstanding data segments. 1750 If multiple retransmissions are triggered that indicate that a 1751 subflow performs badly, this MAY lead to a host resetting the subflow 1752 with a RST. However, additional research is required to understand 1753 the heuristics of how and when to reset underperforming subflows. 1755 For example, a highly asymmetric path may be misdiagnosed as 1756 underperforming. A RST for this purpose SHOULD be accompanied with 1757 an "Unacceptable performance" MP_TCPRST option (Section 3.6). 1759 3.3.7. Congestion Control Considerations 1761 Different subflows in an MPTCP connection have different congestion 1762 windows. To achieve fairness at bottlenecks and resource pooling, it 1763 is necessary to couple the congestion windows in use on each subflow, 1764 in order to push most traffic to uncongested links. One algorithm 1765 for achieving this is presented in [RFC6356]; the algorithm does not 1766 achieve perfect resource pooling but is "safe" in that it is readily 1767 deployable in the current Internet. By this, we mean that it does 1768 not take up more capacity on any one path than if it was a single 1769 path flow using only that route, so this ensures fair coexistence 1770 with single-path TCP at shared bottlenecks. 1772 It is foreseeable that different congestion controllers will be 1773 implemented for MPTCP, each aiming to achieve different properties in 1774 the resource pooling/fairness/stability design space, as well as 1775 those for achieving different properties in quality of service, 1776 reliability, and resilience. 1778 Regardless of the algorithm used, the design of the MPTCP protocol 1779 aims to provide the congestion control implementations sufficient 1780 information to take the right decisions; this information includes, 1781 for each subflow, which packets were lost and when. 1783 3.3.8. Subflow Policy 1785 Within a local MPTCP implementation, a host may use any local policy 1786 it wishes to decide how to share the traffic to be sent over the 1787 available paths. 1789 In the typical use case, where the goal is to maximize throughput, 1790 all available paths will be used simultaneously for data transfer, 1791 using coupled congestion control as described in [RFC6356]. It is 1792 expected, however, that other use cases will appear. 1794 For instance, a possibility is an 'all-or-nothing' approach, i.e., 1795 have a second path ready for use in the event of failure of the first 1796 path, but alternatives could include entirely saturating one path 1797 before using an additional path (the 'overflow' case). Such choices 1798 would be most likely based on the monetary cost of links, but may 1799 also be based on properties such as the delay or jitter of links, 1800 where stability (of delay or bandwidth) is more important than 1801 throughput. Application requirements such as these are discussed in 1802 detail in [RFC6897]. 1804 The ability to make effective choices at the sender requires full 1805 knowledge of the path "cost", which is unlikely to be the case. It 1806 would be desirable for a receiver to be able to signal their own 1807 preferences for paths, since they will often be the multihomed party, 1808 and may have to pay for metered incoming bandwidth. 1810 To enable this, the MP_JOIN option (see Section 3.2) contains the 'B' 1811 bit, which allows a host to indicate to its peer that this path 1812 should be treated as a backup path to use only in the event of 1813 failure of other working subflows (i.e., a subflow where the receiver 1814 has indicated B=1 SHOULD NOT be used to send data unless there are no 1815 usable subflows where B=0). 1817 In the event that the available set of paths changes, a host may wish 1818 to signal a change in priority of subflows to the peer (e.g., a 1819 subflow that was previously set as backup should now take priority 1820 over all remaining subflows). Therefore, the MP_PRIO option, shown 1821 in Figure 11, can be used to change the 'B' flag of the subflow on 1822 which it is sent. 1824 Another use of the MP_PRIO option is to set the 'B' flag on a subflow 1825 to cleanly retire its use before closing it and removing it with 1826 REMOVE_ADDR Section 3.4.2, for example to support make-before-break 1827 session continuity, where new subflows are added before the 1828 previously used ones are closed. 1830 1 2 3 1831 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1832 +---------------+---------------+-------+-----+-+ 1833 | Kind | Length |Subtype|(rsv)|B| 1834 +---------------+---------------+-------+-----+-+ 1836 Figure 11: Change Subflow Priority (MP_PRIO) Option 1838 It should be noted that the backup flag is a request from a data 1839 receiver to a data sender only, and the data sender SHOULD adhere to 1840 these requests. A host cannot assume that the data sender will do 1841 so, however, since local policies -- or technical difficulties -- may 1842 override MP_PRIO requests. Note also that this signal applies to a 1843 single direction, and so the sender of this option could choose to 1844 continue using the subflow to send data even if it has signaled B=1 1845 to the other host. 1847 3.4. Address Knowledge Exchange (Path Management) 1849 We use the term "path management" to refer to the exchange of 1850 information about additional paths between hosts, which in this 1851 design is managed by multiple addresses at hosts. For more detail of 1852 the architectural thinking behind this design, see the MPTCP 1853 Architecture document [RFC6182]. 1855 This design makes use of two methods of sharing such information, and 1856 both can be used on a connection. The first is the direct setup of 1857 new subflows, already described in Section 3.2, where the initiator 1858 has an additional address. The second method, described in the 1859 following subsections, signals addresses explicitly to the other host 1860 to allow it to initiate new subflows. The two mechanisms are 1861 complementary: the first is implicit and simple, while the explicit 1862 is more complex but is more robust. Together, the mechanisms allow 1863 addresses to change in flight (and thus support operation through 1864 NATs, since the source address need not be known), and also allow the 1865 signaling of previously unknown addresses, and of addresses belonging 1866 to other address families (e.g., both IPv4 and IPv6). 1868 Here is an example of typical operation of the protocol: 1870 o An MPTCP connection is initially set up between address/port A1 of 1871 Host A and address/port B1 of Host B. If Host A is multihomed and 1872 multiaddressed, it can start an additional subflow from its 1873 address A2 to B1, by sending a SYN with a Join option from A2 to 1874 B1, using B's previously declared token for this connection. 1875 Alternatively, if B is multihomed, it can try to set up a new 1876 subflow from B2 to A1, using A's previously declared token. In 1877 either case, the SYN will be sent to the port already in use for 1878 the original subflow on the receiving host. 1880 o Simultaneously (or after a timeout), an ADD_ADDR option 1881 (Section 3.4.1) is sent on an existing subflow, informing the 1882 receiver of the sender's alternative address(es). The recipient 1883 can use this information to open a new subflow to the sender's 1884 additional address. In our example, A will send ADD_ADDR option 1885 informing B of address/port A2. The mix of using the SYN-based 1886 option and the ADD_ADDR option, including timeouts, is 1887 implementation specific and can be tailored to agree with local 1888 policy. 1890 o If subflow A2-B1 is successfully set up, Host B can use the 1891 Address ID in the Join option to correlate this with the ADD_ADDR 1892 option that will also arrive on an existing subflow; now B knows 1893 not to open A2-B1, ignoring the ADD_ADDR. Otherwise, if B has not 1894 received the A2-B1 MP_JOIN SYN but received the ADD_ADDR, it can 1895 try to initiate a new subflow from one or more of its addresses to 1896 address A2. This permits new sessions to be opened if one host is 1897 behind a NAT. 1899 Other ways of using the two signaling mechanisms are possible; for 1900 instance, signaling addresses in other address families can only be 1901 done explicitly using the Add Address option. 1903 3.4.1. Address Advertisement 1905 The Add Address (ADD_ADDR) MPTCP option announces additional 1906 addresses (and optionally, ports) on which a host can be reached 1907 (Figure 12). This option can be used at any time during a 1908 connection, depending on when the sender wishes to enable multiple 1909 paths and/or when paths become available. As with all MPTCP signals, 1910 the receiver MUST undertake standard TCP validity checks, e.g. 1911 [RFC5961], before acting upon it. 1913 Every address has an Address ID that can be used for uniquely 1914 identifying the address within a connection for address removal. The 1915 Address ID is also used to identify MP_JOIN options (see Section 3.2) 1916 relating to the same address, even when address translators are in 1917 use. The Address ID MUST uniquely identify the address for the 1918 sender of the option (within the scope of the connection), but the 1919 mechanism for allocating such IDs is implementation specific. 1921 All address IDs learned via either MP_JOIN or ADD_ADDR SHOULD be 1922 stored by the receiver in a data structure that gathers all the 1923 Address ID to address mappings for a connection (identified by a 1924 token pair). In this way, there is a stored mapping between Address 1925 ID, observed source address, and token pair for future processing of 1926 control information for a connection. Note that an implementation 1927 MAY discard incoming address advertisements at will, for example, for 1928 avoiding updating mapping state, or because advertised addresses are 1929 of no use to it (for example, IPv6 addresses when it has IPv4 only). 1930 Therefore, a host MUST treat address advertisements as soft state, 1931 and it MAY choose to refresh advertisements periodically. Note also 1932 that an implementation MAY choose to cache these address 1933 advertisements even if they are not currently relevant but may be 1934 relevant in the future, such as IPv4 addresses when IPv6 connectivity 1935 is available but IPv4 is awaiting DHCP. 1937 This option is shown in Figure 12. The illustration is sized for 1938 IPv4 addresses. For IPv6, the length of the address will be 16 1939 octets (instead of 4). 1941 The 2 octets that specify the TCP port number to use are optional and 1942 their presence can be inferred from the length of the option. 1943 Although it is expected that the majority of use cases will use the 1944 same port pairs as used for the initial subflow (e.g., port 80 1945 remains port 80 on all subflows, as does the ephemeral port at the 1946 client), there may be cases (such as port-based load balancing) where 1947 the explicit specification of a different port is required. If no 1948 port is specified, MPTCP SHOULD attempt to connect to the specified 1949 address on the same port as is already in use by the subflow on which 1950 the ADD_ADDR signal was sent; this is discussed in more detail in 1951 Section 3.9. 1953 The Truncated HMAC present in this Option is the rightmost 64 bits of 1954 an HMAC, negotiated and calculated in the same way as for MP_JOIN as 1955 described in Section 3.2. For this specification of MPTCP, as there 1956 is only one hash algorithm option specified, this will be HMAC as 1957 defined in [RFC2104], using the SHA-256 hash algorithm [RFC6234]. In 1958 the same way as for MP_JOIN, the key for the HMAC algorithm, in the 1959 case of the message transmitted by Host A, will be Key-A followed by 1960 Key-B, and in the case of Host B, Key-B followed by Key-A. These are 1961 the keys that were exchanged in the original MP_CAPABLE handshake. 1962 The message for the HMAC is the Address ID, IP Address, and Port 1963 which precede the HMAC in the ADD_ADDR option. If the port is not 1964 present in the ADD_ADDR option, the HMAC message will nevertheless 1965 include two octets of value zero. The rationale for the HMAC is to 1966 prevent unauthorized entities from injecting ADD_ADDR signals in an 1967 attempt to hijack a connection. Note that additionally the presence 1968 of this HMAC prevents the address being changed in flight unless the 1969 key is known by an intermediary. If a host receives an ADD_ADDR 1970 option for which it cannot validate the HMAC, it SHOULD silently 1971 ignore the option. 1973 A set of four flags are present after the subtype and before the 1974 Address ID. Only the rightmost bit - labelled 'E' - is assigned in 1975 this specification. The other bits are currently unassigned and MUST 1976 be set to zero by a sender and MUST be ignored by the receiver. 1978 The 'E' flag exists to provide reliability for this option. Because 1979 this option will often be sent on pure ACKs, there is no guarantee of 1980 reliability. Therefore, a receiver receiving a fresh ADD_ADDR option 1981 (where E=0), will send the same option back to the sender, but not 1982 including the HMAC, and with E=1, to indicate receipt. The lack of 1983 this echo can be used by the initial ADD_ADDR sender to retransmit 1984 the ADD_ADDR according to local policy. 1986 1 2 3 1987 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 1988 +---------------+---------------+-------+-------+---------------+ 1989 | Kind | Length |Subtype|(rsv)|E| Address ID | 1990 +---------------+---------------+-------+-------+---------------+ 1991 | Address (IPv4 - 4 octets / IPv6 - 16 octets) | 1992 +-------------------------------+-------------------------------+ 1993 | Port (2 octets, optional) | | 1994 +-------------------------------+ | 1995 | Truncated HMAC (8 octets, if E=0) | 1996 | +-------------------------------+ 1997 | | 1998 +-------------------------------+ 2000 Figure 12: Add Address (ADD_ADDR) Option 2002 Due to the proliferation of NATs, it is reasonably likely that one 2003 host may attempt to advertise private addresses [RFC1918]. It is not 2004 desirable to prohibit this, since there may be cases where both hosts 2005 have additional interfaces on the same private network, and a host 2006 MAY advertise such addresses. The MP_JOIN handshake to create a new 2007 subflow (Section 3.2) provides mechanisms to minimize security risks. 2008 The MP_JOIN message contains a 32-bit token that uniquely identifies 2009 the connection to the receiving host. If the token is unknown, the 2010 host will return with a RST. In the unlikely event that the token is 2011 valid at the receiving host, subflow setup will continue, but the 2012 HMAC exchange must occur for authentication. This will fail, and 2013 will provide sufficient protection against two unconnected hosts 2014 accidentally setting up a new subflow upon the signal of a private 2015 address. Further security considerations around the issue of 2016 ADD_ADDR messages that accidentally misdirect, or maliciously direct, 2017 new MP_JOIN attempts are discussed in Section 5. 2019 A host that receives an ADD_ADDR but finds a connection set up to 2020 that IP address and port number is unsuccessful SHOULD NOT perform 2021 further connection attempts to this address/port combination for this 2022 connection. A sender that wants to trigger a new incoming connection 2023 attempt on a previously advertised address/port combination can 2024 therefore refresh ADD_ADDR information by sending the option again. 2026 A host can therefore send an ADD_ADDR message with an already 2027 assigned Address ID, but the Address MUST be the same as previously 2028 assigned to this Address ID. A new ADD_ADDR may have the same, or 2029 different, port number. If the port number is different, the 2030 receiving host SHOULD try to set up a new subflow to this new 2031 address/port combination. 2033 A host wishing to replace an existing Address ID MUST first remove 2034 the existing one (Section 3.4.2). 2036 During normal MPTCP operation, it is unlikely that there will be 2037 sufficient TCP option space for ADD_ADDR to be included along with 2038 those for data sequence numbering (Section 3.3.1). Therefore, it is 2039 expected that an MPTCP implementation will send the ADD_ADDR option 2040 on separate ACKs. As discussed earlier, however, an MPTCP 2041 implementation MUST NOT treat duplicate ACKs with any MPTCP option, 2042 with the exception of the DSS option, as indications of congestion 2043 [RFC5681], and an MPTCP implementation SHOULD NOT send more than two 2044 duplicate ACKs in a row for signaling purposes. 2046 3.4.2. Remove Address 2048 If, during the lifetime of an MPTCP connection, a previously 2049 announced address becomes invalid (e.g., if the interface disappears, 2050 or an IPv6 address is no longer preferred), the affected host SHOULD 2051 announce this so that the peer can remove subflows related to this 2052 address. Even if an address is not in use by a MPTCP connection, if 2053 it has been previously announced, an implementation SHOULD announce 2054 its removal. A host MAY also choose to announce that a valid IP 2055 address should not be used any longer, for example for make-before- 2056 break session continuity. 2058 This is achieved through the Remove Address (REMOVE_ADDR) option 2059 (Figure 13), which will remove a previously added address (or list of 2060 addresses) from a connection and terminate any subflows currently 2061 using that address. 2063 For security purposes, if a host receives a REMOVE_ADDR option, it 2064 must ensure the affected path(s) are no longer in use before it 2065 instigates closure. The receipt of REMOVE_ADDR SHOULD first trigger 2066 the sending of a TCP keepalive [RFC1122] on the path, and if a 2067 response is received the path SHOULD NOT be removed. If the path is 2068 found to still be alive, the receiving host SHOULD no longer use the 2069 specified address for future connections, but it is the 2070 responsibility of the host which sent the REMOVE_ADDR to shut down 2071 the subflow. The requesting host MAY also use MP_PRIO 2072 (Section 3.3.8) to request a path is no longer used, before removal. 2073 Typical TCP validity tests on the subflow (e.g., ensuring sequence 2074 and ACK numbers are correct) MUST also be undertaken. An 2075 implementation can use indications of these test failures as part of 2076 intrusion detection or error logging. 2078 The sending and receipt (if no keepalive response was received) of 2079 this message SHOULD trigger the sending of RSTs by both hosts on the 2080 affected subflow(s) (if possible), as a courtesy to cleaning up 2081 middlebox state, before cleaning up any local state. 2083 Address removal is undertaken by ID, so as to permit the use of NATs 2084 and other middleboxes that rewrite source addresses. If there is no 2085 address at the requested ID, the receiver will silently ignore the 2086 request. 2088 A subflow that is still functioning MUST be closed with a FIN 2089 exchange as in regular TCP, rather than using this option. For more 2090 information, see Section 3.3.3. 2092 1 2 3 2093 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2094 +---------------+---------------+-------+-------+---------------+ 2095 | Kind | Length = 3+n |Subtype|(resvd)| Address ID | ... 2096 +---------------+---------------+-------+-------+---------------+ 2097 (followed by n-1 Address IDs, if required) 2099 Figure 13: Remove Address (REMOVE_ADDR) Option 2101 3.5. Fast Close 2103 Regular TCP has the means of sending a reset (RST) signal to abruptly 2104 close a connection. With MPTCP, a regular RST only has the scope of 2105 the subflow and will only close the concerned subflow but not affect 2106 the remaining subflows. MPTCP's connection will stay alive at the 2107 data level, in order to permit break-before-make handover between 2108 subflows. It is therefore necessary to provide an MPTCP-level 2109 "reset" to allow the abrupt closure of the whole MPTCP connection, 2110 and this is the MP_FASTCLOSE option. 2112 MP_FASTCLOSE is used to indicate to the peer that the connection will 2113 be abruptly closed and no data will be accepted anymore. The reasons 2114 for triggering an MP_FASTCLOSE are implementation specific. Regular 2115 TCP does not allow sending a RST while the connection is in a 2116 synchronized state [RFC0793]. Nevertheless, implementations allow 2117 the sending of a RST in this state, if, for example, the operating 2118 system is running out of resources. In these cases, MPTCP should 2119 send the MP_FASTCLOSE. This option is illustrated in Figure 14. 2121 1 2 3 2122 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2123 +---------------+---------------+-------+-----------------------+ 2124 | Kind | Length |Subtype| (reserved) | 2125 +---------------+---------------+-------+-----------------------+ 2126 | Option Receiver's Key | 2127 | (64 bits) | 2128 | | 2129 +---------------------------------------------------------------+ 2131 Figure 14: Fast Close (MP_FASTCLOSE) Option 2133 If Host A wants to force the closure of an MPTCP connection, it has 2134 two different options: 2136 o Option A (ACK) : Host A sends an ACK containing the MP_FASTCLOSE 2137 option on one subflow, containing the key of Host B as declared in 2138 the initial connection handshake. On all the other subflows, Host 2139 A sends a regular TCP RST to close these subflows, and tears them 2140 down. Host A now enters FASTCLOSE_WAIT state. 2142 o Option R (RST) : Host A sends a RST containing the MP_FASTCLOSE 2143 option on all subflows, containing the key of Host B as declared 2144 in the initial connection handshake. Host A can tear the subflows 2145 and the connection down immediately. 2147 If host A decides to force the closure by using Option A and sending 2148 an ACK with the MP_FASTCLOSE option, the connection shall proceed as 2149 follows: 2151 o Upon receipt of an ACK with MP_FASTCLOSE by Host B, containing the 2152 valid key, Host B answers on the same subflow with a TCP RST and 2153 tears down all subflows also through sending TCP RST signals. 2154 Host B can now close the whole MPTCP connection (it transitions 2155 directly to CLOSED state). 2157 o As soon as Host A has received the TCP RST on the remaining 2158 subflow, it can close this subflow and tear down the whole 2159 connection (transition from FASTCLOSE_WAIT to CLOSED states). If 2160 Host A receives an MP_FASTCLOSE instead of a TCP RST, both hosts 2161 attempted fast closure simultaneously. Host A should reply with a 2162 TCP RST and tear down the connection. 2164 o If Host A does not receive a TCP RST in reply to its MP_FASTCLOSE 2165 after one retransmission timeout (RTO) (the RTO of the subflow 2166 where the MP_FASTCLOSE has been sent), it SHOULD retransmit the 2167 MP_FASTCLOSE. The number of retransmissions SHOULD be limited to 2168 avoid this connection from being retained for a long time, but 2169 this limit is implementation specific. A RECOMMENDED number is 3. 2170 If no TCP RST is received in response, Host A SHOULD send a TCP 2171 RST with the MP_FASTCLOSE option itself when it releases state in 2172 order to clear any remaining state at middleboxes. 2174 If however host A decides to force the closure by using Option R and 2175 sending a RST with the MP_FASTCLOSE option, Host B will act as 2176 follows: Upon receipt of a RST with MP_FASTCLOSE, containing the 2177 valid key, Host B tears down all subflows by sending a TCP RST. Host 2178 B can now close the whole MPTCP connection (it transitions directly 2179 to CLOSED state). 2181 3.6. Subflow Reset 2183 An implementation of MPTCP may also need to send a regular TCP RST to 2184 force the closure of a subflow. A host sends a TCP RST in order to 2185 close a subflow or reject an attempt to open a subflow (MP_JOIN). In 2186 order to inform the receiving host why a subflow is being closed or 2187 rejected, the TCP RST packet MAY include the MP_TCPRST Option. The 2188 host MAY use this information to decide, for example, whether it 2189 tries to re-establish the subflow immediately, later, or never. 2191 1 2 3 2192 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2193 +---------------+---------------+-------+-----------------------+ 2194 | Kind | Length |Subtype|U|V|W|T| Reason | 2195 +---------------+---------------+-------+-----------------------+ 2197 Figure 15: TCP RST Reason (MP_TCPRST) Option 2199 The MP_TCPRST option contains a reason code that allows the sender of 2200 the option to provide more information about the reason for the 2201 termination of the subflow. Using 12 bits of option space, the first 2202 four bits are reserved for flags (only one of which is currently 2203 defined), and the remaining octet is used to express a reason code 2204 for this subflow termination, from which a receiver MAY infer 2205 information about the usability of this path. 2207 The "T" flag is used by the sender to indicate whether the error 2208 condition that is reported is Transient (T bit set to 1) or Permanent 2209 (T bit set to 0). If the error condition is considered to be 2210 Transient by the sender of the RST segment, the recipient of this 2211 segment MAY try to reestablish a subflow for this connection over the 2212 failed path. The time at which a receiver may try to re-establish 2213 this is implementation-specific, but SHOULD take into account the 2214 properties of the failure defined by the following reason code. If 2215 the error condition is considered to be permanent, the receiver of 2216 the RST segment SHOULD NOT try to reestablish a subflow for this 2217 connection over this path. The "U", "V" and "W" flags are not 2218 defined by this specification and are reserved for future use. An 2219 implementation of this specification MUST set these flags to 0, and a 2220 receiver MUST ignore them. 2222 The "Reason" code is an 8-bit field that indicates the reason for the 2223 termination of the subflow. The following codes are defined in this 2224 document: 2226 o Unspecified error (code 0x0). This is the default error implying 2227 the subflow is no longer available. The presence of this option 2228 shows that the RST was generated by a MPTCP-aware device. 2230 o MPTCP specific error (code 0x01). An error has been detected in 2231 the processing of MPTCP options. This is the usual reason code to 2232 return in the cases where a RST is being sent to close a subflow 2233 for reasons of an invalid response. 2235 o Lack of resources (code 0x02). This code indicates that the 2236 sending host does not have enough resources to support the 2237 terminated subflow. 2239 o Administratively prohibited (code 0x03). This code indicates that 2240 the requested subflow is prohibited by the policies of the sending 2241 host. 2243 o Too much outstanding data (code 0x04). This code indicates that 2244 there is an excessive amount of data that need to be transmitted 2245 over the terminated subflow while having already been acknowledged 2246 over one or more other subflows. This may occur if a path has 2247 been unavailable for a short period and it is more efficient to 2248 reset and start again than it is to retransmit the queued data. 2250 o Unacceptable performance (code 0x05). This code indicates that 2251 the performance of this subflow was too low compared to the other 2252 subflows of this Multipath TCP connection. 2254 o Middlebox interference (code 0x06). Middlebox interference has 2255 been detected over this subflow making MPTCP signaling invalid. 2256 For example, this may be sent if the checksum does not validate. 2258 3.7. Fallback 2260 Sometimes, middleboxes will exist on a path that could prevent the 2261 operation of MPTCP. MPTCP has been designed in order to cope with 2262 many middlebox modifications (see Section 6), but there are still 2263 some cases where a subflow could fail to operate within the MPTCP 2264 requirements. These cases are notably the following: the loss of 2265 MPTCP options on a path, and the modification of payload data. If 2266 such an event occurs, it is necessary to "fall back" to the previous, 2267 safe operation. This may be either falling back to regular TCP or 2268 removing a problematic subflow. 2270 At the start of an MPTCP connection (i.e., the first subflow), it is 2271 important to ensure that the path is fully MPTCP capable and the 2272 necessary MPTCP options can reach each host. The handshake as 2273 described in Section 3.1 SHOULD fall back to regular TCP if either of 2274 the SYN messages do not have the MPTCP options: this is the same, and 2275 desired, behavior in the case where a host is not MPTCP capable, or 2276 the path does not support the MPTCP options. When attempting to join 2277 an existing MPTCP connection (Section 3.2), if a path is not MPTCP 2278 capable and the MPTCP options do not get through on the SYNs, the 2279 subflow will be closed according to the MP_JOIN logic. 2281 There is, however, another corner case that should be addressed. 2282 That is one of MPTCP options getting through on the SYN, but not on 2283 regular packets. This can be resolved if the subflow is the first 2284 subflow, and thus all data in flight is contiguous, using the 2285 following rules. 2287 A sender MUST include a DSS option with data sequence mapping in 2288 every segment until one of the sent segments has been acknowledged 2289 with a DSS option containing a Data ACK. Upon reception of the 2290 acknowledgment, the sender has the confirmation that the DSS option 2291 passes in both directions and may choose to send fewer DSS options 2292 than once per segment. 2294 If, however, an ACK is received for data (not just for the SYN) 2295 without a DSS option containing a Data ACK, the sender determines the 2296 path is not MPTCP capable. In the case of this occurring on an 2297 additional subflow (i.e., one started with MP_JOIN), the host MUST 2298 close the subflow with a RST, which SHOULD contain a MP_TCPRST option 2299 (Section 3.6) with a "Middlebox interference" reason code. 2301 In the case of such an ACK being received on the first subflow (i.e., 2302 that started with MP_CAPABLE), before any additional subflows are 2303 added, the implementation MUST drop out of an MPTCP mode, back to 2304 regular TCP. The sender will send one final data sequence mapping, 2305 with the Data-Level Length value of 0 indicating an infinite mapping 2306 (to inform the other end in case the path drops options in one 2307 direction only), and then revert to sending data on the single 2308 subflow without any MPTCP options. 2310 If a subflow breaks during operation, e.g. if it is re-routed and 2311 MPTCP options are no longer permitted, then once this is detected (by 2312 the subflow-level receive buffer filling up, since there is no 2313 mapping available in order to DATA_ACK this data), the subflow SHOULD 2314 be treated as broken and closed with a RST, since no data can be 2315 delivered to the application layer, and no fallback signal can be 2316 reliably sent. This RST SHOULD include the MP_TCPRST option 2317 (Section 3.6) with a "Middlebox interference" reason code. 2319 These rules should cover all cases where such a failure could happen: 2320 whether it's on the forward or reverse path and whether the server or 2321 the client first sends data. 2323 So far this section has discussed the loss of MPTCP options, either 2324 initially, or during the course of the connection. As described in 2325 Section 3.3, each portion of data for which there is a mapping is 2326 protected by a checksum, if checksums have been negotiated. This 2327 mechanism is used to detect if middleboxes have made any adjustments 2328 to the payload (added, removed, or changed data). A checksum will 2329 fail if the data has been changed in any way. This will also detect 2330 if the length of data on the subflow is increased or decreased, and 2331 this means the data sequence mapping is no longer valid. The sender 2332 no longer knows what subflow-level sequence number the receiver is 2333 genuinely operating at (the middlebox will be faking ACKs in return), 2334 and it cannot signal any further mappings. Furthermore, in addition 2335 to the possibility of payload modifications that are valid at the 2336 application layer, there is the possibility that such modifications 2337 could be triggered across MPTCP segment boundaries, corrupting the 2338 data. Therefore, all data from the start of the segment that failed 2339 the checksum onwards is not trustworthy. 2341 Note that if checksum usage has not been negotiated, this fallback 2342 mechanism cannot be used unless there is some higher or lower layer 2343 signal to inform the MPTCP implementation that the payload has been 2344 tampered with. 2346 When multiple subflows are in use, the data in flight on a subflow 2347 will likely involve data that is not contiguously part of the 2348 connection-level stream, since segments will be spread across the 2349 multiple subflows. Due to the problems identified above, it is not 2350 possible to determine what adjustment has done to the data (notably, 2351 any changes to the subflow sequence numbering). Therefore, it is not 2352 possible to recover the subflow, and the affected subflow must be 2353 immediately closed with a RST, featuring an MP_FAIL option 2354 (Figure 16), which defines the data sequence number at the start of 2355 the segment (defined by the data sequence mapping) that had the 2356 checksum failure. Note that the MP_FAIL option requires the use of 2357 the full 64-bit sequence number, even if 32-bit sequence numbers are 2358 normally in use in the DSS signals on the path. 2360 1 2 3 2361 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2362 +---------------+---------------+-------+----------------------+ 2363 | Kind | Length=12 |Subtype| (reserved) | 2364 +---------------+---------------+-------+----------------------+ 2365 | | 2366 | Data Sequence Number (8 octets) | 2367 | | 2368 +--------------------------------------------------------------+ 2370 Figure 16: Fallback (MP_FAIL) Option 2372 The receiver of this option MUST discard all data following the data 2373 sequence number specified. Failed data MUST NOT be DATA_ACKed and so 2374 will be retransmitted on other subflows (Section 3.3.6). 2376 A special case is when there is a single subflow and it fails with a 2377 checksum error. If it is known that all unacknowledged data in 2378 flight is contiguous (which will usually be the case with a single 2379 subflow), an infinite mapping can be applied to the subflow without 2380 the need to close it first, and essentially turn off all further 2381 MPTCP signaling. In this case, if a receiver identifies a checksum 2382 failure when there is only one path, it will send back an MP_FAIL 2383 option on the subflow-level ACK, referring to the data-level sequence 2384 number of the start of the segment on which the checksum error was 2385 detected. The sender will receive this, and if all unacknowledged 2386 data in flight is contiguous, will signal an infinite mapping. This 2387 infinite mapping will be a DSS option (Section 3.3) on the first new 2388 packet, containing a data sequence mapping that acts retroactively, 2389 referring to the start of the subflow sequence number of the most 2390 recent segment that was known to be delivered intact (i.e. was 2391 successfully DATA_ACKed). From that point onwards, data can be 2392 altered by a middlebox without affecting MPTCP, as the data stream is 2393 equivalent to a regular, legacy TCP session. Whilst in theory paths 2394 may only be damaged in one direction, and the MP_FAIL signal affects 2395 only one direction of traffic, for implementation simplicity, the 2396 receiver of an MP_FAIL MUST also respond with an MP_FAIL in the 2397 reverse direction and entirely revert to a regular TCP session. 2399 In the rare case that the data is not contiguous (which could happen 2400 when there is only one subflow but it is retransmitting data from a 2401 subflow that has recently been uncleanly closed), the receiver MUST 2402 close the subflow with a RST with MP_FAIL. The receiver MUST discard 2403 all data that follows the data sequence number specified. The sender 2404 MAY attempt to create a new subflow belonging to the same connection, 2405 and, if it chooses to do so, SHOULD place the single subflow 2406 immediately in single-path mode by setting an infinite data sequence 2407 mapping. This mapping will begin from the data-level sequence number 2408 that was declared in the MP_FAIL. 2410 After a sender signals an infinite mapping, it MUST only use subflow 2411 ACKs to clear its send buffer. This is because Data ACKs may become 2412 misaligned with the subflow ACKs when middleboxes insert or delete 2413 data. The receive SHOULD stop generating Data ACKs after it receives 2414 an infinite mapping. 2416 When a connection has fallen back with an infinite mapping, only one 2417 subflow can send data; otherwise, the receiver would not know how to 2418 reorder the data. In practice, this means that all MPTCP subflows 2419 will have to be terminated except one. Once MPTCP falls back to 2420 regular TCP, it MUST NOT revert to MPTCP later in the connection. 2422 It should be emphasized that MPTCP is not attempting to prevent the 2423 use of middleboxes that want to adjust the payload. An MPTCP-aware 2424 middlebox could provide such functionality by also rewriting 2425 checksums. 2427 3.8. Error Handling 2429 In addition to the fallback mechanism as described above, the 2430 standard classes of TCP errors may need to be handled in an MPTCP- 2431 specific way. Note that changing semantics -- such as the relevance 2432 of a RST -- are covered in Section 4. Where possible, we do not want 2433 to deviate from regular TCP behavior. 2435 The following list covers possible errors and the appropriate MPTCP 2436 behavior: 2438 o Unknown token in MP_JOIN (or HMAC failure in MP_JOIN ACK, or 2439 missing MP_JOIN in SYN/ACK response): send RST (analogous to TCP's 2440 behavior on an unknown port) 2442 o DSN out of window (during normal operation): drop the data, do not 2443 send Data ACKs 2445 o Remove request for unknown address ID: silently ignore 2447 3.9. Heuristics 2449 There are a number of heuristics that are needed for performance or 2450 deployment but that are not required for protocol correctness. In 2451 this section, we detail such heuristics. Note that discussion of 2452 buffering and certain sender and receiver window behaviors are 2453 presented in Sections 3.3.4 and 3.3.5, as well as retransmission in 2454 Section 3.3.6. 2456 3.9.1. Port Usage 2458 Under typical operation, an MPTCP implementation SHOULD use the same 2459 ports as already in use. In other words, the destination port of a 2460 SYN containing an MP_JOIN option SHOULD be the same as the remote 2461 port of the first subflow in the connection. The local port for such 2462 SYNs SHOULD also be the same as for the first subflow (and as such, 2463 an implementation SHOULD reserve ephemeral ports across all local IP 2464 addresses), although there may be cases where this is infeasible. 2465 This strategy is intended to maximize the probability of the SYN 2466 being permitted by a firewall or NAT at the recipient and to avoid 2467 confusing any network monitoring software. 2469 There may also be cases, however, where a host wishes to signal that 2470 a specific port should be used, and this facility is provided in the 2471 ADD_ADDR option as documented in Section 3.4.1. It is therefore 2472 feasible to allow multiple subflows between the same two addresses 2473 but using different port pairs, and such a facility could be used to 2474 allow load balancing within the network based on 5-tuples (e.g., some 2475 ECMP implementations [RFC2992]). 2477 3.9.2. Delayed Subflow Start and Subflow Symmetry 2479 Many TCP connections are short-lived and consist only of a few 2480 segments, and so the overheads of using MPTCP outweigh any benefits. 2481 A heuristic is required, therefore, to decide when to start using 2482 additional subflows in an MPTCP connection. Experimental deployments 2483 have shown that MPTCP can be applied in a range of scenarios so an 2484 implementation is likely to need to take into account factors 2485 including the type of traffic being sent and duration of session, and 2486 this information MAY be signalled by the application layer. 2488 However, for standard TCP traffic, a suggested general-purpose 2489 heuristic that an implementation MAY choose to employ is as follows. 2491 If a host has data buffered for its peer (which implies that the 2492 application has received a request for data), the host opens one 2493 subflow for each initial window's worth of data that is buffered. 2495 Consideration should also be given to limiting the rate of adding new 2496 subflows, as well as limiting the total number of subflows open for a 2497 particular connection. A host may choose to vary these values based 2498 on its load or knowledge of traffic and path characteristics. 2500 Note that this heuristic alone is probably insufficient. Traffic for 2501 many common applications, such as downloads, is highly asymmetric and 2502 the host that is multihomed may well be the client that will never 2503 fill its buffers, and thus never use MPTCP according to this 2504 heuristic. Advanced APIs that allow an application to signal its 2505 traffic requirements would aid in these decisions. 2507 An additional time-based heuristic could be applied, opening 2508 additional subflows after a given period of time has passed. This 2509 would alleviate the above issue, and also provide resilience for low- 2510 bandwidth but long-lived applications. 2512 Another issue is that both communicating hosts may simultaneously try 2513 to set up a subflow between the same pair of addresses. This leads 2514 to an inefficient use of resources. 2516 If the same ports are used on all subflows, as recommended above, 2517 then standard TCP simultaneous open logic should take care of this 2518 situation and only one subflow will be established between the 2519 address pairs. However, this relies on the same ports being used at 2520 both end hosts. If a host does not support TCP simultaneous open, it 2521 is RECOMMENDED that some element of randomization is applied to the 2522 time to wait before opening new subflows, so that only one subflow is 2523 created between a given address pair. If, however, hosts signal 2524 additional ports to use (for example, for leveraging ECMP on-path), 2525 this heuristic is not appropriate. 2527 This section has shown some of the considerations that an implementer 2528 should give when developing MPTCP heuristics, but is not intended to 2529 be prescriptive. 2531 3.9.3. Failure Handling 2533 Requirements for MPTCP's handling of unexpected signals have been 2534 given in Section 3.8. There are other failure cases, however, where 2535 a hosts can choose appropriate behavior. 2537 For example, Section 3.1 suggests that a host SHOULD fall back to 2538 trying regular TCP SYNs after one or more failures of MPTCP SYNs for 2539 a connection. A host may keep a system-wide cache of such 2540 information, so that it can back off from using MPTCP, firstly for 2541 that particular destination host, and eventually on a whole 2542 interface, if MPTCP connections continue failing. The duration of 2543 such a cache would be implementation-specific. 2545 Another failure could occur when the MP_JOIN handshake fails. 2546 Section 3.8 specifies that an incorrect handshake MUST lead to the 2547 subflow being closed with a RST. A host operating an active 2548 intrusion detection system may choose to start blocking MP_JOIN 2549 packets from the source host if multiple failed MP_JOIN attempts are 2550 seen. From the connection initiator's point of view, if an MP_JOIN 2551 fails, it SHOULD NOT attempt to connect to the same IP address and 2552 port during the lifetime of the connection, unless the other host 2553 refreshes the information with another ADD_ADDR option. Note that 2554 the ADD_ADDR option is informational only, and does not guarantee the 2555 other host will attempt a connection. 2557 In addition, an implementation may learn, over a number of 2558 connections, that certain interfaces or destination addresses 2559 consistently fail and may default to not trying to use MPTCP for 2560 these. Behavior could also be learned for particularly badly 2561 performing subflows or subflows that regularly fail during use, in 2562 order to temporarily choose not to use these paths. 2564 4. Semantic Issues 2566 In order to support multipath operation, the semantics of some TCP 2567 components have changed. To aid clarity, this section collects these 2568 semantic changes as a reference. 2570 Sequence number: The (in-header) TCP sequence number is specific to 2571 the subflow. To allow the receiver to reorder application data, 2572 an additional data-level sequence space is used. In this data- 2573 level sequence space, the initial SYN and the final DATA_FIN 2574 occupy 1 octet of sequence space. This is to ensure these signals 2575 are acknowledged at the connection level. There is an explicit 2576 mapping of data sequence space to subflow sequence space, which is 2577 signaled through TCP options in data packets. 2579 ACK: The ACK field in the TCP header acknowledges only the subflow 2580 sequence number, not the data-level sequence space. 2581 Implementations SHOULD NOT attempt to infer a data-level 2582 acknowledgment from the subflow ACKs. This separates subflow- and 2583 connection-level processing at an end host. 2585 Duplicate ACK: A duplicate ACK that includes any MPTCP signaling 2586 (with the exception of the DSS option) MUST NOT be treated as a 2587 signal of congestion. To limit the chances of non-MPTCP-aware 2588 entities mistakenly interpreting duplicate ACKs as a signal of 2589 congestion, MPTCP SHOULD NOT send more than two duplicate ACKs 2590 containing (non-DSS) MPTCP signals in a row. 2592 Receive Window: The receive window in the TCP header indicates the 2593 amount of free buffer space for the whole data-level connection 2594 (as opposed to for this subflow) that is available at the 2595 receiver. This is the same semantics as regular TCP, but to 2596 maintain these semantics the receive window must be interpreted at 2597 the sender as relative to the sequence number given in the 2598 DATA_ACK rather than the subflow ACK in the TCP header. In this 2599 way, the original flow control role is preserved. Note that some 2600 middleboxes may change the receive window, and so a host SHOULD 2601 use the maximum value of those recently seen on the constituent 2602 subflows for the connection-level receive window, and also needs 2603 to maintain a subflow-level window for subflow-level processing. 2605 FIN: The FIN flag in the TCP header applies only to the subflow it 2606 is sent on, not to the whole connection. For connection-level FIN 2607 semantics, the DATA_FIN option is used. 2609 RST: The RST flag in the TCP header applies only to the subflow it 2610 is sent on, not to the whole connection. The MP_FASTCLOSE option 2611 provides the fast close functionality of a RST at the MPTCP 2612 connection level. 2614 Address List: Address list management (i.e., knowledge of the local 2615 and remote hosts' lists of available IP addresses) is handled on a 2616 per-connection basis (as opposed to per subflow, per host, or per 2617 pair of communicating hosts). This permits the application of 2618 per-connection local policy. Adding an address to one connection 2619 (either explicitly through an Add Address message, or implicitly 2620 through a Join) has no implication for other connections between 2621 the same pair of hosts. 2623 5-tuple: The 5-tuple (protocol, local address, local port, remote 2624 address, remote port) presented by kernel APIs to the application 2625 layer in a non-multipath-aware application is that of the first 2626 subflow, even if the subflow has since been closed and removed 2627 from the connection. This decision, and other related API issues, 2628 are discussed in more detail in [RFC6897]. 2630 5. Security Considerations 2632 As identified in [RFC6181], the addition of multipath capability to 2633 TCP will bring with it a number of new classes of threat. In order 2634 to prevent these, [RFC6182] presents a set of requirements for a 2635 security solution for MPTCP. The fundamental goal is for the 2636 security of MPTCP to be "no worse" than regular TCP today, and the 2637 key security requirements are: 2639 o Provide a mechanism to confirm that the parties in a subflow 2640 handshake are the same as in the original connection setup. 2642 o Provide verification that the peer can receive traffic at a new 2643 address before using it as part of a connection. 2645 o Provide replay protection, i.e., ensure that a request to add/ 2646 remove a subflow is 'fresh'. 2648 In order to achieve these goals, MPTCP includes a hash-based 2649 handshake algorithm documented in Sections 3.1 and 3.2. 2651 The security of the MPTCP connection hangs on the use of keys that 2652 are shared once at the start of the first subflow, and are never sent 2653 again over the network (unless used in the fast close mechanism, 2654 Section 3.5). To ease demultiplexing while not giving away any 2655 cryptographic material, future subflows use a truncated cryptographic 2656 hash of this key as the connection identification "token". The keys 2657 are concatenated and used as keys for creating Hash-based Message 2658 Authentication Codes (HMACs) used on subflow setup, in order to 2659 verify that the parties in the handshake are the same as in the 2660 original connection setup. It also provides verification that the 2661 peer can receive traffic at this new address. Replay attacks would 2662 still be possible when only keys are used; therefore, the handshakes 2663 use single-use random numbers (nonces) at both ends -- this ensures 2664 the HMAC will never be the same on two handshakes. Guidance on 2665 generating random numbers suitable for use as keys is given in 2666 [RFC4086] and discussed in Section 3.1. The nonces are valid for the 2667 lifetime of the TCP connection attempt. HMAC is also used to secure 2668 the ADD_ADDR option, due to the threats identified in [RFC7430]. 2670 The use of crypto capability bits in the initial connection handshake 2671 to negotiate use of a particular algorithm allows the deployment of 2672 additional crypto mechanisms in the future. This negotiation would 2673 nevertheless be susceptible to a bid-down attack by an on-path active 2674 attacker who could modify the crypto capability bits in the response 2675 from the receiver to use a less secure crypto mechanism. The 2676 security mechanism presented in this document should therefore 2677 protect against all forms of flooding and hijacking attacks discussed 2678 in [RFC6181]. 2680 The version negotiation specified in Section 3.1, if differing MPTCP 2681 versions shared a common negotiation format, would allow an on-path 2682 attacker to apply a theoretical bid-down attack. Since the v1 and v0 2683 protocols have a different handshake, such an attack would require 2684 the client to re-establish the connection using v0, and this being 2685 supported by the server. Note that an on-path attacker would have 2686 access to the raw data, negating any other TCP-level security 2687 mechanisms. Also a change from RFC6824 has removed the subflow 2688 identifier from the MP_PRIO option (Section 3.3.8), to remove the 2689 theoretical attack where a subflow could be placed in "backup" mode 2690 by an attacker. 2692 During normal operation, regular TCP protection mechanisms (such as 2693 ensuring sequence numbers are in-window) will provide the same level 2694 of protection against attacks on individual TCP subflows as exists 2695 for regular TCP today. Implementations will introduce additional 2696 buffers compared to regular TCP, to reassemble data at the connection 2697 level. The application of window sizing will minimize the risk of 2698 denial-of-service attacks consuming resources. 2700 As discussed in Section 3.4.1, a host may advertise its private 2701 addresses, but these might point to different hosts in the receiver's 2702 network. The MP_JOIN handshake (Section 3.2) will ensure that this 2703 does not succeed in setting up a subflow to the incorrect host. 2704 However, it could still create unwanted TCP handshake traffic. This 2705 feature of MPTCP could be a target for denial-of-service exploits, 2706 with malicious participants in MPTCP connections encouraging the 2707 recipient to target other hosts in the network. Therefore, 2708 implementations should consider heuristics (Section 3.9) at both the 2709 sender and receiver to reduce the impact of this. 2711 To further protect against malicious ADD_ADDR messages sent by an 2712 off-path attacker, the ADD_ADDR includes an HMAC using the keys 2713 negotiated during the handshake. This effectively prevents an 2714 attacker from diverting an MPTCP connection through an off-path 2715 ADD_ADDR injection into the stream. 2717 A small security risk could theoretically exist with key reuse, but 2718 in order to accomplish a replay attack, both the sender and receiver 2719 keys, and the sender and receiver random numbers, in the MP_JOIN 2720 handshake (Section 3.2) would have to match. 2722 Whilst this specification defines a "medium" security solution, 2723 meeting the criteria specified at the start of this section and the 2724 threat analysis ([RFC6181]), since attacks only ever get worse, it is 2725 likely that a future version of MPTCP would need to be able to 2726 support stronger security. There are several ways the security of 2727 MPTCP could potentially be improved; some of these would be 2728 compatible with MPTCP as defined in this document, whilst others may 2729 not be. For now, the best approach is to get experience with the 2730 current approach, establish what might work, and check that the 2731 threat analysis is still accurate. 2733 Possible ways of improving MPTCP security could include: 2735 o defining a new MPCTP cryptographic algorithm, as negotiated in 2736 MP_CAPABLE. A sub-case could be to include an additional 2737 deployment assumption, such as stateful servers, in order to allow 2738 a more powerful algorithm to be used. 2740 o defining how to secure data transfer with MPTCP, whilst not 2741 changing the signaling part of the protocol. 2743 o defining security that requires more option space, perhaps in 2744 conjunction with a "long options" proposal for extending the TCP 2745 options space (such as those surveyed in [TCPLO]), or perhaps 2746 building on the current approach with a second stage of MPTCP- 2747 option-based security. 2749 o revisiting the working group's decision to exclusively use TCP 2750 options for MPTCP signaling, and instead look at also making use 2751 of the TCP payloads. 2753 MPTCP has been designed with several methods available to indicate a 2754 new security mechanism, including: 2756 o available flags in MP_CAPABLE (Figure 4); 2758 o available subtypes in the MPTCP option (Figure 3); 2760 o the version field in MP_CAPABLE (Figure 4); 2762 6. Interactions with Middleboxes 2764 Multipath TCP was designed to be deployable in the present world. 2765 Its design takes into account "reasonable" existing middlebox 2766 behavior. In this section, we outline a few representative 2767 middlebox-related failure scenarios and show how Multipath TCP 2768 handles them. Next, we list the design decisions multipath has made 2769 to accommodate the different middleboxes. 2771 A primary concern is our use of a new TCP option. Middleboxes should 2772 forward packets with unknown options unchanged, yet there are some 2773 that don't. These we expect will either strip options and pass the 2774 data, drop packets with new options, copy the same option into 2775 multiple segments (e.g., when doing segmentation), or drop options 2776 during segment coalescing. 2778 MPTCP uses a single new TCP option "Kind", and all message types are 2779 defined by "subtype" values (see Section 8). This should reduce the 2780 chances of only some types of MPTCP options being passed, and instead 2781 the key differing characteristics are different paths, and the 2782 presence of the SYN flag. 2784 MPTCP SYN packets on the first subflow of a connection contain the 2785 MP_CAPABLE option (Section 3.1). If this is dropped, MPTCP SHOULD 2786 fall back to regular TCP. If packets with the MP_JOIN option 2787 (Section 3.2) are dropped, the paths will simply not be used. 2789 If a middlebox strips options but otherwise passes the packets 2790 unchanged, MPTCP will behave safely. If an MP_CAPABLE option is 2791 dropped on either the outgoing or the return path, the initiating 2792 host can fall back to regular TCP, as illustrated in Figure 17 and 2793 discussed in Section 3.1. 2795 Subflow SYNs contain the MP_JOIN option. If this option is stripped 2796 on the outgoing path, the SYN will appear to be a regular SYN to Host 2797 B. Depending on whether there is a listening socket on the target 2798 port, Host B will reply either with SYN/ACK or RST (subflow 2799 connection fails). When Host A receives the SYN/ACK it sends a RST 2800 because the SYN/ACK does not contain the MP_JOIN option and its 2801 token. Either way, the subflow setup fails, but otherwise does not 2802 affect the MPTCP connection as a whole. 2804 Host A Host B 2805 | Middlebox M | 2806 | | | 2807 | SYN(MP_CAPABLE) | SYN | 2808 |-------------------|---------------->| 2809 | SYN/ACK | 2810 |<------------------------------------| 2811 a) MP_CAPABLE option stripped on outgoing path 2813 Host A Host B 2814 | SYN(MP_CAPABLE) | 2815 |------------------------------------>| 2816 | Middlebox M | 2817 | | | 2818 | SYN/ACK |SYN/ACK(MP_CAPABLE)| 2819 |<----------------|-------------------| 2820 b) MP_CAPABLE option stripped on return path 2822 Figure 17: Connection Setup with Middleboxes that Strip Options from 2823 Packets 2825 We now examine data flow with MPTCP, assuming the flow is correctly 2826 set up, which implies the options in the SYN packets were allowed 2827 through by the relevant middleboxes. If options are allowed through 2828 and there is no resegmentation or coalescing to TCP segments, 2829 Multipath TCP flows can proceed without problems. 2831 The case when options get stripped on data packets has been discussed 2832 in the Fallback section. If only some MPTCP options are stripped, 2833 behavior is not deterministic. If some data sequence mappings are 2834 lost, the connection can continue so long as mappings exist for the 2835 subflow-level data (e.g., if multiple maps have been sent that 2836 reinforce each other). If some subflow-level space is left unmapped, 2837 however, the subflow is treated as broken and is closed, through the 2838 process described in Section 3.7. MPTCP should survive with a loss 2839 of some Data ACKs, but performance will degrade as the fraction of 2840 stripped options increases. We do not expect such cases to appear in 2841 practice, though: most middleboxes will either strip all options or 2842 let them all through. 2844 We end this section with a list of middlebox classes, their behavior, 2845 and the elements in the MPTCP design that allow operation through 2846 such middleboxes. Issues surrounding dropping packets with options 2847 or stripping options were discussed above, and are not included here: 2849 o NATs [RFC3022] (Network Address (and Port) Translators) change the 2850 source address (and often source port) of packets. This means 2851 that a host will not know its public-facing address for signaling 2852 in MPTCP. Therefore, MPTCP permits implicit address addition via 2853 the MP_JOIN option, and the handshake mechanism ensures that 2854 connection attempts to private addresses [RFC1918], since they are 2855 authenticated, will only set up subflows to the correct hosts. 2856 Explicit address removal is undertaken by an Address ID to allow 2857 no knowledge of the source address. 2859 o Performance Enhancing Proxies (PEPs) [RFC3135] might proactively 2860 ACK data to increase performance. MPTCP, however, relies on 2861 accurate congestion control signals from the end host, and non- 2862 MPTCP-aware PEPs will not be able to provide such signals. MPTCP 2863 will, therefore, fall back to single-path TCP, or close the 2864 problematic subflow (see Section 3.7). 2866 o Traffic Normalizers [norm] may not allow holes in sequence 2867 numbers, and may cache packets and retransmit the same data. 2868 MPTCP looks like standard TCP on the wire, and will not retransmit 2869 different data on the same subflow sequence number. In the event 2870 of a retransmission, the same data will be retransmitted on the 2871 original TCP subflow even if it is additionally retransmitted at 2872 the connection level on a different subflow. 2874 o Firewalls [RFC2979] might perform initial sequence number 2875 randomization on TCP connections. MPTCP uses relative sequence 2876 numbers in data sequence mapping to cope with this. Like NATs, 2877 firewalls will not permit many incoming connections, so MPTCP 2878 supports address signaling (ADD_ADDR) so that a multiaddressed 2879 host can invite its peer behind the firewall/NAT to connect out to 2880 its additional interface. 2882 o Intrusion Detection/Prevention Systems (IDS/IPS) observe packet 2883 streams for patterns and content that could threaten a network. 2884 MPTCP may require the instrumentation of additional paths, and an 2885 MPTCP-aware IDS/IPS would need to read MPTCP tokens to correlate 2886 data from mutliple subflows to maintain comparable visibility into 2887 all of the traffic between devices. Without such changes, an IDS 2888 would get an incomplete view of the traffic, increasing the risk 2889 of missing traffic of interest (false negatives), and increasing 2890 the chances of erroneously identifying a subflow as a risk due to 2891 only seeing partial data (false positives). 2893 o Application-level middleboxes such as content-aware firewalls may 2894 alter the payload within a subflow, such as rewriting URIs in HTTP 2895 traffic. MPTCP will detect these using the checksum and close the 2896 affected subflow(s), if there are other subflows that can be used. 2897 If all subflows are affected, multipath will fall back to TCP, 2898 allowing such middleboxes to change the payload. MPTCP-aware 2899 middleboxes should be able to adjust the payload and MPTCP 2900 metadata in order not to break the connection. 2902 In addition, all classes of middleboxes may affect TCP traffic in the 2903 following ways: 2905 o TCP options may be removed, or packets with unknown options 2906 dropped, by many classes of middleboxes. It is intended that the 2907 initial SYN exchange, with a TCP option, will be sufficient to 2908 identify the path capabilities. If such a packet does not get 2909 through, MPTCP will end up falling back to regular TCP. 2911 o Segmentation/Coalescing (e.g., TCP segmentation offloading) might 2912 copy options between packets and might strip some options. 2913 MPTCP's data sequence mapping includes the relative subflow 2914 sequence number instead of using the sequence number in the 2915 segment. In this way, the mapping is independent of the packets 2916 that carry it. 2918 o The receive window may be shrunk by some middleboxes at the 2919 subflow level. MPTCP will use the maximum window at data level, 2920 but will also obey subflow-specific windows. 2922 7. Acknowledgments 2924 The authors gratefully acknowledge significant input into this 2925 document from Sebastien Barre and Andrew McDonald. 2927 The authors also wish to acknowledge reviews and contributions from 2928 Iljitsch van Beijnum, Lars Eggert, Marcelo Bagnulo, Robert Hancock, 2929 Pasi Sarolahti, Toby Moncaster, Philip Eardley, Sergio Lembo, 2930 Lawrence Conroy, Yoshifumi Nishida, Bob Briscoe, Stein Gjessing, 2931 Andrew McGregor, Georg Hampel, Anumita Biswas, Wes Eddy, Alexey 2932 Melnikov, Francis Dupont, Adrian Farrel, Barry Leiba, Robert Sparks, 2933 Sean Turner, Stephen Farrell, Martin Stiemerling, Gregory Detal, 2934 Fabien Duchene, Xavier de Foy, Rahul Jadhav, Klemens Schragel, Mirja 2935 Kuehlewind, Sheng Jiang, Alissa Cooper, Ines Robles, Roman Danyliw, 2936 Adam Roach, Barry Leiba, Alexey Melnikov, Eric Vyncke, and Ben Kaduk. 2938 8. IANA Considerations 2940 This document obsoletes RFC6824 and as such IANA is requested to 2941 update the TCP option space registry to point to this document for 2942 Multipath TCP, as follows: 2944 +------+--------+-----------------------+---------------+ 2945 | Kind | Length | Meaning | Reference | 2946 +------+--------+-----------------------+---------------+ 2947 | 30 | N | Multipath TCP (MPTCP) | This document | 2948 +------+--------+-----------------------+---------------+ 2950 Table 1: TCP Option Kind Numbers 2952 8.1. MPTCP Option Subtypes 2954 The 4-bit MPTCP subtype sub-registry ("MPTCP Option Subtypes" under 2955 the "Transmission Control Protocol (TCP) Parameters" registry) was 2956 defined in RFC6824. Since RFC6824 was an Experimental not Standards 2957 Track RFC, and since no further entries have occurred beyond those 2958 pointing to RFC6824, IANA is requested to replace the existing 2959 registry with Table 2 and with the following explanatory note. 2961 Note: This registry specifies the MPTCP Option Subtypes for MPTCP v1, 2962 which obsoletes the Experimental MPTCP v0. For the MPTCP v0 2963 subtypes, please refer to RFC6824. 2965 +-------+-----------------+-------------------------+---------------+ 2966 | Value | Symbol | Name | Reference | 2967 +-------+-----------------+-------------------------+---------------+ 2968 | 0x0 | MP_CAPABLE | Multipath Capable | This | 2969 | | | | document, | 2970 | | | | Section 3.1 | 2971 | 0x1 | MP_JOIN | Join Connection | This | 2972 | | | | document, | 2973 | | | | Section 3.2 | 2974 | 0x2 | DSS | Data Sequence Signal | This | 2975 | | | (Data ACK and data | document, | 2976 | | | sequence mapping) | Section 3.3 | 2977 | 0x3 | ADD_ADDR | Add Address | This | 2978 | | | | document, | 2979 | | | | Section 3.4.1 | 2980 | 0x4 | REMOVE_ADDR | Remove Address | This | 2981 | | | | document, | 2982 | | | | Section 3.4.2 | 2983 | 0x5 | MP_PRIO | Change Subflow Priority | This | 2984 | | | | document, | 2985 | | | | Section 3.3.8 | 2986 | 0x6 | MP_FAIL | Fallback | This | 2987 | | | | document, | 2988 | | | | Section 3.7 | 2989 | 0x7 | MP_FASTCLOSE | Fast Close | This | 2990 | | | | document, | 2991 | | | | Section 3.5 | 2992 | 0x8 | MP_TCPRST | Subflow Reset | This | 2993 | | | | document, | 2994 | | | | Section 3.6 | 2995 | 0xf | MP_EXPERIMENTAL | Reserved for private | | 2996 | | | experiments | | 2997 +-------+-----------------+-------------------------+---------------+ 2999 Table 2: MPTCP Option Subtypes 3001 Values 0x9 through 0xe are currently unassigned. Option 0xf is 3002 reserved for use by private experiments. Its use may be formalized 3003 in a future specification. Future assignments in this registry are 3004 to be defined by Standards Action as defined by [RFC8126]. 3005 Assignments consist of the MPTCP subtype's symbolic name and its 3006 associated value, and a reference to its specification. 3008 8.2. MPTCP Handshake Algorithms 3010 The "MPTCP Handshake Algorithms" sub-registry under the "Transmission 3011 Control Protocol (TCP) Parameters" registry was defined in RFC6824. 3012 Since RFC6824 was an Experimental not Standards Track RFC, and since 3013 no further entries have occurred beyond those pointing to RFC6824, 3014 IANA is requested to replace the existing registry with Table 3 and 3015 with the following explanatory note. 3017 Note: This registry specifies the MPTCP Handshake Algorithms for 3018 MPTCP v1, which obsoletes the Experimental MPTCP v0. For the MPTCP 3019 v0 subtypes, please refer to RFC6824. 3021 +-------+----------------------------------------+------------------+ 3022 | Flag | Meaning | Reference | 3023 | Bit | | | 3024 +-------+----------------------------------------+------------------+ 3025 | A | Checksum required | This document, | 3026 | | | Section 3.1 | 3027 | B | Extensibility | This document, | 3028 | | | Section 3.1 | 3029 | C | Do not attempt to establish new | This document, | 3030 | | subflows to the source address. | Section 3.1 | 3031 | D-G | Unassigned | | 3032 | H | HMAC-SHA256 | This document, | 3033 | | | Section 3.2 | 3034 +-------+----------------------------------------+------------------+ 3036 Table 3: MPTCP Handshake Algorithms 3038 Note that the meanings of bits D through H can be dependent upon bit 3039 B, depending on how Extensibility is defined in future 3040 specifications; see Section 3.1 for more information. 3042 Future assignments in this registry are also to be defined by 3043 Standards Action as defined by [RFC8126]. Assignments consist of the 3044 value of the flags, a symbolic name for the algorithm, and a 3045 reference to its specification. 3047 8.3. MP_TCPRST Reason Codes 3049 IANA is requested to create a further sub-registry, "MPTCP MP_TCPRST 3050 Reason Codes" under the "Transmission Control Protocol (TCP) 3051 Parameters" registry, based on the reason code in MP_TCPRST 3052 (Section 3.6) message. Initial values for this registry are given in 3053 Table 4; future assignments are to be defined by Specification 3054 Required as defined by [RFC8126]. Assignments consist of the value 3055 of the code, a short description of its meaning, and a reference to 3056 its specification. The maximum value is 0xff. 3058 As guidance to the Designated Expert [RFC8126], assignments should 3059 not normally be refused unless codepoint space is becoming scarce, 3060 providing that there is a clear distinction from other, already- 3061 existing codes, and also providing there is sufficient guidance for 3062 implementors both sending and receiving these codes. 3064 +------+-----------------------------+----------------------------+ 3065 | Code | Meaning | Reference | 3066 +------+-----------------------------+----------------------------+ 3067 | 0x00 | Unspecified TCP error | This document, Section 3.6 | 3068 | 0x01 | MPTCP specific error | This document, Section 3.6 | 3069 | 0x02 | Lack of resources | This document, Section 3.6 | 3070 | 0x03 | Administratively prohibited | This document, Section 3.6 | 3071 | 0x04 | Too much outstanding data | This document, Section 3.6 | 3072 | 0x05 | Unacceptable performance | This document, Section 3.6 | 3073 | 0x06 | Middlebox interference | This document, Section 3.6 | 3074 +------+-----------------------------+----------------------------+ 3076 Table 4: MPTCP MP_TCPRST Reason Codes 3078 9. References 3080 9.1. Normative References 3082 [RFC0793] Postel, J., "Transmission Control Protocol", STD 7, 3083 RFC 793, DOI 10.17487/RFC0793, September 1981, 3084 . 3086 [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- 3087 Hashing for Message Authentication", RFC 2104, 3088 DOI 10.17487/RFC2104, February 1997, . 3091 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 3092 Requirement Levels", BCP 14, RFC 2119, 3093 DOI 10.17487/RFC2119, March 1997, . 3096 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 3097 Robustness to Blind In-Window Attacks", RFC 5961, 3098 DOI 10.17487/RFC5961, August 2010, . 3101 [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms 3102 (SHA and SHA-based HMAC and HKDF)", RFC 6234, 3103 DOI 10.17487/RFC6234, May 2011, . 3106 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 3107 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 3108 May 2017, . 3110 9.2. Informative References 3112 [deployments] 3113 Bonaventure, O. and S. Seo, "Multipath TCP Deployments", 3114 IETF Journal 2016, November 2016, 3115 . 3117 [howhard] Raiciu, C., Paasch, C., Barre, S., Ford, A., Honda, M., 3118 Duchene, F., Bonaventure, O., and M. Handley, "How Hard 3119 Can It Be? Designing and Implementing a Deployable 3120 Multipath TCP", Usenix Symposium on Networked Systems 3121 Design and Implementation 2012, 2012, 3122 . 3125 [norm] Handley, M., Paxson, V., and C. Kreibich, "Network 3126 Intrusion Detection: Evasion, Traffic Normalization, and 3127 End-to-End Protocol Semantics", Usenix Security 2001, 3128 2001, 3129 . 3132 [RFC1122] Braden, R., Ed., "Requirements for Internet Hosts - 3133 Communication Layers", STD 3, RFC 1122, 3134 DOI 10.17487/RFC1122, October 1989, . 3137 [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., 3138 and E. Lear, "Address Allocation for Private Internets", 3139 BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, 3140 . 3142 [RFC2018] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP 3143 Selective Acknowledgment Options", RFC 2018, 3144 DOI 10.17487/RFC2018, October 1996, . 3147 [RFC2979] Freed, N., "Behavior of and Requirements for Internet 3148 Firewalls", RFC 2979, DOI 10.17487/RFC2979, October 2000, 3149 . 3151 [RFC2992] Hopps, C., "Analysis of an Equal-Cost Multi-Path 3152 Algorithm", RFC 2992, DOI 10.17487/RFC2992, November 2000, 3153 . 3155 [RFC3022] Srisuresh, P. and K. Egevang, "Traditional IP Network 3156 Address Translator (Traditional NAT)", RFC 3022, 3157 DOI 10.17487/RFC3022, January 2001, . 3160 [RFC3135] Border, J., Kojo, M., Griner, J., Montenegro, G., and Z. 3161 Shelby, "Performance Enhancing Proxies Intended to 3162 Mitigate Link-Related Degradations", RFC 3135, 3163 DOI 10.17487/RFC3135, June 2001, . 3166 [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, 3167 "Randomness Requirements for Security", BCP 106, RFC 4086, 3168 DOI 10.17487/RFC4086, June 2005, . 3171 [RFC4987] Eddy, W., "TCP SYN Flooding Attacks and Common 3172 Mitigations", RFC 4987, DOI 10.17487/RFC4987, August 2007, 3173 . 3175 [RFC5681] Allman, M., Paxson, V., and E. Blanton, "TCP Congestion 3176 Control", RFC 5681, DOI 10.17487/RFC5681, September 2009, 3177 . 3179 [RFC6181] Bagnulo, M., "Threat Analysis for TCP Extensions for 3180 Multipath Operation with Multiple Addresses", RFC 6181, 3181 DOI 10.17487/RFC6181, March 2011, . 3184 [RFC6182] Ford, A., Raiciu, C., Handley, M., Barre, S., and J. 3185 Iyengar, "Architectural Guidelines for Multipath TCP 3186 Development", RFC 6182, DOI 10.17487/RFC6182, March 2011, 3187 . 3189 [RFC6356] Raiciu, C., Handley, M., and D. Wischik, "Coupled 3190 Congestion Control for Multipath Transport Protocols", 3191 RFC 6356, DOI 10.17487/RFC6356, October 2011, 3192 . 3194 [RFC6528] Gont, F. and S. Bellovin, "Defending against Sequence 3195 Number Attacks", RFC 6528, DOI 10.17487/RFC6528, February 3196 2012, . 3198 [RFC6897] Scharf, M. and A. Ford, "Multipath TCP (MPTCP) Application 3199 Interface Considerations", RFC 6897, DOI 10.17487/RFC6897, 3200 March 2013, . 3202 [RFC7323] Borman, D., Braden, B., Jacobson, V., and R. 3203 Scheffenegger, Ed., "TCP Extensions for High Performance", 3204 RFC 7323, DOI 10.17487/RFC7323, September 2014, 3205 . 3207 [RFC7413] Cheng, Y., Chu, J., Radhakrishnan, S., and A. Jain, "TCP 3208 Fast Open", RFC 7413, DOI 10.17487/RFC7413, December 2014, 3209 . 3211 [RFC7430] Bagnulo, M., Paasch, C., Gont, F., Bonaventure, O., and C. 3212 Raiciu, "Analysis of Residual Threats and Possible Fixes 3213 for Multipath TCP (MPTCP)", RFC 7430, 3214 DOI 10.17487/RFC7430, July 2015, . 3217 [RFC8041] Bonaventure, O., Paasch, C., and G. Detal, "Use Cases and 3218 Operational Experience with Multipath TCP", RFC 8041, 3219 DOI 10.17487/RFC8041, January 2017, . 3222 [RFC8126] Cotton, M., Leiba, B., and T. Narten, "Guidelines for 3223 Writing an IANA Considerations Section in RFCs", BCP 26, 3224 RFC 8126, DOI 10.17487/RFC8126, June 2017, 3225 . 3227 [TCPLO] Ramaiah, A., "TCP option space extension", Work 3228 in Progress, March 2012. 3230 Appendix A. Notes on Use of TCP Options 3232 The TCP option space is limited due to the length of the Data Offset 3233 field in the TCP header (4 bits), which defines the TCP header length 3234 in 32-bit words. With the standard TCP header being 20 bytes, this 3235 leaves a maximum of 40 bytes for options, and many of these may 3236 already be used by options such as timestamp and SACK. 3238 We have performed a brief study on the commonly used TCP options in 3239 SYN, data, and pure ACK packets, and found that there is enough room 3240 to fit all the options we propose using in this document. 3242 SYN packets typically include Maximum Segment Size (MSS) (4 bytes), 3243 window scale (3 bytes), SACK permitted (2 bytes), and timestamp (10 3244 bytes) options. Together these sum to 19 bytes. Some operating 3245 systems appear to pad each option up to a word boundary, thus using 3246 24 bytes (a brief survey suggests Windows XP and Mac OS X do this, 3247 whereas Linux does not). Optimistically, therefore, we have 21 bytes 3248 spare, or 16 if it has to be word-aligned. In either case, however, 3249 the SYN versions of Multipath Capable (12 bytes) and Join (12 or 16 3250 bytes) options will fit in this remaining space. 3252 Note that due to the use of a 64-bit data-level sequence space, it is 3253 feasible that MPTCP will not require the timestamp option for 3254 protection against wrapped sequence numbers (PAWS [RFC7323]), since 3255 the data-level sequence space has far less chance of wrapping. 3256 Confirmation of the validity of this optimisation is for further 3257 study. 3259 TCP data packets typically carry timestamp options in every packet, 3260 taking 10 bytes (or 12 with padding). That leaves 30 bytes (or 28, 3261 if word-aligned). The Data Sequence Signal (DSS) option varies in 3262 length depending on whether the data sequence mapping and DATA_ACK 3263 are included, and whether the sequence numbers in use are 4 or 8 3264 octets. The maximum size of the DSS option is 28 bytes, so even that 3265 will fit in the available space. But unless a connection is both 3266 bidirectional and high-bandwidth, it is unlikely that all that option 3267 space will be required on each DSS option. 3269 Within the DSS option, it is not necessary to include the data 3270 sequence mapping and DATA_ACK in each packet, and in many cases it 3271 may be possible to alternate their presence (so long as the mapping 3272 covers the data being sent in the following packet). It would also 3273 be possible to alternate between 4- and 8-byte sequence numbers in 3274 each option. 3276 On subflow and connection setup, an MPTCP option is also set on the 3277 third packet (an ACK). These are 20 bytes (for Multipath Capable) 3278 and 24 bytes (for Join), both of which will fit in the available 3279 option space. 3281 Pure ACKs in TCP typically contain only timestamps (10 bytes). Here, 3282 Multipath TCP typically needs to encode only the DATA_ACK (maximum of 3283 12 bytes). Occasionally, ACKs will contain SACK information. 3284 Depending on the number of lost packets, SACK may utilize the entire 3285 option space. If a DATA_ACK had to be included, then it is probably 3286 necessary to reduce the number of SACK blocks to accommodate the 3287 DATA_ACK. However, the presence of the DATA_ACK is unlikely to be 3288 necessary in a case where SACK is in use, since until at least some 3289 of the SACK blocks have been retransmitted, the cumulative data-level 3290 ACK will not be moving forward (or if it does, due to retransmissions 3291 on another path, then that path can also be used to transmit the new 3292 DATA_ACK). 3294 The ADD_ADDR option can be between 16 and 30 bytes, depending on 3295 whether IPv4 or IPv6 is used, and whether or not the port number is 3296 present. It is unlikely that such signaling would fit in a data 3297 packet (although if there is space, it is fine to include it). It is 3298 recommended to use duplicate ACKs with no other payload or options in 3299 order to transmit these rare signals. Note this is the reason for 3300 mandating that duplicate ACKs with MPTCP options are not taken as a 3301 signal of congestion. 3303 Appendix B. TCP Fast Open and MPTCP 3305 TCP Fast Open (TFO) is an experimental TCP extension, described in 3306 [RFC7413], which has been introduced to allow sending data one RTT 3307 earlier than with regular TCP. This is considered a valuable gain as 3308 very short connections are very common, especially for HTTP request/ 3309 response schemes. It achieves this by sending the SYN-segment 3310 together with the application's data and allowing the listener to 3311 reply immediately with data after the SYN/ACK. [RFC7413] secures 3312 this mechanism, by using a new TCP option that includes a cookie 3313 which is negotiated in a preceding connection. 3315 When using TCP Fast Open in conjunction with MPTCP, there are two key 3316 points to take into account, detailed hereafter. 3318 B.1. TFO cookie request with MPTCP 3320 When a TFO initiator first connects to a listener, it cannot 3321 immediately include data in the SYN for security reasons [RFC7413]. 3322 Instead, it requests a cookie that will be used in subsequent 3323 connections. This is done with the TCP cookie request/response 3324 options, of respectively 2 bytes and 6-18 bytes (depending on the 3325 chosen cookie length). 3327 TFO and MPTCP can be combined provided that the total length of all 3328 the options does not exceed the maximum 40 bytes possible in TCP: 3330 o In the SYN: MPTCP uses a 4-bytes long MP_CAPABLE option. The 3331 MPTCP and TFO options sum up to 6 bytes. With typical TCP-options 3332 using up to 19 bytes in the SYN (24 bytes if options are padded at 3333 a word boundary), there is enough space to combine the MP_CAPABLE 3334 with the TFO Cookie Request. 3336 o In the SYN+ACK: MPTCP uses a 12-bytes long MP_CAPABLE option, but 3337 now TFO can be as long as 18 bytes. Since the maximum option 3338 length may be exceeded, it is up to the listener to solve this by 3339 using a shorter cookie. As an example, if we consider that 19 3340 bytes are used for classical TCP options, the maximum possible 3341 cookie length would be of 7 bytes. Note that the same limitation 3342 applies to subsequent connections, for the SYN packet (because the 3343 initiator then echoes back the cookie to the listener). Finally, 3344 if the security impact of reducing the cookie size is not deemed 3345 acceptable, the listener can reduce the amount of other TCP- 3346 options by omitting the TCP timestamps (as outlined in 3347 Appendix A). 3349 B.2. Data sequence mapping under TFO 3351 MPTCP uses, in the TCP establishment phase, a key exchange that is 3352 used to generate the Initial Data Sequence Numbers (IDSNs). In 3353 particular, the SYN with MP_CAPABLE occupies the first octet of the 3354 data sequence space. With TFO, one way to handle the data sent 3355 together with the SYN would be to consider an implicit DSS mapping 3356 that covers that SYN segment (since there is not enough space in the 3357 SYN to include a DSS option). The problem with that approach is that 3358 if a middlebox modifies the TFO data, this will not be noticed by 3359 MPTCP because of the absence of a DSS-checksum. For example, a TCP 3360 (but not MPTCP)-aware middlebox could insert bytes at the beginning 3361 of the stream and adapt the TCP checksum and sequence numbers 3362 accordingly. With an implicit mapping, this would give to initiator 3363 and listener a different view on the DSS-mapping, with no way to 3364 detect this inconsistency as the DSS checksum is not present. 3366 To solve this, the TFO data must not be considered part of the Data 3367 Sequence Number space: the SYN with MP_CAPABLE still occupies the 3368 first octet of data sequence space, but then the first non-TFO data 3369 byte occupies the second octet. This guarantees that, if the use of 3370 DSS-checksum is negotiated, all data in the data sequence number 3371 space is checksummed. We also note that this does not entail a loss 3372 of functionality, because TFO-data is always only sent on the initial 3373 subflow before any attempt to create additional subflows. 3375 B.3. Connection establishment examples 3377 The following shows a few examples of possible TFO+MPTCP 3378 establishment scenarios. 3380 Before an initiator can send data together with the SYN, it must 3381 request a cookie to the listener, as shown in Figure 18. This is 3382 done by simply combining the TFO and MPTCP options. 3384 initiator listener 3385 | | 3386 | S Seq=0(Length=0) , | 3387 | -----------------------------------------------------------> | 3388 | | 3389 | S. 0(0) ack 1 , | 3390 | <----------------------------------------------------------- | 3391 | | 3392 | . 0(0) ack 1 | 3393 | -----------------------------------------------------------> | 3394 | | 3396 Figure 18: Cookie request - sequence number and length are annotated 3397 as Seq(Length) and used hereafter in the figures. 3399 Once this is done, the received cookie can be used for TFO, as shown 3400 in Figure 19. In this example, the initiator first sends 20 bytes in 3401 the SYN. The listener immediately replies with 100 bytes following 3402 the SYN-ACK upon which the initiator replies with 20 more bytes. 3403 Note that the last segment in the figure has a TCP sequence number of 3404 21, while the DSS subflow sequence number is 1 (because the TFO data 3405 is not part of the data sequence number space, as explained in 3406 Section Appendix B.2. 3408 initiator listener 3409 | | 3410 | S 0(20) , | 3411 | -----------------------------------------------------------> | 3412 | | 3413 | S. 0(0) ack 21 | 3414 | <----------------------------------------------------------- | 3415 | | 3416 | . 1(100) ack 21 | 3417 | <----------------------------------------------------------- | 3418 | | 3419 | . 21(0) ack 1 | 3420 | -----------------------------------------------------------> | 3421 | | 3422 | . 21(20) ack 101 | 3423 | -----------------------------------------------------------> | 3424 | | 3426 Figure 19: The listener supports TFO 3428 In Figure 20, the listener does not support TFO. The initiator 3429 detects that no state is created in the listener (as no data is 3430 acked), and now sends the MP_CAPABLE in the third ack, in order for 3431 the listener to build its MPTCP context at then end of the 3432 establishment. Now, the tfo data, retransmitted, becomes part of the 3433 data sequence mapping because it is effectively sent (in fact re- 3434 sent) after the establishment. 3436 initiator listener 3437 | | 3438 | S 0(20) , | 3439 | -----------------------------------------------------------> | 3440 | | 3441 | S. 0(0) ack 1 | 3442 | <----------------------------------------------------------- | 3443 | | 3444 | . 1(0) ack 1 | 3445 | -----------------------------------------------------------> | 3446 | | 3447 | . 1(20) ack 1 | 3448 | -----------------------------------------------------------> | 3449 | | 3450 | . 0(0) ack 21 | 3451 | <----------------------------------------------------------- | 3452 | | 3454 Figure 20: The listener does not support TFO 3456 It is also possible that the listener acknowledges only part of the 3457 TFO data, as illustrated in Figure 21. The initiator will simply 3458 retransmit the missing data together with a DSS-mapping. 3460 initiator listener 3461 | | 3462 | S 0(1000) , | 3463 | -----------------------------------------------------------> | 3464 | | 3465 | S. 0(0) ack 501 | 3466 | <----------------------------------------------------------- | 3467 | | 3468 | . 501(0) ack 1 | 3469 | -----------------------------------------------------------> | 3470 | | 3471 | . 501(500) ack 1 | 3472 | -----------------------------------------------------------> | 3473 | | 3475 Figure 21: Partial data acknowledgement 3477 Appendix C. Control Blocks 3479 Conceptually, an MPTCP connection can be represented as an MPTCP 3480 protocol control block (PCB) that contains several variables that 3481 track the progress and the state of the MPTCP connection and a set of 3482 linked TCP control blocks that correspond to the subflows that have 3483 been established. 3485 RFC 793 [RFC0793] specifies several state variables. Whenever 3486 possible, we reuse the same terminology as RFC 793 to describe the 3487 state variables that are maintained by MPTCP. 3489 C.1. MPTCP Control Block 3491 The MPTCP control block contains the following variable per 3492 connection. 3494 C.1.1. Authentication and Metadata 3496 Local.Token (32 bits): This is the token chosen by the local host on 3497 this MPTCP connection. The token must be unique among all 3498 established MPTCP connections, and is generated from the local 3499 key. 3501 Local.Key (64 bits): This is the key sent by the local host on this 3502 MPTCP connection. 3504 Remote.Token (32 bits): This is the token chosen by the remote host 3505 on this MPTCP connection, generated from the remote key. 3507 Remote.Key (64 bits): This is the key chosen by the remote host on 3508 this MPTCP connection 3510 MPTCP.Checksum (flag): This flag is set to true if at least one of 3511 the hosts has set the A bit in the MP_CAPABLE options exchanged 3512 during connection establishment, and is set to false otherwise. 3513 If this flag is set, the checksum must be computed in all DSS 3514 options. 3516 C.1.2. Sending Side 3518 SND.UNA (64 bits): This is the data sequence number of the next byte 3519 to be acknowledged, at the MPTCP connection level. This variable 3520 is updated upon reception of a DSS option containing a DATA_ACK. 3522 SND.NXT (64 bits): This is the data sequence number of the next byte 3523 to be sent. SND.NXT is used to determine the value of the DSN in 3524 the DSS option. 3526 SND.WND (32 bits with RFC 7323, 16 bits otherwise): This is the 3527 sending window. MPTCP maintains the sending window at the MPTCP 3528 connection level and the same window is shared by all subflows. 3529 All subflows use the MPTCP connection level SND.WND to compute the 3530 SEQ.WND value that is sent in each transmitted segment. 3532 C.1.3. Receiving Side 3534 RCV.NXT (64 bits): This is the data sequence number of the next byte 3535 that is expected on the MPTCP connection. This state variable is 3536 modified upon reception of in-order data. The value of RCV.NXT is 3537 used to specify the DATA_ACK that is sent in the DSS option on all 3538 subflows. 3540 RCV.WND (32 bits with RFC 7323, 16 bits otherwise): This is the 3541 connection-level receive window, which is the maximum of the 3542 RCV.WND on all the subflows. 3544 C.2. TCP Control Blocks 3546 The MPTCP control block also contains a list of the TCP control 3547 blocks that are associated with the MPTCP connection. 3549 Note that the TCP control block on the TCP subflows does not contain 3550 the RCV.WND and SND.WND state variables as these are maintained at 3551 the MPTCP connection level and not at the subflow level. 3553 Inside each TCP control block, the following state variables are 3554 defined. 3556 C.2.1. Sending Side 3558 SND.UNA (32 bits): This is the sequence number of the next byte to 3559 be acknowledged on the subflow. This variable is updated upon 3560 reception of each TCP acknowledgment on the subflow. 3562 SND.NXT (32 bits): This is the sequence number of the next byte to 3563 be sent on the subflow. SND.NXT is used to set the value of 3564 SEG.SEQ upon transmission of the next segment. 3566 C.2.2. Receiving Side 3568 RCV.NXT (32 bits): This is the sequence number of the next byte that 3569 is expected on the subflow. This state variable is modified upon 3570 reception of in-order segments. The value of RCV.NXT is copied to 3571 the SEG.ACK field of the next segments transmitted on the subflow. 3573 RCV.WND (32 bits with RFC 7323, 16 bits otherwise): This is the 3574 subflow-level receive window that is updated with the window field 3575 from the segments received on this subflow. 3577 Appendix D. Finite State Machine 3579 The diagram in Figure 22 shows the Finite State Machine for 3580 connection-level closure. This illustrates how the DATA_FIN 3581 connection-level signal (indicated in the diagram as the DFIN flag on 3582 a DATA_ACK) interacts with subflow-level FINs, and permits "break- 3583 before-make" handover between subflows. 3585 +---------+ 3586 | M_ESTAB | 3587 +---------+ 3588 M_CLOSE | | rcv DATA_FIN 3589 ------- | | ------- 3590 +---------+ snd DATA_FIN / \ snd DATA_ACK[DFIN] +---------+ 3591 | M_FIN |<----------------- ------------------->| M_CLOSE | 3592 | WAIT-1 |--------------------------- | WAIT | 3593 +---------+ rcv DATA_FIN \ +---------+ 3594 | rcv DATA_ACK[DFIN] ------- | M_CLOSE | 3595 | -------------- snd DATA_ACK | ------- | 3596 | CLOSE all subflows | snd DATA_FIN | 3597 V V V 3598 +-----------+ +-----------+ +-----------+ 3599 |M_FINWAIT-2| | M_CLOSING | | M_LAST-ACK| 3600 +-----------+ +-----------+ +-----------+ 3601 | rcv DATA_ACK[DFIN] | rcv DATA_ACK[DFIN] | 3602 | rcv DATA_FIN -------------- | -------------- | 3603 | ------- CLOSE all subflows | CLOSE all subflows | 3604 | snd DATA_ACK[DFIN] V delete MPTCP PCB V 3605 \ +-----------+ +---------+ 3606 ------------------------>|M_TIME WAIT|----------------->| M_CLOSED| 3607 +-----------+ +---------+ 3608 All subflows in CLOSED 3609 ------------ 3610 delete MPTCP PCB 3612 Figure 22: Finite State Machine for Connection Closure 3614 Appendix E. Changes from RFC6824 3616 This section lists the key technical changes between RFC6824, 3617 specifying MPTCP v0, and this document, which obsoletes RFC6824 and 3618 specifies MPTCP v1. Note that this specification is not backwards 3619 compatible with RFC6824. 3621 o The document incorporates lessons learnt from the various 3622 implementations, deployments and experiments gathered in the 3623 documents "Use Cases and Operational Experience with Multipath 3624 TCP" [RFC8041] and the IETF Journal article "Multipath TCP 3625 Deployments" [deployments]. 3627 o Connection initiation, through the exchange of the MP_CAPABLE 3628 MPTCP option, is different from RFC6824. The SYN no longer 3629 includes the initiator's key, allowing the MP_CAPABLE option on 3630 the SYN to be shorter in length, and to avoid duplicating the 3631 sending of keying material. 3633 o This also ensures reliable delivery of the key on the MP_CAPABLE 3634 option by allowing its transmission to be combined with data and 3635 thus using TCP's in-built reliability mechanism. If the initiator 3636 does not immediately have data to send, the MP_CAPABLE option with 3637 the keys will be repeated on the first data packet. If the other 3638 end is first to send, then the presence of the DSS option 3639 implicitly confirms the receipt of the MP_CAPABLE. 3641 o In the Flags field of MP_CAPABLE, C is now assigned to mean that 3642 the sender of this option will not accept additional MPTCP 3643 subflows to the source address and port. This is an efficiency 3644 improvement, for example where the sender is behind a strict NAT. 3646 o In the Flags field of MP_CAPABLE, H now indicates the use of HMAC- 3647 SHA256 (rather than HMAC-SHA1). 3649 o Connection initiation also defines the procedure for version 3650 negotiation, for implementations that support both v0 (RFC6824) 3651 and v1 (this document). 3653 o The HMAC-SHA256 (rather than HMAC-SHA1) algorithm is used, as the 3654 algorithm provides better security. It is used to generate the 3655 token in the MP_JOIN and ADD_ADDR messages, and to set the initial 3656 data sequence number. 3658 o A new subflow-level option exists to signal reasons for sending a 3659 RST on a subflow (MP_TCPRST Section 3.6), which can help an 3660 implementation decide whether to attempt later re-connection. 3662 o The MP_PRIO option (Section 3.3.8), which is used to signal a 3663 change of priority for a subflow, no longer includes the AddrID 3664 field. Its purpose was to allow the changed priority to be 3665 applied on a subflow other than the one it was sent on. However, 3666 it has been realised that this could be used by a man-in-the- 3667 middle to divert all traffic on to its own path, and MP_PRIO does 3668 not include a token or other security mechanism. 3670 o The ADD_ADDR option (Section 3.4.1), which is used to inform the 3671 other host about another potential address, is different in 3672 several ways. It now includes an HMAC of the added address, for 3673 enhanced security. In addition, reliability for the ADD_ADDR 3674 option has been added: the IPVer field is replaced with a flag 3675 field, and one flag is assigned (E) which is used as an 'Echo' so 3676 a host can indicate that it has received the option. 3678 o An additional way of performing a Fast Close is described, by 3679 sending a MP_FASTCLOSE option on a RST on all subflows. This 3680 allows the host to tear down the subflows and the connection 3681 immediately. 3683 o In the IANA registry a new MPTCP subtype option, MP_EXPERIMENTAL, 3684 is reserved for private experiments. However, the document 3685 doesn't define how to use the subtype option. 3687 o A new Appendix discusses the usage of both the MPTCP and TCP Fast 3688 Open on the same packet (Appendix B). 3690 Authors' Addresses 3692 Alan Ford 3693 Pexip 3695 EMail: alan.ford@gmail.com 3697 Costin Raiciu 3698 University Politehnica of Bucharest 3699 Splaiul Independentei 313 3700 Bucharest 3701 Romania 3703 EMail: costin.raiciu@cs.pub.ro 3705 Mark Handley 3706 University College London 3707 Gower Street 3708 London WC1E 6BT 3709 UK 3711 EMail: m.handley@cs.ucl.ac.uk 3713 Olivier Bonaventure 3714 Universite catholique de Louvain 3715 Pl. Ste Barbe, 2 3716 Louvain-la-Neuve 1348 3717 Belgium 3719 EMail: olivier.bonaventure@uclouvain.be 3720 Christoph Paasch 3721 Apple, Inc. 3722 Cupertino 3723 US 3725 EMail: cpaasch@apple.com