捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
{!~ u gS8m LT2m    0yyO \&P4UM6Q,@
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
e4cu8_)h upn&y   
EB,O J$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
#S9O/iM"DUp    QHP'^ ` q {
  Options: %NR)zy-ec
   m^*eZN6_.r6qrS
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
OH WtI    d*}w^ s
  不停的ping地方主机,直到你按下Control-C。
L-OI\.[    .\1i"Nv.H{
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 /w&^P6x*xZ6]AD
  
j3m cLp'L&s9V   -a Resolve addresses to hostnames. +K:yWX U
  
Yut$B'MR1i   解析计算机NetBios名。 ){~W0A:A+c4_mO
   1Q%ww4r$MU
  示例:C:\>ping -a 192.168.1.21 d/O[.B B+V5~Dq p
   L8H!pl!mqJh
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
t!IMrfvf    n9jpqk1L
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
-Qq%RH,t a't    ?:L|CuHB
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
8bu+gBq/X]   
Y KTcj2r]mz)P   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
^Psi\~"[2Iu |.DqM@ N$F d)m0@
   5L1z(P.}R[8u
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
Ja1Z TA {8lPK   
,h~L1f+Z"Dp8_!A   Ping statistics for 192.168.1.21: j1@#]!R4P{h4I[
   mP s*H'O mp&n
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
0H7]FR.Px+X   
QR b[2yn[   Minimum = 0ms, Maximum = 0ms, Average = 0ms
.kH2Vsx1Qx M   
eXUS6F3n{PW [   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 wG }dq7W
   "nm\*}6v#h8d
  -n count Number of echo requests to send.
B!f&lGiPS    da/J I?m,d!T3K
  发送count指定的Echo数据包数。 'I)u8X"Uu-NU:q&T
   +Y7@5c {$s9O\.Q:I
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: y:^;r~T:K y7Z6uQ
  
x\0MZ)z2c5tG)A   C:\>ping -n 50 202.103.96.68 bIy6F*U Rf
   A vp@:c!T8G@s7Z
  Pinging 202.103.96.68 with 32 bytes of data: F z-dgD#Wr
  
-ID$ME)dC4x2i   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 E0vQ,[x8|/B%Ka
   4\yk.jo0Mr0m
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
m/Z$a5eg    W|)l/Mz3S3H9K-\e-A
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
,E_ p0Y6K nE'vZVS    9eH X aLA
  Request timed out.
!r8GXY+JL*[(R    )N|C9S P-^$e9`4c
  ……………… '}-re:p1u"AIe
  
)_ U6TIb5` Q+]   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
f9I;Y \6Z   
w)ZF[,aRc4V+q   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Mx'C?hO)e:~
  
(w J| n!A/|L,t3fT   Ping statistics for 202.103.96.68:
7e8Z,Q9Z!f    c1i]n1pH }:j
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: %oMi{`+d)I,|o
   SWvpm
  Minimum = 40ms, Maximum = 51ms, Average = 46ms {&y&EbgMa }
  
d!?1a"V} A   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
;R0XO)JR+v    [K8`$d#J T
  -l size Send buffer size. gp1La5]*oL/_j
   {:HbeFT
  定义echo数据包大小。

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

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

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


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