Ubuntu16.0配置MPTCP
一.在Ubuntu16.0下配置并编译MPTCP
1.安装依赖环境
sudo apt-get update
sudo apt-get install libncurses5-dev
sudo apt-get install build-essential
2.下载MPTCP源码
cd /usr/src
sudo git clone --depth=1 git://github.com/multipath-tcp/mptcp.git
cd mptcp
3.配置编译内核
sudo make menuconfig
PS:如果出现错误提示:
则下载缺少的依赖包
sudo apt-get install bison flex
配置内核Tips:
1. 每一个条目,(1)选择y表示编译到内核,条目前括号内的内容显示为<*>或[*];(2)选择n表示不编译到内核中,条目前显示为<>或[ ];(3)选择m表示以模块的方式编译,之后使用需要加载该模块才可以,条目前显示为<M>或[M]。2. 进入networking support->networking options,检查一下IPv6模块,选择编译进内核或者不编译,不要选择以模块方式编译,否则看不到后面的MPTCP选项。这里我选择编译到内核。3. networking support->networking options->TCP/IP networking->MPTCP protocol(MPTCP),按y选择编译。4. Networking support->Networking options->IP: advanced router->IP: policy routing,按y选择编译。5. MPTCP: advanced path-manager control,编译。进到里面,编译MPTCP Full-Mesh Path-Manager和MPTCP ndiff-ports。下面的Default MPTCP Path-Manager 选择Full mesh。6. Networking support->Networking options->TCP: advanced congestion control,进入。这里是拥塞控制算法,需要哪些就选择哪些,*编译到内核,M是编译成模块。这里选择CUBIC ,Vegas,Veno,LIA(MPTCP Link Increase),Olia (MPTCP Opportunistic Linked Increase),wVegas,Balia。选择默认的算法。7. Networking support->Networking options-> “Schedule”都选上,默认选择Round Robin(Default选择的是最小RTT)。8. 保存配置,退出
4.编译内核
cd /usr/src/mptcp
sudo make
5.编译并安装模块
sudo make modules_install
6.安装
sudo make install
7.重启系统
重启系统,重启以后要进入新编译好的内核中,在开机的时候选择ubuntu高级选项,找到刚刚编译好的内核,选择进入。
8.检查安装的MPTCP版本
dmesg | grep MPTCP
9.检查是否在使用MPTCP
网址
参考链接
网址
二。配置路由
自动配置
1.编辑mptcp_up
cd /etc/network/if-up.d
sudo gedit mptcp_up
复制粘贴以下内容,保存退出
#!/bin/sh
# A script for setting up routing tables for MPTCP in the N950.# Copy this script into /etc/network/if-up.d/set -eenv > /etc/network/if_up_envif [ "$IFACE" = lo -o "$MODE" != start ]; thenexit 0
fiif [ -z $DEVICE_IFACE ]; thenexit 0
fi# FIRST, make a table-alias
if [ `grep $DEVICE_IFACE /etc/iproute2/rt_tables | wc -l` -eq 0 ]; thenNUM=`cat /etc/iproute2/rt_tables | wc -l`echo "$NUM $DEVICE_IFACE" >> /etc/iproute2/rt_tables
fiif [ $DHCP4_IP_ADDRESS ]; thenSUBNET=`echo $IP4_ADDRESS_0 | cut -d \ -f 1 | cut -d / -f 2`ip route add table $DEVICE_IFACE to $DHCP4_NETWORK_NUMBER/$SUBNET dev $DEVICE_IFACE scope linkip route add table $DEVICE_IFACE default via $DHCP4_ROUTERS dev $DEVICE_IFACEip rule add from $DHCP4_IP_ADDRESS table $DEVICE_IFACE
else# PPP-interfaceIPADDR=`echo $IP4_ADDRESS_0 | cut -d \ -f 1 | cut -d / -f 1`ip route add table $DEVICE_IFACE default dev $DEVICE_IP_IFACE scope linkip rule add from $IPADDR table $DEVICE_IFACE
fi
设置文件可执行(root下)
sudo chmod a+x mptcp_up
2.编辑mptcp_down
cd /etc/network/if-post-down.d
sudo gedit mptcp_down
复制粘贴以下内容,保存退出
#!/bin/sh
# A script for setting up routing tables for MPTCP in the N950.# Copy this script into /etc/network/if-post-down.d/set -eenv > /etc/network/if_down_envif [ "$IFACE" = lo -o "$MODE" != stop ]; thenexit 0
fiip rule del table $DEVICE_IFACE
ip route flush table $DEVICE_IFACE
设置文件可执行(root下)
sudo chmod a+x mptcp_down
上述两个脚本根据环境变量配置路由表,绝大多数情况下可以正常工作。还可以参考手动配置路由
三.更改调度算法(有问题 尚未解决)
更改前执行sudo make menuconfig命令时,MPTCP:advanced scheduler control有以下这几个选项:
1.对Kconfig文件添加语句
#
# MPTCP configuration
#
config MPTCPbool "MPTCP protocol"depends on (IPV6=y || IPV6=n)---help---This replaces the normal TCP stack with a Multipath TCP stack,able to use several paths at once.menuconfig MPTCP_PM_ADVANCEDbool "MPTCP: advanced path-manager control"depends on MPTCP=y---help---Support for selection of different path-managers. You should choose 'Y' here,because otherwise you will not actively create new MPTCP-subflows.if MPTCP_PM_ADVANCEDconfig MPTCP_FULLMESHtristate "MPTCP Full-Mesh Path-Manager"depends on MPTCP=y---help---This path-management module will create a full-mesh among all IP-addresses.config MPTCP_NDIFFPORTStristate "MPTCP ndiff-ports"depends on MPTCP=y---help---This path-management module will create multiple subflows between the samepair of IP-addresses, modifying the source-port. You can set the numberof subflows via the mptcp_ndiffports-sysctl.config MPTCP_BINDERtristate "MPTCP Binder"depends on (MPTCP=y)---help---This path-management module works like ndiffports, and adds the sysctloption to set the gateway (and/or path to) per each additional subflowvia Loose Source Routing (IPv4 only).config MPTCP_NETLINKtristate "MPTCP Netlink Path-Manager"depends on MPTCP=y---help---This path-management module is controlled over a Netlink interface. A userspacemodule can therefore control the establishment of new subflows and the policyto apply over those new subflows for every connection.choiceprompt "Default MPTCP Path-Manager"default DEFAULT_DUMMYhelpSelect the Path-Manager of your choiceconfig DEFAULT_FULLMESHbool "Full mesh" if MPTCP_FULLMESH=yconfig DEFAULT_NDIFFPORTSbool "ndiff-ports" if MPTCP_NDIFFPORTS=yconfig DEFAULT_BINDERbool "binder" if MPTCP_BINDER=yconfig DEFAULT_NETLINKbool "Netlink" if MPTCP_NETLINK=yconfig DEFAULT_DUMMYbool "Default"endchoiceendifconfig DEFAULT_MPTCP_PMstringdefault "default" if DEFAULT_DUMMYdefault "fullmesh" if DEFAULT_FULLMESHdefault "ndiffports" if DEFAULT_NDIFFPORTSdefault "binder" if DEFAULT_BINDERdefault "default"menuconfig MPTCP_SCHED_ADVANCEDbool "MPTCP: advanced scheduler control"depends on MPTCP=y---help---Support for selection of different schedulers. You should choose 'Y' here,if you want to choose a different scheduler than the default one.if MPTCP_SCHED_ADVANCEDconfig MPTCP_BLESTtristate "MPTCP BLEST"depends on MPTCP=y---help---This is an experimental BLocking ESTimation-based (BLEST) scheduler.config MPTCP_ROUNDROBINtristate "MPTCP Round-Robin"depends on (MPTCP=y)---help---This is a very simple round-robin scheduler. Probably has bad performancebut might be interesting for researchers.config MPTCP_REDUNDANTtristate "MPTCP Redundant"depends on (MPTCP=y)---help---This scheduler sends all packets redundantly over all subflows to decreaseslatency and jitter on the cost of lower throughput.config MPTCP_SCHEWZXtristate "MPTCP Sche_wzx"depends on (MPTCP=y)---help---This scheduler created by wzx in 2021/10/12 for test.choiceprompt "Default MPTCP Scheduler"default DEFAULT_SCHEDULERhelpSelect the Scheduler of your choiceconfig DEFAULT_SCHEDULERbool "Default"---help---This is the default scheduler, sending first on the subflowwith the lowest RTT.config DEFAULT_ROUNDROBINbool "Round-Robin" if MPTCP_ROUNDROBIN=y---help---This is the round-rob scheduler, sending in a round-robinfashion..config DEFAULT_REDUNDANTbool "Redundant" if MPTCP_SCHEWZX=y---help---This is the redundant scheduler, sending packets redundantly overall the subflows.config DEFAULT_SCHEWZXbool "schewzx" if MPTCP_REDUNDANT=y---help---This scheduler created by wzx in 2021/10/12 for test.endchoice
endifconfig DEFAULT_MPTCP_SCHEDstringdepends on (MPTCP=y)default "default" if DEFAULT_SCHEDULERdefault "roundrobin" if DEFAULT_ROUNDROBINdefault "redundant" if DEFAULT_REDUNDANTdefault "schewzx" if DEFAULT_SCHEWZXdefault "default"
2.对Makefile增加语句
#
## Makefile for MultiPath TCP support code.
#
#obj-$(CONFIG_MPTCP) += mptcp.omptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_pm.o \mptcp_output.o mptcp_input.o mptcp_sched.oobj-$(CONFIG_TCP_CONG_LIA) += mptcp_coupled.o
obj-$(CONFIG_TCP_CONG_OLIA) += mptcp_olia.o
obj-$(CONFIG_TCP_CONG_WVEGAS) += mptcp_wvegas.o
obj-$(CONFIG_TCP_CONG_BALIA) += mptcp_balia.o
obj-$(CONFIG_TCP_CONG_MCTCPDESYNC) += mctcp_desync.o
obj-$(CONFIG_MPTCP_FULLMESH) += mptcp_fullmesh.o
obj-$(CONFIG_MPTCP_NDIFFPORTS) += mptcp_ndiffports.o
obj-$(CONFIG_MPTCP_BINDER) += mptcp_binder.o
obj-$(CONFIG_MPTCP_NETLINK) += mptcp_netlink.o
obj-$(CONFIG_MPTCP_ROUNDROBIN) += mptcp_rr.o
obj-$(CONFIG_MPTCP_REDUNDANT) += mptcp_redundant.o
obj-$(CONFIG_MPTCP_BLEST) += mptcp_blest.o
obj-$(CONFIG_MPTCP_SCHEWZX) += mptcp_wzx.omptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o
3.终端执行命令
make CONFIG_MPTCP_SCHEWZX=m -C /usr/src/mptcp M=/usr/src/mptcp/net/mptcp modules
执行命令后再执行 sudo make menuconfig 出现新的调度算法:
但是模块前的编译方式是<>表示不编译到内核
4.按照教程,后续步骤为将产生的.ko文件拷贝到/lib/modules/2.6.19/kernel/对应的目录即可。再运行depmod -a重新配置依赖关系,以后就可以通过modprobe mptcp来加载mptcp模块了。没找到这个kernel文件夹,所以就没执行这一步骤。且手欠把新产生的文件都给删了,就无法产生新文件了,咱也不知道咋回事。
Ubuntu16.0配置MPTCP相关推荐
- ubuntu16.04 配置显卡驱动+cuda8.0+cudnn+pytorch
ubuntu1604 配置显卡驱动cuda80cudnnpytorch 在线安装显卡驱动 离线安装cuda 安装cudnn 配置环境变量 离线安装cond 配置pytorch 测试pytorch 感悟 ...
- Ubuntu16.04 配置记录(持续更新)
Ubuntu16.04 配置记录 1.安装中文输入法 https://www.cnblogs.com/darklights/p/7722861.html 2.修改终端命令行路径长度 https://b ...
- ROS入门 TX2+Turtlebot+Kinect2.0配置记录
首先是刷机,本人使用的是虚拟机,此处一坑,使用VMware一定要选择新版本的,旧版本的功能不稳定,容易卡死.装ros-Kinect版对应的是ubuntu16.0,所以虚拟机也用的ubuntu16.0, ...
- centos7.4和ubuntu16.0.4常用命令
centos7.4和ubuntu16.0.4常用命令 1. CentOS和Ubuntu的区别 2. 命令区别 防火墙 CentOS 6 关闭防火墙的命令 CentOS 7 关闭防火墙的命令 Linux ...
- ubuntu16.04配置a-loam、lego-loam、lio-sam可能遇到的问题及解决方案
ubuntu16.04配置a-loam.lego-loam.lio-sam可能遇到的问题及解决方案 1.安装a-loam github网址:https://github.com/HKUST-Aeria ...
- Ubuntu16.04配置软raid
Ubuntu16.04配置软raid 1.查看磁盘情况 这里推荐两种查看磁盘情况的命令: # 1.使用fdisk -l查看磁盘root@txkj:/home/txkj# fdisk -lDisk /d ...
- 百度云服务器Ubuntu16.0(Linux)安装mqtt的mosquitto代理服务器
本文主要总结在百度云服务器Ubuntu16.0(Linux)上部署mqtt的mosqutto代理服务器,全文分为三大部分,分别是百度云服务器安装Ubuntu16.0系统.在Ubuntu16.0上部署m ...
- Ubuntu14.04+caffe+cuda8.0+cudnn5.0配置
Ubuntu14.04+caffe+cuda8.0+cudnn5.0配置 自从实验室配置了新电脑,我们就开始折腾了~ 一开始是只菜鸟,Linux是啥都闹不清,因为实验室要用caffe研究深度学习,然后 ...
- J2EE 中的服务器 tomcat6.0 配置
Tomcat6.0 配置 第一步:下载jdk和tomcat:JDK下载 Tomcat下载 最新的jdk为1.6.10,tomcat为6.0,建议jdk1.4以上,tomcat4.0以上 第二 ...
最新文章
- 决策树模型与学习《一》
- 小米8 SE和小米9 SE 开源 Android 9 Pie 内核代码
- 微服务,微架构[五]之springboot读取properties文件
- BZOJ.3227.[SDOI2008]红黑树tree(树形DP 思路)
- 001_Spring Data JPA
- SQL Server 2008概述(一)
- 你了解VLSM多少(1)
- Getter DI是个好主意吗?
- 我在博客园写博客的原因
- Mapbox词汇表中文文档(查找Mapbox相关的术语及其定义)
- python匿名函数_Python匿名函数
- redis的发布和订阅
- NR LTE UMTS GSM CDMA TDS频点频率换算工具
- 德·摩根定律的验证(De Morgan’s Laws)
- 计算机电脑用户名,如何改计算机用户名(administrator)
- Linux下vasp优化结构,VASP入门系列文章[6]结构优化
- 营业执照如何完整的转为Word格式?
- 基于OpenCV做“三维重建”(1)--找到并绘制棋盘
- Flutter如何强制竖屏
- 使用Android Studio设置调试的外接设备屏幕分辨率