捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
$f ^XK-}i    *J"DN lfV&C
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
Y`8vc"~SI%g    .H3}.I#@p/A
  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
/| v1~Rzg(yp   
R tK"C q#y   Options: u[de[$Pg0t
   S6UHU'O)i
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. S4c8CK~ t*H$J
   oSK ^2}pl9c
  不停的ping地方主机,直到你按下Control-C。
` mhG0k%c'P   
4j,m tS[p-E   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 Ox-T!Ty}R
   f0kRA Z8bI*V
  -a Resolve addresses to hostnames. wv1OXCO
   Jm HdWO,V
  解析计算机NetBios名。
E,AwoQp    :C3E5d!`aN
  示例:C:\>ping -a 192.168.1.21
z(mAt so3[4})w   
7WzE+{+K5y ta5d   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: ZVd S$]J:rO
   4r)j ?Teqw't(D
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
1Wc x Lul"Q    "x;sa*h:Y!v6c
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 T|4RLc;KKUn"YQ
  
r2ej}"mO'Ye0U'S   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
[#Y?2d#s0Di0|@ 6l*dhx"c8F
  
O9V lg[CS   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
hsC#pbp.R   
9Z_4llRGyq   Ping statistics for 192.168.1.21:
)Q4]_5]-BL,N3uME    es4Md0U YH s3V1`
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: ;K{g@t:s] p
  
Z5x$ab"X   Minimum = 0ms, Maximum = 0ms, Average = 0ms @)cy"Ps"v.F:~
  
3SG2~iPk~ZyU   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
5M2NuP7H_b?-~   
/UK+c,sA#z1B   -n count Number of echo requests to send. 0Q?4l y.S#Oj |
   8w9z9sNO HY:Ho
  发送count指定的Echo数据包数。 8B UA3t m/C3r\D
   (sg7m!B*o#i}s#v1c_(dj
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: LG_Y4F4h [~V0G
   E,?,ow7m g
  C:\>ping -n 50 202.103.96.68
1p#^w@2UN(tJ} h    0I}xOV\
  Pinging 202.103.96.68 with 32 bytes of data:
w,i:?b/h,l#GmSG_   
|FT\W$^r   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 [e8c'I I.dP!y3H
   -YNzD'Ed%xv
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 'G'^Kt h5xK$mG
   +Iy j c@ap5r!CBv.QG
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 [hn2E Pj1h
  
/^ yGZTD6S*dj   Request timed out.
jf.wA_/Ll3y   
Qh,m1O+OA;d   ……………… 3hNQn3Il VS9X(J
  
!s U D mP/K1P   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
Z v n @/f0It+isb   
.a AJU/BJ(CQF   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0VGe"Mr^[o)W
   6|1Sz7U wY
  Ping statistics for 202.103.96.68:
InK9]gqn   
Wa8] BAh-C   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
V:|W P2\"s ^   
p*?)H@!e"Ry#Y E%z   Minimum = 40ms, Maximum = 51ms, Average = 46ms (lV/P&~zk0b[
   eM gdoLK4a0A6F
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
fB4o;~'PG9zt   
o7UI V2?r-X3s   -l size Send buffer size.
7H2[,a.MA:m}    an:g] x
  定义echo数据包大小。

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

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

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


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