我可以ping
ping AddressIp
64 bytes from indirizzoIp: icmp_req=1 ttl=42 time=149 ms
Run Code Online (Sandbox Code Playgroud)
但有额外的参数
ping AddressIp -l 1400
ping: cannot set preload to value > 3
ping AddressIp -t -l 1400
ping: can't set unicast time-to-live: Invalid argument
Run Code Online (Sandbox Code Playgroud)
为什么我ping不通?
来自ping's manpage
:
-l preload
If preload is specified, ping sends that many packets not waiting
for reply. Only the super-user may select preload more than 3.
-p pattern
You may specify up to 16 ``pad'' bytes to fill out the packet
you send. This is useful for diagnosing data-dependent problems
in a network. For example, -p ff will cause the sent packet to
be filled with all ones.
Run Code Online (Sandbox Code Playgroud)
因此,请确保您在超级用户下运行 ping 并提供给-p
选项一个参数。
ping AddressIp -l 1400
ping: cannot set preload to value > 3
Run Code Online (Sandbox Code Playgroud)
您需要超级用户权限才能访问ping
值大于 3 的此功能。
尝试:
sudo ping AddressIp -l 1400
Run Code Online (Sandbox Code Playgroud)
更新:
你想要你的ping
数据包的“大小”选项吗?我想,在 Windows 中选项-l
意味着“数据包的大小”,但在 Linux 中还有另一个选项。
尝试-s
选项:
sudo ping AddressIp -s 1000 -l 1400
Run Code Online (Sandbox Code Playgroud)
德贝内埃塞
在 Linuxping
中,直到你停止它,所以你不需要 Windows-t
选项。
归档时间: |
|
查看次数: |
22156 次 |
最近记录: |