捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
T}5hzL'vhh   
:J@B6I%ZIZ6W6G   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
{B7d"SD'U V!?   
!B;? zY/bh n   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 )[C#{9^sB f4bu
   Asrx6JM.q}
  Options:
;W#`%i+P8Y8j^    @2p/fN&lo*g!J
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. 8Hb)w\+g%w"mo
   $a \Bv1t&_Ekw
  不停的ping地方主机,直到你按下Control-C。 Qx_5wtKA
  
3bH%CaU D4y   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
tH"a7QD6V    Kr l Cy\
  -a Resolve addresses to hostnames. XM\ R(g4s{?
   9PEb t%k;ht
  解析计算机NetBios名。 'x8pG~md;k \M*q)nN
   3[)rJ d&J4ph
  示例:C:\>ping -a 192.168.1.21
'Ge)wo1A3b   
(|"H3D\"C-o3U   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
3e(m_:bn   
V6yq-X({/s   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
I nR3t7NID/m    3I }]N{7V-y
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
^kvES'}    ?8E&G*?L2N5B D.fK
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
4r0z B;P)YA:zq,n
h.H"Ul,\tG p   
? VuP5WI+v   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 D,HD7mM
  
Nm6]6E*tY7z7D6G   Ping statistics for 192.168.1.21:
4vp'^~4Z"k    0P#ry"L!IoW6J
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
!t`wt8YDM4`#X3x2^C2~Y    tgX!mR r!N-C/x6g
  Minimum = 0ms, Maximum = 0ms, Average = 0ms
8b4@#KzoO5S`+K?   
%G:C"s\lS f   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 *| V:` lq8g&\
  
%eq Q0pE   -n count Number of echo requests to send.
C4L4TI }6Zzx   
^K6U#Q iP.w9c   发送count指定的Echo数据包数。
WN)Gc0t2]-N8E   
#\ De o8|   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: cBk&{-T#bD Z n
   ^'A"K)^l
  C:\>ping -n 50 202.103.96.68 i0O_ f k
   !_Y3r} aP*a
  Pinging 202.103.96.68 with 32 bytes of data:
LnM3g$}[_;F    TN'dK)m2G/r5f
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 \N1W+jPd{ xF
   #Z0vl1s,@9L Z;AZ
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
w9RB-^%LfYS   
K ts+R9qe3`+L)d2H   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
:H;? Z0|+v+]'Z@6MW   
^Y7W*BN$g`,|)}   Request timed out. B {Ww.x'ab,i&Ff
  
l\elz*WM_f   ………………
3{)c` IzWU   
9q,y7t:E:g:~"V/e1K   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 #E8Wg;wh
   U0G1c T*v
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
VI%J6]N I$dDg    l#_9w{ F?
  Ping statistics for 202.103.96.68:
-H"ygD:qoa6{   
*K&p-x_S,RhFl   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
*[Xi$~I[    A(`&A t/x4TF)n3Q
  Minimum = 40ms, Maximum = 51ms, Average = 46ms
jA#G:`2fxI   
4ZC h'M-B&|#i   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 O~;_G@g M)n6h
   Q h9k"[ ]Nn
  -l size Send buffer size. g#BN(^Yq
  
m3E1b2^C_   定义echo数据包大小。

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

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

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


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