网站无法ping通,但已通过Web浏览器打开 [英] Website not pinging but is opened by Web browser

查看:417
本文介绍了网站无法ping通,但已通过Web浏览器打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我认为这很奇怪(至少对我来说).因为我了解到Internet上的每个域名都有其对应的IP地址.它存储在DNS上的某个位置.

Friends, I think it is a strange thing (at least for me). Coz I have learnt that every domain name on the Internet has itself a corresponding IP address. And it is stored at some place on a DNS.

现在,这是从命令行ping google.com 时得到的.

Now, This is what I get when I ping google.com from my command line.

C:\Windows\system32>ping google.com

Pinging google.com [74.125.236.135] with 32 bytes of data:
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=11ms TTL=55
Reply from 74.125.236.135: bytes=32 time=10ms TTL=55

Ping statistics for 74.125.236.135:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 11ms, Average = 10ms

但是当我ping www.cloudbees.net 时,我得到以下信息:

But when I ping www.cloudbees.net I get the following:

C:\Windows\system32>ping www.cloudbees.net

Pinging www.cloudbees.net [75.101.143.131] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 75.101.143.131:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

我也尝试了它的IP地址(75.101.143.131),它返回了相同的结果. 但是,当我从浏览器浏览相同的内容( www.cloudbees.net 而不是IP地址)时,该网页就会打开.怎么发生的?

I also tried it with its ip address(75.101.143.131) and it returns the same result. But when I browse the same(www.cloudbees.net but not the ip address) from my browser, the webpage opens up. How that happened?

我在ping中注意到的另一件奇怪的事情是,当我ping google.com 时,我在ping结果的最后得到了以下两行,但我没有如果是 www.cloudbees.net .

The another strange thing I noticed in the pinging is that when I ping google.com I get the following two line in the end of the ping result which I dont in case of www.cloudbees.net.

Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 11ms, Average = 10ms

所以任何人都可以对整个机制以及发生这种情况的原因进行一些了解.

So can anyone please put some light on the entire mechanism and why such a thing is happening.

推荐答案

ping数据包使用ICMP协议,而在同一级别上,网页使用TCP协议.两者都通过IP协议,但是它们是不同类型的数据包. (如果您听说过HTTP一词,则该协议是ICMP或TCP的上一层协议.)

ping packets use the ICMP protocol, whereas on the same level web pages use the TCP protocol. Both go over the IP protocol, but they are different types of packets. (In case you have heard the term HTTP, it is a protocol which is one layer up from ICMP or TCP.)

这意味着您与您尝试ping的服务器之间的任何路由器或防火墙都可能会阻止ping.对服务器执行ping操作不是查看服务器是否正常的可靠方法.某些操作系统在其默认配置下会阻止ping操作.

What this means is that any router or firewall between you and the server you try to ping may just block your pings. Pinging a server is not a reliable way to see if it is up. Some operating systems block pings in their default configuration.

来自不同网络的人们甚至有可能看到不同的行为. @Popnoodles也许可以让他通过ping通,无论您是不是我.

And it is even possible that people from different networks see different behaviour. @Popnoodles may be able to get his ping through, you or me not.

当我ping www.cloudbees.net时,没有答案.但是,当我告诉我的计算机了解更多信息时:

When I ping www.cloudbees.net, there is no answer. However, when I tell my computer to find out a bit more:

traceroute 75.101.143.131

此命令显示ping数据包在传输过程中遇到的服务器.在ping消失在大空白中的某个地方之前,我得到了大约20台服务器.最后一个服务器是216.182.224.73,它在Amazon云中.

This command shows you the servers the ping packet meets during its travel. I get approximately 20 servers before the ping vanishes somewhere in the big void. The last server is 216.182.224.73, which is somewhere in the Amazon cloud.

因此,根据此信息,cloudbees.net可能使用了Amazon服务.但是,没有充分的技术理由可以使ping数据包与TCP数据包走相同的路由.通常,它确实可以,但是如果有人想混淆路线,则可以做不同的事情. (就亚马逊而言,这不太可能.)

So, by this information, it is likely that cloudbees.net uses Amazon services. However, there is no solid technical reason for a ping packet to go the same route as a TCP packet. Usually, it does, but things can be done differently if someone wants to obfuscate the route. (In Amazon's case it's unlikely.)

顺便说一句,一个DNS名称可能对应一个IP地址,并且一个DNS名称可能指向同一地址.第一种情况(多个IP)在大型站点中非常常见,可以用来平衡负载.第二种情况(多个名称指向相同的地址)发生在基于名称的虚拟主机上,该虚拟主机在单个服务器上有多个网站,但只有一个IP地址.

By the way, there may be more than one IP address corresponding to a DNS name, and more than one DNS name may point to the same address. The first scenario (multiple IPs) is very common with large sites, and it can be used to balance the load. The second scenario (several names point to the same address) happens with name-based virtual hosting where there are several websites on a single server with only one IP address.

这篇关于网站无法ping通,但已通过Web浏览器打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆