他们对往返最大的意义是什么?

网络工程 思科 线鲨
2022-03-05 17:07:22
6509#ping 23.6.1.111 size 500 rep 100
Type escape sequence to abort.
Sending 100, 500-byte ICMP Echos to 23.6.1.111, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 1/2/8 ms

查看第一个数据包和最后一个数据包

tcpdump -X -vv -n -r r.pcap | grep 01:10: |  (head -n1 && tail -n1)
reading from file r.pcap, link-type EN10MB (Ethernet)
01:10:16.847774 IP (tos 0x0, ttl 255, id 6517, offset 0, flags [none], proto ICMP (1), length 500)
01:10:17.011485 IP (tos 0x0, ttl 64, id 15139, offset 0, flags [none], proto ICMP (1), length 500)

第一帧到达 01:10:16.847774 最后一帧到达 01:10:17.011485

>>> from datetime import datetime
>>>
>>> d1 = datetime.strptime("2222-01-01 01:10:16.8477", "%Y-%m-%d %H:%M:%S.%f")
>>> d2 = datetime.strptime("2222-01-01 01:10:17.0114", "%Y-%m-%d %H:%M:%S.%f")
>>>
>>> print(d2 - d1)

0:00:00.163700

似乎思科平均四舍五入到 2,

Wireshark 更接近 python 输出

在此处输入图像描述

但它们是什么意思大约 8 毫秒?从第一个数据包到最后一个数据包作业过程完成的时间?

有没有什么方法可以在wireshark 中获得这个值?

1个回答

ping 包含来自运行 ping 命令的主机的 ICMP 回显请求,并且当同一主机收到来自目标主机的 ICMP 回显回复时完成。发生这种情况所需的时间被报告为以毫秒为单位的往返时间。

平均在所有的round-trip min/avg/maxping测试中,最快的只用了1ms,最长的用了8ms,所有测试时间的平均值是2ms。您可能进行过多次测试,耗时 8 毫秒,但没有一个测试超过 8 毫秒。当然,这些数字会四舍五入到最接近的毫秒数。