# Y6 V6 Q2 {5 v Options: ! }/ g% |0 d, a) R, p 6 [* \3 A$ K( Z O% |. c -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. : V U: l! }1 d- `4 t6 q9 \* H 9 l% N8 @- [& X/ ^7 O% O, ? 不停的ping地方主机,直到你按下Control-C。 3 Q s, g3 V7 E5 ?! n5 X3 z+ E : n+ U9 G( m; A4 i! o 此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 `- p$ Q" q# k6 l1 N X- \ p 3 D; }- M, ?( x7 }% ~ E3 Y
-a Resolve addresses to hostnames. : z# ?: a, B' u* p
0 M6 o1 c% v% a% i: G 解析计算机NetBios名。 ( y9 C* O( O! Y9 e4 b" Z2 i- M# J " T6 \* n4 m. ?
示例:C:\>ping -a 192.168.1.21 ( p0 w r) o/ I1 ]1 S
, ^# `) s/ {' f5 N8 A Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: ; g- ~" B7 ^% ^! ^' J; @2 ]
( Y/ j1 K+ M& y* S% _0 X/ _& m& z6 M Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 / O% A2 A- b' q* _) i- E( m( d , D) P; x: }- g. ]: _8 `/ u' u
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 6 p: e" k( W4 N' l/ [$ \ 1 O2 I$ ^, Y9 z5 ^( G
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 4 Q# X! I* N ~$ ]" D7 ~ f( b3 V1 ]! u$ W7 I4 H M0 N) {% F m0 W5 M: J' x
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 + H. [5 r" k# z# ~+ @
# t' W/ m% m1 a$ v; S6 i* l
Ping statistics for 192.168.1.21: 3 D' F4 V' x' n& w$ k; _ : T, y& I! u1 _+ j' R; q Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 1 G* I, f" R0 Y7 G/ u# U
& H) B0 c1 H$ |( G. X Minimum = 0ms, Maximum = 0ms, Average = 0ms m2 M: N* p' K8 i) \4 }
& X0 }3 H D, w6 l# ^9 |) \7 @
从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 . t8 p2 [* W% z+ m5 o2 Q
+ G% E) X% z* F M- j1 M+ |5 X -n count Number of echo requests to send. 7 ~. `: @1 x" A( P: z7 {* M ; p) B- T% {6 u9 C 发送count指定的Echo数据包数。 \+ i5 D7 K% t5 O7 M ; s! n& C0 }7 e3 D% W2 P
在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ! L7 E+ l- Y9 P( d! h$ s
: v U: b8 q3 G5 }# z
C:\>ping -n 50 202.103.96.68 3 R' P7 d A% f5 T + ^7 K) R, U+ t& [& Y* {
Pinging 202.103.96.68 with 32 bytes of data: 2 [) i% D- `) s/ _2 l" _3 w! @
; I$ Q. q0 E" s/ ^9 a
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 , i O; }+ F4 Z* \
0 T4 U! A* h3 G8 [1 s( K
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5 Q6 O7 n. a% |' P8 B) E& M
: e! x R+ l% Q# E- _% J
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 8 j% ]: K+ q+ ]& i z
1 n: K& P, }4 b, Y9 C3 j' o
Request timed out. 8 U5 I5 ]; ^! a' ]; l. p
( ^7 q! Y5 ^* b1 v( Y' m# J0 q/ } ……………… % K- r: _! C, \: X
3 y, e* Y1 `* j5 C4 |# ]# D! r; @
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ) {6 X( p: C7 [+ A
, D/ Y1 d8 T3 t- R
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5 f4 Q$ s) ^% a* E# P7 q
- j+ I- t8 n5 G0 j Ping statistics for 202.103.96.68: , ~5 I, Y- m3 K& Y3 p
! q9 U* k" W$ K Y6 I
Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 1 B2 m& e8 I3 `4 d3 N3 L& R
0 z, ]$ X: b8 Y0 l" o, r3 L7 K
Minimum = 40ms, Maximum = 51ms, Average = 46ms $ f, z; f- l& X5 o 4 w( z. Q$ W, [/ b
从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 7 m c! j- K7 w2 R: K : D; l8 D: J3 ~: e. H -l size Send buffer size. , x! R$ c3 w4 p/ W6 W% W* V
+ z8 S0 I W* T& }) g
定义echo数据包大小。作者: 冷雨清心 时间: 2008-9-25 15:54