网站没有ping通,但被Web浏览器打开 [英] Website not pinging but is opened by Web browser

查看:30
本文介绍了网站没有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:Windowssystem32>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:Windowssystem32>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,它在亚马逊云的某个地方.

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 很可能使用亚马逊服务.但是,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天全站免登陆