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

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 servicesAvailable CMDs:run [-d] prog [<args>]    Run target program with specifiedarguments, forcing MPTCP socket usageinstead of TCP.  If the '-d' argumentis provided, dump messages on stderrwhen a TCP socket is forced to MPTCP.enable <unit>             Update the systemd <unit>, forcingthe given service to run under theabove launcher.disable <unit>            Update the systemd <unit>, removingthe above launcher.Report bugs to <mptcp@lists.linux.dev>.

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抓包

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/343368.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C++结合ffmpeg获取声音的分贝值

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、分贝是什么&#xff1f;1.功率量2.场量 二、实际操作1.分析wav文件2.读取麦克风 总结 前言 最近面对一个需求&#xff0c;就是需要传递声音文件到模型里推…

CTFHUB-技能树-web-信息泄露

目录 1.目录遍历 2.PHPINFO 3.备份文件下载 3.1 网站源码 3.2 bak文件 3.3 vim缓存 3.4 .DS_Store 4.Git泄露 4.1 Log 4.2 Stash 4.3 Index 5.SVN泄露 6.HG泄露 1.目录遍历 这个没什么好讲的&#xff0c;进去直接点击找flag,然后在下面目录翻&#xff0c;就找到了 …

【Vue】路由介绍

一、引入 思考 单页面应用程序&#xff0c;之所以开发效率高&#xff0c;性能好&#xff0c;用户体验好 最大的原因就是&#xff1a;页面按需更新 比如当点击【发现音乐】和【关注】时&#xff0c;只是更新下面部分内容&#xff0c;对于头部是不更新的 要按需更新&#xff…

mysql 8 linux7,8安装教程

选择自己对应的linux版本 cat /etc/os-release //查看自己linux系统版本 1.mysql下载地址 MySQL :: Download MySQL Community Server (Archived Versions) 拉到下面找到 选择自己linux指定的版本&#xff0c;否则会很麻烦 cat /etc/os-release //查看系统版本 2.查…

抱抱脸上第一的开原模型Qwen2-72B;腾讯开源人像照片生成视频的模型;Facebook开源翻译模型;智谱 AI 推出的最新一代预训练模型

✨ 1: Qwen2 Qwen2 是一种多语言预训练和指令调优的语言模型&#xff0c;支持128K上下文长度并在多项基准测试中表现优异。 Qwen2&#xff08;全称“Qwen Qwen”&#xff0c;简称Qwen&#xff09;是一个先进的大语言模型家族&#xff0c;在其前身Qwen1.5的基础上进行了重大提…

读取文件

自学python如何成为大佬(目录):自学python如何成为大佬(目录)_利用python语言智能手机的默认语言实战一-CSDN博客 在Python中打开文件后&#xff0c;除了可以向其写入或追加内容&#xff0c;还可以读取文件中的内容。读取文件内容主要分为以下几种情况&#xff1a; 1 读取指…

【人工智能】流行且重要的智能算法整理

✍&#x1f3fb;记录学习过程中的输出&#xff0c;坚持每天学习一点点~ ❤️希望能给大家提供帮助~欢迎点赞&#x1f44d;&#x1f3fb;收藏⭐评论✍&#x1f3fb;指点&#x1f64f; 小记&#xff1a; 今天在看之前写的文档时&#xff0c;发现有人工智能十大算法的内容&#xf…

wireshark 二次开发

一、 Windows 准备 1、源代码下载 Git&#xff1a;https://github.com/wireshark/wireshark 2、 准备Visual C 要编译wireshark&#xff0c;开发电脑上应该安装了Visual Studio并包括了Visual C&#xff0c;请至少安装Visual Studio 2010以减少不必要的麻烦。 visual studio …

【ffmpeg】本地格式转换 mp4转wav||裁剪mp4

个人感受&#xff1a;太爽了&#xff01;&#xff01;&#xff01;&#xff08;可能用惯了转换网站和无良的转换软件&#xff09; ———— 使用FFmpeg把mp4文件转换为WAV文件 - 简书 (jianshu.com) FFMPEG 视频分割和合并 - 简书 (jianshu.com) ———— 示例 ffmpeg -i …

具有 MOSFET 的电压到电流 (V-I) 转换器电路

设计说明 该单电源、低侧、V-I 转换器向可以连接到比运算放大器电源电压更高的电压的负载提供经过良好调节的电流。该 电路接受介于 0V 和 2V 之间的输入电压&#xff0c;将其转换为介于 0mA 和 100mA 之间的电流。通过将低侧电流检测电 阻 R3 上的压降反馈到运算放大器的反相…

C语言 指针——函数指针的典型应用:通用排序

目录 编程实现升序和降序排序 如果不使用函数指针编程… 使用函数指针编写一个通用的排序函数 小结 编程实现升序和降序排序 如果不使用函数指针编程… 使用函数指针编写一个通用的排序函数 小结 正确理解指针的概念  指针是一种特殊的数据类型  指针类型的变量&am…

【多模态】37、TextSquare | 借助 Gemini-Pro 通过四个步骤来生成高质量的文本问答数据

文章目录 一、背景二、方法2.1 Square-10M2.2 模型结构2.3 使用 Square-10M 进行有监督微调 三、效果3.1 实验设置3.2 Benchmark 测评 论文&#xff1a;TextSquare: Scaling up Text-Centric Visual Instruction Tuning 代码&#xff1a;暂无 出处&#xff1a;字节 | 华中科技…

自动驾驶仿真(高速道路)LaneKeeping

前言 A high-level decision agent trained by deep reinforcement learning (DRL) performs quantitative interpretation of behavioral planning performed in an autonomous driving (AD) highway simulation. The framework relies on the calculation of SHAP values an…

WPF国际化的最佳实践

WPF国际化的最佳实践 1.创建项目资源文件 如果你的项目没有Properties文件夹和Resources.resx文件&#xff0c;可以通过右键项目-资源-常规-添加创建或打开程序集资源 2.添加国际化字符串 打开Resources.resx文件&#xff0c;添加需要翻译的文本字符&#xff0c;并将访问修…

java版B/S架构UWB人员定位系统源码spring boot+vue技术架构uwb定位装置-工业级UWB室内定位系统源码

java版B/S架构UWB人员定位系统源码spring bootvue技术架构uwb定位装置-工业级UWB室内定位系统源码 本套系统运用UWB定位技术&#xff0c;开发的高精度人员定位系统&#xff0c;通过独特的射频处理&#xff0c;配合先进的位置算法&#xff0c;可以有效计算复杂环境下的人员与物…

怎么避免电脑磁盘数据泄露?磁盘数据保护方法介绍

电脑磁盘是电脑存储数据的基础&#xff0c;而为了避免磁盘数据泄露&#xff0c;我们需要保护电脑磁盘。下面我们就来了解一下磁盘数据保护的方法。 磁盘加密 磁盘加密可以通过专业的加密算法来加密保护磁盘数据&#xff0c;避免电脑磁盘数据泄露。在这里小编推荐使用文件夹只读…

Springboot注意点

1.Usermapper里加param注解 2.RequestParam 和 RequestBody的区别&#xff1a; RequestParam 和 RequestBody的区别&#xff1a; RequestParam 和 RequestBody 是Spring框架中用于处理HTTP请求的两个不同的注 get请求一般用url传参数&#xff0c;所以参数名和参数的值就在ur…

Windows系统下DOS命令

Windows系统下DOS命令 1. 与文件操作相关1.1 mkdir&#xff0c;md命令1.2 rmdir、rd命令1.3 dir命令1.4 start命令1.5 echo命令1.6 type命令1.7 copy命令1.8 move命令1.9 copy和move的区别1.10 del命令1.11 rename命令1.12 attrib命令1.13 fsutil命令1.14 assoc命令 2. 与网络相…

如何在MySQL中实现upsert:如果不存在则插入?

目录 1 使用 REPLACE 2 使用 INSERT ... ON DUPLICATE KEY UPDATE 使用 INSERT IGNORE 有效会导致 MySQL 在尝试执行语句时忽略执行错误 INSERT 。这意味着 包含 索引或 字段 INSERT IGNORE 中重复值的语句 不会 产生错误&#xff0c;而只是完全忽略该特定 命令。其明显目的是…

centos官方yum源不可用 解决方案(随手记)

昨天用yum安装软件的时候&#xff0c;就报错了 [rootop01 ~]# yum install -y net-tools CentOS Stream 8 - AppStream 73 B/s | 38 B 00:00 Error: Failed to download metadata for repo appstream: Cannot prepare internal mirrorlis…