Linux(CentOS)中的ping命令是否可以发送0字节。在 Windows 中可以定义使用-l
参数
命令尝试
ping localhost -s 0
PING localhost (127.0.0.1) 0(28) bytes of data.
8 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64
8 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64
^C
--- localhost ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
man ping
-s packetsize
Specifies the number of data bytes to be sent. The default is
56, which translates into 64 ICMP data bytes when combined with
the 8 bytes of ICMP header …
Run Code Online (Sandbox Code Playgroud)