捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 6{,T9rJ2G5H0D9O1m
  
hbb1[G:[   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
)o$[%qK4{~m+k   
Bn5F&v:~A3oB   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
&?&}b'r5|8j    q$X8~l?
  Options: 4c cRs1K~G7\
   V3zhJR!f_ `{
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
oF+A#`T'B b6N{u(|$R+P   
&fQN:uNR Nj9VI{   不停的ping地方主机,直到你按下Control-C。 |FX/o%m
   QA(C_W6x1M
  此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 1o I6Ku$~&MbtOG
  
^s$]U ITH   -a Resolve addresses to hostnames. $n/^yEC/~|cr
   !r`-vQH
  解析计算机NetBios名。 y#f\~| z
  
B*t(fW1lqO   示例:C:\>ping -a 192.168.1.21
&DpU b5VLb    T mvO NA1h
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: 8@Ff*l!_J/Ceq
  
'~j jQ@"Z"i7NI   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
8I2v"e I_cu!K6V4c!N    b/s3Un C xD;If
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 k6_a/cOa
  
0@'n3[|S5T/|   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
6y Ir'E.d?d e4UTS"j
  
Te)J u7h f-?   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
t3?%nG,Q] H ^W9]    3Z:Q"Sc;Sga2~nd
  Ping statistics for 192.168.1.21:
z0L*{d o-W l   
?MpJ*rQT   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: 2s$V9j8|x1y
   1tsXNX.X9x3@0N
  Minimum = 0ms, Maximum = 0ms, Average = 0ms .gaWdnM AD
   '|tGy/K:\0A&[5t
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。
Bv J_*d(r%j G?!G    N5ys?8a y e1tE8}
  -n count Number of echo requests to send. 1AAPMK{gE
   K@;q V7l*D
  发送count指定的Echo数据包数。 {%h `3zn K
   kl`N|6a2`$k
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: n/foP4x!V+W-J
  
hyvx$hF   C:\>ping -n 50 202.103.96.68 .G#^4\x({.N
   !R+C$c({ Cq$W
  Pinging 202.103.96.68 with 32 bytes of data: ]8y"si"H:gR
   T+p$x;E6c.L"K3Zo
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 'FnS#{9Uw$l
   tn/{4^,w"G:s R-KJ!v
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 *Q `?f1n#O
  
U-gZ^L~&o}   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 uBE&M0B,t2};CW
  
6Eo*Y~jSL   Request timed out. g.[ s}Y S d
   l7HFd.\Z
  ……………… 5FX%@\;r3L$B
  
;Q1]&x8W%U4B   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
T9~WH8nm   
oh$VP1Bn   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
r _~3n;n p}hYS   
b,\7t*Io2PI@8F   Ping statistics for 202.103.96.68: ?1xbP~9J
  
Zn0_r6I j   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: Z4~nHqF @mH
   $?8r)pPv3AKpt
  Minimum = 40ms, Maximum = 51ms, Average = 46ms `+{#e$H M ?~z?a$J
  
Q5Az"q3| l*Hj   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 2Dd4J-|"h3vE/b
   ,y]{(I |Ik{
  -l size Send buffer size.
Q3fRd{ Je&K&P~ hr   
0~^EW.j0W;H(j{   定义echo数据包大小。

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

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

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


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