当我 ping xxx255 时出现奇怪的响应

当我 ping xxx255 时出现奇怪的响应

这是我的计算机网络配置:

C:\Users\user>ipconfig

Windows IP Configuration

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::f56e:2272:8e45:d325%11
   IPv4 Address. . . . . . . . . . . : 10.0.0.81
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.0.60

问题是为什么当我ping输入 IP 地址时10.0.0.255,会看到以下结果:

C:\Users\User>ping 10.0.0.255

Pinging 10.0.0.255 with 32 bytes of data:
Reply from 10.0.0.5: bytes=32 time<1ms TTL=255
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.0.255:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\User>ping 10.0.0.255

Pinging 10.0.0.255 with 32 bytes of data:
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.0.255:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

正如您在上面看到的,它没有返回任何内容(因为它10.0.0.255不是有效的 IP 地址,并且是我的网络广播 IP),10.0.0.5而是ping 了10.0.0.154!为什么?

请注意,我检查了路径hosts下的文件Windows\system32\drivers\etc\,如您所见,那里没有重定向:

在此处输入图片描述

更新:

C:\Users\user>ping -t 10.255

Pinging 10.0.0.255 with 32 bytes of data:
Reply from 10.0.0.5: bytes=32 time<1ms TTL=255
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time=1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64
Reply from 10.0.0.154: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.0.255:
    Packets: Sent = 49, Received = 49, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms
Control-C
^C
C:\Users\user>

答案1

因为 Ping 是一种广播兼容服务。收到此类回显请求的计算机将很乐意进行回复。

相关内容