SlideShare a Scribd company logo
1 of 17
Download to read offline
MPTCP学习
hubugui@gmail.com
2016-06
目录
• 介绍
– Multipath TCP Data transfer
– MPTCP over WiFi/3G
– 官方性能测试-50Gbps
• 常见QA
• iperf流量测试
– 准备
– 环境
– 交换机限速
– TCP流量
– MPTCP流量
– 灾备问题
• 可行性
• 参考
2
介绍
• What
• MPTCP是一种基于TCP的传输层协议,利用多IP地址/网卡同时传输数据,提高吞吐率
• 延续标准TCP Socket API,应用软件无须修改
• Why
• Benefits of this include better resource utilization, better throughput and
smoother reaction to failures
• mobile hosts to handover traffic from WiFi to 3G, without disrupting the
application
• IPv6/IPv4 coexistence
• How
• 利用双方多个IP地址的多条组合来建立多个TCP连接(subflow),并行传输数据
• 标准
• IETF组织发布实验标准RFC6824, 2013年
• 实现
• 2009年开始比利时UCL大学一直在维护基于Linux内核的版本
• 最新V0.90/linux-image-3.18.20-90-mptcp,但没有合并进入Linux官方内核
• iOS7/Mac OS X 10.10/FreeBSD
Multipath TCP Data transfer
• Two levels of sequence numbers
Multipath TCP
TCP1
socket
TCP2
Multipath TCP
TCP1
socket
TCP2
ABCDEF
Data sequence #
TCP1 sequence #
TCP2 sequence #
内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
MPTCP over WiFi/3G
8Mbps, 20ms
2Mbps, 150ms
内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
6
MPTCP over WiFi/3G
C. Raiciu, et al. “How hard can it be? designing and implementing a deployable multipath TCP,” NSDI'12:
Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation, 2012.
内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
官方性能测试-50Gbps
• 环境
• 2台HP DL380p G7,各有3张Intel dual-port 10Gb Ethernet NICs,也就是各6个10Gb/s的网口
• Linux内核根据硬件定制
• client's script和server's script
• custom netperf implementation
• 测试结果
– Multipath TCP is able to transmit a single data-stream at the rate of up to 51.8 Gbit/s.
This corresponds to more than 1 DVD per second, or an entire Blu-Ray disk (25GB) in
only 5 seconds !
– 实际带宽51.8Gbit/s,利用率达到物理带宽60Gb/s的86%
常见QA
• Q1. MPTCP的一端单网卡,另一端3网卡时,到底建立了几条TCP连接?
• A1. 假设单网卡机器上设立分属3个网段的IP地址,在另一端3网卡机器上将3张网卡
地址分别设置为与单网卡的3个IP地址段一一相同网段,比如:A有1张网卡,却有3
个IP地址,分别:10.1.1.3/10.1.2.3/192.168.1.151,而B有3张网卡,IP地址分
别:10.1.1.2/10.1.2.2/192.168.1.155,那么MPTCP连接建立时,会产生3*3=9
个TCP连接(MPTCP full mesh模式),但经尝试后有效连接仅3个,分别是:
10.1.1.3 <---> 10.1.1.2
10.1.2.3 <---> 10.1.2.2
192.168.1.151 <---> 192.168.1.155
• Q2. 如Q1,一条MPTCP连接中的多条TCP连接的端口号如何分配?
• A2. 对于应用开发者而言和TCP一样,只有一对端口,但实际上由于建立了3条TCP连
接,也就是有3个本地端口分别对应对端的1个端口.端口的分配和管理全部由
MPTCP实现,应用开发者无需关心.
• Q3. MPTCP监测连接"健康"状态,发送数据时优选最优连接吗?
• A3. 是的,MPTCP会定期监控并挑选合适的TCP连接来传输数据,这包括计算拥塞,延
时等参数来给每个连接评分.但看到一些文章介绍到MPTCP的拥塞算法还有明显的改
进空间.
iperf流量测试
9
• 2台Ubuntu14.04机器
• A,笔记本,有1个千兆网卡
• B,工作站,有4个千兆网卡
• Install MPTCP
• 安装完重启进入Grub"高级选项",选择linux-image-3.18.20-90-mptcp
• uname -a可查看当前系统内核版本
• 启动MPTCP
• sudo sysctl -w net.mptcp.mptcp_enabled=1
• 客户端
• sudo ifconfig eth0:1 10.1.1.3 netmask 255.255.255.0 up
• sudo ifconfig eth0:2 10.1.2.3 netmask 255.255.255.0 up
• 服务器
• sudo ip rule add from 10.1.1.2 table 1
• sudo ip rule add from 10.1.2.2 table 2
• sudo ip route add 10.1.1.0/24 dev eth0 scope link table 1
• sudo ip route add 10.1.2.0/24 dev eth1 scope link table 2
• 交换机
• 连接A-笔记本的端口设在1Gb/s
• 连接B-工作站的4个端口限速10Mb/s
• 测试工具
• iperf,流量测试应用软件
• bmon,检测网卡流量
准备
10
环境
11
千兆网卡,接交换机
1Gb/s速率端口
多IP地址
10.1.1.3
10.1.2.3
192.168.1.151
10.1.1.2
192.168.1.155 3个千兆网卡
接交换机10Mb/s
速率端口
A B
上图有3条IP地址路径,故每个MPTCP连接建立3条TCP子连接
10.1.2.2
10Mb/s
1Gb/s
• 测试方法:iperf测试TCP流量
• A作服务器,B作客户端,贴近真实环境
路径1 路径2
路径3
10Mb/s
10Mb/s
交换机限速
• 编号为17/19/21/23的4个端口被限速10Mb/s
• 前3个由B-工作站使用,最后1个空闲
TCP流量(关闭MPTCP)
13
iperf服务器 iperf客户端
运行: iperf -s -f M -i 1 运行: iperf -c 10.1.1.3 -f M -i 1 -t 1000
BA
iperf流量
1.12MB/s
iperf流量
1MB/s
bmon检测到网卡流量
eth0有1.18MB/s
bmon检测到网卡流量
• eth0有1.18MB/s
• eth1有0MB/s
• eth2有2.4KB/s
•客户端只启用1张网卡, 双方的iperf应用流量 ≈ bmon的网卡流量
•服务器接收带宽 ≈ 客户端发送带宽
•服务器接收带宽8.96Mb/s=8 * 1.12MB/s,占总带宽10Mb/s的89%
MPTCP流量
14
bmon检测到网卡流量
eth0有3.52MB/s
bmon检测到网卡流量
• eth0有1.18MB/s
• eth1有1.18MB/s
• eth2有1.17MB/s
•客户端启用了3张网卡, 双方的iperf应用流量 ≈ bmon的网卡流量
•服务器接收带宽 ≈ 客户端发送带宽
•计算十次平均,服务器接收带宽提高到26.6Mb/s=8 * 3.32MB/s,占总带宽30Mb/s的88%
结论: MPTCP可激活3张网卡同时传输,使得1+1+1 ≈ 2.66
iperf服务器 iperf客户端
运行: iperf -s -f M -i 1 运行: iperf -c 10.1.1.3 -f M -i 1 -t 1000
BA
iperf流量
3.32MB/s
iperf流量
3.23MB/s
• B-工作站是客户端,A-笔记本是是服务器
• B-工作站向A-笔记本请求数据时,先ifconfig
down掉eth2(default路由),然后ifconfig up
eth2,流量不会恢复
• 拔掉eth2/eth0/eth1的网线则不发生
• 反过来A-笔记本作为客户端,不发生
• 有关MPTCP协议栈和网卡驱动粘合部分,实际LTE
场景再看
灾备问题
15
可行性
• 应用优势
– 专为移动端和数据中心设计
– iOS7已引入,成为IETF标准,受到业界认可
• 潜在问题
– 最新MPTCP实现基于Linux内核3.8,而官方内核发
展到4.6,移植MPTCP内核到嵌入式平台可能有障碍
16
• www.multipath-tcp.org/
• http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
• http://inl.info.ucl.ac.be/system/files/these_pres.pdf
• https://en.wikipedia.org/wiki/Multipath_TCP
• netperf
• http://www.netperf.org/svn/netperf2/tags/netperf-2.7.0/src/
• wget -np -m -l5 http://www.netperf.org/svn/netperf2/tags/netperf-
2.7.0/
参考
17

More Related Content

What's hot

DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking WalkthroughThomas Graf
 
Domain naming system
Domain naming systemDomain naming system
Domain naming systemChinmoy Jena
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.Naoto MATSUMOTO
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopSetor Amuzu
 
Qt user interface
Qt user interfaceQt user interface
Qt user interfacemeriem sari
 
Demystifying EVPN in the data center: Part 1 in 2 episode series
Demystifying EVPN in the data center: Part 1 in 2 episode seriesDemystifying EVPN in the data center: Part 1 in 2 episode series
Demystifying EVPN in the data center: Part 1 in 2 episode seriesCumulus Networks
 
Sejarah linux dan perintah internal eksternal
Sejarah linux dan perintah internal eksternalSejarah linux dan perintah internal eksternal
Sejarah linux dan perintah internal eksternalNur Kholis
 
Upgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningUpgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningMarna Walle
 
z/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS Resolverz/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS ResolverzOSCommserver
 
Bottom half in linux kernel
Bottom half in linux kernelBottom half in linux kernel
Bottom half in linux kernelKrishnaPrasad630
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisBuland Singh
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to BottomKernel TLV
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/CoreShay Cohen
 
Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questionsKavya Sri
 

What's hot (20)

DevConf 2014 Kernel Networking Walkthrough
DevConf 2014   Kernel Networking WalkthroughDevConf 2014   Kernel Networking Walkthrough
DevConf 2014 Kernel Networking Walkthrough
 
Domain naming system
Domain naming systemDomain naming system
Domain naming system
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
Introduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics WorkshopIntroduction to linux at Introductory Bioinformatics Workshop
Introduction to linux at Introductory Bioinformatics Workshop
 
Qt user interface
Qt user interfaceQt user interface
Qt user interface
 
Demystifying EVPN in the data center: Part 1 in 2 episode series
Demystifying EVPN in the data center: Part 1 in 2 episode seriesDemystifying EVPN in the data center: Part 1 in 2 episode series
Demystifying EVPN in the data center: Part 1 in 2 episode series
 
Sejarah linux dan perintah internal eksternal
Sejarah linux dan perintah internal eksternalSejarah linux dan perintah internal eksternal
Sejarah linux dan perintah internal eksternal
 
L4 Microkernel :: Design Overview
L4 Microkernel :: Design OverviewL4 Microkernel :: Design Overview
L4 Microkernel :: Design Overview
 
Upgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 PlanningUpgrade to IBM z/OS V2.5 Planning
Upgrade to IBM z/OS V2.5 Planning
 
z/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS Resolverz/OS Communications Server: z/OS Resolver
z/OS Communications Server: z/OS Resolver
 
Bottom half in linux kernel
Bottom half in linux kernelBottom half in linux kernel
Bottom half in linux kernel
 
Kdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysisKdump and the kernel crash dump analysis
Kdump and the kernel crash dump analysis
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
 
Mcsa certification 410
Mcsa certification 410Mcsa certification 410
Mcsa certification 410
 
SR-IOV Introduce
SR-IOV IntroduceSR-IOV Introduce
SR-IOV Introduce
 
OpenWrt From Top to Bottom
OpenWrt From Top to BottomOpenWrt From Top to Bottom
OpenWrt From Top to Bottom
 
linux kernel overview 2013
linux kernel overview 2013linux kernel overview 2013
linux kernel overview 2013
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Acls
AclsAcls
Acls
 
Linux admin interview questions
Linux admin interview questionsLinux admin interview questions
Linux admin interview questions
 

Viewers also liked

Multipath TCP as Security Solution
Multipath TCP as Security SolutionMultipath TCP as Security Solution
Multipath TCP as Security SolutionNishant Pawar
 
MultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathMultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathDiogo Mónica
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsOlivier Bonaventure
 
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentPacket Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentCommunication Systems & Networks
 
From TCP to MPTCP a brief explanation
From TCP to MPTCP a brief explanationFrom TCP to MPTCP a brief explanation
From TCP to MPTCP a brief explanationAkrem Hadji
 

Viewers also liked (6)

Multipath TCP as Security Solution
Multipath TCP as Security SolutionMultipath TCP as Security Solution
Multipath TCP as Security Solution
 
MultiPath TCP - The path to multipath
MultiPath TCP - The path to multipathMultiPath TCP - The path to multipath
MultiPath TCP - The path to multipath
 
Beyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocolsBeyond TCP: The evolution of Internet transport protocols
Beyond TCP: The evolution of Internet transport protocols
 
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous EnvironmentPacket Reordering Response for MPTCP under Wireless Heterogeneous Environment
Packet Reordering Response for MPTCP under Wireless Heterogeneous Environment
 
Multipath TCP & practical usage
Multipath TCP & practical usageMultipath TCP & practical usage
Multipath TCP & practical usage
 
From TCP to MPTCP a brief explanation
From TCP to MPTCP a brief explanationFrom TCP to MPTCP a brief explanation
From TCP to MPTCP a brief explanation
 

Similar to MPTCP学习

计算机网络:复习
计算机网络:复习计算机网络:复习
计算机网络:复习magicshui
 
组网实践
组网实践组网实践
组网实践telab
 
SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉ptcracker
 
Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙drewz lin
 
Linux bonding
Linux bondingLinux bonding
Linux bondinghubugui
 
服务器端性能优化
服务器端性能优化服务器端性能优化
服务器端性能优化ZhiYong Wei
 
实时消息推送系统
实时消息推送系统实时消息推送系统
实时消息推送系统Yi Feng Yang
 
[圣思园][Java SE]Network
[圣思园][Java SE]Network[圣思园][Java SE]Network
[圣思园][Java SE]NetworkArBing Xie
 
Apache trafficserver
Apache trafficserverApache trafficserver
Apache trafficserverDin Dindin
 
门户网站宕机网络分析报告
门户网站宕机网络分析报告门户网站宕机网络分析报告
门户网站宕机网络分析报告Kainy
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)William Lee
 
IBM Cloud Private Introduction
IBM Cloud Private IntroductionIBM Cloud Private Introduction
IBM Cloud Private IntroductionGuangya Liu
 
大规模高性能计算集群优化.pdf
大规模高性能计算集群优化.pdf大规模高性能计算集群优化.pdf
大规模高性能计算集群优化.pdfchachachat
 
Alibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconAlibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconYiwei Ma
 
数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011Yiwei Ma
 
第17讲 广域网基础
第17讲 广域网基础第17讲 广域网基础
第17讲 广域网基础F.l. Yu
 
第9讲 Eigrp
第9讲 Eigrp第9讲 Eigrp
第9讲 EigrpF.l. Yu
 
Linux performance network analysis
Linux performance network analysisLinux performance network analysis
Linux performance network analysis静 丁
 
Unix socket
Unix socketUnix socket
Unix socketst900278
 
第3讲 Tcpip协议栈
第3讲 Tcpip协议栈第3讲 Tcpip协议栈
第3讲 Tcpip协议栈F.l. Yu
 

Similar to MPTCP学习 (20)

计算机网络:复习
计算机网络:复习计算机网络:复习
计算机网络:复习
 
组网实践
组网实践组网实践
组网实践
 
SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉SACC2015 ”互联网+“任重而道远-白金&高春辉
SACC2015 ”互联网+“任重而道远-白金&高春辉
 
Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙Tcpcopy 阿里技术沙龙
Tcpcopy 阿里技术沙龙
 
Linux bonding
Linux bondingLinux bonding
Linux bonding
 
服务器端性能优化
服务器端性能优化服务器端性能优化
服务器端性能优化
 
实时消息推送系统
实时消息推送系统实时消息推送系统
实时消息推送系统
 
[圣思园][Java SE]Network
[圣思园][Java SE]Network[圣思园][Java SE]Network
[圣思园][Java SE]Network
 
Apache trafficserver
Apache trafficserverApache trafficserver
Apache trafficserver
 
门户网站宕机网络分析报告
门户网站宕机网络分析报告门户网站宕机网络分析报告
门户网站宕机网络分析报告
 
CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)CWMP TR-069 Training (Chinese)
CWMP TR-069 Training (Chinese)
 
IBM Cloud Private Introduction
IBM Cloud Private IntroductionIBM Cloud Private Introduction
IBM Cloud Private Introduction
 
大规模高性能计算集群优化.pdf
大规模高性能计算集群优化.pdf大规模高性能计算集群优化.pdf
大规模高性能计算集群优化.pdf
 
Alibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qconAlibaba server-zhangxuseng-qcon
Alibaba server-zhangxuseng-qcon
 
数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011数据中心网络架构与全球化服务-Qcon2011
数据中心网络架构与全球化服务-Qcon2011
 
第17讲 广域网基础
第17讲 广域网基础第17讲 广域网基础
第17讲 广域网基础
 
第9讲 Eigrp
第9讲 Eigrp第9讲 Eigrp
第9讲 Eigrp
 
Linux performance network analysis
Linux performance network analysisLinux performance network analysis
Linux performance network analysis
 
Unix socket
Unix socketUnix socket
Unix socket
 
第3讲 Tcpip协议栈
第3讲 Tcpip协议栈第3讲 Tcpip协议栈
第3讲 Tcpip协议栈
 

MPTCP学习

  • 2. 目录 • 介绍 – Multipath TCP Data transfer – MPTCP over WiFi/3G – 官方性能测试-50Gbps • 常见QA • iperf流量测试 – 准备 – 环境 – 交换机限速 – TCP流量 – MPTCP流量 – 灾备问题 • 可行性 • 参考 2
  • 3. 介绍 • What • MPTCP是一种基于TCP的传输层协议,利用多IP地址/网卡同时传输数据,提高吞吐率 • 延续标准TCP Socket API,应用软件无须修改 • Why • Benefits of this include better resource utilization, better throughput and smoother reaction to failures • mobile hosts to handover traffic from WiFi to 3G, without disrupting the application • IPv6/IPv4 coexistence • How • 利用双方多个IP地址的多条组合来建立多个TCP连接(subflow),并行传输数据 • 标准 • IETF组织发布实验标准RFC6824, 2013年 • 实现 • 2009年开始比利时UCL大学一直在维护基于Linux内核的版本 • 最新V0.90/linux-image-3.18.20-90-mptcp,但没有合并进入Linux官方内核 • iOS7/Mac OS X 10.10/FreeBSD
  • 4. Multipath TCP Data transfer • Two levels of sequence numbers Multipath TCP TCP1 socket TCP2 Multipath TCP TCP1 socket TCP2 ABCDEF Data sequence # TCP1 sequence # TCP2 sequence # 内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
  • 5. MPTCP over WiFi/3G 8Mbps, 20ms 2Mbps, 150ms 内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
  • 6. 6 MPTCP over WiFi/3G C. Raiciu, et al. “How hard can it be? designing and implementing a deployable multipath TCP,” NSDI'12: Proceedings of the 9th USENIX conference on Networked Systems Design and Implementation, 2012. 内容来源:http://multipath-tcp.org/data/MultipathTCP-netsys.pptx
  • 7. 官方性能测试-50Gbps • 环境 • 2台HP DL380p G7,各有3张Intel dual-port 10Gb Ethernet NICs,也就是各6个10Gb/s的网口 • Linux内核根据硬件定制 • client's script和server's script • custom netperf implementation • 测试结果 – Multipath TCP is able to transmit a single data-stream at the rate of up to 51.8 Gbit/s. This corresponds to more than 1 DVD per second, or an entire Blu-Ray disk (25GB) in only 5 seconds ! – 实际带宽51.8Gbit/s,利用率达到物理带宽60Gb/s的86%
  • 8. 常见QA • Q1. MPTCP的一端单网卡,另一端3网卡时,到底建立了几条TCP连接? • A1. 假设单网卡机器上设立分属3个网段的IP地址,在另一端3网卡机器上将3张网卡 地址分别设置为与单网卡的3个IP地址段一一相同网段,比如:A有1张网卡,却有3 个IP地址,分别:10.1.1.3/10.1.2.3/192.168.1.151,而B有3张网卡,IP地址分 别:10.1.1.2/10.1.2.2/192.168.1.155,那么MPTCP连接建立时,会产生3*3=9 个TCP连接(MPTCP full mesh模式),但经尝试后有效连接仅3个,分别是: 10.1.1.3 <---> 10.1.1.2 10.1.2.3 <---> 10.1.2.2 192.168.1.151 <---> 192.168.1.155 • Q2. 如Q1,一条MPTCP连接中的多条TCP连接的端口号如何分配? • A2. 对于应用开发者而言和TCP一样,只有一对端口,但实际上由于建立了3条TCP连 接,也就是有3个本地端口分别对应对端的1个端口.端口的分配和管理全部由 MPTCP实现,应用开发者无需关心. • Q3. MPTCP监测连接"健康"状态,发送数据时优选最优连接吗? • A3. 是的,MPTCP会定期监控并挑选合适的TCP连接来传输数据,这包括计算拥塞,延 时等参数来给每个连接评分.但看到一些文章介绍到MPTCP的拥塞算法还有明显的改 进空间.
  • 10. • 2台Ubuntu14.04机器 • A,笔记本,有1个千兆网卡 • B,工作站,有4个千兆网卡 • Install MPTCP • 安装完重启进入Grub"高级选项",选择linux-image-3.18.20-90-mptcp • uname -a可查看当前系统内核版本 • 启动MPTCP • sudo sysctl -w net.mptcp.mptcp_enabled=1 • 客户端 • sudo ifconfig eth0:1 10.1.1.3 netmask 255.255.255.0 up • sudo ifconfig eth0:2 10.1.2.3 netmask 255.255.255.0 up • 服务器 • sudo ip rule add from 10.1.1.2 table 1 • sudo ip rule add from 10.1.2.2 table 2 • sudo ip route add 10.1.1.0/24 dev eth0 scope link table 1 • sudo ip route add 10.1.2.0/24 dev eth1 scope link table 2 • 交换机 • 连接A-笔记本的端口设在1Gb/s • 连接B-工作站的4个端口限速10Mb/s • 测试工具 • iperf,流量测试应用软件 • bmon,检测网卡流量 准备 10
  • 13. TCP流量(关闭MPTCP) 13 iperf服务器 iperf客户端 运行: iperf -s -f M -i 1 运行: iperf -c 10.1.1.3 -f M -i 1 -t 1000 BA iperf流量 1.12MB/s iperf流量 1MB/s bmon检测到网卡流量 eth0有1.18MB/s bmon检测到网卡流量 • eth0有1.18MB/s • eth1有0MB/s • eth2有2.4KB/s •客户端只启用1张网卡, 双方的iperf应用流量 ≈ bmon的网卡流量 •服务器接收带宽 ≈ 客户端发送带宽 •服务器接收带宽8.96Mb/s=8 * 1.12MB/s,占总带宽10Mb/s的89%
  • 14. MPTCP流量 14 bmon检测到网卡流量 eth0有3.52MB/s bmon检测到网卡流量 • eth0有1.18MB/s • eth1有1.18MB/s • eth2有1.17MB/s •客户端启用了3张网卡, 双方的iperf应用流量 ≈ bmon的网卡流量 •服务器接收带宽 ≈ 客户端发送带宽 •计算十次平均,服务器接收带宽提高到26.6Mb/s=8 * 3.32MB/s,占总带宽30Mb/s的88% 结论: MPTCP可激活3张网卡同时传输,使得1+1+1 ≈ 2.66 iperf服务器 iperf客户端 运行: iperf -s -f M -i 1 运行: iperf -c 10.1.1.3 -f M -i 1 -t 1000 BA iperf流量 3.32MB/s iperf流量 3.23MB/s
  • 15. • B-工作站是客户端,A-笔记本是是服务器 • B-工作站向A-笔记本请求数据时,先ifconfig down掉eth2(default路由),然后ifconfig up eth2,流量不会恢复 • 拔掉eth2/eth0/eth1的网线则不发生 • 反过来A-笔记本作为客户端,不发生 • 有关MPTCP协议栈和网卡驱动粘合部分,实际LTE 场景再看 灾备问题 15
  • 16. 可行性 • 应用优势 – 专为移动端和数据中心设计 – iOS7已引入,成为IETF标准,受到业界认可 • 潜在问题 – 最新MPTCP实现基于Linux内核3.8,而官方内核发 展到4.6,移植MPTCP内核到嵌入式平台可能有障碍 16
  • 17. • www.multipath-tcp.org/ • http://multipath-tcp.org/data/MultipathTCP-netsys.pptx • http://inl.info.ucl.ac.be/system/files/these_pres.pdf • https://en.wikipedia.org/wiki/Multipath_TCP • netperf • http://www.netperf.org/svn/netperf2/tags/netperf-2.7.0/src/ • wget -np -m -l5 http://www.netperf.org/svn/netperf2/tags/netperf- 2.7.0/ 参考 17