这里介绍一些常用的网络诊断、链路质量评估工具。
PING
ping
是最常用的基于 ICMP Echo 协议的链路诊断工具,Windows 和 Linux 平台都有该工具。
ping 8.8.8.8
路由跟踪
路由跟踪是基于 IP 协议 TTL 限制触发 ICMP 错误实现的一种链路路径探测器。可以找出 IP 数据包和模板间经过的路由器地址。
Windows 的路由跟踪指令是 tracert
。
tracert 8.8.8.8
Linux 上是 traceroute
tarceroute 8.8.8.8
带宽测试
可以用于 TCP、UDP 协议带宽测试的工具有 iperf3
https://iperf.fr/。
iperf3
需要客户端和服务端同时运行。
服务端
iperf3 -s
客户端
iperf3 -c x.x.x.x
同类工具还有
dperf
https://github.com/baidu/dperfnetperf
https://github.com/HewlettPackard/netperfqperf
https://github.com/linux-rdma/qperf。
psping
微软的工具包 PSTools 中提供了 psping
工具用于测试 TCP 协议延迟。
psping www.google.com:443
也可以测试 UCP 协议
psping -u 8.8.8.8:53