捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 'ee!hx(X0i
  
0S!tCng   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: j I;x/p \Bc(\
   AE(hXod+q j3y+P
  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
0\ H:ggE%o `   
Q9O}ZO$As0w:Yq   Options: "r@d.EL&x
  
3@4p6xvQQy   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
eAg^0}   
Wz9pIiC)K   不停的ping地方主机,直到你按下Control-C。
D8z+y1uZR3F    q2oM-fE6q
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 ,~M*]Zv JS
   x[r9{JaK@
  -a Resolve addresses to hostnames.
z#gCOs3r ig&q/q   
4[@)w4qNwt`   解析计算机NetBios名。 nmo x4Xu2L
  
6[hmjeq&z~g P   示例:C:\>ping -a 192.168.1.21
Gb~(Q;WT    9D*Gl"r.M T
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
\oL-VsdW ^   
\6[5FBVb   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 \'h(Fh/Z)K*q.a
   7b:z ~%Rr-J
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 TrqIcfI
  
HhW cUR   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 LU`(B#@L
,P O%L$T"r(Y O
   s^w_1Pe
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 z ~mKS*q
   (nUB,qr/t:n/BH
  Ping statistics for 192.168.1.21:
q0Gl&M^9@z!r!A   
/D_N!y8pz)d   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
|/g Z$PE5J    l`w tB In
  Minimum = 0ms, Maximum = 0ms, Average = 0ms iqQY)T ^
   2E0a.t6R-h"Vl
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
RGmX5e    M[pT:]L]
  -n count Number of echo requests to send. Z_ B&ZL Q/B
   o/B;jB:v(uc:sg
  发送count指定的Echo数据包数。
Oz.cH,oQ    `pz?!}9cYn(Tu\
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: K2j~N,B ^6a
   |8k6Bs/d$O/u%S`(gE
  C:\>ping -n 50 202.103.96.68 6P/j5C5B`S
   m'_;],A&j
  Pinging 202.103.96.68 with 32 bytes of data: ^-w`V)W+s4VI@/y
  
%\6SM/B#t(FA/Mm   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 O:I$oV:`o
  
cq5E Idp4v   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
n \)TN N@ j$f7H/h   
cZoe$Tv)r   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 I uN/^#[F7Y#|.D
  
-uY0Cw3mv1d   Request timed out.
tJ@%lv:w {!F]   
zV ]i3n]q!\}   ……………… 5D/[,Iivo
  
rE#[Bw X-X   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
*G$~9[-];N:y%m kq*h   
#y8ovr,_!l   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
SA)dlD    1@4} \g_ t^v
  Ping statistics for 202.103.96.68:
(prwooa    qJx0P!`1LyF!x%k
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: nW8~]m0C
  
7MWe v7c(s   Minimum = 40ms, Maximum = 51ms, Average = 46ms
C cyV,a-T;~;} a   
}ihe k   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
Y.Z4F m6ww)g    _/Mc:u&X@8D
  -l size Send buffer size.
kk/?8pV;Ya    |-`-Q'F}q{%j8|w
  定义echo数据包大小。

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

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

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


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