当在 Windows 10 上使用 cmd.exe 对 cryptopia.co.nz 进行 ping 时,我得到以下结果之一:
Pinging cryptopia.co.nz [45.60.13.241] with 32 bytes of data:
Reply from 45.60.13.241: bytes=32 time=7ms TTL=54
Reply from 45.60.13.241: bytes=32 time=12ms TTL=54
Reply from 45.60.13.241: bytes=32 time=12ms TTL=54
Reply from 45.60.13.241: bytes=32 time=10ms TTL=54
Ping statistics for 45.60.13.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 7ms, Maximum = 12ms, Average = 10ms
或者
Pinging cryptopia.co.nz [45.60.11.241] with 32 bytes of data:
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Reply from 45.60.11.241: bytes=32 time=110ms TTL=55
Reply from 45.60.11.241: bytes=32 time=114ms TTL=55
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Ping statistics for 45.60.11.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 114ms, Average = 111ms
这两次 ping 间隔 1 秒。我以为我的电脑 DNS 缓存会在第一次解析时保留地址,为什么却不是这样?有没有办法强制系统在所有操作中使用包含 13 的 IP?这样 ping 时间就好多了。
答案1
记下您第一次查询的 IP 地址,然后明确 ping 该 IP 地址。
A:\> nslookup cryptiopia.co.nz
Server: 10.9.8.7
Address: 10.9.8.7#53
Non-authoritative answer:
Name: cryptopia.co.nz
Address: 45.60.11.241
Name: cryptopia.co.nz
Address: 45.60.13.241
A:\> ping 45.60.11.241
Pinging 45.60.11.241 [45.60.11.241] with 32 bytes of data:
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Reply from 45.60.11.241: bytes=32 time=110ms TTL=55
Reply from 45.60.11.241: bytes=32 time=114ms TTL=55
Reply from 45.60.11.241: bytes=32 time=111ms TTL=55
Ping statistics for 45.60.11.241:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 114ms, Average = 111ms
当然,如果没有先验知识,您就不知道哪个 IP 地址会更快,或者选择其他 IP 地址是否实际上会产生任何差异,或者再次询问是否会产生另一组 IP 地址。