首页 > 系统相关 >[ubuntu18.04]搭建mptcp测试环境说明

[ubuntu18.04]搭建mptcp测试环境说明

时间:2024-05-31 18:01:35浏览次数:22  
标签:main mptcp restricted ubuntu deb ubuntu18.04 multiverse 测试环境

MPTCP介绍

Multipath TCP — Multipath TCP -- documentation 2022 documentation

安装ubuntu18.04,可以使用虚拟机安装

点击安装VMware Tool

桌面会出现如下图标

双击打开VMware Tools,复制如下图所示的文件到Home目录

打开终端,切换到管理员权限(如果忘记管理员密码可以使用sudo passwd root修改密码)

解压vmwaretools

tar -xvf VMwareTools-10.3.22-15902021.tar.gz

   切换到vmware-tools-distrib目录下

              cd vmware-tools-distrib

执行vmware-install.pl安装

./vmware-install.pl

    按照提示输入yes,然后回车

后面根据提示可以一直回车,安装完成之后,需要重启设备

更新ubuntu18.04源

#阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

#网易源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

##中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

备份系统原始源

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

更改源

sudo gedit /etc/apt/sources.list

将原始内容删除,替换ubuntu18.04源.txt里面的内容

更新源

sudo apt-get update

安装ifconfig指令工具包

sudo apt install net-tools

安装vim工具包

       sudo apt install vim

安装支持mptcp内版本的内核

软件包下载地址

Releases · multipath-tcp/mptcp (github.com)icon-default.png?t=N7T8https://github.com/multipath-tcp/mptcp/releases

将软件包

linux-headers-5.4.230.mptcp_20230203134326-1_amd64.deb 

linux-libc-dev_20230203134326-1_amd64.deb

linux-image-5.4.230.mptcp_20230203134326-1_amd64.deb   

linux-mptcp_v0.96_20230203134326-1_all.deb

拷贝到ubuntu系统里面,然后执行安装

安装指令

       解压软件包

sudo dpkg -i linux*.deb

       安装软件包

              sudo apt-get install –f

开启开机选择内核版本选项

打开/etc/default/grub文件

注释掉#GRUB_HIDDEN_TIMEOUT=0

更新grub

root@w0425-virtual-machine:/home/w0425/mptcp/5.4# sudo update-grub

Generating grub configuration file ...

Found linux image: /boot/vmlinuz-5.4.230.mptcp

Found initrd image: /boot/initrd.img-5.4.230.mptcp

Found linux image: /boot/vmlinuz-4.19.234.mptcp

Found initrd image: /boot/initrd.img-4.19.234.mptcp

Found linux image: /boot/vmlinuz-4.15.0-20-generic

Found initrd image: /boot/initrd.img-4.15.0-20-generic

Found memtest86+ image: /boot/memtest86+.elf

Found memtest86+ image: /boot/memtest86+.bin

Done

重启设备,选择支持mptcp版本内核

重启之后会自动进入内核选择界面,按键盘的上下键选择Ubuntu高级选项(Advanced options for Ubuntu),然后回车进入内核选择界面,选择带mptcp的内核版本,然后回车启动

 

确认内核支持mptcp方法

关闭mptcp_checksum选择

echo 0 > /proc/sys/net/mptcp/mptcp_checksum

开启debug

echo 1 > /proc/sys/net/mptcp/mptcp_debug

查看mptcp是否默认开启,为1表示开启

root@w0425-virtual-machine:/home/w0425# cat /proc/sys/net/mptcp/mptcp_enabled

1

开启和关闭mptcp方法

开启

       echo 1 > /proc/sys/net/mptcp/mptcp_enabled

关闭

       echo 0 > /proc/sys/net/mptcp/mptcp_enabled

安装测试工具

Iperf & tcpdump

        sudo apt-get install iperf iperf3 tcpdump

git

              sudo apt-get install git

curl

              sudo apt-get install curl

mptcpd

              电脑浏览器手动下载

https://github.com/multipath-tcp/mptcpd/archive/refs/tags/v0.12.tar.gz

mptcpd-0.12.tar.gz

       编译安装mptcpd

              安装软件包依赖工具

sudo apt-get -y install autoconf automake libtool autoconf-archive pkg-config

              安装ell工具

                       git clone git://git.kernel.org/pub/scm/libs/ell/ell.git

      git checkout 0.56

         cd ell

         ./bootstrap

         ./configure

         make install

安装mptcpd

  拷贝mptcpd-0.12.tar.gz到ubuntu

  解压

              tar –xvf mptcpd-0.12.tar.gz

  编译安装

              cd mptcpd-0.12

             ./bootstrap

              ./configure

              mke install

                检查是否安装成功

root@w0425-virtual-machine:/home/w0425/mptcp/mptcpd-0.12# mptcpize

root@w0425-virtual-machine:/home/w0425/mptcp/mptcpd-0.12# mptcpize 
Usage: mptcpize CMD
mptcpize - a tool to enable MPTCP usage on unmodified legacy services

Available CMDs:
	run [-d] prog [<args>]    Run target program with specified
	                          arguments, forcing MPTCP socket usage
	                          instead of TCP.  If the '-d' argument
	                          is provided, dump messages on stderr
	                          when a TCP socket is forced to MPTCP.

	enable <unit>             Update the systemd <unit>, forcing
	                          the given service to run under the
	                          above launcher.

	disable <unit>            Update the systemd <unit>, removing
	                          the above launcher.

Report bugs to <[email protected]>.

Ubuntu配置

网卡设置

需要实体网卡,不能使用nat模式,nat模式会出现mptcp异常

查看内核是否启动mptcp

关闭checksum

默认mptcp配置如下,需要手动关闭checksum

需要确认net.mptcp.mptcp_enabled=1

指令如下:

sysctl –w net.mptcp.mptcp_checksum=0

启动tcpdump

tcpdump –ni any port 8888 –vvvv &

启动iperf

mptcpize run iperf –c 192.168.1.1 –p 8888 –P 2 –t 30 –i 1

抓包结果分析

192.168.1.20 to 192.168.1.1 带有mptcp capable表示客户端请求是支持mptcp的

192.168.1.1 to 192.168.1.20 带有mptcp capable字段表示服务器回复支持mptcp

Tcpdump抓包

标签:main,mptcp,restricted,ubuntu,deb,ubuntu18.04,multiverse,测试环境
From: https://blog.csdn.net/wgl307293845/article/details/139355926

相关文章

  • Ubuntu18.04 + Caffe + python3.7 + CUDA11 + cuDNN8编译记录 转载文章 非原创
    背景这两天接手了一个在两年前基于caffe实现的交互式活体检测的项目,想要让他在python3和CUDA11的环境下运行。但是呢,caffe已经官方宣布不再继续更新,不支持最新版的cuDNN8,那需求摆在这边只好自行想办法,前前后后倒腾了两天,可算是编译成功把项目跑通了,在此记录一下自己配置辛酸史。......
  • ubuntu18.04.6安装配置StrongSwan5.1.1
    目前成功配置执行ipsecstart命令的ubuntu版本为18.04.6以及22.04,两个版本的配置过程完全相同,但是22.04版本在后续配置CA证书中发生未知错误,18.04.6正常进行,推荐优先低于18.04.6版本进行配置。虚拟机均从清华源下载https://mirrors.tuna.tsinghua.edu.cn/ubuntu-releases/Vm工......
  • vue测试环境打包文件不添加hash和生产环境打包不一致
    npmrunbuild:testnpmrunbuild:pro测试环境打包出来文件和生产包有差异.env.test-配置文件打包出来文件有hash值,加上下面的配置,打包就和pro一致NODE_ENV='production'NODE_ENV只能设置production和development两个参数开发环境是development,生产环境都是produ......
  • VMware虚拟机中ubuntu使用记录(10)—— 如何在Ubuntu18.04中使用自己的单目摄像头运行OR
    提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录前言一、ORB_SLAM3源码编译二、ORB_SLAM3实时单目相机测试1.查看摄像头的话题2.运行测试三.运行测试可能的报错1.报错一(1)问题描述(2)原因分析(3)解决2.报错二(1)问题描述(2)解决......
  • 测试环境建设原则和问题对策
    《Pattern:ServiceMesh》测试环境建设原则和管理实践测试环境不稳定&复杂的必然性及其对策......
  • ROS学习篇1安装(Ubuntu18.04 Bionic +ROS Melodic)
    设置sources.listsudosh-c'echo"debhttp://packages.ros.org/ros/ubuntu$(lsb_release-sc)main">/etc/apt/sources.list.d/ros-latest.list'sudoapt-keyadv--keyserver'hkp://keyserver.ubuntu.com:80'--recv-keyC1CF6E31E6......
  • Tensorflow object detection API (ubuntu18.04) 安装和踩坑;
    踩坑:将slim和models路径加入虚拟环境中;将slim和models路径加入系统路径中;(加入系统路径的时候,这个pwd) qit(持续更新)具体安装流程:(很多问题)2.0版本;(继续更新)condacreate-ntf_obj_det_api_v2python=3.8 (很丝滑)重新尝试tf1.0版本;参考:https://blog.csdn......
  • 测试环境服务器比生产环境服务器差怎么等比换算?
    将测试环境服务器的性能转换为相当于生产环境服务器的性能需要一些考虑和估算,因为测试环境和生产环境可能有不同的配置、负载和性能要求。但是,以下是一种常见的方法:确定关键指标:首先,确定用于评估服务器性能的关键指标,例如CPU性能、内存容量、磁盘I/O速度等。性能评估:对测试......
  • VUE配置proxy代理、开发环境、测试环境、生产环境
    1、根目录下新建三个环境的配置文件,.env.development(开发环境).env.test(测试环境).evn.production(生产环境)开发环境NODE_ENV='development'开发环境,api前缀VUE_APP_BASE_API='/api'开发环境,Url地址VUE_APP_BASE_RUL='http://xxxxxxxxxxxxx:8081/****生产环境NODE_ENV......
  • Java+Selenium+edge自动化测试环境搭建
    查看edge版本:​​下载edge驱动:MicrosoftEdgeWebDriver|MicrosoftEdge开发人员​​在官网下载依赖包:Downloads|Selenium​​​​安装edge扩展:​​​​解压下载到的jar到一个文件夹,添加jar包:​​写一个自动化测试类:importorg.openqa.selenium.edge.EdgeDriv......