捌玖网络工作室's Archiver

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

教你正确使用Windows的Ping命令

  对于Windows下ping命令相信大家已经再熟悉不过了,但是能把ping的功能发挥到最大的人却并不是很多,当然我也并不是说我可以让ping发挥最大的功能,我也只不过经常用ping这个工具,也总结了一些小经验,现在和大家分享一下。
1{ pJ$B{-{SD   
2|V3rlQ`   现在我就参照ping命令的帮助说明来给大家说说我使用ping时会用到的技巧,ping只有在安装了TCP/IP协议以后才可以使用: #[t/t;xP&bA-a_za
  
%Pcv/y`   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 -~Z8B:]g\-I;WG2}
  
9Z WBl6@.B   Options:
r9[O#J.L V    f?*Cc {#` d c
  -t Ping the specified host until stopped.To see statistics and continue - type Control-Break;To stop - type Control-C.
fz]r o B;he   
vj5f;]NW;YY/h?"s ~$s   不停的ping地方主机,直到你按下Control-C。 v#[)df+y
  
U~ ^ i8f-C_G   此功能没有什么特别的技巧,不过可以配合其他参数使用,将在下面提到。 7p k2t8T9H(p!M)_Npj
   +jI"E.T` x)@
  -a Resolve addresses to hostnames. Pp~z0P.M1R1z7f
  
-]~+x+q2m6i   解析计算机NetBios名。 3td,iq @`$i+R
   O^1[3z-yLm z:P~
  示例:C:\>ping -a 192.168.1.21
Xc:n7RqLs    /k:dqNK D*m*I
  Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data: H Dr.g,}:x^M
  
A/D V|o2T(p   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 V"R!bhik
  
"A2rw!]y}fy.p   Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 8q^a1yuA'{
   %^BQ"Y9t6D0v+H
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 z;ID*D@8mAt1d
7|ndC$c(b2sd+S8np P
   q+C%yuFm M
  Reply from 192.168.1.21: bytes=32 time<10ms TTL=254 Lb9d;\s/H
  
D,\ZXA   Ping statistics for 192.168.1.21:
jN S-U*\kH$pq%e&[   
h`j fN0F   Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: &v/O`8dL;B1F2A2?.c
   O5a:u.{5]U_
  Minimum = 0ms, Maximum = 0ms, Average = 0ms
rQ?,sj(G   
4tL2cH}2NC/F   从上面就可以知道IP为192.168.1.21的计算机NetBios名为iceblood.yofor.com。 $]@$K5D)X IP'V
  
t$st d4?_n.O   -n count Number of echo requests to send.
1h/F%Ih0\0T2g    z9dV??
  发送count指定的Echo数据包数。 g/A HV f/i d e
   G&g^&X5sL!E0L/F hW+s
  在默认情况下,一般都只发送四个数据包,通过这个命令可以自己定义发送的个数,对衡量网络速度很有帮助,比如我想测试发送50个数据包的返回的平均时间为多少,最快时间为多少,最慢时间为多少就可以通过以下获知: `5q$J NoTs7g
   F%l\*}%q9`p6g5Jc
  C:\>ping -n 50 202.103.96.68
Zg'g)h7@a.s    5T"@N Y/Z%j
  Pinging 202.103.96.68 with 32 bytes of data:
:vQ#ox%E wEP_ \   
K*_Q1n.i   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Wa3xV\iUt:Mj
  
t8n3Dhz MS   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 )J `W P&Jz$c
   ls7z"i7l'E3^!o4d
  Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 NDpC t.M.^7WGd
   QS/Hy[
  Request timed out. MS)ai~ x}
   7u/retIvO
  ……………… 4dz9Wv V3|
  
PI;eP[+~6j*R   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 :YciNk3\"v
  
%T+H,E m.|0~   Reply from 202.103.96.68: bytes=32 time=50ms TTL=241 Dyks2W
  
E4r0Xn%z}!h$HB   Ping statistics for 202.103.96.68: Z)M)r:C2O|-^
  
?3a~X9B   Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds: /{5M)O7U F:f3l
  
'Y0h-^&l+F!i   Minimum = 40ms, Maximum = 51ms, Average = 46ms
Ypyk#I+h#[gm   
zA8?9U&X5f W\6W   从以上我就可以知道在给202.103.96.68发送50个数据包的过程当中,返回了48个,其中有两个由于未知原因丢失,这48个数据包当中返回速度最快为40ms,最慢为51ms,平均速度为46ms。 O.U%y*I7Q-h
   H+I$K\ f+C}L
  -l size Send buffer size. 5nTWy%n
   J/JZU q
  定义echo数据包大小。

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

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

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


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