捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 5Hc&~F|)q)n3e0v
  
N{6R4\q3M)Dt   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: ,]1H"w@s A
   #eP6K&z7D'w"`e
  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
CE mx:Msz    BYM$P6b*Q
  Options:
c7Kc}?    $BQab ?
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. 6LI9sZv!e
  
oS9b-`9N2Nl&O8n   不停的ping地方主机,直到你按下Control-C。
XD*H9v5^#@r'XX)h)r    a u:nn6P)X.Am1r8j9E
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 &Z'f@)o5F
  
cf-z!ogh   -a Resolve addresses to hostnames.
} r \_;d F    ;m(x5G9U3b7[4??
  解析计算机NetBios名。 #VsFt3^
  
~A#sN#DfF(PI   示例:C:\>ping -a 192.168.1.21
4e5G#^#mFrh    pr2aBu~%n3n)yh
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
;x9F!h7s2SYUN^    }#h u B#M6p.x
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
dD#f&RC A   
T.`G9EBY;iw   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
I NS_Q%L    r U%fKZ]Ug
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
N/zm h(E`R h CY;i| \6[!e
  
'o"|6x)~2}4@V%Irl   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 e#|h {9xB8sW&G4F
  
)v(d&UhUv6k9c?   Ping statistics for 192.168.1.21: v[2\#\&`8W Ht8nX
   '?@%@2^3aIH7Xg"A
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: z4l6N'c$bn1h&w*h
  
!N aQq9B zy4r\   Minimum = 0ms, Maximum = 0ms, Average = 0ms
;Bd0K)x ?sx    9@.D-~P$q+C1?Z;O
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
%Bc4B s(n(n v*`   
8Q_v!m+S(M_C.N!`   -n count Number of echo requests to send.
i rM+ri!t#Y @    $bmg'CVNp
  发送count指定的Echo数据包数。 4rkF4P3?3DW3^
   rdRq hl;q^Hy
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
-o(DO9k6xT@1J   
n5dC(v r jP`   C:\>ping -n 50 202.103.96.68 -j,\]kH8Q4X!OA
   8~o,b8q hH3}
  Pinging 202.103.96.68 with 32 bytes of data:
#SC}3RU    SD/^|(ao5Ol
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
B2qN\N0d   
,B%onU$a.f$d'`   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 8j JH;_z-T s;} nI
  
y#}2Jj)\o G {;q   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
b-jb6w rvFc `   
BD(E#U"@q   Request timed out.
%E A8Q7kL    QiEY}Cd
  ……………… 1{J$n/G&NT6rx4SWAb
   $^ XE.r?
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
lq2mqO    S P"h;i4GS
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 -I%GX8zQHJV
  
y[;o p2W?9f   Ping statistics for 202.103.96.68:
(Yjz/_6~s    :F%z^0X m4ly
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
GVx Y'R#y dT    Z3g[|.H
  Minimum = 40ms, Maximum = 51ms, Average = 46ms b4H"Vcv!p`)f8o
   rr5g;c6D9e1i At
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
%hN7])Ke6[n$Bl    (VO"f^g n5rBM+x
  -l size Send buffer size. PF4F s'~lp~"l
   2i8x,K%ZXhB
  定义echo数据包大小。

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

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

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


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