捌玖网络工作室's Archiver

野人e族 发表于 2008-1-27 22:16

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
/Y Hj7D[j7|j)v)h6TT    j|9K `P B
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
P T ZH$Q2G7JOz    A?7?7k+u!y!}7v3n
  ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list]   [-k computer-list]] [-w timeout] destination-list
M/~3_&[!a9v ]]   
{ pyl#p   Options: C6n*|0g)tfn
   -C*Lk? n zI
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
$fs'\] R1i*a t x    wVZqAHaz
  不停的ping地方主机,直到你按下Control-C。
K#o*s6^+UM   
'd R ru W,M:O*o   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 9a3p7JYk*A1T4ze?
   )kt.PZes&V*U
  -a Resolve addresses to hostnames.
,FS2N#OeY    nou*y(t*`)C4E
  解析计算机NetBios名。
X\M_4h4w   
5y3thN5L1rh   示例:C:\>ping -a 192.168.1.21
&N {ii{'BLs2Z   
|/V}%P^V td$no   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: k ] D {TK,`-T
   G7~m:] QK&w {
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
/y){ p*aS    f bC#T(y2T}
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 A0_nq6\|
  
K]wW @.Xza4C,_   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
C(d{%M*_l Wc*W!j ad
   Q'Km(G_Jw*{
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
Iq;ys/P.aS4b^    ~'K:A+pjW0x
  Ping statistics for 192.168.1.21: B8c"}6LM L-Y m#\ S7n
  
_/@$o4a*_   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
.e#ny8E5Xm&JZ7}   
:Sl2~7@9G3qH)@:u   Minimum = 0ms, Maximum = 0ms, Average = 0ms
a] q N&H9H'TS y    ~OTj\w9j
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 I;D!iG@o1a&RhJPAS I
   &K:w@ Z,L!a
  -n count Number of echo requests to send.
oyrYP.vG4g1}yB   
;LFOz6t oY"`#d   发送count指定的Echo数据包数。
#[5PB q$G+mY*euw T    F | BB L/\g.Qo:J
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: 4tO6a'A0D8y
   n e/P6w!b
  C:\>ping -n 50 202.103.96.68
3x |/R4iqIJ Q    hX YIp4IM1W
  Pinging 202.103.96.68 with 32 bytes of data: 5O4FB(M'c9\3Q ZX
   z%r;e2d[E-g9w3i
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4lD;Nl[0W
  
Wa!D+Xhf b   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
x8Uv F7sK[JP    "m#??z5gAe6\A
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ,fyI` P
  
'M1a:CR$_.djy   Request timed out. o @[FJ$L)YG$C'V&`
  
s;K*?DM/\0VY   ……………… F[vhfkT]
  
dR{7]{4h K u   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0|,z `mk9\
   _ E,Hb\,C!V\
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 C ilx;jq;?7fo6@!A
   0JYl-N4Nz+l
  Ping statistics for 202.103.96.68: zNv D;fC0D3Tc&t;ur
  
]hVK/v%K   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
p4Y8j/i!z1o(_   
~;rv'snW   Minimum = 40ms, Maximum = 51ms, Average = 46ms :w KidD
   m [nC F!V
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 ln*oL8I!D;E0E
   ;Z/]:Z7Ck;w6u
  -l size Send buffer size.
#dS3EiC^VP    {*Kz~'Q#GQ-\
  定义echo数据包大小。

冷雨清心 发表于 2008-9-25 15:54

强大,但是我看得不是很懂!

页: [1]
【捌玖网络】已经运行:


Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.