准备
- 已经安装KVM或者Virtual Box的Ubuntu 16.04 64bit。
- 下载MPQUIC镜像,下载地址,下载后解压。
配置环境
创建虚拟机
- 在KVM或者Virtual Box中创建一个虚拟机,内存推荐2G以上。
- 虚拟机硬盘为下载的MPQUIC镜像。
- 设置虚拟机的网卡为e1000,其他的网卡可能不支持。
- 启动虚拟机,用户名和密码均为
mininet。 - 测试虚拟机是否可以上网。
部署测试环境
挂载内存盘,虚拟机每次重启都要进行该步骤。
1
2
3
4bash ~/mount_tmpfs.sh
# 或者
sudo mkdir -p /mnt/tmpfs
sudo mount -t tmpfs -o size=256M tmpfs /mnt/tmpfs创建ssh密钥
1
2
3ssh-keygen # 一直回车即可,之前创建过的可以忽略
# 设置ssh免密登录
ssh-copy-id mininet@localhost安装依赖
1
sudo apt install python-dev python-pip python-numpy
下载测试脚本
1
2cd ~/git
git clone https://github.com/qdeconinck/minitopo-experiences.git
运行测试脚本
修改脚本参数,将待运行的脚本中的
REMOTE_SERVER_RUNNER_PORT的值修改为["22"]。1
2# 以quic_mptcp_https_tests_expdes_wsp_highbdp_loss_quic.py脚本为例
vim ~/git/minitopo-experiences/experiences/quic_mptcp_https_tests_expdes_wsp_highbdp_loss_quic.py运行脚本。脚本运行很慢,且无法用
Ctrl-C终止,建议使用tmux或者screen等软件运行。1
python ~/git/minitopo-experiences/experiences/quic_mptcp_https_tests_expdes_wsp_highbdp_loss_quic.py
查看运行结果。运行结果保存在
/mnt/tmpfs中,测试结束后应及时复制出来,因为该目录为内存盘,重启后数据会丢失。