我正在学习ping命令及其选项。
任何人都可以解释一下以下两者之间有什么区别 输出?
$ ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_req=1 ttl=64 time=0.187 ms
64 bytes from 192.168.2.2: icmp_req=2 ttl=64 time=0.197 ms
64 bytes from 192.168.2.2: icmp_req=3 ttl=64 time=0.203 ms
^C
--- 192.168.2.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.187/0.195/0.203/0.017 ms
$ ping -U 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
64 bytes from 192.168.2.2: icmp_req=1 ttl=64 time=0.202 ms
64 bytes from 192.168.2.2: icmp_req=2 ttl=64 time=0.418 ms
64 bytes from 192.168.2.2: icmp_req=3 ttl=64 time=0.230 ms
64 bytes from 192.168.2.2: icmp_req=4 ttl=64 time=0.283 ms
^C
--- 192.168.2.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2999ms
rtt min/avg/max/mdev = 0.202/0.283/0.418/0.083 ms
如果这两个输出之间没有区别,那么ping命令中的use -U选项是什么?
答案 0 :(得分:1)
-U选项 打印完整的用户到用户延迟(旧行为)。通常ping打印网络往返时间,可以是不同的f.e.由于DNS故障。
ping -U是不同的,例如,如果您的DNS服务器不解析主机名,并且您的计算机需要向辅助DNS询问,这种"延迟"从ping -U开始测量,否则在没有-U
的情况下从ping中忽略