捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
m9k6Z#C[6eM7N$kW    UtJ1D6?K
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: e/hmlRid,^
  
&IZ i$RW?'yd   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 5@ [~6h[p
   BP]6Mi)RV/X#V
  Options:
GJqi _i5WQZL    h&d o,{ V%N#rVt L
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
9n-Rb7Q!B*{    n,G4B[ u `
  不停的ping地方主机,直到你按下Control-C。
0ZX{7k#bh6~ew VG   
9V4P/rx;I;{   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
$e'd:ZIY2a    C yQF-~j
  -a Resolve addresses to hostnames. x#rk1i xgt.?fD
  
Ac*C}Jt*V7B*Mk   解析计算机NetBios名。 )r-x U/Y*n7q%Ec^?
  
G-|R`/c.V   示例:C:\>ping -a 192.168.1.21
3Bo uI q@%y9F   
"H5v neg   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: &Hi+m} AD&e
   ^M Orh {\1}P#cm
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 PkO]q2K(U
   Uc9HS,XbY[
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 8C;Z F~s$}:h
   -TY+wo9G
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
R6w i7}6p8SVP7?1@
/l u!ls#}    N6V1u;tq8^O:e2H
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 4`x^?-LV.yRsI_
  
%f$XA2k+~8o Z   Ping statistics for 192.168.1.21: A)?ZdMm Zb
   S.DQo1\s1B
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
TX#` E!jl#v.J9J C    n%N9a m(X(Q8c3I_.p
  Minimum = 0ms, Maximum = 0ms, Average = 0ms %D XOi^up
  
0rh8BA!R9t@   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
H5X-s-@/k0tD%Pk   
)y d]nnBf   -n count Number of echo requests to send. ~RK]jQ0\
   +FG5\E ?)x
  发送count指定的Echo数据包数。
J KlGcj#b    O"nc,X q#~?I \
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
)lYo"|4i'UD    &TzTU:KN
  C:\>ping -n 50 202.103.96.68
c*V*SG8P;i*L2k    Bb(b Q;iy,[;a
  Pinging 202.103.96.68 with 32 bytes of data:
Q`9ni-ul    E%uzn*|c
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
hBL8I'\;?"dO2Z   
!TB~,u#E9i@   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 ;\U1[l1m ]
  
8s0KM+aEk E7_   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 _(vVm#DJ.uktx!n
  
1]e+lV%c sf   Request timed out.
:Y3W]IaC    3m td-hX
  ………………
6L;U+~2Mh1Et-v6tZ@,@    ,}ps4tt)K4]_3^7}
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 2kW`rF(E
   "G&z/D2JW Rv0KD.e;[
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
%V!I:oZ-R2k*PNhr    uW*t5B s%b ?
  Ping statistics for 202.103.96.68:
v:N{r.t.g ac"c   
3G @ aj gc-rpY   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
Z8kj0_p'qb U   
#MFZj"n:Bq   Minimum = 40ms, Maximum = 51ms, Average = 46ms
r9?})u @Pn;Tk    ~.zD _ZpO
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 1h4I i_b$`#[Q
   %K-PMFjtf%l Q
  -l size Send buffer size. p2]9L-@ Ru]7K
   \~.LX/k1v l
  定义echo数据包大小。

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

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

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


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