捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 ~h`:m9U_ZI
   h|\d7QK@0~ T
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: a+d O |8U]L W
   0H!j rF d9D
  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
5}3eWfVt&x{"a   
M.R*M%T.\Y/c#bh y'J   Options:
,M/HVp)j$F/~4\   
6kkE%vT   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. L(mH0P9qS(G
   6h(gx,F L*Vo)[1]fN:O%y
  不停的ping地方主机,直到你按下Control-C。
_|J#V^i p1~3\   
,rk c!l|eA   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
yQ VT:];st(Bqo   
V|-n%L5z0^+p)p   -a Resolve addresses to hostnames.
d5xNl&tk!f    `gv J2VI
  解析计算机NetBios名。
,N8sN#t)dn J @4T    m4a R.} B?:O\}
  示例:C:\>ping -a 192.168.1.21 ~/c%u*x W+L M
  
fX:F.w\Nb n   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: D3_l-}7Gkc&e3I F
  
~u.O%K%z.C;|)Xh{   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
{0j2A8h yeP9j MB.u1S   
M4c)H0pS ^.]_   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
KI/UF$k(Jd*VB   
4T ` F"n%H.k(Z   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 E"iA%?ik2Y.@;|1H

4ER%^P3p'd   
%WH1i.w;d7}AN:HM(}   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 )E{I'B;CCtu
  
,]3a@:q\)@y(^%t'E   Ping statistics for 192.168.1.21: +{*J UO!{\
   !g'ib%eR?
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
0`rVQ},o n    ,~t@6V| {i%me8t
  Minimum = 0ms, Maximum = 0ms, Average = 0ms _x ?3d:a;TD G
  
vK(n O)Y%Q~   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 Z g$`S#ax%F&W
  
[ ^"e0j B   -n count Number of echo requests to send.
1stb]v1{ D   
%w+iq;kiThrOV   发送count指定的Echo数据包数。
1bY7K1n2?{T4y   
(S#IL"oL A{o   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: (t/bJU?1Lay2~
   XA&u^ oY5n.l
  C:\>ping -n 50 202.103.96.68 (_0|6[$uf:ot)m
   YnE'^(\/Rd
  Pinging 202.103.96.68 with 32 bytes of data: H*E\_i kZ!Z
   v|"GM }9pG
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
^:@ ?D:Vp    /|@ @I)lo ]R \
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 @!q+c gS9x g,Q#z
   9`9\@@m3[ X3@
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
|-R,J#U'Q/bl.~!P    0xU)d7_kZ3`0~
  Request timed out. J.yR(zX&h
   2U.V-D j,eLD
  ……………… ;].H([1n*S(S1cl3F
   TN4_9~ YBp
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
I(y5H@w1C2jD    El \3]5n#s K X
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
#QK-]b;g&` e    e`b+?#uS$FK5P#M
  Ping statistics for 202.103.96.68:
"O k*~ |g*CN   
k|@t&nEy,O   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 4s6O+F e(?sx8HS)TI
   v8{8Dhl{Z
  Minimum = 40ms, Maximum = 51ms, Average = 46ms
?ZyO3u'[\    ~T`~tc*{,\
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
Minl6N]5?$\z   
x!|?Sw   -l size Send buffer size.
nBW;Y1J!N%F    "O7E x6c P3p&H @
  定义echo数据包大小。

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

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

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


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