捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
'q&Q&cb5}Tg:H   
sk)Nv P QL-`;D   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: 3Nc*\"c5[}
  
hdn\%eD&|   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 |lmnL[3Gv4w
  
.^JA0s t5k j[}   Options:
qS8R1Ff5hve{^    Kj!K5e C3H6|7_7u
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
9\/o(S0i,a'm~5KO{    ~Z[)h$IHS#D
  不停的ping地方主机,直到你按下Control-C。 dv }$V\ p
   AP;F%\,U*`
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。
E8L0Y(KXz|)dBw8i   
kQ`LY ]t   -a Resolve addresses to hostnames.
8O-Y Gp"o/f$op    2u'S+X&_.[Ju ~c
  解析计算机NetBios名。
"D QHC#[rogmN   
mPBu8Obb+RPI   示例:C:\>ping -a 192.168.1.21
1Z4~!E wh(M:g:E,Mx,@    ~5V/S FT} pr
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: *Yk)QJ$n4^
   O0c B"f'Jw bw+zY
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
[$_C ct7?   
UC6B3ORRqF   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
Eq7?+E4BMw{   
0R)c Kp%] q*Jg][6O   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
7~ ?J#b*l-G2_
4Q.c:Q;}Yg%U8EP    ;A_ i7A;H\1`*B
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
;UI0MLj3o!D    5l"l(S"r(ut"p
  Ping statistics for 192.168.1.21: ,s.j#~ g j4}#A
   -j T5O }/op
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
/L9DY7] kHT\   
Y9mTU:a^\F   Minimum = 0ms, Maximum = 0ms, Average = 0ms 7d0TL4~0Y^BJ)Mu
   !z"P^ YKI/eQk
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 3aD5G hu
  
)xnYtSA;Z   -n count Number of echo requests to send. ?`p3xS
   !L/n [Mh;r)\Cg
  发送count指定的Echo数据包数。
L X"[;rs}H@ h6U   
-M-D}6?o"a   在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知:
7y m"W*r7Ho~h   
"q2zhJa)v:\t7u   C:\>ping -n 50 202.103.96.68
ib`?#i*}q    $u1YX `1h?tm
  Pinging 202.103.96.68 with 32 bytes of data: Hh7C%K)Id'o8h%z
   9y p6b;{W*e
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
.n8u+el#Ti5Qv$m    "C#q;te U:\B3v
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
(e.^?4c AS*~*K   
0GaO%mt   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 0W1Zi)R.u:L!An.L1b
  
)OnuywgZv4` { D[   Request timed out.
Wk.R)~` o.{   
w ]e{{as   ………………
%zAcs(aoWc   
B!yvT"a"fVrk   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
#O6?g1E0t   
6} bEL]A   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 au&jF``d
   F+P+[!D#v4S2y$h`UK
  Ping statistics for 202.103.96.68:
k_OrN`n   
{j4My[H%jh   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: "Zf1yy0Zyo)i?
   8zC1aV7X
  Minimum = 40ms, Maximum = 51ms, Average = 46ms x QG.x9IyG+k0b
  
Um9~L\'SR*R   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
3n N-H#I.\EoG!B.x   
hq^s*_6Db,Q   -l size Send buffer size. Tr/k.v5nZZ$r
  
RY!yvY:e   定义echo数据包大小。

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

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

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


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