N8 c, n( c- t8 _' v Options: * V% o2 M# f R/ @# _' \# f
# @$ I) u: b Z) ]
-t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. % H3 C, _( P( C: ]( H6 D+ |& Q
, k" O* D! q5 {( }2 { 不停的ping地方主机,直到你按下Control-C。 ( G/ n& P9 A) U5 g/ h o$ `! b' |
$ f1 e+ D/ U8 r6 Y# ?/ n- K
此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 ' m9 m( p( _+ [ P' D5 h
+ V9 O0 e4 h& p* F5 e/ H8 @
-a Resolve addresses to hostnames. " J$ p7 {6 l; r( m , h2 J: J/ a' E* G8 r. t
解析计算机NetBios名。 8 P2 g5 G+ F9 m' P7 n" Q# q6 N1 J
3 C6 w- f: Y Q* R- Z1 _( L 示例:C:\>ping -a 192.168.1.21 - G+ b# `, k3 c. {. d: ?* o" S6 L" y
2 l$ l! @ P1 Z4 p. g Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: 8 q$ [8 u, f) _8 ^4 w9 Q
2 X: k' U. T7 {1 X6 E Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 $ D L; h/ V4 Y8 g% u$ o / S. g& V8 B9 v" R2 I8 n Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ' I) P' i% v# P3 [) I& a$ U
; c7 p8 \# s) G) h+ }& z, ]4 G
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ! `' y* ^2 a0 U+ f4 n9 p+ g4 r
0 t- Q) H' x4 |& b* a; c4 U
: z: S# h7 O/ K3 I: M, u Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 . }; e( \* o' V. w+ A1 M 2 m$ k( Q# a g! h8 }
Ping statistics for 192.168.1.21: * V$ {: \9 C: P' `' l# Q
* w: f" U; _% i+ Y; k
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 4 E- r8 p- X4 A% b
5 {4 l) F. r; [4 t Minimum = 0ms, Maximum = 0ms, Average = 0ms 2 t7 B2 j3 z" Q x5 H: j4 F( R
9 Y. d7 \) n7 {! C; V2 X. D 从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 9 f8 u. W( t6 _- c; \4 ] 6 ?7 }$ T7 }, D( {$ d -n count Number of echo requests to send. 7 W( N! s) v: z0 x' `- I4 a
9 A0 g& S& t) T# `& b3 E 发送count指定的Echo数据包数。 6 `2 }/ T0 k: F( w( S) y6 u
3 ]( I( a$ k* O1 X 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: , s, i C4 j6 a7 O3 W: I
" i. ]. E1 ^1 V* V! s$ L* j9 C# i& b) G! V C:\>ping -n 50 202.103.96.68 & s3 T+ i& ~5 C! `+ u
9 f0 ^0 n- |! z/ N$ d Pinging 202.103.96.68 with 32 bytes of data: 7 o0 M, r3 [; _ k8 _3 F
3 W) z) k& M m) M a7 w) j
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4 N, @ v0 D: d/ e* ^. m9 R . P( g( Q0 V+ E/ ]0 z
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 3 M: p) U* o5 ^: z( u
8 M4 h# ^, b3 S4 J4 O5 P; i" h Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ; D5 L7 @! T( a& r ! B3 q" v8 E. V6 Q5 A$ ? Request timed out. 3 I7 t+ { @5 F! @
3 F: d5 ]; a9 \: \8 u
……………… 9 _$ N' ]* x# s0 c- ?
- L+ @( ]: [. V/ V- |2 T1 a6 ~ Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 . ^7 o7 ~3 d }, Y0 Q8 Y2 w3 h
* q2 Q6 d- F0 o; |7 H& o Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 7 p/ J; c/ G- ^! Q( z : T4 c7 H0 b1 x9 ^7 v7 T
Ping statistics for 202.103.96.68: ; `5 F/ |# ^& {! `
. K* m6 l# E3 W$ C+ ], v9 N Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 2 P0 U( h9 j4 C6 s, b # H6 z) z, ~1 M8 |6 v: U2 _) R/ G
Minimum = 40ms, Maximum = 51ms, Average = 46ms 0 o% P2 e- r! K, m