捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
,{/sz }T3\w   
%E*[^3_g6G   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: D"J#@W4Ve
   hy-Z#e] ku#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 5s~^E2Mce,Z3|
  
x~L+tK+PR   Options:
I/^2dVR.Eo   
kN8@p/Q;f ~_   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
rsp WH7sq   
.G!nA-H0x7Y   不停的ping地方主机,直到你按下Control-C。
:u"U v3~[uI   
5l@)lD7KUj!q&P   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 9J.}e MV*g4G hwR
  
;cO ~av*t kYY   -a Resolve addresses to hostnames.
E?SyRVh   
t&d:lcS3J6r   解析计算机NetBios名。
v:xzd7b    ,C*t j-DP2kPv
  示例:C:\>ping -a 192.168.1.21
-Wg8m/m MEo*G8SN    *\*?-l8K9B7r }:E%^
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:
_9LBK5Y{1M1kH K    0Gwv c#l*z
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 "G$j fBa
   :{7w8Z^3`^(kWA
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
r@9kE0s+R;{m   
.aHm D4B   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
[/}q*K$f s-uL
)M$ie)Hg^@;b+M,E    jMz6S/i/[ @3v!GPa
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
/v8yv v w2^2k    6j3KpDZk.KCn}6P{1]e
  Ping statistics for 192.168.1.21: 4rN9{pj
   5m,ZYoB\
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: TyhFsSYI
  
[p_U6V*n$k N#d-F0l   Minimum = 0ms, Maximum = 0ms, Average = 0ms
QT(h2Bz Mt0y    1l;] G/O b:{#}S`;g cS
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 TsH6Mqs?
   NS6V}8N8S)NN
  -n count Number of echo requests to send.
8D+[z;I jf%Q0Wu;fA   
G-@Eg0Z:L4u @   发送count指定的Echo数据包数。
y${a kO$h.Tz2y?    :|:C*g]Qq-N
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ;n$P:j%up,f.o7y/T8E
  
U Q"Ekh   C:\>ping -n 50 202.103.96.68
6Dx^Db:{   
xj_BV   Pinging 202.103.96.68 with 32 bytes of data:
d1hTU-z ha    7qA&ANUxD2Do
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
b$e)E^#\MSG    4be O]#dJx K
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
g@$YTsK^7S.vqm   
t8zv3_v9S3KP   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
GED+~4YI9Odu    `a3I$i&E
  Request timed out. "BB bo s6M
   9o[[{7i'g(~iIOS
  ………………
b_&\#?;],\3P,oH   
'n+wJ K'sn"K   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
l L4C1Bd f;K6[    :W-ylFl
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
q1j g y)V   
3R0BA?L&Sz_'m   Ping statistics for 202.103.96.68:
'l%KR[h:F2a   
H @~.F%Gd7lE P@   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: +P {B@Z,i N;w'Qv
  
;snSm,Ty?Nd   Minimum = 40ms, Maximum = 51ms, Average = 46ms V{&C ?AE
  
*Z_N.Y{c"H9@;_ N   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
%r!CX^'}    8FD_ A2\)nN-{'x
  -l size Send buffer size. (CR7P.T U#f
   \Q2sA\ Xc I ]M
  定义echo数据包大小。

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

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

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


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