捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 G.J'W-d)pF4G R%^r
  
8L%u/XmZ7dMQ   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: !F$h&S8Q-hn TD1nh S
   ;o0tw$c:r0W5K)?
  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
:S+yF7h!QoI+G   
)\ F S,v|r$T%~   Options: *qq!f,_-J*K
  
]/bm?8F7x vG*R   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
2S(J V,j{2Qi2U   
,?u6_z3v B.M?   不停的ping地方主机,直到你按下Control-C。
'Bu7eAP ~2|&y1V a   
7un/ez\2}#Q,iP   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 R I4O;U gt$? fr
  
qD?&k rG iQd.D   -a Resolve addresses to hostnames.
b{M*Af W    ^6B n,i9ns
  解析计算机NetBios名。
hH,rPye+G6m0d    F-D+C"U4IbI
  示例:C:\>ping -a 192.168.1.21 G6b Y"C E3N_*U
  
3j%lz.W OO   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: G EV)U2{#g
  
L(K)@qz   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
aO~I {v]3R   
xU]6djSZ   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
5oHTfV'fj `"N`5\ n    K'[nWR!HXh N\
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 }2a$F;@T1l

T P.wav`%P    E8q e bCMV
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 zn?lnCMXNsm
   k5@6WOW!{
  Ping statistics for 192.168.1.21: 5_Q+JUh
  
pco4Ah;x g/Z.m6eD   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 2B t.v1kgG't
  
N,H'T-yS+S/GC   Minimum = 0ms, Maximum = 0ms, Average = 0ms Z ?$q(Up n$q:vR
  
K.~`JB7y o   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
:ZH/DK~w%Czqk]   
a-{$f(FR!i z   -n count Number of echo requests to send. SPw:Xw]
  
P5H,t`)[U   发送count指定的Echo数据包数。
7r1\tK#S C   
pa(YKaN   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ;LN;ko BMk
  
0~7]C4k }:N_,|   C:\>ping -n 50 202.103.96.68
g{.Rou%W\b    $ae e(} JjC
  Pinging 202.103.96.68 with 32 bytes of data:
7L-\)x;t Ad7k(q"p   
W*|*rn H-L#j   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0M J t-pB;w#ET
   8Qo"GdK
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 `$mN L$l;s o-B
   "A1bl:o'S6]} pr
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 aG*AM_R
   |9j"I|;{F
  Request timed out.
Ah-q { R2i {   
.t%} J/s3Z\   ……………… 6]Jl6UF
  
L5n$W0ehu~   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 5Cl,v \5bZ},q
   J4C7^,`B0l
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 _J0F/C;w\GT
   ,juN#L |
  Ping statistics for 202.103.96.68:
q m,k4UT|` sQ-t)x   
B%k h;H/V   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
T7^!t4J0oR2@2n    DrO#rj{C7B)H9@
  Minimum = 40ms, Maximum = 51ms, Average = 46ms
)k/^$s6l8W$u"N   
~?t1^t L}Z   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
&f M9jg)F)d!Y2XX g    9L.XT6lC-o.q_;^
  -l size Send buffer size.
6]"fNU?'O6I   
7}WHp^3C!h+I   定义echo数据包大小。

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

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

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


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