Multipath TCP: an overview


https://lwn.net/Articles/544399/


By Jonathan Corbet
March 26, 2013


The world was a simpler place when the TCP/IP network protocol suite wasfirst designed. The net was slow and primitive and it was often a triumphto get a connection to a far-away host at all. The machines at either endof a TCP session normally did not have to concern themselves with how thatconnection was made; such details were left to routers. As a result, TCPis built around the notion of a (single) connection between two hosts. TheMultipath TCP (MPTCP) project looksto change that view of networking by adding support for multiple transportpaths to the endpoints; it offers a lot of benefits, but designing adeployable protocol for today's Internet is surprisingly hard.

Things have gotten rather more complicated in the years since TCP was firstdeployed. Connections to multiple networks, once the province of large serversystems, are now ubiquitous; a smartphone, for example, can have separate,simultaneous interfaces to a cellular network, a WiFi network, and,possibly, other networks via Bluetooth or USB ports. Each of those networksprovides a possible way to reach a remote host, but any givenTCP session will use only one of them. That leads to obvious policyconsiderations (which interface should be used when) and operationaldifficulties: most handset users are familiar with how a WiFi-based TCPsession will be broken if the device moves out of range of the accesspoint, for example.

What if a TCP session could make use of all of the available paths betweenthe two endpoints at any given time? There would be performanceimprovements, since each of the paths could carry data in parallel, andcongested paths could be avoided in favor of faster paths at any giventime. Sessions could also be more robust. Imagine a video stream that isestablished over both WiFi and cellular networks; if the watcher leaves thehouse (one hopes somebody else is driving), the stream would shifttransparently to the cellular connection without interruption. Datacenters, where multiple paths between systems and variable congestion areboth common, could also make use of a multipath-capable transport protocol.

The problem is that TCP does not work that way. Enter MPTCP, whichis designed to work that way.

How it works

A TCP session is normally set up by way of a three-way handshake. Theinitiating host sends a packet with the SYN flag set, the receiving host,if it is amenable to the connection, responds with a packet containing boththe SYN and ACK flags. The final ACK packet sent by the initiator putsthe connection into the "established" state; after that, data can betransferred in either direction.

An MPTCP session starts in the same way, with one change: the initiatoradds the new MP_CAPABLE option to the SYN packet. If the receiving hostsupports MPTCP, it will add that option to its SYN-ACK reply; the two hostswill also include cryptographic keys in these packets for later use. Thefinal ACK (which must also carry the MP_CAPABLE option) establishes amultipath session, albeit a session using a single path just liketraditional TCP.

When MPTCP is in use, both sides recognize a distinction between thesession itself and any specific "subflow" used by that session. So, atany point, either party to the session can initiate another TCP connectionto the other side, with the proviso that the address and/or port at one end or theother of the connection must differ. So, if a smartphone has initiated anMPTCP connection to a server using its WiFi interface:

[Cheesy diagram]

It can add anothersubflow at any time by connecting to the same server by way of its cellularinterface:

[Cheesy diagram]

That subflow is added by sending a SYN packet with the MP_JOIN option; italso includes information on which MPTCP session is to be joined. Needlessto say, the protocol designers are concerned that a hostile party might tryto join somebody else's session; the previously-exchanged cryptographickeys are used to prevent such attacks from succeeding. If the receivingserver is amenable to adding the subflow, it will allow the establishmentof the new TCP connection and add it to the MPTCP session.

Once a session has more than one subflow, it is up to the systems on eachend to decide how to split traffic between them (though it is possible tomark a specific subflow for use only when any others no longer work). Asingle receive window applies to the session as a whole. Each subflowlooks like a normal TCP connection, with its own sequence numbers, but thesession as a whole has a separate sequence number; there is another TCPoption (DSS, or "Data Sequence Signal") which is used to inform the otherend how data on each subflow fits into the overall stream.

Subflows can come and go over the life of an MPTCP connection. They can beexplicitly closed by either end, or they can simply vanish if one of thepaths becomes unavailable. If the underlying machinery is working well,applications should not even notice these changes. Just like IP can hiderouting changes, MPTCP can hide the details of which paths it is using atany given time. It should, from an application's point of view, just work.

Needless to say, there are vast numbers of details that have been glossedover here. Making a protocol extension like this work requires thinkingabout issues like congestion control, how to manage retransmissions over adifferent path, how one party can tell the other about additional addresses(paths) it could use, how to decide when setting up multiple subflows isworth the expense, and so on. The MPTCP designers have done much of that thinking; seeRFC 6824 for the details.

The dreaded middlebox

One set of details merits a closer look, though. The designers of MPTCPare not interested in going through an idle academic exercise; they want tocreate a solution to real problems that will be deployed on the existingInternet. And that means designing something that will function with thenet as it exists now. At one level, that means making things worktransparently for TCP-based applications. But there isan entire section inthe RFC that is concerned with "middleboxes" and how they can sabotageany attempt to introduce a new protocol.

Middleboxes are routers that impose some sort of constraint ortransformation on network traffic passing through them. Network addresstranslation (NAT) boxes are one example: they hide an entire network behinda translation layer that will change the address and port of a connectionon its way through. NAT boxes can also insert data into a stream — addingcommands to make FTP work, for example. Some boxes will acknowledge dataon its way through, well before it arrives at the real destination, in anattempt to increase pipelining. Some routers will drop packets withunknown options; that behavior made the rollout of the selectiveacknowledgment (SACK) feature much harder than it needed to be. Firewallswill kill connections with holes in the sequence number stream; they willalso, sometimes, transform sequence numbers on the way through. Splittingand coalescing of segments can cause options to be dropped or duplicated.And so on; the list of potential problems is impressive.

On top of that, anybody trying to introduce an entirely new transport-layeris likely to discover that it will not make it across the Internet at all.Much of the routing infrastructure on the net assumes that TCP and UDP areall there is; anything else has a poor chance of making it through.

Working around these issues drove the design of MPTCP at all levels. TCPwas never designed for multiple subflows; rather than bolting that ideaonto the protocol, it might well have been better to start over. One could have incorporated the lessons learned from TCP in all ways — includingdoing things entirely differently where it made sense. But the resultingprotocol would not work on today's Internet, so the designers had no choicebut to create a protocol that, to almost every middlebox out there, lookslike plain old TCP.

So every subflow is an independent TCP connection in every respect. Sinceholes in sequence numbers can cause problems, each subflow has its ownsequence and a mapping layer must be added on top. That mapping layer usesrelative sequence numbers because some middlebox may have changed thosenumbers as they passed through. The two sides assign "address identifiers"to the IP addresses of their interfaces and use those identifiers tocommunicate about those interfaces, since the addresses themselves may bechanged by a NAT box in the middle. When one side tells the other about anavailable interface, it adds an "address identifier" to be used in futuremessages because a NAT box might change the visible address of thatinterface. Special checks exist for subflows that corrupt data, insertpreemptive acknowledgments, or strip unknown options; such subflows willnot be used. And the whole thing is designed to fall back gracefully toordinary TCP if the interference is too strong to overcome.

It is all a clever bit of design on the part of the MPTCP developers, butit also highlights an area of concern: the "dumb" Internet with end-to-endtransparent routing of data is a thing of the distant past. What we havenow is inflexible and somewhat hostile to the deployment of new technologies. TheMPTCP developers have been able to work around these limitations, but theeffort required was considerable. In the future, we may find that the netis broken in fundamental ways and it simply cannot be fixed; some might saythat the difficulties in moving to IPv6 show that this has alreadyhappened.

Future directions

The current MPTCP code can be found at the MPTCP githubrepository; it adds a good 10,000 lines to the mainline kernel'snetworking subtree. While it has apparently been the subject ofdiscussions with various networking developers, it has not, yet,been posted for public review or inclusion into the mainline. It does,however, seem to work: the MPTCP developers claim to have implementedthe fastest TCPconnection ever by transmitting at a rate of 51.8Gb/s over six 10Gblinks.

MPTCP is still relatively young, so there is almost certainly quite a bitof work yet to be done before it is ready for mainline merging orproduction use. There is also some thinking to be done on the applicationside; it may be possible for MPTCP-aware applications to make better use ofthe available paths. Projects like this are arguably never finished (we arestill refining TCP, after all), but MPTCP does seem to have reached thepoint where more users may want to start experimenting with it.

Anybody wanting to play with this code can grab the project's kernelrepository and build a custom kernel. For those who are not up to thatlevel of effort, the project offers a number ofotheroptions, including a Debian repository, instructions for running MPTCPon Amazon's EC2, and kernels for a handful of Android-based handsets.Needless to say, the developers are highly interested in hearing bugreports or other testing results.


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: Action-net是一种用于动作识别的多路径激励模型。它通过同时考虑多个视角和多个时间尺度的信息,提高了动作识别的准确性。模型的核心是一个多路径卷积神经网络,它可以从不同的视角和时间尺度提取特征。此外,模型还使用了一种新的激励机制,可以增强不同路径之间的信息交互,从而进一步提高了准确性。 ### 回答2: Action-Net是一个用于动作识别的多路径激发(Multipath Excitation)模型。动作识别是计算机视觉领域的一个重要任务,旨在从视频中自动识别和分类不同的动作。Action-Net通过采用多路径激发方法,提高了动作识别的准确性和性能。 多路径激发是一种模型设计技术,通过在网络架构中引入多个并行路径,每个路径分别学习不同的特征表示进行动作识别。这样的设计可以捕获到不同级别、不同尺度和不同分辨率的特征信息,提供更加全面准确的动作表示。 Action-Net利用了深度神经网络的强大表达能力,将视频输入分为多个时间段或空间尺度,并在每个时间段或空间尺度上构建不同的网络路径。每个路径在不同的时间尺度或空间分辨率上学习不同的特征表示,这些特征表示可以捕捉到动作的关键信息。 通过引入多路径激发机制,Action-Net可以同时学习到描述全局结构和细节特征的表示。此外,多路径激发还可以减轻网络在学习过程中的过拟合问题,提高了模型的泛化能力。 在实验中,Action-Net在各种动作识别任务上取得了优秀的性能。与传统的单一路径模型相比,Action-Net的准确性有了显著提升。多路径激发不仅可以用于动作识别,还可以应用于其他计算机视觉任务,如目标检测和图像分割。 综上所述,Action-Net是一种基于多路径激发的动作识别模型,通过引入多个并行路径学习不同的特征表示,提高了动作识别的准确性和性能。它具有较强的表达能力和泛化能力,在计算机视觉任务中有着广泛的应用前景。 ### 回答3: "action-net: multipath excitation for action recognition"是一种用于行为识别的多路径激励模型。 行为识别是计算机视觉中的一项重要任务,它旨在通过分析视频或图像序列来识别和理解人类的动作或行为。为了更好地解决这个问题,研究人员提出了许多方法,其中一个方法就是使用深度神经网络。 "action-net: multipath excitation for action recognition"是一种基于深度神经网络的模型,它通过多路径激励的方式来增强行为识别的性能。多路径激励是指通过引入多个并行的路径,每个路径都具有不同的特征提取能力,以捕捉不同方面的行为特征。 在"action-net"模型中,每个路径都是一个独立的卷积神经网络,这些网络在不同尺度和层次上进行特征提取。每个网络都通过激励机制来增强其对特定行为特征的敏感性。这种激励机制可以使网络在学习时集中注意力于关键的特征,提高行为识别的准确性。 通过多个路径的组合,"action-net"模型能够充分利用不同尺度和层次的特征信息,增强行为识别的鲁棒性和泛化能力。此外,多路径激励还能够有效地缓解过拟合问题,提高模型的泛化能力。 总之,"action-net: multipath excitation for action recognition"是一种基于深度神经网络的行为识别模型,通过多路径激励的方式有效地提高了行为识别的性能。它能够捕捉不同尺度和层次的行为特征,提高模型的鲁棒性和泛化能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值