zoukankan      html  css  js  c++  java
  • Multipath TCP on iOS11 : A closer look at the TCP Options(转)

    Multipath TCP uses a variety of TCP options to use different paths simultaneously. Several Multipath TCP options are defined in RFC6824 :

    • subtype 0x0: MP_CAPABLE
    • subtype 0x1: MP_JOIN
    • subtype 0x2: DSS
    • subtype 0x3: ADD_ADDR
    • subtype 0x4: REMOVE_ADDR
    • subtype 0x5: MP_PRIO
    • subtype 0x6: MP_FAIL
    • subtype 0x7: MP_FASTCLOSE

    In this blog post, we explore in more details the packet trace collected on an iPhone using iOS11 beta. We start our analysis with the three-way handshake. The trace contains one Multipath TCP connection. Recent versions of Wireshark support Multipath TCP and we use the tcp.options.mptcp.subtype==0 filter to match all the packets that contain the MP_CAPABLE option. This option only appears in the three packets of the initial three-way handshake. Let us first analyse the SYN sent by the iPhone. In our test over an LTE network, iOS11 beta2 advertises the following options:

    • MSS set to 1410 bytes. This is a relatively small value that was probably chosen to reduce the risk of fragmentation or Path MTU discovery problems since cellular networks often use tunnels internally
    • Selective Acknowledgements are proposed
    • The Window scale factor is set to 6 and the iPhone advertises a 64Kbytes window.
    • The Timestamp option is used as well.
    • The MP_CAPABLE option sent by the iPhone does not request the utilisation of the DSS checksum. The DSS checksum was introduced in RFC6824 to detect middlebox interference. Previous versions of iOS did not use this checksum to support Siri because Siri ran over HTTPS and this prevents most middlebox interference. However, when Multipath TCP is used to support a protocol such as HTTP, there is a risk of interference from middleboxes that inject HTTP headers. If you plan to use Multipath TCP on iOS11, you should probably rely on HTTPS and forget HTTP for other reasons than Multipath TCP.

    ../../../_images/syn.png

    The server, in this trace the Linux implementation running on multipath-tcp.org replies with Selective Acknowledgements, Timestamps, a Window Scaling factor set to 7 and requires the utilisation of the DSS Checksum.

    ../../../_images/synack.png

    The MP_CAPABLE option contained in the third ACK sent by the iPhone confirms that the iPhone will use the DSS checksum for this connection as requested by the server.

    ../../../_images/thirdack.png

    The utilisation of the DSS Checksum is clearly visible in the first data packet that is sent by the iPhone. It uses 32 bits long Data sequence numbers and data acknowledgement numbers.

    ../../../_images/dss1.png

    The first data packet returned by the Linux server is shown below. It also uses 32 bits data sequence and data acknowledgement numbers.

    ../../../_images/dss2.png

    With iOS11 beta2, the iPhone uses the MP_PRIO option and sets the cellular subflow as a backup subflow. This is immediately visible in the fourth packet of the trace that is shown below.

    ../../../_images/mpprio.png

    Apple has already explained earlier that they do not use the ADD_ADDR option because their stack is focussed on clients and they do not see a benefit in advertising client addresses since those are often behind a NAT or firewall. We did not observe ADD_ADDR or REMOVE_ADDR in our first trace.

    The MP_JOIN option is used to create subflows. In our trace, this happens at time 4.74 when we enable the WiFi interface. The MP_JOIN option contains the token advertise by the server in the MP_CAPABLE option and its backup flag is reset. This indicates that the WiFi subflow is preferred to the cellular flow that was initially created. It is interesting to note that iOS11 beta advertises a longer MSS over the WiFi interface than over the cellular one. The same window scaling factor (6) is used.

    ../../../_images/mpjoin.png

    We did not observe MP_FASTCLOSE in this trace.

    We’ll discuss MP_FAIL in another post since it is related to fallbacks to TCP.。

    这篇文章的包内容上面连接有。即使配置好了支持mptcp内核的安卓机仍然没有发现mptcp包!!!!!

  • 相关阅读:
    2013-11-26的工作-【工作日志】
    grails下的httpclient
    如何解决grails2.3.2中不能运行fork模式
    华丽的bootstrap3碰到土鳖IE6
    grails中报Cannot create a session after the response has been committed异常的解决办法
    听自己喜欢的文章-【睿读】
    动态规划----完全背包问题
    动态规划----最长公共子序列(LCS)问题
    动态规划----数字三角形问题
    动态规划----钢条切割问题
  • 原文地址:https://www.cnblogs.com/lanjianhappy/p/9812543.html
Copyright © 2011-2022 走看看