捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
9x6O/R_0pE)C]P$`   
5L,WN _J-d [oR   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: +j"x8]v(G
   _?#_$`1i%O4|
  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 %ZD0|2T&JA H'P"_fPA
  
|&[S$P2pv{ n   Options:
9]3Cj.s:zt/]cU    E c6z*x H
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. 5J:~UU5NoL'yJ p
  
D:le5gi{%L]2g   不停的ping地方主机,直到你按下Control-C。
-Z a?9`w*B"J%TOR    |cJJT
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 ,Dr"Qe%u+C+C
   xE0Th{)Xr@"n
  -a Resolve addresses to hostnames.
/y7g{H&Y   
@$a!_`+R}   解析计算机NetBios名。 /V6a#w:q)TiU.E[
  
.},i~[J   示例:C:\>ping -a 192.168.1.21
9v'~%sX9I)ckmi   
k}d@(y3]I)?e6~s Q   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: r`X3vR9G-_?
   [(F {@7m0z-u#dB@6?
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 [dt5vF8f
   0K8V$\$s3z6YL7r$?|
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 3I!xHL#I#V(Qp
  
y!_Zs v   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 J;eFy/_s @
'Y,wa#e&sx)[9A D
   -j9b.{S:A+v n
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 s)`L Yq}s
  
v(H9|!vx:I#df[   Ping statistics for 192.168.1.21: p w(A.A6g2vT2C,V#?
  
Rq/\ I8f.] c2j   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
f A | Oe(Cm xo   
fCf&mf \Y   Minimum = 0ms, Maximum = 0ms, Average = 0ms
*l-qV4`0Fg{O;m)E   
.k*F)Z(S.a#p P   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 1FZ/F|*hoH7E
   z(]/X7r0\a,@7l:E ye
  -n count Number of echo requests to send.
Ai8D SdWp   
s@wl+B av(K   发送count指定的Echo数据包数。
+n0G~#{8Z;S   
Q7p!t cv0u:@*}   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
'_X$SJt   
Bo!n3_]xf   C:\>ping -n 50 202.103.96.68
j3{nvX4Do    3Z8| K'P i
  Pinging 202.103.96.68 with 32 bytes of data:
3{PE1tI9N4k7TLBN   
C|1QG*g@f uZ1T   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 D;Gwl |\
  
j@'J%gX x,EeU   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4pEyJL:l
   !t#l-w&L|2skE
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 3v4re/aI}*j _
   +F&aJ)OKHa
  Request timed out. #M#g:qq(xzmI
   "~/I"?fl&C0@Y[
  ……………… X ~}_uZ_
  
M!ZVCs3LNP   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
(`Ya!q#Pcklk ?   
v;f]'ciJ!V/~   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 *{B![$c.qt:T
   WO@d'W(F:`~2u9{"l
  Ping statistics for 202.103.96.68:
!l LH^0SU'W9t   
X6}9Pm3f[/q;Su   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
:O\;f\Z(dh    8Fg*d.]/`4cp!{
  Minimum = 40ms, Maximum = 51ms, Average = 46ms eZs6R#Y
   +S&kp.d d*c A
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 !c5H1SM"Ocs;y
   P8@ G,VA`X
  -l size Send buffer size.
X;E{(Pu7D YP)N%O   
(bKN1qvu I;k   定义echo数据包大小。

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

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

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


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