不同域里相同ip地址_不同的人可能具有相同的公共IP地址吗?

不同域里相同ip地址_不同的人可能具有相同的公共IP地址吗?

不同域里相同ip地址

不同域里相同ip地址_不同的人可能具有相同的公共IP地址吗?

For the most part, all of us are used to having a unique public IP address, but what do you do when that is actually not the case? What exactly is going on? With that in mind, today’s SuperUser Q&A post helps a confused reader solve an IP address mystery.

在大多数情况下,我们所有人都习惯于拥有唯一的公共IP地址,但是实际上情况并非如此,您会怎么做? 到底是怎么回事? 考虑到这一点,今天的SuperUser Q&A帖子可帮助困惑的读者解决IP地址的奥秘。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

Photo courtesy of Nicolas Nova (Flickr).

照片由Nicolas Nova(Flickr)提供

问题 (The Question)

SuperUser reader Spartan wants to know if it is possible for different people to have the same public IP address:

超级用户阅读器Spartan想知道不同的人是否可能具有相同的公共IP地址:

As I understand it, two computers cannot have the same public (external) IP address unless they are connected via the same router. If they are connected via the same router, then they can have (share) the same public IP address yet have different private (local) IP addresses.

据我了解,两台计算机不能具有相同的公用(外部)IP地址,除非它们通过同一路由器连接。 如果它们通过同一路由器连接,则它们可以具有(共享)相同的公用IP地址,但可以具有不同的专用(本地)IP地址。

The Situation I Encountered

我遇到的情况

My friend and I both use the same Internet service provider. We have different user names and passwords, and independent connections to our Internet service provider, yet we have the same public IP address! How is this possible? When we use Google to determine our IP address, we both get the same exact result, 112.133.229.29 (in my router it says 10.1.102.93, my friend’s router says 10.1.101.29).

我和我的朋友都使用同一个Internet服务提供商。 我们具有不同的用户名和密码,并且与我们的Internet服务提供商具有独立的连接,但是我们具有相同的公用IP地址! 这怎么可能? 当我们使用Google来确定我们的IP地址时,我们都得到相同的准确结果,即112.133.229.29(在我的路由器中为10.1.102.93,我朋友的路由器为10.1.101.29)。

I have installed an Apache web server on my computer and know that it can be accessed via the public IP address of my computer, but in my case I do not have a unique public IP address, so it is impossible for anyone to access my computer via http://112.133.229.29/index.html.

我已经在计算机上安装了Apache Web服务器,并且知道可以通过计算机的公共IP地址访问它,但是就我而言,我没有唯一的公共IP地址,因此任何人都不可能访问我的计算机通过http://112.133.229.29/index.html。

The friend I mentioned above is able to access my computer using this address: http://10.1.102.93/index.html, so I find myself wondering if we have some kind of common Internet service provider DNS.

我上面提到的朋友可以使用以下地址访问我的计算机:http://10.1.102.93/index.html,因此我发现自己想知道我们是否具有某种通用的Internet服务提供商DNS。

If another friend of mine tries to access my computer via a different Internet service provider using the router-based link shown above (http://10.1.102.93/index.html), he is not able to access it.

如果我的另一个朋友尝试使用上面显示的基于路由器的链接(http://10.1.102.93/index.html)通过其他Internet服务提供商访问我的计算机,则他将无法访问它。

How is my Internet service provider doing this? My requests to any server are pinned with my public IP address and the server responds to the request based on the that address.

我的互联网服务提供商如何做到这一点? 我对任何服务器的请求都用我的公共IP地址固定,服务器根据该地址响应该请求。

Is it possible for different people to have the same public IP address?

不同的人可能具有相同的公共IP地址吗?

答案 (The Answer)

SuperUser contributor Gestudio Cloud has the answer for us:

超级用户贡献者Gestudio Cloud为我们提供了答案:

Well, as DavidPostill mentioned earlier, your Internet service provider is using NAT on their routers before routing your traffic to the Internet.

好了,正如DavidPostill前面提到的,您的Internet服务提供商在将流量路由到Internet之前正在其路由器上使用NAT。

Basically, this means that you and the other clients inside your Internet service provider’s “service area” are in a big Metropolitan Area Network (MAN) and that works the same way your home’s router does in creating a Local Area Network (LAN), just on a much larger scale.

基本上,这意味着您和Internet服务提供商的“服务区域”内的其他客户端都在大型城域网(MAN)中,并且其工作方式与家庭路由器在创建局域网(LAN)中的工作方式相同,只是在更大的范围内。

Why would your Internet service provider do this? Well, the answer is simple. They want and/or need to use a lower amount of public IPv4 addresses (probably because they have more customers than available public IPv4 addresses).

为什么您的Internet服务提供商会这样做? 好吧,答案很简单。 他们希望和/或需要使用较少数量的公共IPv4地址(可能是因为他们拥有的客户多于可用的公共IPv4地址)。

As you may know, the pool of free IPv4 addresses was exhausted a couple of years ago. Carriers that are growing are unable to get new IPv4 subnets unless they buy them from other Internet service providers closing down somewhere else.

您可能知道,免费的IPv4地址池在几年前已经用尽。 成长中的运营商无法获得新的IPv4子网,除非他们从其他地方关闭的其他Internet服务提供商那里购买子网。

The solution is to use IPv6 addresses. This obviously requires changing routers, changing configurations, investing money and time, etc., so setting up a huge Metropolitan Area Network is just easier and faster for them.

解决方案是使用IPv6地址。 显然,这需要更改路由器,更改配置,投入金钱和时间等,因此,对他们而言,建立大型的城域网变得更加轻松快捷。

You can call them and ask about getting a dedicated IPv4 address, but they will probably require an extra payment on your part just to have a dedicated IPv4 address for your computer/location.

您可以打电话给他们,询问是否要获得专用的IPv4地址,但是他们可能需要为您的计算机/位置使用专用的IPv4地址而额外付费。



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/247452/is-it-possible-for-different-people-to-have-the-same-public-ip-address/

不同域里相同ip地址