捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 8b.]Q7Ee(B.\?+u
  
(~'u6S#hE7L   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: kDu^*T2O(NH
   +^d*xB%O Y+A f^ S
  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 !}F B;kD+ebGn
  
P e)X!y'z@;SPQr   Options:
c`n-[%RE#u$}    +Q1O,YN&R"a.J$q
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
`oE4NK4PI;C3a sT    A yYx;MJh!}(X
  不停的ping地方主机,直到你按下Control-C。
:i1|nXa'ds-|^x   
mu5\^ c4kR   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
em7\&D&lc8Ho4_    4u+P yUC~M@
  -a Resolve addresses to hostnames.
[C] ggM}6a   
-rGq~'s c2d-[2u9?   解析计算机NetBios名。 5A%GcT0g3M0K v
  
(Iy]%q+K"?n)tL   示例:C:\>ping -a 192.168.1.21 kF.l6\8~-W
   4PK&k,fq+um
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
Kw"@ `XT4L l$z,y    +E y!q%I ^^,C(L
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 N3E'bpk,~L!TI%F
  
Si5X9p Mw   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 (Ut!Eo q
  
~v)p\'T Y;o   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 ]cj"k)Ev
*t_Dq%{#G
   1HXJ"j#q@
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
1x.E'oY4S.t`?n!K    z,KR5YR0k#B lp|
  Ping statistics for 192.168.1.21:
TJYA8C    AL3KnN(u0`7{/n|
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: F[(i;_D
   aVJ%x%@NW
  Minimum = 0ms, Maximum = 0ms, Average = 0ms -fdiI.c d.]
  
ym,U H^&\   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
\B+st?   
(U2C aO T.C'}   -n count Number of echo requests to send.
;drES6r a{%o9MS    W7b xE5F6LZ&Ug2i
  发送count指定的Echo数据包数。
'hmwXR2H3YY-Z `    Psq-q*f&pX
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: `[!Z `Sv^
   *`9c2@2OF
  C:\>ping -n 50 202.103.96.68
$DY6Z*Z_{%l    Mrla f-l%\
  Pinging 202.103.96.68 with 32 bytes of data: "\&]}@2zK.B
   %lG,lO^3l \,zs
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 /n#UwMe'g5At
  
Mc)B'i R%F*v3q   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
#T&p+X5F%X5Y$i!tV    (O9U;M#BWLr
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
%OiL j#}^    ;ad-US IfRP
  Request timed out. }:s'x3}9D l6t
  
$`)t,hZUo_ w\C   ……………… @Ls+Fdy;y
  
fJ7P4TO   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 PD8a+T6\2w0]$S8`
  
%_(V{N/z [M   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
(b6EG6V1^P3@    ufx~sE0Ug
  Ping statistics for 202.103.96.68:
'ajXG#m6oB(KQ5Ste&`    lR$_XlbSGPDk
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: R]|J2fg7fMb
  
]5T4[H5]#g4C/Ce#j!tNK   Minimum = 40ms, Maximum = 51ms, Average = 46ms
D?"Nm+F,r:Q$p   
7kE-c5Q"Y2t+Zio w   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
^(V|n!ES    ;a8b^.I;e%ef'K3K
  -l size Send buffer size. pg-RZm?
  
:a Qw dPEi5O   定义echo数据包大小。

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

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

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


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