捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
WR[`v5?:Hj   
I1fno/qJ_ i   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
V1])]k(qr7x"[Y*m    e/?;IXC*h Y0?t4H7^
  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
E/|wEJ8nG)C-] t|M    |.wezr9VQ
  Options: Or:]&Nc^z6l
  
'nS)UV1wV?.\+y   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. )HZDUtI8vv+G `
  
4tf9[+A${Y f   不停的ping地方主机,直到你按下Control-C。
F`H.^ Zb l.O    \-] [,]m sa*H
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
p;r/{b aj6Qq   
B+nt0`{B   -a Resolve addresses to hostnames. 0[B$[y,ue#ol
  
;I1teD,X*@ojO   解析计算机NetBios名。
H(D4A3A^   
8}2E8N#@ T   示例:C:\>ping -a 192.168.1.21
,~"gOx$o H   
i GGf$E^   Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
&s9OB0N*WP/n    $k.r D@b3[
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 :qA']{_.W7h
  
B5`2aI!P X#Q#V Z   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
/K3l9]rGv3Od+H    ,C q%t\%N$N
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
*?.jVI zIT }6G|i2yA4@^4BR
  
,uS @q#q},UM7X   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
6Eya1]0X?)\~   
` q ` ^0f   Ping statistics for 192.168.1.21:
}Sp'd+K;S   
&zPG Z*My0?7}.C   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: P2UD W2REs6~1s*g/Y
  
)iA;[$bXbD2O!?CI8R   Minimum = 0ms, Maximum = 0ms, Average = 0ms
S&]A(S#Sp-hC    "_ s{/K TUr^
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 fW$L*`(X"`+| L
  
M'R:h b g__T   -n count Number of echo requests to send.
3t _}+?V's\C}}   
Y1Aas WHZ   发送count指定的Echo数据包数。 `"u]`nh
  
eM^I H\   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: .IP4irf9^
  
yO&E8?/tV,t   C:\>ping -n 50 202.103.96.68 -Y\g4yQ Ica@
  
g7\ _+a0l-C   Pinging 202.103.96.68 with 32 bytes of data: 8eq0k%{;p5X J9l!I
   @3C&D7S/c^]
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
@?{+DB%o"O4?    D3f6p@]c`+C^5I
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 P3aq ?#ub:b8^ZEd
   ]o ?*ktbG
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
#b5Z_?'_1Ut   
h"vp*MLWU/PSee   Request timed out.
L3y/z|rB"m!c2q   
(Vu T6U.}} }#t L   ………………
-jq @6z8j&m   
A|q `.`D2O Nl+Tk   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
gd1p+kO    ^n#PU!ud
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
0A8Sm"t4^){u5eW   
$[B(A!?3j&} |:U   Ping statistics for 202.103.96.68:
4BX;mCJ9ud%D    ?"M D S'v
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: %i#V}:E6g9f
  
fIC'O*A+VK{5Vn   Minimum = 40ms, Maximum = 51ms, Average = 46ms
r R)B(~0wk`    W-r%c [7m#[
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
%w(Bn9Hh/z7f   
'Kr3K.I&yT;|   -l size Send buffer size.
"I_x:~@8XNV   
%`-mrLs.|:|5l @?   定义echo数据包大小。

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

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

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


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