1 `+ l% U* t) M$ G* e Options: 0 W! y3 k& }" ^# `# @ 3 y5 W& X6 d' K; A* j -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. , P+ e; ~( h$ V 2 g) c; y1 H$ t; A# p4 I% v 不停的ping地方主机,直到你按下Control-C。 " J( V/ [% q- N8 D9 e' I R F
. M( c- b0 Q- C" C
此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 ! y1 T( Q2 x L L4 X$ M ' H) H2 V, a; `, K -a Resolve addresses to hostnames. 4 t) ?7 G" `$ |% P( ? 9 E' i, w$ J. B+ K8 p8 g! j; z& M
解析计算机NetBios名。 3 ^: E5 R8 u5 I6 ` ( h% Z8 w. |; O4 ?) x4 Y% R& l# a
示例:C:\>ping -a 192.168.1.21 # ~, W: C/ B; ]# [+ W# D% u5 a9 _# A
9 n" d T3 H0 T
Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: ) f4 s3 A1 Z" k# [
1 E9 Z9 H% r3 f5 Y* O Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 % ^ j3 Q- O( i3 F t" ]- c
- d# C, ]9 d" V* Y" A4 ^, u
Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ! t2 R5 L0 f3 D; | 2 O# T r" f; o: s$ N, v Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 : }8 Y* N$ J% r; v& h$ J4 j, h {# h
/ _/ L9 G' K3 e1 ]. B' `3 V Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 3 S/ Z8 t6 O" _4 C8 O. U' w9 a . U! ]" T1 r8 C* x" e& B6 h' w( D Ping statistics for 192.168.1.21: 8 n: A* f0 G9 N ( \' x5 r0 @; t
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: % R$ I4 j9 k+ v$ U( X * i- Y7 k2 Y1 Q0 C Minimum = 0ms, Maximum = 0ms, Average = 0ms . l" v* c+ n" o ] 2 l% M, `8 H3 A$ C4 }
从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 . e0 W9 c U9 f( p8 @ , n( ~5 E, O6 M* \' r
-n count Number of echo requests to send. 4 @4 s, {+ s1 j5 i- d% f ; v* E' f1 l2 O 发送count指定的Echo数据包数。 + i0 C, V9 ^2 R9 [* m: R' |8 l1 t
5 ?/ G' D* u. Y; k 在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ; _ s3 T% k# h2 w' ~4 n
. z5 |: F- v7 u( [/ O. ^ C:\>ping -n 50 202.103.96.68 8 I. A" ]8 Z: L
7 K% s. |! A0 M. E0 g" l, R9 ~/ A Pinging 202.103.96.68 with 32 bytes of data: ! p& f R9 z! f: U3 D
2 T& \; N, T- } z' |5 T* W& T0 |- M Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 & D$ ~7 z8 V* Z! h H
3 V; U0 V8 s, f' j6 |" _! n Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 . M5 w6 a3 Z) d) }
' G* U* U( w! L* [9 J. E8 U' C Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5 F! Q, A% X! j% F+ G# `* `
( G2 Z4 B7 l' _' Z: w1 R" c Request timed out. 7 \, K. ]1 T' {3 A- i' i 1 I+ c2 @# `. y$ d7 L: O0 Z
……………… 5 Y2 J: E- F! Y0 m
0 C! R: Q3 I4 P0 M& a* f& N7 O& O T Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 " z/ T+ g Y) {- k, e ) [2 f/ b# R2 w% W T
Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ( j6 R9 P1 U; A* [# z: M8 Z* o
' r; q6 V( x) P6 r4 F+ t: I
Ping statistics for 202.103.96.68: / S9 l5 ?6 u) W8 ]( U$ E
8 a9 Q1 O' ?5 p, K% N8 f6 y Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 5 I: w3 w/ I7 ~7 e! T- w- s1 w1 m 7 E1 C+ N( C' [; c) G
Minimum = 40ms, Maximum = 51ms, Average = 46ms / {3 w0 }( }$ v8 r% F& p