使用mtr 和 iperf3诊断网络情况

Linux & Windows 网络测试:mtr + iperf3 快速指南

1️⃣ 安装工具(Linux)

sudo apt update -y sudo apt install -y iperf3 mtr sudo ufw allow 5201/tcp # 开放 iperf3 默认端口

2️⃣ MTR 测试延迟

mtr -rw -c 100 目标IP
  • -r:报告模式

  • -w:宽格式显示

  • -c 100:发送 100 个探测包

输出每一跳延迟和丢包率


3️⃣ iperf3 测试带宽

a) Linux VPS(A)作为服务端

iperf3 -s

b) 另一台机器(B)测试上传速度

iperf3 -c VPS_IP

c) 测试下载速度(反向)

iperf3 -c VPS_IP -R

d) 双向同时测试

iperf3 -c VPS_IP --bidir

4️⃣ Windows 使用

  • 下载 WinMTR(https://winmtr.net/download-winmtr/)测试延迟

  • 下载 Windows 版 iperf3(https://iperf.fr/iperf-download.php#windows)测试带宽

Windows 命令与 Linux 类似,只需在 CMD 里运行对应 iperf3 命令

附件下载:

iperf-3.19.1-win64.zip1.13MB

WinMTR-v092.zip1.82MB