测试局域网两台机器的之间的最大带宽
工具下载:https://iperf.fr/iperf-download.php
测试环境:
服务端(CentOS7):
1、快速安装
wget -O /usr/lib/libiperf.so.0 https://iperf.fr/download/ubuntu/libiperf.so.0_3.1.3 wget -O /usr/bin/iperf3 https://iperf.fr/download/ubuntu/iperf3_3.1.3 chmod +x /usr/bin/iperf3
2、排错
注:在CentOS 7下安装iperf3时可能会出现如下错误
iperf3: error while loading shared libraries: libiperf.so.0: cannot open shared object file: No such file or directory
一般情况下是因为wget了iperf3的动态链接库,而共享库未能及时更新,需要手动执行 ldconfig 命令以创建连接和缓存文件。
3、安装测试
iperf3 -v 查看版本
带宽测试:
1、服务器端开始监听:
[root@test]# iperf3 -s ----------------------------------------------------------- Server listening on 5201 -----------------------------------------------------------
2、客户端连接测试
本地客户端日志:
D:\iperf-3.1.3-win64>iperf3.exe -c 192.168.99.240 Connecting to host 192.168.99.240, port 5201 [ 4] local 192.168.167.28 port 58926 connected to 192.168.99.240 port 5201 [ ID] Interval Transfer Bandwidth [ 4] 0.00-1.00 sec 13.6 MBytes 114 Mbits/sec [ 4] 1.00-2.00 sec 8.25 MBytes 69.2 Mbits/sec [ 4] 2.00-3.00 sec 7.62 MBytes 64.0 Mbits/sec [ 4] 3.00-4.00 sec 10.4 MBytes 87.0 Mbits/sec [ 4] 4.00-5.00 sec 8.75 MBytes 73.4 Mbits/sec [ 4] 5.00-6.00 sec 10.8 MBytes 90.2 Mbits/sec [ 4] 6.00-7.00 sec 8.25 MBytes 69.2 Mbits/sec [ 4] 7.00-8.00 sec 7.75 MBytes 65.0 Mbits/sec [ 4] 8.00-9.00 sec 11.0 MBytes 92.3 Mbits/sec [ 4] 9.00-10.00 sec 10.4 MBytes 87.0 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 4] 0.00-10.00 sec 96.8 MBytes 81.2 Mbits/sec sender [ 4] 0.00-10.00 sec 96.6 MBytes 81.1 Mbits/sec receiver iperf Done.
远程服务器端日志
[root@ATopencanaryAQ01 admin]# iperf3 -s ----------------------------------------------------------- Server listening on 5201 ----------------------------------------------------------- Accepted connection from 192.168.167.28, port 58925 [ 5] local 192.168.99.240 port 5201 connected to 192.168.167.28 port 58926 [ ID] Interval Transfer Bandwidth [ 5] 0.00-1.00 sec 11.9 MBytes 100 Mbits/sec [ 5] 1.00-2.00 sec 8.01 MBytes 67.2 Mbits/sec [ 5] 2.00-3.00 sec 7.12 MBytes 59.7 Mbits/sec [ 5] 3.00-4.00 sec 10.8 MBytes 90.8 Mbits/sec [ 5] 4.00-5.00 sec 9.03 MBytes 75.7 Mbits/sec [ 5] 5.00-6.00 sec 10.8 MBytes 90.9 Mbits/sec [ 5] 6.00-7.00 sec 8.56 MBytes 71.8 Mbits/sec [ 5] 7.00-8.00 sec 8.52 MBytes 71.5 Mbits/sec [ 5] 8.00-9.00 sec 11.6 MBytes 97.3 Mbits/sec [ 5] 9.00-9.95 sec 10.2 MBytes 90.5 Mbits/sec - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bandwidth [ 5] 0.00-9.95 sec 0.00 Bytes 0.00 bits/sec sender [ 5] 0.00-9.95 sec 96.6 MBytes 81.5 Mbits/sec receiver ----------------------------------------------------------- Server listening on 5201 -----------------------------------------------------------
简单来说,可以认为局域网两台机器之间的带宽是 81.5 Mbits/sec。
本文由Bypass整理发布,转载请保留出处。
欢迎关注我的个人微信公众号:Bypass--,浏览更多精彩文章。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App
· 张高兴的大模型开发实战:(一)使用 Selenium 进行网页爬虫