PING

(ping)


验证与远程计算机的连接。该命令只有在安装了 TCP/IP 协议后才可以使用。

 

ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [-j computer-list] | [-k computer-list] [-w timeout] destination-list

 

参数

 

-t Ping 指定的计算机直到中断。

 

-a 将地址解析为计算机名。

 

-n count 发送 count 指定的 ECHO 数据包数。默认值为 4

 

-l length 发送包含由 length 指定的数据量的 ECHO 数据包。默认为 32 字节;最大值是 65,527

 

-f 在数据包中发送不要分段标志。数据包就不会被路由上的网关分段。

 

-i ttl 生存时间字段设置为 ttl 指定的值。

 

-v tos 服务类型字段设置为 tos 指定的值。

 

-r count 记录路由字段中记录传出和返回数据包的路由。count 可以指定最少 1 台,最多 9 台计算机。

 

-s count 指定 count 指定的跃点数的时间戳。

 

-j computer-list 利用 computer-list 指定的计算机列表路由数据包。连续计算机可以被中间网关分隔(路由稀疏源)IP 允许的最大数量为 9

 

-k computer-list 利用 computer-list 指定的计算机列表路由数据包。连续计算机不能被中间网关分隔(路由严格源)IP 允许的最大数量为 9

 

-w timeout 指定超时间隔,单位为毫秒。

 

destination-list 指定要 ping 的远程计算机。

 


 

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]

            [-r count] [-s count] [[-j host-list] | [-k host-list]]

            [-w timeout] target_name

 

Options:

    -t             Ping the specified host until stopped.

                   To see statistics and continue - type Control-Break;

                   To stop - type Control-C.

    -a             Resolve addresses to hostnames.

    -n count       Number of echo requests to send.

    -l size        Send buffer size.

    -f             Set Don't Fragment flag in packet.

    -i TTL         Time To Live.

    -v TOS         Type Of Service.

    -r count       Record route for count hops.

    -s count       Timestamp for count hops.

    -j host-list   Loose source route along host-list.

    -k host-list   Strict source route along host-list.

    -w timeout     Timeout in milliseconds to wait for each reply.