捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。 6j p)vty^*{
  
rW*mkY?GE   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用:
"cY+kH4m"U+Y   
@\T[;@l   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
!na0P4Up%L9P A7C    ,P/uj1|C q&x*iP
  Options: 3s%gK[|x^ l X Gz
  
6k3WA,E.o;u|   -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C. ^ e \ ?&RYU'UO],q
  
eJ:S9G LX hI5kVo   不停的ping地方主机,直到你按下Control-C。 ;ut3~g\$z y
  
+VXK9~8Gyi |?   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 AU;y S lJ"]
  
|o~q&]4Kz   -a Resolve addresses to hostnames.
!p;D*zg o A~q    "g!\Bg%?b)[5OB
  解析计算机NetBios名。 |Ksysq L*I.g
  
5C(^}8P7Pdf   示例:C:\>ping -a 192.168.1.21
]9dg7S^o*L1Z    .~Q0~ f/A3zf
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: c)tt KNj wY
   2@}'xqyT%lP5Q*[)T
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 |N2P#t7[MG
  
&U'J UX$M8]   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
(}gK xNE:@   
'xH;m.s8`4h]   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
_R4mzu*f8E7~DpKK
i(|+\M CI   
`"?V P1Y^0TI3W   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254
*x+~n+C|/EO#c   
;UgcOa/B;_iJ   Ping statistics for 192.168.1.21:
0h5hls"j4`]    wk,B+v r)Q/_*t
  Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:
gp C$Anl    M7XZI I
  Minimum = 0ms, Maximum = 0ms, Average = 0ms
B:x!l3mo    d LT$H2Z
  从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 v-x-jA2W
  
CF;CMh+O)[aP|0N   -n count Number of echo requests to send. K _#?d6]E
   *rtlV}
  发送count指定的Echo数据包数。
1? h-U6Ir\^ mN    u:Q^/x"J\GM(~Z
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: ;[sB A+YU[5E*G
  
}{__MI:ZX   C:\>ping -n 50 202.103.96.68
1in a J m+YK   
Js9r.E/qo_   Pinging 202.103.96.68 with 32 bytes of data: `|7YX2xS
  
{q\7acr%z%u   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
U#gW Oun   
T;D k4R5}(W8Q kF   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
3|iBj%^y&c    B0EFm` W
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
Y6Pl|-x'Zn4hL%a    )_|No C|
  Request timed out.
Pl q2d5]   
t4_`$} T NT&@qQ2d   ……………… No l7Q.?-N
  
{g:[8V&ZP[Xn$y   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 *}YH Eo3c
   q^R.H P~ kg*kg|#Q/Z
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241
[| f9[:`%zB1i._/G   
+F:PTL Vf   Ping statistics for 202.103.96.68:
\A5FW"sF[    g]6T8V([ I
  Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:
F8s$s&|JA zo:za    MZ1z2v AL R
  Minimum = 40ms, Maximum = 51ms, Average = 46ms
cMR"e ?+g0\    T1? \2Rm[zN
  从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。
5{nj-PK_6HX%f9^6T:C    !IO%o"z(etNP
  -l size Send buffer size. pwd&} TbMb*d
  
Q{5d)FTW   定义echo数据包大小。

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

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

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


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