| 协议 | ICMP Echo Request/Reply(IPv4)/ ICMPv6(IPv6) |
|---|---|
| 语法 | ping [选项] 目标 |
| 默认行为 | Linux 每秒 1 包持续发送(Ctrl+C 停止);Windows 默认 4 包 |
典型输出(Ubuntu iputils)
典型输出(Ubuntu iputils)
$ ping -c 3 example.com
PING example.com (93.184.216.34) 56(84) bytes of data.
64 bytes from 93.184.216.34: icmp_seq=1 ttl=55 time=12.4 ms
...
--- example.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 12.350/12.484/12.620/0.110 ms| bytes 56(84) | 载荷 56 字节(含 ICMP 头 8),线缆上共 84 = 56+8+20 IP 头 |
|---|---|
| ttl | 剩余 TTL,可用于粗判对端系统与跳数 |
| mdev | RTT 平均偏差,衡量抖动 |
time 值为单包 RTT,单位毫秒;mdev 明显大(>avg 的 20%)说明路径抖动大,业务体验可能差于平均值。