Linux下ping命令参数详细解析
-a Audible ping.
#Audible ping. -A Adaptive ping. Interpacket interval adapts to round-trip time, so that
effectively not more than one (or more, if preload is set) unanswered
probe is present in the network. Minimal interval is 200msec for not
super-user. On networks with low rtt this mode is essentially equiva‐
lent to flood mode.
#自适应ping,根据ping包往返时间确定ping的速度 -b Allow pinging a broadcast address.
#允许ping一个广播地址 -B Do not allow ping to change source address of probes. The address is
bound to one selected when ping starts.
#不允许ping改变包头的源地址 -c count
Stop after sending count ECHO_REQUEST packets. With deadline option,
ping waits for count ECHO_REPLY packets, until the timeout expires.
#ping指定次数后停止ping -d Set the SO_DEBUG option on the socket being used. Essentially, this
socket option is not used by Linux kernel.
#使用Socket的SO_DEBUG功能 -D Print timestamp (unix time + microseconds as in gettimeofday) before
each line.
#打印时间戳 -f Flood ping. For every ECHO_REQUEST sent a period ``.'' is printed,
while for ever ECHO_REPLY received a backspace is printed. This pro‐
vides a rapid display of how many packets are being dropped. If
interval is not given, it sets interval to zero and outputs packets as
fast as they come back or one hundred times per second, whichever is
more. Only the super-user may use this option with zero interval.
#极限检测,快速连续ping一台主机,ping的速度达到100次每秒 -F flow label
ping6 only. Allocate and set bit flow label (in hex) on echo
request packets. If value is zero, kernel allocates random flow
label.
#为ping回显请求分配一个20位的“flow label”,如果未设置,内核会为ping随机分配 -h Show help.
#显示帮助 -i interval
Wait interval seconds between sending each packet. The default is to
wait for one second between each packet normally, or not to wait in
flood mode. Only super-user may set interval to values less 0.2 sec‐
onds.
#设定间隔几秒发送一个ping包,默认一秒ping一次 -I interface
interface is either an address, or an interface name. If interface is
an address, it sets source address to specified interface address. If
interface in an interface name, it sets source interface to specified
interface. For ping6, when doing ping to a link-local scope address,
link specification (by the '%'-notation in destination, or by this
option) is required.
#指定网卡接口、或指定的本机地址送出数据包 -l preload
If preload is specified, ping sends that many packets not waiting for
reply. Only the super-user may select preload more than .
#设置在送出要求信息之前,先行发出的数据包 -L Suppress loopback of multicast packets. This flag only applies if the
ping destination is a multicast address.
#抑制组播报文回送,只适用于ping的目标为一个组播地址 -m mark
use mark to tag the packets going out. This is useful for variety of
reasons within the kernel such as using policy routing to select spe‐
cific outbound processing.
#设置mark -n Numeric output only. No attempt will be made to lookup symbolic names
for host addresses.
#不要将ip地址转换成主机名 -O Report outstanding ICMP ECHO reply before sending next packet. This
is useful together with the timestamp -D to log output to a diagnostic
file and search for missing answers.
#在发送下一个包之前报告未完成的ICMP回复,这与时间戳-D一起记录诊断输出 -p pattern
You may specify up to ``pad'' bytes to fill out the packet you
send. This is useful for diagnosing data-dependent problems in a net‐
work. For example, -p ff will cause the sent packet to be filled with
all ones.
#指定填充ping数据包的十六进制内容,在诊断与数据有关的网络错误时这个选项就非常有用,如:“-p ff” -q Quiet output. Nothing is displayed except the summary lines at
startup time and when finished.
-Q tos Set Quality of Service -related bits in ICMP datagrams. tos can be
decimal (ping only) or hex number.
#不显示任何传送封包的信息,只显示最后的结果 -r Bypass the normal routing tables and send directly to a host on an
attached interface. If the host is not on a directly-attached net‐
work, an error is returned. This option can be used to ping a local
host through an interface that has no route through it provided the
option -I is also used.
#忽略正常的路由表,直接将数据包送到远端主机上,通常是查看本机的网络接口是否有问题;如果主机不直接连接的网络上,则返回一个错误 -R ping only. Record route. Includes the RECORD_ROUTE option in the
ECHO_REQUEST packet and displays the route buffer on returned packets.
Note that the IP header is only large enough for nine such routes.
Many hosts ignore or discard this option.
#记录ping的路由过程(IPv4 only) -s packetsize
Specifies the number of data bytes to be sent. The default is ,
which translates into ICMP data bytes when combined with the
bytes of ICMP header data.
#指定每次ping发送的数据字节数,默认为“56字节”+“28字节”的ICMP头,一共是84字节 -S sndbuf
Set socket sndbuf. If not specified, it is selected to buffer not more
than one packet.
#指定每次ping发送的数据字节数,默认为“56字节”+“28字节”的ICMP头,一共是84字节
#包头+内容不能大于65535,所以最大值为65507(linux:, windows:) -t ttl ping only. Set the IP Time to Live.
#设置TTL(Time To Live)为指定的值。该字段指定IP包被路由器丢弃之前允许通过的最大网段数 -T timestamp option
Set special IP timestamp options. timestamp option may be either
tsonly (only timestamps), tsandaddr (timestamps and addresses) or
tsprespec host1 [host2 [host3 [host4]]] (timestamp prespecified hops).
#设置IP timestamp选项,可以是下面的任何一个:'tsonly' (only timestamps)'tsandaddr' (timestamps and addresses)'tsprespec host1 [host2 [host3]]' (timestamp prespecified hops) -U Print full user-to-user latency (the old behaviour). Normally ping
prints network round trip time, which can be different f.e. due to DNS
failures.
#打印完整的用户到用户延迟(旧的行为)。通常平打印网络往返时间,由于DNS不同,可能会有不同的f.e.失败。 -v Verbose output.
#使ping处于verbose方式,它要ping命令除了打印ECHO-RESPONSE数据包之外,还打印其它所有返回的ICMP数据包 -V Show version and exit.
#显示版本并退出 -w deadline
Specify a timeout, in seconds, before ping exits regardless of how
many packets have been sent or received. In this case ping does not
stop after count packet are sent, it waits either for deadline expire
or until count probes are answered or for some error notification from
network.
#在ping退出之前指定超时(以秒为单位),无论如何许多包已经发送或接收。在这种情况下ping不会计数包发送后停止,它等待最后期限过期或者直到计数探测得到应答或来自某个错误通知网络。 -W timeout
Time to wait for a response, in seconds. The option affects only time‐
out in absence of any responses, otherwise ping waits for two RTTs.
#等待响应的时间,以秒计。该选项只影响时间在没有任何响应的情况下退出,否则ping将等待两个rtt。
Linux下ping命令参数详细解析的更多相关文章
- Linux下ping命令、traceroute命令、tracert命令的使用
Linux系统的ping命令是常用的网络命令,它通常用来测试与目标主机的连通性,我们经常会说“ping一下某机器,看是不是开着”.不能打开网页时会说“你先ping网关地址192.168.1.1试试”. ...
- Linux下ps命令详解 Linux下ps命令的详细使用方法
http://www.jb51.net/LINUXjishu/56578.html Linux下的ps命令比较常用 Linux下ps命令详解Linux上进程有5种状态:1. 运行(正在运行或在运行队列 ...
- linux下top命令参数详解
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.下面详细介绍它的使用方法. 内存信息.内容如下: Mem: 191272k to ...
- linux下top命令参数解释
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.下面详细介绍它的使用方法. top - 01:06:48 up 1:22, 1 ...
- linux下ping命令出现ping: sendto: Network is unreachable
问题:ping外网出现: sendto: Network is unreachable 查看: #route Route命令 : 在数据包没有有效传递的情况下,可以利用route命令查看路由表 [ro ...
- Linux下find命令参数及用法详解
由于find具有强大的功能,所以它的选项也很多,其中大部分选项都值得我们花时间来了解一下.即使系统中含有网络文件系统( NFS),find命令在该文件系统中同样有效,只你具有相应的权限.在运行一个非常 ...
- windows 环境和linux环境下 ping命令的区别:
Ping 是Windows自带的一个DOS命令.利用它可以检查网络是否能够连通,用好它可以很好地帮助我们分析判定网络故障.该命令可以加许多参数使用,键入Ping按回车即可看到详细说明.Ping 命令可 ...
- ZT Linux系统环境下的Socket编程详细解析
Linux系统环境下的Socket编程详细解析 来自: http://blog.163.com/jiangh_1982/blog/static/121950520082881457775/ 什么是So ...
- linux下top命令详细介绍
linux下top命令详细介绍 top 命令是 Linux 下常用的系统资源占用查看及性能分析工具,能够实时显示系统中各个进程的资源(比如cpu.内存的使用)占用状况,top命令的执行结果是一个动态显 ...
随机推荐
- 基于xml文件的格式配置Spring的AOP
用例子直接说明: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http ...
- swift中类与结构体
写了12个Person来复习,不过完成同样的代码需要敲键盘的次数相比OC确实少了很多,这很多应该归功于Swift中不写分号,以及少了OC中的中括号. 一.类与结构体 两者在Swift中差不了多少了 类 ...
- nginx分发请求的2种方式:1、指明server_name;2、通过location过滤uri来分发请求;
user nginx; worker_processes 8; # = cpu num; error_log /data/nginx/log/error/error.log warn; # warn, ...
- mysql 浏览器submit中文, shell乱码
w控制变量法. 初始 浏览器submit中文 成功执行 问题仍未解决 执行 SET character_set_database='latin1'; 再执行 SET character_set_res ...
- python3在centos6.6上的安装
建议:在看这个文档操作前,最好先参考一下这个:https://www.cnblogs.com/bookwed/p/10251236.html,是解决pip安装模块时,提示ssl版本低的问题. #提前的 ...
- 前端开发 - JavaScript - 上
1.js引入 <!DOCTYPE html> <html lang="cn"> <head> <meta charset="UT ...
- Mac 下,Redis(集群)的安装和配置
1. Redis 安装步骤 1. 到github下载redis,我下载的是3.0.4 下载地址:GitHub 2. 将下载下来的redis-3.0.4.tar.gz拷贝到 /usr/local 目录下 ...
- git在使用中出现 refusing to merge unrelated histories如何解决?
一.GIT的使用 # 设置用户名 git config --global user.name "zhaijihai" # 设置用户邮箱 git config --global us ...
- pycharm修改选中字体颜色
File->Setting->Editor->Color Scheme->General Scheme:Monokai 在方框内: Editor->Section Bac ...
- redis的客户端medis
medis是用js写的redis客户端工具,界面很好用,也很有用.点击这里可以下载到mac下的软件包. 下面是截图: 完结.