ping 命令结果一览

摘至:http://ask-leo.com/what_is_ping_and_what_does_its_output_tell_me.html

The ping command runs in a Windows Command Shell (or aLinux/Mac/BSD/Solaris/etc. terminal window - it's a very ubiquitouscommand), and has a very basic syntax at it's core:

ping domain_name

For example, if you open up a command window and type in "pingask-leo.com", you'll see something like this:

[C:\]ping ask-leo.com

Pinging ask-leo.com [72.3.133.152] with 32 bytes of data:

Reply from 72.3.133.152: bytes=32 time=69ms TTL=47
Reply from 72.3.133.152: bytes=32 time=70ms TTL=47
Reply from 72.3.133.152: bytes=32 time=69ms TTL=47
Reply from 72.3.133.152: bytes=32 time=69ms TTL=47

Ping statistics for 72.3.133.152:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 69ms, Maximum = 70ms, Average = 69ms
"the tool is very, very simple: it sends out an'are you there?' ... and expects to hear back a 'yes, here Iam!'"

There's a lot of information here, and I'm not going to get into allthe geeky details, but here are some of the basic, and important thingsthat ping does:

  • "Pinging ask-leo.com [72.3.133.152]" - Ping onlypings IP addresses so the first thing it did when I asked it to ping"ask-leo.com" is it looked up the corresponding IP address. This isperhaps one of the quickest ways I know of to determine the IP addressassociated with a domain. Also, if this look-up fails, you'll know thatthere's a typo in the domain name, or the domain name look-up (DNS) isfailing for some reason.

  • "Reply from 72.3.133.152:" - this tells you thatthe remote server at that IP address replied, obviously. What thatmeans, though, is that the entire route across the internet, from yourmachine through routers and switches and networking equipment andwhatever else, worked. As did the return path carrying the server'sreply. If this fails, ("timed out") then something along the connectionbetween you and the server might be broken, the server might be offline, or the server might not even exist. It's also possible that theserver is explicitly configured not to respond to ping requests.

  • "time=69ms" - this is the round trip time; the timebetween sending the "are you there?" and receiving the "yes I am!". Inthis case, 69 milliseconds. Since the ping is repeated several timesyou can see that this time is fairly consistent, which is good. Thetime will vary depending on many factors including how close you are tothe remote server, how many routers and other networking equipment arein between you and that server, and more. In the example above, theping was from me in the Seattle area to the Ask Leo! server housed inTexas. A quick test of a ping to a server in Japan resulted in timestwice as long.

  • "Sent = 4, Received = 4" - one of the things thatTCP/IP is designed to deal with is packet loss. Ideally, every packetyou send should get to where it's going, but for various reasons thatdoesn't always happen. As long as the packets can get there after aretry or two, in normal usage you'd never notice. Ping sends multiplepackets and reports specifically on the success rate, so that you cansee if a particular connection is prone to packet loss.

  • "Approximate round trip times" - while on averagethe same kind of packet sent to the same destination should takeroughly the same amount of time, that's also not always the case.Sometimes for reasons as diverse as the equipment and paths that thepackets take, some take longer than others. Ping reports thesestatistics so that you can see if a particular connection is prone tothis type of problem.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值