idnits 2.17.1 draft-ietf-mptcp-multiaddressed-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 21, 2010) is 5058 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- -- Obsolete informational reference (is this intentional?): RFC 793 (ref. '2') (Obsoleted by RFC 9293) == Outdated reference: A later version (-05) exists of draft-ietf-mptcp-architecture-00 == Outdated reference: A later version (-04) exists of draft-scharf-mptcp-api-01 -- Obsolete informational reference (is this intentional?): RFC 4960 (ref. '9') (Obsoleted by RFC 9260) == Outdated reference: A later version (-08) exists of draft-ietf-mptcp-threat-02 Summary: 0 errors (**), 0 flaws (~~), 4 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 Roke Manor Research 4 Intended status: Experimental C. Raiciu 5 Expires: December 23, 2010 M. Handley 6 University College London 7 June 21, 2010 9 TCP Extensions for Multipath Operation with Multiple Addresses 10 draft-ietf-mptcp-multiaddressed-00 12 Abstract 14 TCP/IP communication is currently restricted to a single path per 15 connection, yet multiple paths often exist between peers. The 16 simultaneous use of these multiple paths for a TCP/IP session would 17 improve resource usage within the network, and thus improve user 18 experience through higher throughput and improved resilience to 19 network failure. 21 Multipath TCP provides the ability to simultaneously use multiple 22 paths between peers. This document presents a set of extensions to 23 traditional TCP to support multipath operation. The protocol offers 24 the same type of service to applications as TCP - reliable bytestream 25 - and provides the components necessary to establish and use multiple 26 TCP flows across potentially disjoint paths. 28 Status of this Memo 30 This Internet-Draft is submitted in full conformance with the 31 provisions of BCP 78 and BCP 79. 33 Internet-Drafts are working documents of the Internet Engineering 34 Task Force (IETF). Note that other groups may also distribute 35 working documents as Internet-Drafts. The list of current Internet- 36 Drafts is at http://datatracker.ietf.org/drafts/current/. 38 Internet-Drafts are draft documents valid for a maximum of six months 39 and may be updated, replaced, or obsoleted by other documents at any 40 time. It is inappropriate to use Internet-Drafts as reference 41 material or to cite them other than as "work in progress." 43 This Internet-Draft will expire on December 23, 2010. 45 Copyright Notice 47 Copyright (c) 2010 IETF Trust and the persons identified as the 48 document authors. All rights reserved. 50 This document is subject to BCP 78 and the IETF Trust's Legal 51 Provisions Relating to IETF Documents 52 (http://trustee.ietf.org/license-info) in effect on the date of 53 publication of this document. Please review these documents 54 carefully, as they describe your rights and restrictions with respect 55 to this document. Code Components extracted from this document must 56 include Simplified BSD License text as described in Section 4.e of 57 the Trust Legal Provisions and are provided without warranty as 58 described in the Simplified BSD License. 60 Table of Contents 62 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 63 1.1. Design Assumptions . . . . . . . . . . . . . . . . . . . . 4 64 1.2. Multipath TCP in the Networking Stack . . . . . . . . . . 5 65 1.3. Operation Summary . . . . . . . . . . . . . . . . . . . . 6 66 1.4. Requirements Language . . . . . . . . . . . . . . . . . . 7 67 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 7 68 3. Semantic Issues . . . . . . . . . . . . . . . . . . . . . . . 8 69 4. MPTCP Protocol . . . . . . . . . . . . . . . . . . . . . . . . 9 70 4.1. Connection Initiation . . . . . . . . . . . . . . . . . . 9 71 4.2. Starting a New Subflow . . . . . . . . . . . . . . . . . . 11 72 4.3. Address Knowledge Exchange (Path Management) . . . . . . . 13 73 4.3.1. Address Advertisement . . . . . . . . . . . . . . . . 14 74 4.3.2. Remove Address . . . . . . . . . . . . . . . . . . . . 17 75 4.4. General MPTCP Operation . . . . . . . . . . . . . . . . . 18 76 4.4.1. Data Sequence Numbering . . . . . . . . . . . . . . . 18 77 4.4.2. Data Acknowledgements . . . . . . . . . . . . . . . . 20 78 4.4.3. Receiver Considerations . . . . . . . . . . . . . . . 21 79 4.4.4. Sender Considerations . . . . . . . . . . . . . . . . 22 80 4.4.5. Congestion Control Considerations . . . . . . . . . . 24 81 4.4.6. Subflow Policy . . . . . . . . . . . . . . . . . . . . 24 82 4.5. Closing a Connection . . . . . . . . . . . . . . . . . . . 25 83 4.6. Fallback . . . . . . . . . . . . . . . . . . . . . . . . . 27 84 4.7. Error Handling . . . . . . . . . . . . . . . . . . . . . . 29 85 4.8. Heuristics . . . . . . . . . . . . . . . . . . . . . . . . 30 86 4.8.1. Port Usage . . . . . . . . . . . . . . . . . . . . . . 30 87 5. Security Considerations . . . . . . . . . . . . . . . . . . . 31 88 6. Interactions with Middleboxes . . . . . . . . . . . . . . . . 32 89 7. Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 35 90 8. Open Issues . . . . . . . . . . . . . . . . . . . . . . . . . 35 91 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 36 92 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 36 93 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 37 94 11.1. Normative References . . . . . . . . . . . . . . . . . . . 37 95 11.2. Informative References . . . . . . . . . . . . . . . . . . 37 96 Appendix A. Notes on use of TCP Options . . . . . . . . . . . . . 38 97 Appendix B. Resync Packet . . . . . . . . . . . . . . . . . . . . 39 98 Appendix C. Changelog . . . . . . . . . . . . . . . . . . . . . . 41 99 C.1. Changes since draft-ford-mptcp-multiaddressed-03 . . . . . 41 100 C.2. Changes since draft-ford-mptcp-multiaddressed-02 . . . . . 41 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 41 103 1. Introduction 105 Multipath TCP (henceforth referred to as MPTCP) is a set of 106 extensions to regular TCP [2] to allow a transport connection to 107 operate across multiple paths simultaneously. This document presents 108 the protocol changes required to add multipath capability to TCP; 109 specifically, those for signalling and setting up multiple paths 110 ("subflows"), managing these subflows, reassembly of data, and 111 termination of sessions. This is not the only information required 112 to create a Multipath TCP implementation, however. This document is 113 complemented by several others: 115 o Architecture [3], which explains the motivations behind Multipath 116 TCP, contains a discussion of high-level design decisions on which 117 this design is based, and an explanation of a functional 118 separation through which an extensible MPTCP implementation can be 119 developed. 121 o Congestion Control [4], presenting a safe congestion control 122 algorithm for coupling the behaviour of the multiple paths in 123 order to "do no harm" to other network users. 125 o Application Considerations [5], discussing what impact MPTCP will 126 have on applications, what applications will want to do with 127 MPTCP, and as a consequence of these factors, what API extensions 128 an MPTCP implementation should present. 130 1.1. Design Assumptions 132 In order to limit the potentially huge design space, the authors 133 imposed two key constraints on the multipath TCP design presented in 134 this document: 136 o It must be backwards-compatible with current, regular TCP, to 137 increase its chances of deployment 139 o It can be assumed that one or both endpoints are multihomed and 140 multiaddressed 142 To simplify the design we assume that the presence of multiple 143 addresses at an endpoint is sufficient to indicate the existence of 144 multiple paths. These paths need not be entirely disjoint: they may 145 share one or many routers between them. Even in such a situation 146 making use of multiple paths is beneficial, improving resource 147 utilisation and resilience to a subset of node failures. The 148 congestion control algorithms as discussed in [4] ensure this does 149 not act detrimentally. 151 There are three aspects to the backwards-compatibility listed above 152 (discussed in more detail in [3]): 154 External Constraints: The protocol must function through the vast 155 majority of existing middleboxes such as NATs, firewalls and 156 proxies, and as such must resemble existing TCP as far as possible 157 on the wire. Furthermore, the protocol must not assume the 158 segments it sends on the wire arrive unmodified at the 159 destination: they may be split or coalesced; options may be 160 removed or duplicated. 162 Application Constraints: The protocol must be usable with no change 163 to existing applications that use the standard TCP API (although 164 it is reasonable that not all features would be available to such 165 legacy applications). Furthermore, the protocol must provide the 166 same service model as regular TCP to the application. 168 Fall-back: The protocol should be able to fall back to standard TCP 169 with no interference from the user, to be able to communicate with 170 legacy hosts. 172 Areas for further study: 174 o In theory, since this is purely a TCP extension, it should be 175 possible to use MPTCP with both IPv4 and IPv6 subflows for the 176 same connection on dual-stack hosts, thus having the additional 177 possible benefit of aiding transition. 179 o The design presented should work with network provided multipath, 180 for instance ECMP routing; subflows could be opened with different 181 source/destination ports between the same addreses to allow ECMP 182 to place the subflows on different paths. 184 1.2. Multipath TCP in the Networking Stack 186 MPTCP operates at the transport layer and aims to be transparent to 187 both higher and lower layers. It is a set of additional features on 188 top of standard TCP; MPTCP is designed to be usable by legacy 189 applications with no changes. Figure 1 illustrates this layering. 191 One way to enable multipath TCP in a host is adding a system-wide 192 setting: "Use multipath TCP by default? Y/N". Multipath-aware 193 applications would be able to use an extended sockets API [5] to have 194 finer control on the behaviour of MPTCP. 196 +-------------------------------+ 197 | Application | 198 +---------------+ +-------------------------------+ 199 | Application | | MPTCP | 200 +---------------+ + - - - - - - - + - - - - - - - + 201 | TCP | | Subflow (TCP) | Subflow (TCP) | 202 +---------------+ +-------------------------------+ 203 | IP | | IP | IP | 204 +---------------+ +-------------------------------+ 206 Figure 1: Comparison of Standard TCP and MPTCP Protocol Stacks 208 Detailed discussion of an architecture for developing a multipath TCP 209 implementation, especially regarding the functional separation by 210 which different components should be developed, is given in [3]. 212 1.3. Operation Summary 214 This section provides a high-level summary of normal operation of 215 MPTCP, and is illustrated by the scenario shown in Figure 2. A 216 detailed description of operation is given in Section 4. 218 o To a non-MPTCP-aware application, MPTCP will behave the same as 219 normal TCP. Extended APIs could provide additional control to 220 MPTCP-aware applications [5]. An application begins by opening a 221 TCP socket in the normal way. MPTCP signaling and operation is 222 handled by the MPTCP implementation. 224 o An MPTCP connection begins similarly to a regular TCP connection. 225 This is illustrated in Figure 2 where a connection is established 226 between addresses A1 and B1 on Hosts A and B respectively. 228 o If extra paths are available, additional TCP sessions (termed 229 "subflows") are created on these paths, and are combined with the 230 existing session, which continues to appear as a single connection 231 to the applications at both ends. The creation of the additional 232 TCP session is illustrated between Address A2 on Host A and 233 Address B1 on Host B. 235 o MPTCP identifies multiple paths by the presence of multiple 236 addresses at endpoints. Combinations of these multiple addresses 237 equate to the additional paths. In the example, other potential 238 paths that could be set up are A1<->B2 and A2<->B2. Although this 239 additional session is shown as being initiated from A2, it could 240 equally have been initiated from B1. 242 o The discovery and setup of additional subflows will be achieved 243 through a path management method. This document describes a 244 mechanism by which an endpoint can initiate new subflows by using 245 its own additional addresses, or by signalling its available 246 addresses to the other endpoint. 248 o MPTCP adds connection-level sequence numbers to allow the 249 reassembly of the in-order data stream from multiple subflows 250 which may deliver packets out-of-order due to differing network 251 delays. 253 o Subflows are terminated as regular TCP connections, with a four 254 way FIN handshake. The connection is terminated by a connection- 255 level FIN packet, sent together with the FIN on the last subflow 256 of the connection. 258 Host A Host B 259 ------------------------ ------------------------ 260 Address A1 Address A2 Address B1 Address B2 261 ---------- ---------- ---------- ---------- 262 | | | | 263 | (initial connection setup) | | 264 |----------------------------------->| | 265 |<-----------------------------------| | 266 | | | | 267 | (additional subflow setup) | 268 | |--------------------->| | 269 | |<---------------------| | 270 | | | | 271 | | | | 273 Figure 2: Example MPTCP Usage Scenario 275 1.4. Requirements Language 277 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 278 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 279 document are to be interpreted as described in RFC 2119 [1]. 281 2. Terminology 283 Path: A sequence of links between a sender and a receiver, defined 284 in this context by a source and destination address pair. 286 Subflow: A stream of TCP packets sent over a path, started and 287 terminated similarly to a regular TCP connection. 289 Connection: A collection of one or more subflows, over which an 290 application can communicate between two endpoints. There is a 291 one-to-one mapping between a connection and an application socket. 293 Data-level: The payload data is nominally transfered over a 294 connection, which in turn is transported over subflows. Thus the 295 term "data-level" is synonymous with "connection level", in 296 contrast to "subflow-level" which refers to properties of an 297 individual subflow. 299 Token: A locally unique identifier given to a multipath connection 300 by an endpoint. May also be referred to as a "Connection ID". 302 Endpoint: A host operating an MPTCP implementation, and either 303 initiating or accepting an MPTCP connection. 305 3. Semantic Issues 307 In order to support multipath operation, the semantics of some TCP 308 components have changed. To aid clarity, this section collects these 309 semantic changes as a reference. 311 Sequence Number: The (in-header) TCP sequence number is specific to 312 the subflow. To allow the receiver to reorder application data, 313 an additional data-level sequence space is used. In this data- 314 level sequence space, the initial SYN and the final DATA_FIN 315 occupy one octet of sequence space. There is an explicit mapping 316 of data sequence space to subflow sequence space, which is 317 signalled through TCP options in data packets. 319 ACK: The ACK field in the TCP header acknowledges only the subflow 320 sequence number, not the data-level sequence space. 321 Implementations SHOULD NOT attempt to infer a data-level 322 acknowledgement from the subflow ACKs. Instead an explicit data- 323 level DATA_ACK is used. This avoids possible deadlock scenarios 324 when a non-TCP-aware middlebox pro-actively ACKs at the subflow 325 level. 327 Receive Window: The receive window in the TCP header indicates the 328 amount of free buffer space for the whole data-level connection 329 (as opposed to for this subflow) that is available at the 330 receiver. This is the same semantics as regular TCP, but to 331 maintain these semantics the receive window must be interpreted at 332 the sender as relative to the sequence number given in the 333 DATA_ACK rather than the subflow ACK in the TCP header. In this 334 way the original flow control role is preserved. 336 FIN: The FIN flag in the TCP header applies only to the subflow it 337 is sent on, not to the whole connection. For connection-level FIN 338 semantics, the DATA_FIN option is used. 340 RST: The RST flag in the TCP header applies only to the subflow it 341 is sent on, not to the whole connection. A connection is 342 considered reset if a RST is received on every subflow. 344 Address List: Address list management (i.e. knowledge of the local 345 and remote hosts' lists of available IP addresses) is handled on a 346 per-connection basis (as opposed to per-subflow, per host, or per 347 pair of communicating hosts). This permits the application of 348 per-connection local policy. Adding an address to one connection 349 (either explicitly through an Add Address message, or implicitly 350 through a Join) has no implication for other connections between 351 the same pair of hosts. 353 5-tuple: The 5-tuple (protocol, local address, local port, remote 354 address, remote port) presented by kernel APIs to the application 355 layer in a non-multipath-aware application is that of the first 356 subflow, even if the subflow has since been closed and removed 357 from the connection. This decision, and other related API issues, 358 are discussed in more detail in [5]. 360 4. MPTCP Protocol 362 This section describes the operation of the MPTCP protocol, and is 363 subdivided into sections for each key part of the protocol operation. 365 All MPTCP operations are signalled using optional TCP header fields. 366 These TCP Options will have option numbers allocated by IANA, as 367 listed in Section 10, and are defined throughout the following 368 subsections. 370 4.1. Connection Initiation 372 Connection Initiation begins with a SYN, SYN/ACK exchange on a single 373 path. Each packet contains the Multipath Capable (MP_CAPABLE) TCP 374 option (Figure 3). This option declares its sender is capable of 375 performing multipath TCP and wishes to do so on this particular 376 connection. Each host includes in the MP_CAPABLE option a locally- 377 unique token that identifies this connection. This is used when 378 adding additional subflows to this connection. 380 This token is generated by the sender and has local meaning only, 381 hence it MUST be unique for the sender. The token MUST be difficult 382 for an attacker to guess, and thus it is recommended it SHOULD be 383 generated randomly. (However, see further discussions about security 384 in Section 5, including the possibility of 64-bit tokens.) 386 The MP_CAPABLE option is only present in packets with the SYN flag 387 set. It is only used in the first TCP session of a connection, in 388 order to identify the connection; all following connections will use 389 the "Join" option (see Section 4.2) to join the existing connection. 391 1 2 3 392 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 393 +---------------+---------------+-------------------------------+ 394 |Kind=MP_CAPABLE| Length=11 | Sender Token : 395 +---------------+---------------+---------------+---------------+ 396 : Sender Token (4 bytes total) | Initial Data Sequence Number : 397 +-----------------------------------------------+---------------+ 398 : Initial Data Sequence Number (6 bytes total) | 399 +-----------------------------------------------+---------------+ 401 Figure 3: Multipath Capable (MP_CAPABLE) option (only valid on SYN 402 packets) 404 If a SYN contains an MP_CAPABLE option but the SYN/ACK does not, it 405 is assumed that the passive opener is not multipath capable and thus 406 the MPTCP session will operate as regular, single-path TCP. If a SYN 407 does not contain a MP_CAPABLE option, the SYN/ACK MUST NOT contain 408 one in response. 410 If the SYN packets are unacknowledged, it is up to local policy to 411 decide how to respond. It is expected that a sender will eventually 412 fall back to single-path TCP (i.e. without the MP_CAPABLE Option) in 413 order to work around middleboxes that may drop packets with unknown 414 options; however, the number of multipath-capable attempts that are 415 made first will be up to local policy. Once the active opener has 416 sent a SYN without the MP_CAPABLE option, it MUST fall back to 417 regular TCP behavior, even if it subsequently receives a SYN/ACK that 418 contains an MP_CAPABLE option. This might happen if the MP_CAPABLE 419 SYN and subsequent non-MP-capable SYN are reordered. This is to 420 ensure that the two endpoints end up in an interoperable state, no 421 matter what order the SYNs arrive at the passive opener. This final 422 state is inferred from the presence or absence of the DATA_ACK option 423 in the third packet of the TCP handshake. 425 The MP_CAPABLE option includes the most significant 6 bytes of the 426 8-byte initial Data Sequence Number option (discussed in 427 Section 4.4). The least significant two bytes should be treated as 428 being zero. This data sequence number maps the SYN into to the data 429 sequence space (and this initial SYN occupies one octet of this 430 space, as for a regular SYN in single-path TCP). Having the SYN 431 occupy sequence space means that it must be DATA_ACKed, and this 432 ensures that there is two-way agreement on whether or not the 433 multipath capability is enabled, even if a middlebox were to strip 434 the MP_CAPABLE option from a SYN/ACK packet. 436 To preserve option space, only the most significant six bytes of the 437 data sequence number are sent in the SYN, as there is no significant 438 security benefit from randomizing the values of the lower two bytes 439 given that these fall within typical receive window sizes. 441 4.2. Starting a New Subflow 443 Endpoints have knowledge of their own address(es), and can become 444 aware of the other endpoint's addresses through signalling exchanges 445 as described in Section 4.3. Using this knowledge, an endpoint can 446 initiate a new subflow over a currently unused pair of addresses. 447 The protocol permits either endpoint of a connection to initiate the 448 creation of a new subflow (but see Section 4.8 for heuristics) 450 A new subflow is started as a normal TCP SYN/ACK exchange. The Join 451 Connection (MP_JOIN)) TCP option (Figure 4) is used to identify the 452 connection to be joined by the new subflow. The receiver token sent 453 MUST be the other endpoint's locally unique connection token, which 454 was included in the MP_CAPABLE option during connection 455 establishment. 457 1 2 3 458 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 459 +---------------+---------------+-------------------------------+ 460 | Kind=MP_JOIN | Length = 7 |Receiver Token (4 octets total): 461 +---------------+---------------+----------------+--------------+ 462 : Receiver Token (continued) | Address ID | 463 +-------------------------------+----------------+ 465 Figure 4: Join Connection (MP_JOIN) option (only valid on SYN 466 packets) 468 TBD: A better security mechanism that just the token is required 469 here, in order to prove freshness of the subflow initiator's 470 knowledge of the connection. Possibilities could include the DSN 471 (although this would require a reasonably large window), or something 472 to do with the checksums of data. 474 When receiving a SYN with the MP_JOIN option that contains a valid 475 token for an existing MPTCP connection, the recipient SHOULD respond 476 with a SYN/ACK also containing an MP_JOIN option containing the 477 initiator's token. This serves two purposes: it ensures both 478 endpoints agree on the connection being referred to (this is 479 particularly relevant when both addresses being used are new to the 480 connection); and it ensures there are no middleboxes on the path that 481 will drop MPTCP options on the return path. This behaviour is 482 illustrated in Figure 5. 484 Host A Host B 485 ------------------------ ------------------------ 486 Address A1 Address A2 Address B1 Address B2 487 ---------- ---------- ---------- ---------- 488 | | | | 489 | SYN + MP_CAPABLE(Token A) | | 490 |----------------------------------->| | 491 |<-----------------------------------| | 492 | SYN/ACK + MP_CAPABLE(Token B) | | 493 | | | | 494 | | SYN + MP_JOIN(Token B) | 495 | |----------------------------------->| 496 | |<-----------------------------------| 497 | | SYN/ACK + MP_JOIN(Token A) | 498 | | | | 500 Figure 5: Example use of MPTCP Tokens 502 If the token is unknown or local policy prohibits the acceptable of 503 the new subflow, the recipient MUST respond with a TCP RST. 505 It is possible that a middlebox that strips MPTCP options exists, 506 either on the path from A to B, or on the return path. MPTCP must be 507 robust and refuse to open an additional subflow on such a path. 509 If MP_JOIN is stripped from the SYN on the path from A to B, and Host 510 B does not have a passive opener on the relevant port, it will 511 respond with an RST in the normal way. If in response to a SYN with 512 an MP_JOIN option, a SYN/ACK is received without the MP_JOIN option 513 (either since it was stripped on the return path, or it was stripped 514 on the outgoing path but the passive opener on Host B responded as if 515 it was a new regular TCP session), then the subflow is unusable and 516 Host A MUST close it with a RST. 518 It should be noted that additional subflows can be created between 519 any pair of ports (but see Section 4.8 for heuristics); no explicit 520 application-level accept calls or bind calls are required to open 521 additional subflows. To associate a new subflow with an existing 522 connection, the token supplied in the subflow's SYN exchange is used 523 for demultiplexing. This then binds the 5-tuple of the TCP subflow 524 to the local token of the connection. A consequence is that it is 525 possible to allow any port pairs to be used for a connection. 527 Deumultiplexing subflow SYNs MUST be done using the token; this is 528 unlike traditional TCP, where the destination port is used for 529 demultiplexing SYN packets. Once a subflow is setup, demultiplexing 530 packets is done using the five-tuple, as in traditional TCP. The 531 five-tuples will be mapped to the local connection ID. 533 The MP_JOIN option includes an "Address ID". This is an identifier 534 that is locally unique to the sender of this option. It has only 535 significance withing a single connection, where it identifies the 536 source address of this packet. The key purpose of this identifier is 537 to allow address removal without needing to know what the source 538 address actually is, thus allowing the use of NATs), when the subflow 539 is no longer available. The sender can signal this to the receiver 540 via the REMOVE_ADDR option (Section 4.3.2). It also allows 541 correlation between new connection attempts and address signalling 542 (Section 4.3.1), to prevent setting up duplicate subflows on the same 543 path. 545 The Address IDs of the subflow used in the initial SYN exchange of 546 the first subflow in the connection are implicit, and have the value 547 zero. 549 The Address ID must be stored by the receiver in a data structure 550 that gathers all the Address ID to address mappings for a connection 551 identified by a token pair. In this way there is a stored mapping 552 between Address ID, observed source address and token pair for future 553 processing of control information for a connection. 555 The MP_JOIN option MUST only be sent in segments with the SYN flag 556 set. 558 4.3. Address Knowledge Exchange (Path Management) 560 We use the term "path management" to refer to the exchange of 561 information about additional paths between endpoints, which in this 562 design is managed by multiple addresses at endpoints. For more 563 detail of the architectural thinking behind this design, see the 564 separate architecture document [3]. 566 This design makes use of two methods of sharing such information, 567 used simultaneously. The first is the direct setup of new subflows, 568 already described in Section 4.2, where the initiator has an 569 additional address. The second method, described in the following 570 subsections, signals addresses explicitly to the other endpoint to 571 allow it to initiate new connections. The two mechanisms are 572 complementary: the first is implicit and simple, while the explicit 573 is more complex but is more robust. Together, the mechanisms allow 574 addresses to change in flight (and thus support operation through 575 NATs, since the source address need not be known), and also allow the 576 signalling of previ\ ously unknown addresses, and of addresses 577 belonging to other address families (e.g. IPv4 and IPv6). 579 Here is an example of typical operation of the protocol: 581 o A1 of host A and address/port B1 of host B. If host A is 582 multihomed, it can start an additional subflow from its address A2 583 to B1, by sending a SYN with a Join option from A2 to B1, using 584 B's previously declared token for this connection. Alternatively, 585 if B is multhomed, it can try to set up a new subflow from B2 to 586 A1, using A's previously declared token. In either case, the SYN 587 will be sent to the port already in use for the original subflow 588 on the receiving host. 590 o Simultaneously (or after a timeout), an ADD_ADDR option 591 (Section 4.3.1) is sent on an existing subflow, informing the 592 receiver of the sender's alternative address(es). The recipient 593 can use this information to open a new subflow to the sender's 594 additional address. In our example, A will send ADD_ADDR option 595 informing B of address A2. The mix of using the SYN-based option 596 and the ADD_ADDR option, including timeouts, is implementation- 597 specific and can be tailored to agree with local policy. 599 o If subflow A2-B1 is succesfully setup, host B1 can use the Address 600 ID in the Join option to correlate this with the ADD_ADDR option 601 that will also arrive on an existing subflow; now B knows not to 602 open A2-B1, ignoring the ADD_ADDR. Otherwise, if B has not 603 received the A2-B1 SYN join but received the ADD_ADDR, it will try 604 to initiate a new subflow from one or more of its addresses to 605 address A2. This permits new sessions to be opened if one 606 endpoint is behind a NAT. A slight security improvement can be 607 gained if a host ensures there is a correlated ADD_ADDR option 608 before responding to the SYN. 610 Other ways of using the two signaling mechanisms are possible; for 611 instance, signaling addresses in other address families can only be 612 done explicitly using the Add Address option. 614 4.3.1. Address Advertisement 616 The Add Address (ADD_ADDR) TCP Option announces additional addresses 617 on which an endpoint can be reached (Figure 6). It can be used to 618 announce several (ID, address) pairs to be announced to the other 619 endpoint. Multiple addresses can be added in a single message if 620 there is sufficient TCP option space, otherwise multiple TCP messages 621 containing this option will be sent. This option can be used at any 622 time during a connection, depending on when the sender wishes to 623 enable multiple paths and/or when paths become available. 625 Every address has an ID which can be used for address removal, and 626 therefore endpoints must cache the mapping between ID and address. 627 This is also used to identify Join Connection options (Section 4.2) 628 relating to the same address, even when address translators are in 629 use. The ID must be unique to the sender and connection, per 630 address, but its mechanism for allocating such IDs is implementation- 631 specific. 633 This option is shown for IPv4. For IPv6, the IPVer field will read 634 6, and the length of the address will be 16 octets (instead of 4), 635 and the length of the option will be 2 + (18 * number_of_entries). 636 If there is sufficient TCP option space, multiple addresses can be 637 included, with an ID following on immediately from the previous 638 address. The number of addresses can be deduced from the option 639 length and version fields. 641 The 'P' bit is used to indicate the presence of an additional two 642 octets specifying the port number to use. Although it is expected 643 that the majority of use cases will use the same port pairs as used 644 for the initial subflow (e.g. port 80 remains port 80 on all 645 subflows, as does the ephemeral port at the client, there may be 646 cases (such as port-based load balancing) where the explicit 647 specification of a different port is required. If the P bit is not 648 specified, MPTCP MUST attempt to connect to the specified address on 649 same port as is already in use by the signalling subflow. 651 [TBD: We could make use of an additional flag, as follows. Exact 652 behaviour to be worked out: The 'B' bit is used to indicate that this 653 specified address (and port, if applicable) should be treated as a 654 backup subflow to use only in the event of failure of other working 655 subflows. A receiver of this option SHOULD set up a TCP subflow to 656 the specified address and port, but SHOULD NOT send data on it until 657 the other paths have failed.] 659 1 2 3 660 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 661 +---------------+---------------+---------------+-------+-------+ 662 | Kind=ADD_ADDR | Length | Address ID | IPVer |(res)|P| 663 +---------------+---------------+---------------+-------+-------+ 664 | Address (IPv4 - 4 octets / IPv6 - 16 octets) | 665 +-------------------------------+-------------------------------+ 666 | Port (2 octets if P=1) | ... 667 +-------------------------------+ 668 ( ... further ID/Version/Address/Port fields as required ... ) 670 Figure 6: Add Address (ADD_ADDR) option (shown for IPv4) 672 Due to the proliferation of NATs, it is reasonably likely that one 673 endpoint may attempt to advertise private addresses [6]. We do not 674 wish to blanket prohibit this, since there may be cases where both 675 endpoints have additional interfaces on the same private network. We 676 must ensure, however, that such advertisements do not cause harm. 677 The standard mechanism to create a new subflow (Section 4.2) contains 678 a randomly-generated 32-bit token that uniquely identifies the 679 connection to the receiving endpoint . If the token is unknown, the 680 endpoint will return with a RST. If the token is known, connection 681 setup will continue, but the sender's token will be sent back. In 682 order for a new subflow to be setup, both tokens must match what each 683 endpoint expects. This will provide sufficient protection against 684 two unconnected endpoints accidentally setting up a new subflow upon 685 the signal of a private address (furthermore, the mismatch in Data 686 Sequence Number that would occur would provide even further 687 protection). 689 Ideally, we'd like to ensure the ADD_ADDR (and REMOVE_ADDR) option is 690 sent reliably and in order to the other end. This is to ensure that 691 we don't close the connection when remove/add addresses are processed 692 in reverse order, and to ensure that all possible paths are used. We 693 note, however, that losing reliability and ordering it will not break 694 the multipath connections; they will just reduce the opportunity to 695 open multipath paths and to survive different patterns of path 696 failures. 698 Subflow level ACKs do not cover options, so if we want explicit 699 guarantees we need to build in other mechanisms. Solutions include 700 echoing the options and sending one option per RTT, or adding a 701 sequence number to the option which is explicitly acked in another 702 option. However, we feel these mechanisms' added complexity is not 703 worth the benefits they bring. There are two basic failure modes for 704 options: a) every new option gets stripped or b) some options get 705 stripped, randomly. The second option looks more like a middlebox 706 implementation error, so we believe it is not worth optimizing for. 707 In the first case, resending the option on a different subflow is the 708 thing to do. To achieve similar reliability without explicit ACKs, 709 we propose sending all ADD_ADDR/REMOVE_ADDR options on all existing 710 subflows. If ordering is needed, we should only send one ADD_ADDR/ 711 REMOVE_ADDR option per RTT (modulo lost packets at subflow level). 713 When receiving an ADD_ADDR message with an address ID already in use 714 for that connection, the receiver SHOULD silently ignore the 715 ADD_ADDR. 717 During normal MPTCP operation, it is unlikely that there will be 718 sufficient TCP option space for ADD_ADDR to be included along with 719 those for data sequence numbering (Section 4.4.1). Therefore, it is 720 expected that an MPTCP implementation will send the ADD_ADDR option 721 on separate (either duplicate, or normal but lacking any payload) 722 ACKs. As with all TCP Options, the ADD_ADDR option does not have 723 reliable delivery. Therefore, a sender should send a duplicate ACK 724 with this option on all available subflows. 726 4.3.2. Remove Address 728 If, during the lifetime of a MPTCP connection, a previously-announced 729 address becomes invalid (e.g. if the interface disappears), the 730 affected endpoint should announce this so that the other endpoint can 731 remove subflows related to this address. 733 This is achieved through the Remove Address (REMOVE_ADDR) option 734 (Figure 7), which will remove a previously-added address (or list of 735 addresses) from a connection and terminate any subflows currently 736 using that address. 738 For security purposes, if a host receives a REMOVE_ADDR option, it 739 must ensure the affected path(s) are no longer in use before it 740 instigates closure. The receipt of REMOVE_ADDR should first trigger 741 the sending of a TCP Keepalive [7] on the path, and if a response is 742 received the path is not removed. 744 The sending and receipt (if no keepalive response was received) of 745 this message should trigger the sending of FINs by both endpoints on 746 the affected subflow(s) (if possible), as a courtesy to cleaning up 747 middlebox state, but endpoints may clean up their internal state 748 without a long timeout. 750 Address removal is undertaken by ID, so as to permit the use of NATs 751 and other middleboxes. If there is no address at the requested ID, 752 the receiver will silently ignore the request. 754 The standard way to close a subflow (so long as it is still 755 functioning) is to use a FIN exchange as in regular TCP - for more 756 information, see Section 4.5. 758 1 2 3 759 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 760 +---------------+---------------+---------------+ 761 |Kind=REMOVEADDR| Length = 2+n | Address ID | ... 762 +---------------+---------------+---------------+ 764 Figure 7: Remove Address (REMOVE_ADDR) option 766 4.4. General MPTCP Operation 768 This section discusses operation of MPTCP for data transfer. At a 769 high level, an MPTCP implementation will take one input data stream 770 from an application, and split it into one or more subflows, with 771 sufficient control information to allow it to be reassembled and 772 delivered reliably and in-order to the recipient application. The 773 following subsections define this behaviour in detail. 775 4.4.1. Data Sequence Numbering 777 The data stream as a whole can be reassembled through the use of the 778 Data Sequence Mapping (DSN_MAP, Figure 8) option, which defines the 779 mapping from the data sequence number to the subflow sequence number. 780 This is used by the receiver to ensure in-order delivery to the 781 application layer. Meanwhile, the subflow-level sequence numbers 782 (i.e. the regular sequence numbers in the TCP header) have subflow- 783 only relevance. It is expected (but not mandated) that SACK [8] is 784 used at the subflow level to improve efficiency. 786 1 2 3 787 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 788 +---------------+---------------+------------------------------+ 789 | Kind=DSN_MAP | Length | Data Sequence Number ... : 790 +---------------+---------------+------------------------------+ 791 : ... ( (length-8) octets ) | Data-level Length (2 octets) | 792 +-------------------------------+------------------------------+ 793 | Subflow Sequence Number (4 octets) | 794 +-------------------------------+------------------------------+ 795 | CRC-32C (4 octets) | 796 +--------------------------------------------------------------+ 798 Figure 8: Data Sequence Mapping (DSN_MAP) option 800 TBD: We could combine this with the DATA_ACK by adding the local DSN 801 too. However, this may not always be needed in this option, and this 802 option will not be present on all packets that include a DATA_ACK. 803 There is also the additional question of how to handle the different 804 possible DSN lengths. We could make only 4 and 8 octet ones valid, 805 and both must be the same? 807 This option specifies a full mapping from data sequence number to 808 subflow sequence number, informing the receiver that there is a one- 809 to-one correspondence between the two sequence spaces for the 810 specified length. The purpose of the explicit mapping is to assist 811 with compatibility with situations where TCP/IP segmentation or 812 coalescing is undertaken separately from the stack that is generating 813 the data flow (e.g. through the use of TCP segmentation offloading on 814 network interface cards, or by middleboxes such as performance 815 enhancing proxies). 817 The data sequence number specified in this option is absolute, 818 whereas the subflow sequence numbering is relative (the SYN at the 819 start of the subflow has subflow sequence number 1). This is allow 820 middleboxes to change the Initial Sequence Number of a subflow, since 821 the data stream itself will not be affected (some firewalls do ISN 822 randomization). 824 The final four octets of this option contain a checksum of the data 825 that this mapping covers. This is a CRC-32C checksum, the same as 826 used in SCTP [9]. This is used to detect if the payload has been 827 adjusted in any way by a non-MPTCP-aware middlebox. If this checksum 828 fails, it will trigger a failure of the subflow, or a fallback to 829 regular TCP, as documented in Section 4.6. 831 A mapping is unique, in that the subflow sequence number is bound to 832 the data sequence number after the mapping has been processed. It is 833 not possible to change this mapping afterwards (although the length 834 of a mapping can extend); however, the same data sequence number can 835 be mapped on different subflows for retransmission purposes (see 836 Section 4.4.4). 838 To avoid possible deadline scenarios, subflow-level processing should 839 be undertaken separately from that at connection-level. Therefore, 840 even if a mapping does not exist from the subflow space to the data- 841 level space, the data should still be ACKed at the subflow. This 842 data cannot, however, be acknowledged at the data level 843 (Section 4.4.2) because its data sequence numbers are unknown. 844 Implementations MAY hold onto such unmapped data for a short while in 845 the expectation than a mapping will arrive shortly. Such unmapped 846 data cannot be counted as being within the receive window because 847 this is relative to the data sequence numbers, so if the receiver 848 runs out of memory to hold this data, it will have to be discarded. 849 If a mapping for that subflow-level sequence space does not arrive 850 within a receive window of data, that subflow should be treated as 851 broken, closed with an RST, and an unmapped data silently discarded. 853 Data sequence numbers are always 64-bit quantities, and MUST be 854 maintained as such in implementations. If a connection is 855 progressing at a slow rate, so protection against wrapped sequence 856 numbers is not required, and if security requirements against blind 857 insertion attacks are not stringent, then it is permissible to 858 include just the lower 32 bits of the sequence number in the DSN_MAP 859 option as an optimization. Implementations MUST accept this and 860 implicitly promote it to a 64-bit quantity by incrementing the upper 861 32 bits of sequence number the maintain each time the lower 32 bits 862 wrap. By defauly, the full 64 bit DSN_MAP should be sent. Security 863 implications are discussed in Section 5. 865 As with the standard TCP sequence number, the data sequence number 866 should not start at zero, but at a random value to make blind session 867 hijacking harder. This is done by including the most significant six 868 octets of the initial data sequence number in the MP_CAPABLE option 869 in the initial connection SYN (which itself occupies one octet of 870 data sequence space; see Section 4.1). 872 The DSN_MAP option does not need to be included in every MPTCP 873 packet, as long as the subflow sequence space in that packet is 874 covered by a mapping known at the receiver. This can be used to 875 reduce overhead in cases where the mapping is known in advance; one 876 such case is when there is a single subflow between the endpoints, 877 another is when segments of data are scheduled in larger than packet- 878 sized chunks. An "infinite" mapping can be used to fallback to 879 regular TCP (see Section 4.6), which is achieved by setting the data- 880 level length field to the reserved value of 0. 882 4.4.2. Data Acknowledgements 884 In a perfect world, it would be possible to infer the acknowledgment 885 of data at the data-level from the receipt of subflow acks. 886 Unfortunately the existence of certain middleboxes that pro-actively 887 ACK packets might might cause deadlock conditions if data were acked 888 at the subflow level but then fails to reach the receiver. This sort 889 of bad interaction might be expecially prevalent when the receiver is 890 mobile. 892 To provide full end-to-end resilience, MPTCP provides a connection- 893 level acknowledgement, the DATA_ACK, illustrated in Figure 9, to act 894 as a cumulative ACK for the connection as a whole. This is analogous 895 to the behaviour of the standard TCP cumulative ACK in TCP SACK - 896 indicating how much data has been successfully received (with no 897 holes). 899 An MPTCP sender MUST only free data from the send buffer when it has 900 been acknowledged by both a DATA_ACK received on any subflow and at 901 the subflow level by any subflows the data was sent on. The former 902 condition ensures liveness of the connection and the latter condition 903 ensures liveness and self-consistence of a subflow when data needs to 904 be restransmited. 906 The DATA_ACK option SHOULD be included in segments (data or pure 907 ACKs) whenever the DATA_ACK advances. This ensures the sender buffer 908 is freed, while reducing overhead when the data transfer is 909 unidirectional. 911 TBD: include in a single segment after a change, or in a few 912 segments? Probably two makes sense if the segments are pure ACKs, as 913 they may be lost. 915 1 2 3 916 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 917 +---------------+---------------+------------------------------+ 918 | Kind=DATA_ACK | Length | Data Sequence Number ... : 919 +---------------+---------------+------------------------------+ 920 : ... ( (length-8) octets ) | 921 +-------------------------------+ 923 Figure 9: Connection-level Acknowledgement (DATA_ACK) 925 4.4.3. Receiver Considerations 927 Regular TCP advertises a receive window in each packet, telling the 928 sender how much data the receiver is willing to accept past the 929 cumulative ack. The receive window is used to implement flow 930 control, throttling down fast senders when receivers cannot keep up. 932 MPTCP also uses a unique receive window, shared between the subflows. 933 The idea is to allow any subflow to send data as long as the receiver 934 is willing to accept it; the alternative, maintaining per subflow 935 receive windows, could end-up stalling some subflows while others 936 would not use up their window. 938 The receive window is relative to the DATA_ACK. As in TCP, a 939 receiver MUST NOT shrink the right edge of the receive window (e.g. 940 DATA_ACK + receive window). The receiver will use the Data Sequence 941 Number to tell if a packet should be accepted at connection level. 943 When deciding to accept packets at subflow level, normal TCP uses the 944 sequence number in the packet and checks it against the allowed 945 receive window. With multipath, such a check is done using only the 946 connection level window. A sanity check could be performed at 947 subflow level to ensure that: SSN - SUBFLOW_ACK <= DSN - DATA_ACK. 949 When should segments be processed at connection level? An 950 implementation might wait until they arrive in order at subflow 951 level, and only then do connection level processing. However, if 952 many segments of data are restransmitted on more than one subflow, 953 then because some data is duplicated then the sum total of 954 unacknowledged data on all subflows might exceed the receive window 955 that was advertised, which indicates buffering available for data 956 sequence space. This such a strategy is probably undesirable. 958 An alternative implementation might process segments at the 959 connection level segments that have not yet been acked at subflow 960 level; the only requirement for this is to have a valid data sequence 961 mapping for the segment. This removes such duplicate data from the 962 receive buffer, so avoids running out of buffer space. Such 963 implementations SHOULD keep track of which subflow sequence numbers 964 have already been accepted in this way, so they can be ACKed 965 appropriately when the hole in the subflow sequence space in 966 subsequently filled. An implementation that does store such metadata 967 would still progress (the rules for freeing data at the sender ensure 968 this), but unnecessary retransmissions will result. 970 It is important for implementers to understand how large a receiver 971 buffer is appropriate. The lower bound for full network utilization 972 is the maximum bandwidth-delay product of any of the paths. However 973 this might be insufficient when a packet is lost on a slower subflow 974 and needs to be retransmitted (see Section 4.4.4). A tight upper 975 bound would be the maximum RTT of any path multiplied by the total 976 bandwidth available across all paths. This permits all subflows to 977 continue at full speed while a packet is fast-retransmitted on the 978 maximum RTT path. Even this might be insufficient to maintain full 979 performance in the event of a retransmit timeout on the maximum RTT 980 path. It is for future study to determine the relationship between 981 retransmission strategies and receive buffer sizing. 983 4.4.4. Sender Considerations 985 The sender remembers receiver window advertisements from the 986 receiver. It should only update its local receive window values when 987 the largest sequence number allowed (i.e. DATA_ACK + receive window) 988 increases. This is important to allow using paths with different 989 RTTs, and thus different feedback loops. 991 Some classes of middleboxes may alter the TCP-level receive window. 992 Typically these will shrink the offered window, although for short 993 periods of time it may be possible for the window to be larger 994 (however note that this would not continue for long periods since 995 ultimately the middlebox must keep up with delivering data to the 996 receiver). Therefore, if receive window sizes differ on multiple 997 subflows, when sending data MPTCP SHOULD take the largest of the most 998 recent window sizes as the one to use in calculations. (this rule is 999 implicit in the requirement not to move back the right edge of the 1000 window). 1002 The sender also remembers the receive windows advertised by each 1003 subflow. The allowed window for subflow i is (ack_i, ack_i + 1004 rcv_wnd_i), where ack_i is the subflow-level cumulative ack of 1005 subflow i. This ensures data will not be sent to a middlebox unless 1006 there is enough buffering for the data. 1008 Putting the two rules together, we get the following: a sender is 1009 allowed to send data segments with data-level sequence numbers 1010 between (DATA_ACK, DATA_ACK + receive_window). Each of these 1011 segments will be mapped onto subflows, as long as subflow sequence 1012 numbers are in the the allowed windows for those subflows. Note that 1013 subflow sequence numbers do not generally affect flow control if the 1014 same receive window is advertised across all subflows. They will 1015 perform flow control for those subflows with a smaller advertised 1016 receive window. 1018 The data sequence mapping allows senders to re-send data with the 1019 same data sequence number on a different subflow. When doing this, 1020 an endpoint must still retransmit the original data on the original 1021 subflow, in order to preserve the subflow integrity (middleboxes 1022 could replay old data, and/or could reject holes in subflows), and a 1023 receiver will ignore these retransmissions. While this is clearly 1024 suboptimal, for compatibility reasons this is the best behaviour. 1025 Optimisations could be negotiated in future versions of this 1026 protocol. 1028 This protocol specification does not mandate any mechanisms for 1029 handling retransmissions, and much will be dependent upon local 1030 policy (as discussed in Section 4.4.6). One can imagine aggressive 1031 connection level retransmissions policies where every packet lost at 1032 subflow level is retransmitted on a different subflow (hence wasting 1033 bandwidth but possibly reducing application-to-application delays), 1034 or conservative retransmission policies where connection-level 1035 retransmits are only used after a few subflow level retransmission 1036 timeouts occur. 1038 It is envisaged that a standard connection-level retransmission 1039 mechanism would be implemented around a connection-level data queue: 1040 all segments that haven't been DATA_ACKed are stored. A timer (based 1041 on the subflow timer values) is set when the head of the connection- 1042 level is ACKed at subflow level but its corresponding data is not 1043 acked at data level. 1045 The sender MUST keep data in its send buffer as long as the data has 1046 not been acked at connection level and on all subflows it has been 1047 sent on. In this way, the sender can always retransmit the data if 1048 needed, on the same subflow or on a different one. A special case is 1049 when a subflow fails: the sender will typically resend the data on 1050 other working subflows, and will keep trying to retransmit the data 1051 on the failed subflow too. The sender will declare the subflow 1052 failed after a predefined upper bound on retransmissions is reached, 1053 and only then delete the outstanding data segments. 1055 A sender will maintain connection level timers for unacknowledged 1056 segments. These timers will be based on the subflow timers, and will 1057 guard against pro-active acking by middleboxes. 1059 The send buffer must be, at the minimum, as big as the receive 1060 buffer, to enable the sender to reach maximum throughput. 1062 4.4.5. Congestion Control Considerations 1064 Different subflows in an MPTCP connection have different congestion 1065 windows. To achieve fairness at bottlenecks and resource pooling, it 1066 is necessary to couple the congestion windows in use on each subflow, 1067 in order to push most traffic to uncongested links. One algorithm 1068 for achieving this is presented in [4]; the algorithm does not 1069 achieve perfect resource pooling but is "safe" in that it is readily 1070 deployable in the current Internet. 1072 It is foreseeable that different congestion controllers will be 1073 implemented for MPTCP, each aiming to achieve different properties in 1074 the resource pooling/fairness/stability design space. Much research 1075 is expected in this area in the near future. 1077 Regardless of the algorithm used, the design of the MPTCP protocol 1078 aims to provide the congestion control implementations sufficient 1079 information to take the right decisions; this information includes, 1080 for each subflow, which packets where lost and when. 1082 4.4.6. Subflow Policy 1084 Within a local MPTCP implementation, a host may use any local policy 1085 it wishes to decide how to share the traffic to be sent over the 1086 available paths. 1088 In the typical use case, where the goal is to maximise throughput, 1089 all available paths will be used simultaneously for data transfer, 1090 using coupled congestion control as described in [4]. It is 1091 expected, however, that other use cases will appear. 1093 For instance, a possibility is an 'all-or-nothing' approach, i.e. 1094 have a second path ready for use in the event of failure of the first 1095 path, but alternatives could include entirely saturating one path 1096 before using an additional path (the 'overflow' case). Such choices 1097 would be most likely based on the monetary cost of links, but may 1098 also be based on properties such as the delay or jitter of links, 1099 where stability is more important than throughput. Application 1100 requirements such as these are discussed in detail in [5]. 1102 The ability to make effective choices at the sender requires full 1103 knowledge of the path "cost", which is unlikely to be the case. 1105 There is no mechanism in MPTCP for a receiver to signal their own 1106 particular preferences for paths, but this is a necessary feature 1107 since receivers will often be the multihomed party, and may have to 1108 pay for metered incoming bandwidth. Instead of incorporating complex 1109 signalling, it is proposed to use existing TCP features to signal 1110 priority implicitly. If a receiver wishes to keep a path active as a 1111 backup but wishes to prevent data being sent on that path, it could 1112 stop sending ACKs for any data it receives on that path. The sender 1113 would interpret this as severe congestion or a broken path and stop 1114 using it. We do not advocate this method, however, since this will 1115 result in unnecessary retransmissions. 1117 Therefore, a proposal is to use ECN [10] to to provide fake 1118 congestion signals on paths that a receiver wishes to stop being used 1119 for data. This has the benefit of causing the sender to back off 1120 without the need to retransmit data unnecessarily, as in the case of 1121 a lost ACK. This should be sufficient to allow a receiver to express 1122 their policy, although does not permit a rapid increase in throughput 1123 when switching to such a path. 1125 TBD: This is clearly an overload of the ECN signal, and as such other 1126 solutions, such as explicitly signalling path operation preferences 1127 (such as in the reserved bits of certain TCP options, or through 1128 entirely new options) may be a preferred solution. 1130 4.5. Closing a Connection 1132 In regular TCP a FIN announces the receiver that the sender has no 1133 more data to send. In order to allow subflows to operate 1134 independently and to keep the appearance of TCP over the wire, a FIN 1135 in MPTCP only affects the subflow on which it is sent. This allows 1136 nodes to exercise considerable freedom over which paths are in use at 1137 any one time. The semantics of a FIN remain as for regular TCP, i.e. 1138 it is not until both sides have ACKed each other's FINs that the 1139 subflow is fully closed. 1141 When an application calls close() on a socket, this indicates that it 1142 has no more data to send, and for regular TCP this would result in a 1143 FIN on the connection. For MPTCP, an equivalent mechanism is needed, 1144 and this is the DATA_FIN. This option, shown in Figure 10, is 1145 attached to a regular FIN option on a subflow. 1147 A DATA_FIN is an indication that the sender has no more data to send, 1148 and as such can be used as a rapid indication of the end of data from 1149 a sender. A DATA_FIN, as with the FIN on a regular TCP connection, 1150 is a unidirectional signal. 1152 A DATA_FIN occupies one octet (the final octet) of Data Sequence 1153 Number space. This number is included in the option, and will be 1154 ACKed at data level to ensure reliable delivery. 1156 The DATA_FIN is an optimisation to rapidly indicate the end of a data 1157 stream and clean up state associated with a MPTCP connection, 1158 especially when some subflows may have failed. Specifically, when a 1159 DATA_FIN has been received, IF all data has been successfully 1160 received, timeouts on all subflows MAY be reduced. Similarly, when 1161 sending a DATA_FIN, once all data (including the DATA_FIN, since it 1162 occupies one octet of data sequence space) has been acknowledged, 1163 FINs must be sent on every subflow. This applies to both endpoints, 1164 and is required in order to clean up state in middleboxes. 1166 The interactions between a DATA_FIN and subflow properties are as 1167 follows: 1169 o A DATA_FIN MUST only be sent on a packet which also has the FIN 1170 flag set. 1172 o When DATA_FIN is sent, it should be sent on all active subflows. 1174 o There is a one-to-one mapping between the DATA_FIN and the 1175 subflow's FIN flag (and its associated sequence space and thus its 1176 acknowlegement). 1178 o The data sequence number included in the DATA_FIN is used to 1179 verify that all data has been successfully received. 1181 It should be noted that an endpoint may also send a FIN on an 1182 individual subflow to shut it down, but this impact is limited to the 1183 subflow in question. If all subflows have been closed with a FIN, 1184 that is equivalent to having closed the connection with a DATA_FIN. 1186 The full eight-byte data sequence number is always included in a 1187 DATA_FIN. 1189 1 1190 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 1191 +---------------+---------------+---------------+--------------+ 1192 | Kind=DATA_FIN | Length=10 | Data Sequence Number (8B) : 1193 +---------------+---------------+---------------+--------------+ 1194 : Data Sequence Number (contd.) : 1195 +---------------+---------------+---------------+--------------+ 1196 : Data Sequence Number (contd.)| 1197 +---------------+---------------+ 1199 Figure 10: DATA_FIN option 1201 4.6. Fallback 1203 At the start of a MPTCP connection (i.e. the first subflow), it is 1204 important to ensure that the path is fully MPTCP-capable and the 1205 necessary TCP options can reach each endpoint. The handshake as 1206 described in Section 4.1 will fall back to regular TCP if either of 1207 the SYN messages do not have the MPTCP options: this is the same, and 1208 desired, behaviour in the case where an endpoint is not MPTCP 1209 capable, or the path does not support he MPTCP options. When 1210 attempting to join an existing MPTCP connection (Section 4.2), if a 1211 path is not MPTCP capable, the TCP options will not get through on 1212 the SYNs and the subflow will be closed. 1214 There is, however, another corner case which should be addressed. 1215 That is one of MPTCP options getting through on the SYN, but not on 1216 regular packets. This can be resolved if the subflow is the first 1217 subflow, and thus all data in flight is contiguous. This resolution 1218 mechanism is as follows: 1220 o The first window's worth of data MUST be DATA_ACKed on every 1221 packet 1223 o If the first data packet does not have a Data Sequence Mapping 1224 option, drop out of MPTCP mode back to regular TCP (and thus send 1225 a regular, subflow-level ACK, without a DATA_ACK) 1227 o If an ACK is received without a DATA_ACK within the first window, 1228 drop out of MPTCP mode back to regular TCP (and thus stop sending 1229 data with a Data Sequence Mapping) 1231 These rules should cover all cases where such a failure could happen: 1232 whether it's on the forward or reverse path, and whether the server 1233 or the client first sends data. If lost options on data packets 1234 occur on any other subflow apart from the start of the initial 1235 subflow, it should be treated as a standard path failure. The data 1236 would not be DATA_ACKed (since there is no mapping for the data), and 1237 the subflow can be closed with an RST. 1239 The case described above is a specialised case of fallback. More 1240 generally, fallback to regular TCP can become necessary at any point 1241 during a connection if a non-MPTCP-aware middlebox changes the data 1242 stream. 1244 As described in Section 4.4, each portion of data for which there is 1245 a mapping is protected by a CRC-32 checksum. This mechanism is used 1246 to detect if middleboxes have made any adjustments to the payload 1247 (added, removed, or changed data). A checksum will fail if the data 1248 has been changed in any way. This will also detect if the length of 1249 data on the subflow is increased or decreased, and this means the 1250 Data Sequence Mapping is no longer valid. The sender no longer knows 1251 what subflow-level sequence number the receiver is genuinely 1252 operating at (the middlebox will be faking ACKs in return), and 1253 cannot signal any further mappings. Furthermore, in addition to the 1254 possibility of payload modifications that are valid at the 1255 application layer, there is the possibility that false-positives 1256 could be hit across segment boundaries, corrupting the data. 1257 Therefore, all data from the segment that failed the checksum onwards 1258 is not trustworthy. 1260 When multiple subflows are in use, the data in-flight on a subflow 1261 will likely involve data that is not contiguously part of the 1262 connection-level stream, since segments will be spread across the 1263 multiple subflows. Due to the problems identified above, it is not 1264 possible to determine what the adjustment has done to the data 1265 (notably, any changes to the subflow sequence numbering). Therefore, 1266 it is not possible to recover the subflow, and the affected subflow 1267 must be immediately closed with an RST, featuring a "checksum failed" 1268 option, which defines the Data Sequence Number at the start of the 1269 segment (defined by the Data Sequence Mapping) which had the checksum 1270 failure (see Figure 11). 1272 1 1273 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 1274 +---------------+---------------+---------------+--------------+ 1275 | Kind=MP_FAIL | Length=10 | Data Sequence Number (8B) : 1276 +---------------+---------------+---------------+--------------+ 1277 : Data Sequence Number (contd.) : 1278 +---------------+---------------+---------------+--------------+ 1279 : Data Sequence Number (contd.)| 1280 +---------------+---------------+ 1282 Figure 11: Fallback (MP_FAIL) option 1284 TBD: In this case, is there any point in signalling Checksum Failed, 1285 or could we just RST the subflow? The signal would allow the sender 1286 to know there is something wrong with the path and not try to re- 1287 establish the subflow (if that was otherwise the policy). 1289 Failed data will not be DATA_ACKed and so will be re-transmitted on 1290 other subflows (Section 4.4.4). 1292 A special case is when there is a single subflow and it fails with a 1293 checksum error. Here, MPTCP should be able to recover and continue 1294 sending data. There are two possible mechanisms to support this. 1295 The first and simplest is to nevertheless close the subflow with a 1296 RST, and immediately establish a new one as part of the same MPTCP 1297 connection. Since it is known that the path may be compromised, it 1298 is not desirable to use MPTCP's segmentation on this path any longer. 1299 The new subflow will begin and will signal an infinite mapping 1300 (indicated by length=0 in the Data Sequence Mapping option, 1301 Section 4.4) from the data sequence number of the segment that failed 1302 the checksum. This connection will then continue to appear as a 1303 regular TCP session, and a middlebox may change the payload without 1304 causing unintentional harm. 1306 An optimisation is possible, however. If it is known that all 1307 unacknowledged data in flight is contiguous, an infinite mapping 1308 could be applied to the subflow without the need to close it first, 1309 and essentially turn off all further MPTCP signalling. In this case, 1310 if a receiver identifies a checksum failure when there is only one 1311 path, it will send back an OPT_FAIL on the subflow-level ACK. The 1312 sender will receive this, and if all unacknowledged data in flight is 1313 contiguous, will signal an infinite mapping (if the data is not 1314 contiguous, the sender MUST send an RST). This infinite mapping will 1315 be a Data Sequence Mapping option on the first new packet, but it 1316 acts retroactively, referring to the start of the subflow sequence 1317 number of the last segment that was known to be delivered intact. 1318 From that point onwards data can be altered by a middlebox without 1319 affecting MPTCP, as the data stream is equivalent to a regular, 1320 legacy TCP session. 1322 After a sender signals an infinite mapping it MUST only use subflow 1323 ACKs to clear its send buffer. This is because data ACKs may become 1324 misaligned with the subflow ACKs when middleboxes insert or delete 1325 data. The receive SHOULD stop generating Data ACKs after it receives 1326 an infinite mapping. 1328 When a connection is in fallback mode, only one subflow can send data 1329 at a time. Otherwise, the receiver would not know how to reorder the 1330 data. However, subflows can be opened and close as necessary, as 1331 long as a single one is active at any point. 1333 It should be emphasised that we are not attempting to prevent the use 1334 of middleboxes that want to adjust the payload. An MPTCP-aware 1335 middlebox to provide such functionality could be designed that would 1336 re-write checksums if needed, and additionally would be able to parse 1337 the data sequence mappings, and thus not hit false positives though 1338 not knowing where data boundaries lie. 1340 4.7. Error Handling 1342 In addition to the fallback mechanism as described above, the 1343 standard classes of TCP errors may need to be handled in an MPTCP- 1344 specific way. Note that changing semantics - such as the relevance 1345 of an RST - has already been covered in Section 3. Where possible, 1346 we do not want to deviate from regular TCP behaviour. 1348 The following list covers possible errors and the appropriate MPTCP 1349 behaviour: 1351 o Unknown token in MP_JOIN (or token mismatch in MP_JOIN ACK, or 1352 missing MP_JOIN in SYN/ACK response): send RST (analogous to TCP's 1353 behaviour on an unknown port) 1355 o (TBD: If we include DSN in MP_JOIN, and the DSN is out of the 1356 window but the token is valid, do we still send an RST?) 1358 o DSN out of Window (during normal operation): just ignore, however 1359 if at the beginning of a new subflow we might want to RST it as a 1360 security mechanism 1362 o Remove request for unknown address ID: silently ignore 1364 4.8. Heuristics 1366 There are a number of heuristics that are needed for performance or 1367 deployment but which are not required for protocol correctness. In 1368 this section we detail such heuristics 1370 4.8.1. Port Usage 1372 Under typical operation an MPTCP implementation SHOULD use the same 1373 ports as already in use. In other words, the destination port of a 1374 SYN containing a MP_JOIN option SHOULD be the same as the remote port 1375 of the first subflow in the connection. The local port for such SYNs 1376 SHOULD also be the same as for the first subflow (and as such, an 1377 implementation SHOULD reserve ephemeral ports across all local IP 1378 addresses), although there may be cases where this is infeasible. 1379 This strategy is intended to maximize the probability of the SYN 1380 being permitted by a firewall or NAT at the recipient and to avoid 1381 confusing any network monitoring software. 1383 There may also be cases, however, where the passive opener wishes to 1384 signal to the other endpoint that a specific port should be used, and 1385 this facility is provided in the Add Address option as documented in 1386 Section 4.3.1. It is therefore feasible to allow multiple subflows 1387 between the same two addresses but using different port pairs, and 1388 such a facility could be such a facility could be used to allow load 1389 balancing within the network based on 5-tuples (e.g. ECMP). 1391 5. Security Considerations 1393 TBD 1395 (Token generation, handshake mechanisms, new subflow authentication, 1396 etc...) 1398 A generic threat analysis for the addition of multipath capabilities 1399 to TCP is presented in [11]. The protocol presented here has been 1400 designed to minimise or eliminate these identified threats. (A 1401 future version of this document will explicitly address the presented 1402 threats). 1404 The development of a TCP extension such as this will bring with it 1405 many additional security concerns. We have set out here to produce a 1406 solution that is "no worse" than current TCP, with the possibility 1407 that more secure extensions could be proposed later. 1409 The primary area of concern will be around the handshake to start new 1410 subflows which join existing connections. The proposal set out in 1411 Section 4.1 and Section 4.2 is for the initiator of the new subflow 1412 to include the token of the other endpoint in the handshake. The 1413 purpose of this is to indicate that the sender of this token was the 1414 same entity that received this token at the initial handshake. 1416 One area of concern is that the token could be simply brute-forced. 1417 The token must be hard to guess, and as such could be randomly 1418 generated. This may still not be strong enough, however, and so the 1419 use of 64 bits for the token would alleviate this somewhat. 1421 The two tokens don't need to be the same length. Token B could be 64 1422 bits and token A 32 bits. If MP_JOIN always contains Token B, this 1423 would provide adequate security while saving scarce space in the 1424 initial SYN, where it is most at a premium. 1426 Use of these tokens only provide an indication that the token is the 1427 same as at the initial handshake, and does not say anything about the 1428 current sender of the token. Therefore, another approach would be to 1429 bring a new measure of freshness in to the handshake, so instead of 1430 using the initial token a sender could request a new token from the 1431 receiver to use in the next handshake. Hash chains could also be 1432 used for this purpose. 1434 Yet another alternative would be for all SYN packets to include a 1435 data sequence number. This could either be used as a passive 1436 identifier to indicate an awareness of the current data sequence 1437 number (although a reasonable window would have to be allowed for 1438 delays). Or, the SYN could form part of the data sequence space - 1439 but this would cause issues in the event of lost SYNs (if a new 1440 subflow is never established), thus causing unnecessary delays for 1441 retransmissions. 1443 6. Interactions with Middleboxes 1445 Multipath TCP was designed to be deployable in the present world. 1446 Its design takes into account "reasonable" existing middlebox 1447 behaviour. In this section we outline a few representative 1448 middlebox-related failure scenarios and show how multipath TCP 1449 handles them. Next, we list the design decisions multipath has made 1450 to accomodate the different middleboxes. 1452 A primary concern is our use of new TCP options. Most middleboxes 1453 should just forward packets with new options unchanged, yet there are 1454 some that don't. These we expect will either strip options and pass 1455 the data, drop packets with new options, copy the same option into 1456 multiple segments (e.g. when doing segmentation) or drop options 1457 during segment coalescing. 1459 MPTCP SYN packets contain the MP_CAPABLE option to indicate the use 1460 of MPTCP. When the middlebox drops the packet containing the 1461 MP_CAPABLE option either on the outgoing or the return path, the 1462 connection will fail. Host A SHOULD fall back to TCP in such cases 1463 (studies suggest that few middleboxes drop packets with unknown 1464 options). The same applies for subflow setup. 1466 The second case is when the middleboxes strip options. Let's first 1467 discuss behaviour for initial connection SYNs (see Figure 12). If 1468 the option is stripped from the packet on the outgoing path, the 1469 connection falls back to regular TCP. If the option is stripped on 1470 the return path, host B will wait for a DATA_ACK of its connection 1471 SYN, retransmitting the SYN/ACK until it declares the connection 1472 failed. Host A thinks it is talking to a regular host, and may send 1473 data segments, but these will not be acked by host B as they do not 1474 have the proper mapping. Hence the connection fails. Host A SHOULD 1475 fall back to regular TCP after the connection times out. 1477 Subflow SYNs contain the MP_JOIN option. If this option is stripped 1478 on the outgoing path the SYN will appear to be a regular SYN to host 1479 B. Depending on whether there is a listening socket on the target 1480 port, host B will reply either with SYN/ACK or RST (subflow 1481 connection fails). When host A receives the SYN/ACK it sends a RST 1482 because the SYN/ACK does not contain the MP_JOIN option and its 1483 token. Either way, the connection fails. 1485 Host A Host B 1486 | Middlebox M | 1487 | | | 1488 | SYN(MP_CAPABLE) | SYN | 1489 |-------------------|---------------->| 1490 | SYN/ACK | 1491 |<------------------------------------| 1492 a) MP_CAPABLE option stripped on outgoing path 1494 Host A Host B 1495 | SYN(MP_CAPABLE) | 1496 |------------------------------------>| 1497 | Middlebox M | 1498 | | | 1499 | SYN/ACK |SYN/ACK(MP_CAPABLE)| 1500 |<----------------|-------------------| 1501 b) MP_CAPABLE option stripped on return path 1503 Figure 12: Connection Setup with Middleboxes that Strip Options from 1504 Packets 1506 We now examine data flow with MPTCP, assuming the flow is correctly 1507 setup which implies the options in the SYN packets were allowed 1508 through by the relevant middleboxes. If options are allowed through 1509 and there is no resegmentation or coalescing to TCP segments, 1510 multipath TCP flows can proceed without problems. 1512 The case when options get stripped on data packets has been discussed 1513 in the Fallback section. We can further analyze what happens when a 1514 fraction of options is stripped. The multipath subflow should 1515 survive losing a fraction of DATA_ACKs and data sequence mappings, 1516 but performance will degrade as the fraction of stripped options 1517 increases. We do not expect such cases to appear in practice, 1518 though: most middleboxes will either strip all options or let them 1519 all through. 1521 We end this section with a list of middlebox classes, their behaviour 1522 and the elements in the MPTCP design that allow operation through 1523 such middleboxes. Issues surrounding dropping packets with options 1524 or stripping options were discussed above, and are not included here: 1526 o NAT [12]: will prevent flow/subflow setup when the server does not 1527 have a public address. MPTCP assumes the server has at least one 1528 public address (or the client uses standard NAT traversal to reach 1529 it) that is used to setup the connection. If uses ADD_ADDR 1530 messages to signal the existence of other addresses. 1532 o Performance Enhancing Proxies [13]: might pro-actively ACK data 1533 and then fail. MPTCP uses the DATA_ACK to make progress when one 1534 of its subflows fails in this way. This is why MPTCP does not use 1535 subflow ACKs to infer connection level ACKs. 1537 o Traffic Normalizers [14]: do not allow holes in sequence numbers, 1538 cache packets and retransmit the same data. MPTCP looks like 1539 standard TCP on the wire, and will not retransmit different data 1540 on the same subflow sequence number. 1542 o TCP Options: may be removed, or packets with unknown options 1543 dropped, by many classes of middleboxes. It is intended that the 1544 initial SYN exchange, with a TCP Option, will be sufficient to 1545 identify the path capabilities. If such a packet does not get 1546 trhough, MPTCP will end up falling back to regular TCP. 1548 o Segmentation/Coalescing (e.g. tcp segmentation offloading, etc): 1549 might copy options between packets and might strip some options. 1550 MPTCP's data sequence mapping includes the subflow sequence number 1551 instead of using the sequence number in the segment. In this way, 1552 the mapping is independent of the packets that carry it. 1554 o Firewalls [15]: might perform sequence number randomization on 1555 connections. MPTCP uses relative sequence numbers in data 1556 sequence mapping to cope with this. 1558 o Intrusion Detection Systems: look out for traffic patterns and 1559 content that could threaten a network. Multipath will mean that 1560 such data is potentially spread, so it is more difficult for an 1561 IDS to analyse the whole traffic, and potentially increasint the 1562 risk of false positives. However, for an MPTCP-aware IDS, 1563 connection IDs can be easily read by such systems to correlate 1564 multiple subflows and re-assemble for analysis. 1566 o Application level NATs: will alter the payload of the connection. 1567 Multipath TCP will detect these using the checksum and close the 1568 affected subflow(s), if there are other subflows that can be used. 1569 If all subflows are affected multipath will fallback to TCP, 1570 allowing middleboxes to change the payload. 1572 o Middleboxes that alter the receive window: multipath will use the 1573 maximum window at data-level, but will also obbey subflow specific 1574 windows. 1576 7. Interfaces 1578 TBD 1580 Interface with applications, interface with TCP, interface with lower 1581 layers... 1583 Discussion of interaction with applications (both in terms of how 1584 MPTCP will affect an application's assumptions of the transport 1585 layer, and what API extensions an application may wish to use with 1586 MPTCP) are discussed in [5]. 1588 8. Open Issues 1590 This specification is a work-in-progress, and as such there are many 1591 issues that are still to be resolved. This section lists many of the 1592 key open issues within this specification; these are discussed in 1593 more detail in the appropriate sections throughout this document. 1595 o Best handshake mechanisms (Section 4.1). This document contains a 1596 proposed scheme by which connections and subflows can be set up. 1597 It is felt that, although this is "no worse than regular TCP", 1598 there could be opportunities for significant improvements in 1599 security that could be included (potentially optionally) within 1600 this protocol. 1602 o Issues around simultaneous opens, where both ends attempt to 1603 create a new subflow simultaneously, need to be investigated and 1604 behaviour specified. 1606 o Appropriate mechanisms for controlling policy/priority of subflow 1607 usage (specifically regarding controlling incoming traffic, 1608 Section 4.4.6). The ECN signal is currently proposed but other 1609 alternatives, including per subflow receive windows or options 1610 indicating path properties, could be employed instead. 1612 o How much control do we want over subflows from other subflows 1613 (e.g. closing when interface has failed)? Do we want to 1614 differentiate between subflows and addresses (Section 4.2)? 1616 o Do we want a connection identifier in every packet? E.g. would it 1617 make the implementation of an IDS easier? 1619 o Should we do signaling in the TCP payload, rather than options as 1620 proposed in this draft? We discuss this alternative in the 1621 appendix. 1623 o Should we explicitly support SYN cookies? With the current 1624 design, MPTCP would be downgraded to basic TCP if SYN cookies were 1625 used. Is it worth designing the protocol to allow stateless 1626 server handshake? 1628 o Instead of an Address ID in MP_JOIN, are there any cases where a 1629 Subflow ID (i.e. unique to the subflow) would be useful instead? 1630 For example, two addresses which become NATted to the same 1631 address? 1633 9. Acknowledgements 1635 The authors are supported by Trilogy 1636 (http://www.trilogy-project.org), a research project (ICT-216372) 1637 partially funded by the European Community under its Seventh 1638 Framework Program. The views expressed here are those of the 1639 author(s) only. The European Commission is not liable for any use 1640 that may be made of the information in this document. 1642 The authors gratefully acknowledge significant input into this 1643 document from many members of the Trilogy project, notably Iljitsch 1644 van Beijnum, Lars Eggert, Marcelo Bagnulo Braun, Robert Hancock, Pasi 1645 Sarolahti, Olivier Bonaventure, Toby Moncaster, Philip Eardley, 1646 Andrew McDonald and Sergio Lembo. 1648 10. IANA Considerations 1650 This document will make a request to IANA to allocate new values for 1651 TCP Option identifiers, as follows: 1653 +-------------+-----------------------------+---------------+-------+ 1654 | Symbol | Name | Ref | Value | 1655 +-------------+-----------------------------+---------------+-------+ 1656 | MP_CAPABLE | Multipath Capable | Section 4.1 | (tbc) | 1657 | MP_JOIN | Join Connection | Section 4.2 | (tbc) | 1658 | ADD_ADDR | Add Address | Section 4.3.1 | (tbc) | 1659 | REMOVE_ADDR | Remove Address | Section 4.3.2 | (tbc) | 1660 | DSN_MAP | Data Sequence Number | Section 4.4 | (tbc) | 1661 | | Mapping | | | 1662 | DATA_ACK | Data-level Acknowledgment | Section 4.4 | (tbc) | 1663 | DATA_FIN | Data-level FIN | Section 4.5 | (tbc) | 1664 | MP_FAIL | Fallback | Section 4.6 | (tbc) | 1665 +-------------+-----------------------------+---------------+-------+ 1667 Table 1: TCP Options for MPTCP 1669 11. References 1671 11.1. Normative References 1673 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 1674 Levels", BCP 14, RFC 2119, March 1997. 1676 11.2. Informative References 1678 [2] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, 1679 September 1981. 1681 [3] Ford, A., Raiciu, C., Barre, S., and J. Iyengar, "Architectural 1682 Guidelines for Multipath TCP Development", 1683 draft-ietf-mptcp-architecture-00 (work in progress), 1684 March 2010. 1686 [4] Raiciu, C., Handley, M., and D. Wischik, "Coupled Multipath- 1687 Aware Congestion Control", draft-raiciu-mptcp-congestion-01 1688 (work in progress), March 2010. 1690 [5] Scharf, M. and A. Ford, "MPTCP Application Interface 1691 Considerations", draft-scharf-mptcp-api-01 (work in progress), 1692 March 2010. 1694 [6] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and E. 1695 Lear, "Address Allocation for Private Internets", BCP 5, 1696 RFC 1918, February 1996. 1698 [7] Braden, R., "Requirements for Internet Hosts - Communication 1699 Layers", STD 3, RFC 1122, October 1989. 1701 [8] Mathis, M., Mahdavi, J., Floyd, S., and A. Romanow, "TCP 1702 Selective Acknowledgment Options", RFC 2018, October 1996. 1704 [9] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, 1705 September 2007. 1707 [10] Ramakrishnan, K., Floyd, S., and D. Black, "The Addition of 1708 Explicit Congestion Notification (ECN) to IP", RFC 3168, 1709 September 2001. 1711 [11] Bagnulo, M., "Threat Analysis for Multi-addressed/Multi-path 1712 TCP", draft-ietf-mptcp-threat-02 (work in progress), 1713 March 2010. 1715 [12] Srisuresh, P. and K. Egevang, "Traditional IP Network Address 1716 Translator (Traditional NAT)", RFC 3022, January 2001. 1718 [13] Border, J., Kojo, M., Griner, J., Montenegro, G., and Z. 1719 Shelby, "Performance Enhancing Proxies Intended to Mitigate 1720 Link-Related Degradations", RFC 3135, June 2001. 1722 [14] Handley, M., Paxson, V., and C. Kreibich, "Network Intrusion 1723 Detection: Evasion, Traffic Normalization, and End-to-End 1724 Protocol Semantics", Usenix Security 2001, 2001, . 1727 [15] Freed, N., "Behavior of and Requirements for Internet 1728 Firewalls", RFC 2979, October 2000. 1730 Appendix A. Notes on use of TCP Options 1732 The TCP option space is limited due to the length of the Data Offset 1733 field in the TCP header (4 bits), which defines the TCP header length 1734 in 32-bit words. With the standard TCP header being 20 bytes, this 1735 leaves a maximum of 40 bytes for options, and many of these may 1736 already be used by options such as timestamp and SACK. 1738 We have performed a brief study on the commonly used TCP options in 1739 both SYN, data packets and pure ACK packets, and found that there is 1740 enough room to fit all the options we propose using in this draft. 1742 SYN packets typically include MSS (4 bytes), window scale (3 bytes), 1743 SACK permitted (2 bytes) and timestamp (10 bytes) options. Together 1744 these sum to 19 bytes. Some operating systems appear to pad each 1745 option up to a word boundary, thus using 24 bytes (a brief survey 1746 suggests Windows XP and Mac OS X do this, whereas Linux does not). 1747 Optimistically, therefore, we have 21 bytes spare, or 16 if it has to 1748 be word-aligned. In either case, however, the Multipath Capable (12 1749 bytes) and Join (7 bytes) options will fit in this remaining space. 1751 TCP data packets typically carry timestamp options in every packet, 1752 taking 10 bytes (or 12 with padding). That leaves 30 bytes (or 28, 1753 if word-aligned), which are enough to encode the data sequence 1754 mapping (16 or 20 bytes, depending on the length of the sequence 1755 number in use) and the DATA_ACK if the flow is bidirectional (6 or 10 1756 bytes). Such options will just fit in the available option space, 1757 although 8 byte data-level sequence numbers in both will only fit if 1758 word-alignment is not required. If this proves to be a problem, it 1759 is not necessary to include the Data Sequence Mapping and DATA_ACK in 1760 each packet, and in many cases it may be possible to alternate their 1761 presence (so long as the mapping covers the data being sent in the 1762 following packet). Other options include: wrapping the DATA_ACK into 1763 the Data Sequence Mapping option; alternating between 4 and 8 byte 1764 sequence numbers in each option; and sending the DATA_ACK on a 1765 duplicate subflow-level ACK. 1767 Pure ACKs in TCP typically contain only timestamps (10B). Here, 1768 multipath TCP typically needs to encode the DATA_ACK (max 10B). 1769 Occasionally ACKs will contain SACK information. Depending on the 1770 number of lost packets, SACK may utilize the entire option space. If 1771 a DATA_ACK had to be included, then it is probably necessary to 1772 reduce the number of SACK blocks by one to accomodate the DATA_ACK. 1773 However, the presence of the DATA_ACK is unlikely to be necessary in 1774 a case where SACK is in use, however, since until at least some of 1775 the SACK blocks have been retransmitted, the cumulative data-level 1776 ACK will not be moving forward (or if it does, due to retransmissions 1777 on antoher path, then that path can also be used to transmit the new 1778 DATA_ACK). 1780 The ADD_ADDR option can be between 8 and 22 bytes, depending on 1781 whether IPv4 or IPv6 is used, and whether the Port number is present 1782 or not. It is unlikely that such signalling would fit in a data 1783 packet (although if there is space, it is fine to include it). It is 1784 recommended to use duplicate ACKs with no other payload or options in 1785 order to transmit these rare signals. 1787 Finally, there are issues with options reliability. As options can 1788 also be sent on pure ACKs, these are not reliably sent. This is not 1789 an issue for DATA_ACK due to their cumulative nature, but may be an 1790 issue for ADD_ADDR/REMOVE_ADDR options. Here we favour redundant 1791 transmissions at the sender (whether on multiple paths, or on the 1792 same path on a number of ACKs). The cases where options are stripped 1793 by middleboxes are discussed in Section 6. 1795 Appendix B. Resync Packet 1797 In earlier versions of this draft, we proposed the use of a "re-sync" 1798 option that would be used in certain circumstances when a sender 1799 needs to instruct the receiver to skip over certain subflow sequence 1800 numbers (i.e. to treat the specified sequence space as having been 1801 received and acknowledged). 1803 The typical use of this option will be when packets are retransmitted 1804 on different subflows, after failing to be acknowledged on the 1805 original subflow. In such a case, it becomes necessary to move 1806 forward the original subflow's sequence numbering so as not to later 1807 transmit different data with a previously used sequence number (i.e. 1808 when more data comes to be transmitted on the original subflow, it 1809 would be different data, and so must not be sent with previously-used 1810 (but unacknowledged) sequence numbering). 1812 The rationale for needing to do this is two-fold: firstly, when ACKs 1813 are received they are for the subflow only, and the sender infers 1814 from this the data that was sent - if the same sequence space could 1815 be occupied by different data, the sender won't know whether the 1816 intended data was received. Secondly, certain classes of middleboxes 1817 may cache data and not send the new data on a previously-seen 1818 sequence number. 1820 This option was dropped, however, since some middleboxes may get 1821 confused when they meet a hole in the sequence space, and do not 1822 understand the resync option. It is therefore felt that the same 1823 data must continue to be retransmitted on a subflow even if it is 1824 already received after being retransmitted on another. There should 1825 not be a significant performance hit from this since the amount of 1826 data involved and needing to be retransmitted multiple times will be 1827 relatively small. 1829 Therefore, it is necessary to 're-sync' the expected sequence 1830 numbering at the receiving end of a subflow, using the following TCP 1831 option. This packet declares a sequence number space (inclusive) 1832 which the receiving node should skip over, i.e. if the receiver's 1833 next expected sequence number was previously within the range 1834 start_seq_num to end_seq_num, move it forward to end_seq_num + 1. 1836 This option will be used on the first new packet on the subflow that 1837 needs its sequence numbering re-synchronised. It will be continue to 1838 be included on every packet sent on this subflow until a packet 1839 containing this option has been acknowledged (i.e. if subflow 1840 acknowledgements exist for packets beyond the end sequence number). 1841 If the end sequence number is earlier than the current expected 1842 sequence number (i.e. if a resync packet has already been received), 1843 this option should be ignored. 1845 1 2 3 1846 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 1847 +---------------+---------------+------------------------------+ 1848 |Kind=MP_RESYNC| Length = 10 | Start Sequence Number : 1849 +---------------+---------------+------------------------------+ 1850 : (4 octets) | End Sequence Number : 1851 +---------------+---------------+------------------------------+ 1852 : (4 octets) | 1853 +-------------------------------+ 1855 Figure 13: Resync option 1857 Appendix C. Changelog 1859 This section maintains logs of significant changes made to this 1860 document between versions. 1862 C.1. Changes since draft-ford-mptcp-multiaddressed-03 1864 o Clarified handshake mechanism, especially with regard to error 1865 cases (Section 4.2). 1867 o Added optional port to ADD_ADDR and clarified situation with 1868 private addresses (Section 4.3.1). 1870 o Added path liveness check to REMOVE_ADDR (Section 4.3.2). 1872 o Added chunk checksumming to DSN_MAP (Section 4.4.1) to detect 1873 payload-altering middleboxes, and defined fallback mechanism 1874 (Section 4.6). 1876 o Major clarifications to receive window discussion (Section 4.4.4). 1878 o Various textual clarifications, especially in examples. 1880 C.2. Changes since draft-ford-mptcp-multiaddressed-02 1882 o Remove Version and Address ID in MP_CAPABLE in Section 4.1, and 1883 make ISN be 6 bytes. 1885 o Data sequence numbers are now always 8 bytes. But in some cases 1886 where it is unambiguous it is permissible to only send the lower 4 1887 bytes if space is at a premium. 1889 o Clarified behaviour of MP_JOIN in Section 4.2. 1891 o Added DATA_ACK to Section 4.4. 1893 o Clarified fallback to non-multipath once a non-MP-capable SYN is 1894 sent. 1896 Authors' Addresses 1898 Alan Ford 1899 Roke Manor Research 1900 Old Salisbury Lane 1901 Romsey, Hampshire SO51 0ZN 1902 UK 1904 Phone: +44 1794 833 465 1905 Email: alan.ford@roke.co.uk 1907 Costin Raiciu 1908 University College London 1909 Gower Street 1910 London WC1E 6BT 1911 UK 1913 Email: c.raiciu@cs.ucl.ac.uk 1915 Mark Handley 1916 University College London 1917 Gower Street 1918 London WC1E 6BT 1919 UK 1921 Email: m.handley@cs.ucl.ac.uk