捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 `A u.E'kz s
  
8d B-K/}p8Q9~)_ q5[   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
U+VdT mE%o   
~ z8U |/|2r"\   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 'o|[ a:[1j
   \ LWW~4@6S
  Options: !R4Z.h G7D'tP
   S{4C {&D9Q%L'p,v5[U
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. #fODS:d:Z1Kd
   %_b L0tj:~/z
  不停的ping地方主机,直到你按下Control-C。 +L^X4Hn*x8[!{Hn
   a&I3]-o&n*g'Fa j$mL
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
F bB+Vx\gJ    +z.x:}%D8E5?j
  -a Resolve addresses to hostnames. -m[:D{W-_C|
  
?|,gIxa   解析计算机NetBios名。 S9c$_$\P#f
  
m Qo*r8cmnXp   示例:C:\>ping -a 192.168.1.21 !N X.YS/` w
   ,wc,I\%}q kc
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: )P K0`1Jw
  
m V |SH ]B4oF   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
0kzMyz8f   
YP$U0f(^,I3}   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
M:o Y*[M*P   
RT bB|kXl"Jb[   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
C2~8SM!c1|Ws
v/M4I'q3t$c@ q    4b,C9u/T4wq E
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
un2Cg p#w#u*z   
-P$c-E3?)z'F PWv   Ping statistics for 192.168.1.21: %y8Qi*L2U'@k+h
   .Y&h}5B1?(s2cSqq
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: ?5p)jwVgo
  
8Y6k0WBe{;I[.?   Minimum = 0ms, Maximum = 0ms, Average = 0ms P6DW B,t+y
  
Q&O-Eef0E}   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
1xWy/fX    _b't L BR-KI6@Z
  -n count Number of echo requests to send. o D;~r g%M K
   [I#x$g yx{
  发送count指定的Echo数据包数。
oU.~n T o&u i    ?X3^G RT
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
S9?#e2Z0f*{:|   
|4g+E"J _6g*e'`   C:\>ping -n 50 202.103.96.68
/vY iwiE_1E:\b    h|0K,jf A.e_6R
  Pinging 202.103.96.68 with 32 bytes of data: -L!`j'@-H(L4GYz
   p'ne4g;P4C B\.F Q
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 To[L6S
   )]yh%KP
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
ze*h5JLO n&Yf-l;]   
ZuD5K_Ys#DV   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
;D5P|"pf|K i'^    J*ijf6w&NV
  Request timed out.
~0CC9[P8YB(y@+@g A    z?.vs+Rn o%b%rP
  ………………
4}DrSAx   
)gh o8@v4lv   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
r5w;u#X.H   
cQ;U O~ i}   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 %wI%iT$}9Cj-L
  
BI\yw'E%L   Ping statistics for 202.103.96.68:
[(u"^x1Nt"U?    Q@U+V@Q k*g4Y
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: O TtVSLH
  
,NvAa3P[@;t2Q   Minimum = 40ms, Maximum = 51ms, Average = 46ms
N7jT|:Cbx4P2W    8w$L3i[&WT{l
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
u,].b8~I,`zU0`v    #j8X ]v L$Thx
  -l size Send buffer size.
u2WXm SjL~.X    7d|x%i3IKJvp
  定义echo数据包大小。

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

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

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


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