捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 a9Ur6g B3RvC2L C"V
   8FU[$]x*x d g#j
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
$I.t%eX UK    suJK8Q8R
  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
fA\fbDn   
D s2SPx#~   Options:
.W y8j ^bS kj   
(z"F eze r   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. oU*p8FR$R|_
  
/U:?:G+TW.h;\   不停的ping地方主机,直到你按下Control-C。
_3y8T0S\)bh._ ~   
|C%m2ey;jA0v   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
1P/J?D5Yt7D^$m    (j4\0PsU"EHn(F
  -a Resolve addresses to hostnames.
O/i)gw/R cJ$h    |-r JH9F8V-OXyb'n
  解析计算机NetBios名。 Yq Sq N6zL
   K1C;b@$C7O W
  示例:C:\>ping -a 192.168.1.21 4{BC+t/u*ps(X6u
  
mtz-TPR&s   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
#Y/q~ob    MZ!D}$@jnxW$n
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ?7Y X2j8Daz @
  
%i,K Dj'H!T%I   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 3`#PW/[:p4_ ?w|*U
  
acLRC2AO RHl4XS   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 @Q!M#\6\3G#F*U Y)|
3nh^ p H;WAw
   6}'\Hlg wq
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 SAw#g#_7K)w:aE
   'Z/T#S|;s
  Ping statistics for 192.168.1.21: o:VT(Xi8c TIe
  
p7U_ ?!AP}V   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Z5r-Y Li0u-v0v3^:}
   %uUgj P
  Minimum = 0ms, Maximum = 0ms, Average = 0ms
{BR+A,DJHA(v"uM+P    vun}C;{ dI
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 1Q A u+W?pn?$Q
   Tt:D,Sav
  -n count Number of echo requests to send.
+P.oB8L\m    *f3q6V5l,\
  发送count指定的Echo数据包数。
lB0j0G(y.r S    $oh:f_0Jj
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
|$N#d`O%o(E   
2h3z*}s-nCT`   C:\>ping -n 50 202.103.96.68 qE^p1HcD
  
V,F-?(bH!{   Pinging 202.103.96.68 with 32 bytes of data:
a[SrpQB&n    %F1Ji U/hU
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 @;ww5kh;cT%a O
  
MA{[m0qL   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
+NT4Y{+|6Oj7g    -_'C5a~5E%_dO I
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5X'EX0Vy'hdJ(?F+w
   l,JC x l
  Request timed out.
&W v9?(V7XVP   
r YpQHp\d5k   ……………… 3GO)lD"J
   "eO$rX9j(M(?
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
"sw1g7^Q`~ \    /J2Ydl Kty%G
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0`|Z EJ;Z D"{v{
  
:Ch8G+UjL   Ping statistics for 202.103.96.68:
8@-I$]aS    )Z dM5?FZ[[L
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
&RKBV(wK:C   
7l LNO Y:E0Z/W H1u   Minimum = 40ms, Maximum = 51ms, Average = 46ms |;rWAy0NcY
  
4g P dD3dPC   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 5r9y_4kXh\9@
   ue2Ee.h\
  -l size Send buffer size.
l.Ql0x-[z+T)f    PD D%O%c$l
  定义echo数据包大小。

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

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

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


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