在Linux中,如何将特定大小的数据包发送到IP?

你可以运行什么命令? (必须通过terminal)

您可以使用“-s”标志在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 data. 
 ping -s nnnn abcd 

根据手册页发送大小为nnnn + 8个字节(包括头部数据)的数据包到abcd地址。

[root@example ~]# ping -s install.log 192.168.68.107 PING 192.168.68.107 (192.168.68.107) 0(28) bytes of data. 8 bytes from 192.168.68.107: icmp_req=1 ttl=64 8 bytes from 192.168.68.107: icmp_req=2 ttl=64 8 bytes from 192.168.68.107: icmp_req=3 ttl=64

尝试像这样:)