捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
jkb m` RG    +}wx8dW
  现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
l?v$gPz   
'x-ZG{"x?   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 *Z7jHS$x|$? qL
  
7D}7Cx/cN   Options: 7?8Irv*Z eq8s
  
!{m.r Z\7k+Q   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
$A*}(Q6f(m    RP'[-y7Hah ],Y
  不停的ping地方主机,直到你按下Control-C。
yw&Ao(dhg5CY2cy    j FX\Fp
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 %Zm4K0XL!s8uu;v9I@Z
   o0Hzp,@ _]%[\`
  -a Resolve addresses to hostnames.
+Jg*`TE   
v ijQbR   解析计算机NetBios名。
|o1on9?^3`3k{ N    |@z"O2[M.^G
  示例:C:\>ping -a 192.168.1.21
&n#Y)?)]+i8p(N j#T    E6Y)v8^pK.FAa\
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: K1vg-X.Y9B
   ~0N7Pd-G-Rf6\
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 5sx;j.w'X/c#[i#D*ge5wE
  
Y4X| pS:Q   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Z&A@$kZ+]0O(X%q V
  
-[9Udo6t$c#O   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
e R,ID;A-CxW:uV
IT/t2b-P6zGo*H   
$n%S+Q)s@ a   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
'Mz*T/U!YKj    6J Fwzp9|r
  Ping statistics for 192.168.1.21: {E$jr2k
  
| U)`5cWJ)|NXQg   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: ^ b;}!g_S2^i
  
5uN-N-B%]%qS   Minimum = 0ms, Maximum = 0ms, Average = 0ms
.PWZ0~H;N7~$O!u    |uP hQ)K1T
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
x9?*^1K0{KG:h5}    GspS%z_ M7Q5B
  -n count Number of echo requests to send. s]ps d|KF*h,K.o
   ]m w d,HFu,_b
  发送count指定的Echo数据包数。
%`ag1]x5?   
_9Ekb:|_MM   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: :P1Z9?fD$\n
   &g)yh |*Q!b
  C:\>ping -n 50 202.103.96.68
Xc/kfe~M   
br;m Ts~E,sn"K   Pinging 202.103.96.68 with 32 bytes of data:
bR+|,J%T8f9XV8f   
I} K4|;MG   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 nx b6X#i-`?
  
cr`"mi m5\,r   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 4kBh$vKF C lQ
  
U o`@%U   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 FE,g8}$Pjo
  
\][-^qQ!rs   Request timed out. $K8M"JLqs6f1N
  
[%bIE?NF-?   ……………… .n1YK&LxY4w
   1ki~nYrvyi
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 y!@ViD%S"X/px
   a}xJA2?,N/K.[
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
W9a!F8t@j7vkP'g   
T|6Q [b   Ping statistics for 202.103.96.68: ` Zg'KS#Ic
  
+CwG-`[3E`-{   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: 9Q,t&o%gaA
   [;| l4w,Qh F X7qD
  Minimum = 40ms, Maximum = 51ms, Average = 46ms eE(u{7f
   V wOc4uIf;h
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
2m$[!e5Uf Z8mb    p${EX9o Y
  -l size Send buffer size. /}k+on Q#yJ6q
   4K9|2eo(d$Pp
  定义echo数据包大小。

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

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

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


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