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命令的执行结果是一个动态显 ...
随机推荐
- Struts2数据验证与使用Java代码进行数据验证
Struts2数据验证 使用Java代码进行数据验证 重写ActionSupport的validate()方法 对Action类的中所有请求处理方法都会进行验证! 对Action类的数据属性进行检查, ...
- Exception in thread "main" java.lang.IllegalArgumentException: System memory 202768384 must be at least 4.718592E8. Please use a larger heap size.
Spark-submit 提交任务时候报错 Exception in thread "main" java.lang.IllegalArgumentException: Syste ...
- file结构中的private_data
private_data是Linux下连接VFS文件系统框架和不同文件/文件系统底层实现之间的一个核心数据结构,虽然它只是一个指针,但是一个指针可以解决所有问题. 因 为file是VFS框架的一个基本 ...
- C程序编译过程浅析(转)
前几天看了<程序员的自我修养——链接.装载与库>中的第二章“编译和链接”,主要根据其中的内容简单总结一下C程序编译的过程吧. 我现在一般都是用gcc,所以自然以GCC编译hellworld ...
- 设计模式之Factory工厂模式
在上一章,模板模式中,我们在父类规定处理的流程,在子类中实现具体的处理.如果我们将该模式用于生成实例,便演变成了Factory模式,即工厂模式. 在Factory模式中,父类决定实例的生成方式,但并不 ...
- Django 框架之 URL
URL配置就像Django所支撑网站的目录.它的本质是URL模式以及要为该URL模式调用的视图函数之间的映射表. # 示例: urlpatterns = [ path(route, view, kwa ...
- What’s wrong with virtual methods called through an interface
May 31, 2016 Calling a virtual method through an interface always was a lot slower than calling a st ...
- Buns---cf 106C(多重背包)
题目链接:http://codeforces.com/problemset/problem/106/C 题意:有n克面粉,m种馅料,然后每种馅料有ai克,bi克馅料和ci克面粉做的面包可以买di元,也 ...
- git学习------>如何修改git已提交的记录中的Author和Email?
一.背景 最近搭建好GitLab后,准备陆陆续续的将之前在SVN仓库中保存的代码迁移到GitLab上,昨天顺利将三个Android组件的代码迁移到GitLab后,其他同事发现迁移是成功了,但是pull ...
- python argparse命令行参数
测试: 第一个没有任何输出和出错 第二个测试为打印帮助信息,argparse会自动生成帮助文档 第三个测试为未定义的-v参数,会出错 第四个测试为未定义的参数foo,出错 positional arg ...