捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
)`n\;]G*v a6m   
D%IP nT,{d   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
&C\ \I}e J    `uH m%g ^f&A*@5Pa
  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 'c.p8u`![6H0e
   ,Y$qsR&T6U/C*GI
  Options:
j4pq3dU S N    TB!K Ru#zE
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. @&\;b`!E*C&wb5i)L
   /xt1I"G ~
  不停的ping地方主机,直到你按下Control-C。 P&X kh%fT
   0cO;gw8f Y:jz+mR
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 +fS4`z8?*P7xqf-}
   k+J3}+yzi'W}K
  -a Resolve addresses to hostnames. ~0e%J2['NF
  
9B1E&MM/@l(u Sv   解析计算机NetBios名。 w q/w?@T!| f
   -mLR1\:t S
  示例:C:\>ping -a 192.168.1.21 :eW s?L0r7BkGI
   ;Rq2g~1i7I
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: N c1TO| Df RP
   :U o8rOA;k7U!v
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ,@{ m ~0a&P
  
km?J U.L,b   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 .I Ej.F8u n
  
)gl_dS$~6k.n   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 `Xm!c5N,E$j9{4_
[4e _/gM(mt't
  
(J2Rh6g(htf4Mi   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
1o] fVu4}!k"a? IL   
c6?1wu@i   Ping statistics for 192.168.1.21: &X4}#W y5]UR:h
   v&v;e7Zqd'|&N
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: w~N*l*s/Na*^
   7aYn3Q.o-}&Rj,g
  Minimum = 0ms, Maximum = 0ms, Average = 0ms d#^A+Ye ] _;z
   c,O@?2~5`,PT
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
i6N5T%[#a(c%Sr    ~u ^c?
  -n count Number of echo requests to send.
^p+PpSz(QN&x    a$C }f.]6W4q(j.Q
  发送count指定的Echo数据包数。 /MG%D2I-y.P&l0n
  
%i2E@2?B Fv C(]   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: Sa'@,qdH`
  
*NK*X{^)Q:g l   C:\>ping -n 50 202.103.96.68 T[htNU`B:x
   s{%g6j,bp O*@ Nr
  Pinging 202.103.96.68 with 32 bytes of data:
a*n j7Pt3z*F~4x `/`    j5v5Im8` ?B
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 !Ik df_S!Y
  
-hY0F!L;~ l!R)s   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
Zy-DLY.}.UAR~    !e7a N"U HW-l
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
}$`U%Zo0u    &Tn,`PX[Ul
  Request timed out. 3y%A5R9kPRc
  
%b B%fiu'[   ………………
*`m gz2}   
'G [1p1bT^   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
{G0c4ckI r.O   
'pS7yX5m+v#GWr'v   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 9o6OAc+Fv/F5VvC
  
%[6D!^9X)Uj _1X   Ping statistics for 202.103.96.68: L!S$ojG PL-mO4U
   ]1W*N7|^#S)~ PVK J'z
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
9H*aFNZslm K   
rKR+rZ6u5g   Minimum = 40ms, Maximum = 51ms, Average = 46ms
V#g#x%V4Mb+v1n!? _2o    "[:l D2w F_Uhf
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 U,xF#ix$F
   U4a/lQ[
  -l size Send buffer size. 'P5b5KJ#] xos
   *z)S(Q2G0R(}
  定义echo数据包大小。

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

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

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


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