捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 LSk\F7z{Jkwl
  
9ol-@-vn k   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
U4j'XoK   
:OO]A O-k7Z3ej   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 )KaVxC2[
   #[;d `*\g E ls`[t
  Options: 7Q\ I k*L.t[
  
E C8KE!i0Mj8O;o%m2_   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
mNz0`R&k    nHY }?#~Z0Z/^
  不停的ping地方主机,直到你按下Control-C。 h/R4D5e3A nf.g4S2z
  
Qy%} D\ M'd   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
q${~)v)z   
,r xg3Q^LY(E aTU   -a Resolve addresses to hostnames. }&@ Y:zfKS8u8q"],y
  
*^"v6j7a![   解析计算机NetBios名。
I M0t)?'@,L2f#Y U$~    m f \6D\(N\F#pYW(z:J
  示例:C:\>ping -a 192.168.1.21 bC`M;IgC5]
   'pC4\A/J%x
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
haE[*c D)I;hR.S   
mIm-U h!BpTah   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 :r t-p0l2U@e \
   e&z#U+BY)SfU%z
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
As0f`)E[&s2_   
"E r"y:i;P-VF   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 nI^5`5\k_p+^-s
.W/Uy#L;i4Vf YN
  
3c$f(dv{2G!}   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
xkMxz3T%Q    +xd \c)g R(C+C
  Ping statistics for 192.168.1.21: Q3Wuq ^0Fr
   [9N@]/aW]+mT
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 0_PL'| { },sw
  
7L*{{^4[P2R T   Minimum = 0ms, Maximum = 0ms, Average = 0ms /Q3g)g`9Z
   R I?/m/M
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 E,Q,e*p&Ea.{K3O9N/]
  
3Ps6M:KW N ]W&\0y   -n count Number of echo requests to send. C2]C^5^aj'a:p
   6_Z5ub4U
  发送count指定的Echo数据包数。
E/FE'`)V0i1T.m8kE    ~/AxI k Ck?
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
pJnD/sm B)A"Eq    )p:~6v8g,heb
  C:\>ping -n 50 202.103.96.68 +_-|AmT-H8W
  
!_n#nQ Ho$_3Y   Pinging 202.103.96.68 with 32 bytes of data: pO9^/mmHwe F3I_ `!i
   ${iY/AS!{'Y"c
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 n5`?%l9L S
  
| v vo#zhL)q   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 $AS`2DT'U l
   EG5A1C|1~
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ?5H;TI%n6D
   ;?7li'N5F/c^
  Request timed out.
r'^4QeI}4`    nFn9N F F} rb$d
  ………………
E!u Ka$@hy   
9n6pRmR   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
`'zt']#PX   
:tUPn mK!Y   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
w-t9}O#P3P5GU   
1F2Q3bGy4l$oz_}   Ping statistics for 202.103.96.68:
c;j'[ @%[}o-I0|   
0C y5T8rnZ6]U8xD   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
L8D,B-x%PW2fF   
o8H'h:ij Tpm%~   Minimum = 40ms, Maximum = 51ms, Average = 46ms K[}:f }x&~,Q/u
   r5~%fqa
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 d a O@`8H6L |?
   &oxk(k~;n k
  -l size Send buffer size. ^9_'adGe f$u
  
FO2hP%qv   定义echo数据包大小。

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

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

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


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