7 q! d" @6 A: t& d: X% l- o 示例:C:\>ping -a 192.168.1.21 : H! F) W! Y: V$ j4 n6 U% t. F( h % P# L5 X4 z. g Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: " @9 Z9 T2 E' u9 s- c
5 d' w: t$ c, d4 z
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 + M4 v) i$ S: o) Z0 | 5 d( f6 V4 {$ Q5 ^1 t
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 3 @ z2 B3 S+ z" I; W; }3 ^$ S3 V + @- E' _* L" B x! F
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 " _3 N3 F9 I( t/ u5 o$ H/ { M& W
3 u7 }+ m$ I) M1 Y# e + N- u) ^" K) j) I% v Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ( O' J/ j! y7 W0 O
7 P4 B7 h! B) G# t5 q4 f* c, ? b3 S
Ping statistics for 192.168.1.21: . q* T s1 S6 e6 \$ E ~) B5 X9 b. E H6 ^, @( X
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 2 d4 x# V) I# G& X8 C . Z! j& Q: }& e4 z C
Minimum = 0ms, Maximum = 0ms, Average = 0ms t& ^* e) j7 T; s0 _5 @ 1 y. w- t' L* e: C" Y 从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 & e! e; {8 d9 [1 Y2 h + A( ]" Y0 a- m$ q) U -n count Number of echo requests to send. 2 i* c& Q) W, ] + \2 a1 q) V/ | 发送count指定的Echo数据包数。 ; |& P. h0 F' N, m2 |% U
2 X" f3 K6 x9 k$ B6 [1 C 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: 3 i; i& X9 z c* Y9 s8 z , Y, d8 `; G# u* ^8 X( L! @' O
C:\>ping -n 50 202.103.96.68 0 }( D( Z. S2 I: g I# C$ J
( y6 ^: _" d; [
Pinging 202.103.96.68 with 32 bytes of data: 8 L% [* x9 P- d( f * r1 g! G8 b7 o- B: G8 @
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 : m: B" v* ?' @, j) v& j1 y, S% q3 W ! l! H0 i- F1 p/ E# w2 }! E* |
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 - u: q8 m7 V; w( x2 s : F$ a- n3 @7 P# E
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ; r8 y) e% ?& O8 b- m" h0 o
9 y' \9 ]# w; | Request timed out. ! D' b. b. V, U# Y( R8 j) M5 B
" _& u5 R2 B0 E$ r ……………… " w3 Q, T6 a7 z* E
% |: a! r# a5 W" G* x Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 # W0 x" B- z8 Y$ e3 q- _ A/ f" w" g/ R3 F' ? E6 |7 j5 n) ] Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5 G* X6 S. L6 E6 }% ^1 F8 o ; S( I: {7 A1 I0 t
Ping statistics for 202.103.96.68: 6 H1 k; Q) x1 K1 m' b+ L
" \5 g/ M6 V9 y) X: i& c
Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 5 S8 Y- u l; d7 I k
4 ]$ i+ G: _6 j+ M' D/ I Minimum = 40ms, Maximum = 51ms, Average = 46ms ) q- G/ Q/ Z# ~5 i
# m- U% p5 q2 n C O+ R
从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 " L! K. ?; o$ K" ]+ |5 O$ d + O ]& Y" z! w( X0 s
-l size Send buffer size. H# t" G) Q$ N& v