捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
5LluJ8?{1EnU   
t5H8tW8Hf I0gc   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: 'wW#Pr}r,r
  
vt&| c,x3K\Oh$W-g   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 h ^bX.Q1t[q1^u
  
.O%p _&qZa   Options:
z/tTH ^ B    LqZiQ-E
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. 1C*zD.R&K ?
   p,C/x1Gb L&o B
  不停的ping地方主机,直到你按下Control-C。
jY g-{7in;ORw   
"G j$a5ad)cC   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 )E9m]9\,w'^F@
  
voUp1UL C&d4U   -a Resolve addresses to hostnames.
/ejI\1q(y7b   
5]6s.u|"iU'M   解析计算机NetBios名。 Ol yLT+y
   ,s/uzCb)i(o7~:}
  示例:C:\>ping -a 192.168.1.21 !x?gw2u3X;U
   .\Hvi&r(n@
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: O#aK@f
   v qS}2C9qUK4P)c1S
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 -XF yU\s
   3pgk"sf
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
@A3e7{xD ?    A:V\gx Y
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 K]"~)vk:]'M M

2}5I E.k s%P;^3JH   
O.k+a*DWS   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
d9iq&kj2y0Si;W    &PP8P%JI7cT
  Ping statistics for 192.168.1.21:
4E y&\2JGR"L   
5Z.\w.q%Xf'w-W   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
+S8OB4^$z&oU e    3nA.i.D0X[
  Minimum = 0ms, Maximum = 0ms, Average = 0ms
1Z"EtF*m |5Fw~u   
K@/qN j1Nk   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 H0S8X3b9n~ l(m
   \z?1rb!y
  -n count Number of echo requests to send.
0|$o'G&`A T   
'L-NZ B#}~IB   发送count指定的Echo数据包数。
4Tq0e2J2|L    mI:FJ4u9cu q
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ,t2~)j E2a Z `1W4tn,b
   +kz _o-V*]QO%Pj`
  C:\>ping -n 50 202.103.96.68
W+a2v)j%l4mC [M ]2e    #U'TZx4y%N
  Pinging 202.103.96.68 with 32 bytes of data: wj2m-~a4hX(d
  
Sv_#FII r   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
d S;TG4L   
R,?y,S8A   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 (v,n:n#K!`*y+[-Ft
  
xhuD;H0h7O+?A&kh   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
0w M;giR    z8h,K&J2[w8WT5n
  Request timed out. h d\V#X$IC1bM
   j!p+]$~i!B _
  ………………
T)YAa X1R    Dj+}8ry ~
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 "a|I+kj3LWu*b r;{
   l/GkB#nVz
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
UAR9x,I,L*`/aj }@#K    ;c3H"p'F2GU} hI
  Ping statistics for 202.103.96.68: (lq({7Q(G/g \3mT
  
ve${!`O~L^6?^   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
L:Rpp K FhN    :M"X\ i/o*rM
  Minimum = 40ms, Maximum = 51ms, Average = 46ms
l#T7S5D@I@    0TS:^a B?
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 l)e R*b0[7R
   $yyL6iiDJm/D
  -l size Send buffer size.
a7|8r \AU,U:dwH   
#w8Fc$T { xQ   定义echo数据包大小。

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

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

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


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