# ~4 R0 u& N7 r7 Y- B -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. ! {0 Y/ G* \" }- @2 M
# M( g2 y( C' @ 不停的ping地方主机,直到你按下Control-C。 8 ?% N/ Z! } Y) P# w* n
9 U; N; P, V( z" G% R 此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 ' L% _( z4 i, u
/ A, Q$ y6 ?( ^
-a Resolve addresses to hostnames. ! [- x4 L4 ^( B0 }$ [( h6 }( |$ t
5 b) j3 s$ X' V2 p2 K2 u- ~/ J 解析计算机NetBios名。 : z3 a$ B+ m2 X% O& K2 l# o# D l9 _) k. L3 T8 {
示例:C:\>ping -a 192.168.1.21 % W3 e0 V& j9 O) l; n. e" Y4 x
7 w# V: H @- w+ j- j2 _+ Q: e
Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: 2 z. l# j& w# N; E( k
: M8 J! f9 y1 N9 v) A Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 0 w2 N. D8 I& c, A2 @ ; }( [& e. G1 i+ t. m- a Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 - T% s* Y/ k8 d. ^ 3 |; a( E* Z }+ y' f$ Y* l
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 7 O3 [ ~) r4 @# S4 W0 x1 K
p' T/ j/ S y7 e. i ! f5 b# g2 T, {* \) x9 V( j' N" p Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 8 _; f6 w0 g; s& D$ O 0 Q8 p8 R5 y$ j) L; p4 A
Ping statistics for 192.168.1.21: 1 ]7 W$ M$ l7 m* g2 p
7 ^+ r4 p3 {0 g Q
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: ! U3 W& Q# M/ D# I5 E . H9 B8 g u& B9 Y6 b
Minimum = 0ms, Maximum = 0ms, Average = 0ms 4 q/ F4 w0 E7 ?- n9 P( ` - D) i% x7 |& q 从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 , Y. r) g: ?' P! M0 J4 o
8 ~5 h7 [0 c0 X% I
-n count Number of echo requests to send. * p' A* S1 o. }( J3 r } # t% ^/ s4 ^: y# O1 B 发送count指定的Echo数据包数。 3 F% y3 {% j6 @7 |. g
- D" }8 {3 h- F: O; ^, A 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: 7 I: e, E4 p% ]. r! ~& |1 Z + S3 e! O$ |: N7 ]9 w! Z& b2 P C:\>ping -n 50 202.103.96.68 ' i) t Z+ y# v+ N# o. t; f+ B2 J ! z& z3 g0 W( K
Pinging 202.103.96.68 with 32 bytes of data: 1 o- w( ?/ y1 w5 }