捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 Kr,A;l Z~*Ap$\
   4V rF(C;l5}z M+N'vds
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
6x I5?Mz y'z.v   
%j {'uT}p'{   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 i.o;\B'R
  
t |9y#Z }Z   Options:
#rO5F'T/g   
^a2p A:U\Gt^/n   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. *X+bfX^
   C0z,P+\Tc%Rp
  不停的ping地方主机,直到你按下Control-C。
"n5{ Dr[h\.tX/N   
bZ$N[ {Sz(?1Bb   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 C2]-\N @#_
  
%A}/_#V0`#b'La   -a Resolve addresses to hostnames. ]'MiX$|!kc] Rn
  
5@@3J$^LF ~   解析计算机NetBios名。 J5X5}H P m)K _
   .m;N~tn)BYHj
  示例:C:\>ping -a 192.168.1.21
*sU|3ZG3p    5vtP;| z {h
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
KF:^,og_)~4|   
i%fO jm%gr U&d7@   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
6OC|#pH3] |   
ZZ2Qf`+{   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
TTV5|v3m\    &i%EKA S^O
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
f#\4L#i,Jr uP1A&T2I5P l#fcX1o
   a;D3k~3C0y$\9u!qG
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
_@1}U6B)}1`   
sGmd-L$q.V*WE   Ping statistics for 192.168.1.21:
:c|:iD H    (Vd'x+wK!NN_
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: u#RD_$g;v
  
Y [5K$z |cf^   Minimum = 0ms, Maximum = 0ms, Average = 0ms
'm}7[(f.B;CN    N.I2?'Ef!M
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
~'UK:A#l;Aj5U4Q    -dhE G)T;^F
  -n count Number of echo requests to send. Y!@Qgj*mr
   x ds"uX{7D)x
  发送count指定的Echo数据包数。 A'YB+n-H3o
   IILIg"yA
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: 6CmkHJN@
  
6qm.PrG ^*A5A}   C:\>ping -n 50 202.103.96.68
&YYB9P(F R ?$aM    G%RD5}E%B
  Pinging 202.103.96.68 with 32 bytes of data:
nRP,y%Q    %q~T&V]#]Nd5`'S w
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4T b1d L.lV Ov
   S6Qc7`no/qU:C
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 .W8n9M&F \%`I%hY
   }Jks%Uql|T |a
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
D v&Yk:u.Ua8qn   
f'Yn"bC5{6q*N   Request timed out. &Y b/h5W/h?%t2a
   &}3A:u[ b8xZH/a
  ………………
)iJ8{6].|$w6Sq   
^&LIs my PI   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 3]&FN.Ek_)r)l
   r&{-I$~y K w%K]
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 %^ZL8U]Lu]7I.I
  
5y@{P/D{4[5uY@x   Ping statistics for 202.103.96.68: L*hY])s|1t4tBU|O
  
M1| RU+_$Z#V!A1F1Z)D0x   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
(u O.@O-K eJ*J P   
k%c"a~mv(g$tg)Z   Minimum = 40ms, Maximum = 51ms, Average = 46ms ;J7i1?z2tbB tg/wa
   T I`KH
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
^8EL+o5z[4R   
5_ aj|'}(t9E2F   -l size Send buffer size. n HSfc
   rL`*ja~ W-^
  定义echo数据包大小。

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

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

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


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