公共IP是唯一的吗?

当你开始学习IP地址以及它们的工作原理时,有时会感到有些不知所措。那你是做什么的?你从搜索和提问开始!今天的超级用户问答帖子回答了一位好奇的读者的问题。...

公共IP是唯一的吗?

当你开始学习IP地址以及它们的工作原理时,有时会感到有些不知所措。那你是做什么的?你从搜索和提问开始!今天的超级用户问答帖子回答了一位好奇的读者的问题。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

Linux屏幕截图(Flickr)提供的屏幕截图。

问题

超级用户读者amin gholami想知道公共IP是否唯一:

Are public IPs unique? I mean since we have two kinds of IPs (private and public) and if the public IP belongs to the router, then does everyone connected to the same router have a single IP address or not?

公共IP是唯一的吗?

答案

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

In general terms the answer is yes, public IPs are globally unique. In the context of IPv4, the IPs (v4) known for not being unique are private IPs. These are found in the following ranges:

  • From 10.0.0.0 to 10.255.255.255.
  • From 172.16.0.0 to 172.31.255.255.
  • From 192.168.0.0 to 192.168.255.255.

See: RFC1918

The IP your home router has on the “Internet side” of the interface is public, given to you by your ISP. The IPs used for your home’s Wi-Fi or Ethernet connection are private, so they are not unique, but that is not a problem because those never leave your home before being NATed or translated by the NAT.

As mentioned in other comments (see thread link below), there is an exception to what I have just said. There are some techniques that allow us to be more flexible about the original one-to-one communication Internet protocol paradigm that allows one-to-nearest. These techniques are used when talking about services that need high availability, redundancy, or low latency like DNS or CDN services. Given a certain IP (IPv4 or IPv6), there might be more that one server in the world configured to answer to that IP, but only one will be answering.

See: RFC4786

IPv6 also introduced a new addressing system that copes with these “new needs” and it defined the Anycast Address.

IP Version 6 (IPv6) defines a new type of address, known as an Anycast Address, that allows a packet to be routed to one of a number of different nodes all responding to the same address. The Anycast Address may be assigned to one or more network interfaces (typically on different nodes) with the network delivering each packet addressed to this address to the “nearest” interface based on the notion of “distance” determined by the routing protocols in use.

See: RFC2526

About IPv6 Anycast Addresses

An Anycast Address is an address that is assigned to a set of interfaces that typically belongs to different nodes. A packet sent to an Anycast Address is delivered to the closest interface (as defined by the routing protocols in use) identified by the Anycast Address. Anycast Addresses are syntactically indistinguishable from Unicast Addresses because Anycast Addresses are allocated from the Unicast Address space. Assigning a Unicast Address to more than one interface makes a Unicast Address an Anycast Address. Nodes to which the Anycast Address is assigned must be explicitly configured to recognize that the address is an Anycast Address.

See: IPv6 Address Type: Anycast [Cisco]


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-10 07:14
  • 阅读 ( 158 )
  • 分类:互联网

你可能感兴趣的文章

公共ip(public ip)和私有ip(private ip)的区别

公共ip与私有ip 顾名思义,公共IP和私有IP的基本区别在于它们使用的网络。在深入研究这些细节之前,IP地址或Internet协议地址是分配给网络上每个设备的唯一标识符。这使得网络上的每个不同设备都能被唯一地识别。有两类I...

  • 发布于 2020-10-22 21:26
  • 阅读 ( 510 )

如何使用假ip地址并在网上屏蔽自己

... 方法三:使用公共wi-fi ...

  • 发布于 2021-03-23 08:37
  • 阅读 ( 362 )

一个真正分散的互联网是可能的吗?如何与区块链合作

...链是由比特币创造者Satoshi Nakamoto提出的,是一个分散的公共账本。每一笔比特币交易的记录都被写入区块链,并在整个网络**享。没有一个实体可以控制区块链,它允许像分散应用程序这样的创新。 ...

  • 发布于 2021-03-24 05:18
  • 阅读 ( 179 )

什么是端口转发?你需要知道的一切

...设备)都有一个IP地址。但实际上有两种类型的IP地址:公共和私有。 ...

  • 发布于 2021-03-31 08:18
  • 阅读 ( 831 )

执法部门真的能追踪到有ip地址的人吗?

...”。它们也被记录在RIRs(区域互联网注册中心)运营的公共数据库中。共有五个注册中心,每个注册中心负责管理其所在地区的IP地址。因此,找到ISP只需在正确的数据库中键入IP地址。 如果你在Google上搜索“IP查找”,你会发...

  • 发布于 2021-04-02 00:15
  • 阅读 ( 199 )

ip地址是如何工作的?

...以把它配置成不同的东西。 相关:如何找到你的私人和公共IP地址 dns服务器 最后一条信息将与设备的IP地址、子网掩码和默认网关地址一起分配:一个或两个默认域名系统(DNS)服务器的地址。我们人类对名字的处理要比数字...

  • 发布于 2021-04-06 18:43
  • 阅读 ( 194 )

如何查找任何设备的ip地址、mac地址和其他网络连接详细信息

...网络可能使用路由器连接到Internet。该路由器也将有一个公共IP地址一个在公共互联网上标识它的地址。要找到您的公共IP地址,您可能需要登录到路由器的管理页面。 相关:MAC地址到底是用来做什么的? 视窗10 在Windows10上,您...

  • 发布于 2021-04-07 20:34
  • 阅读 ( 181 )

如何找到你的私人和公共ip地址

...设备才能看到的专用IP地址。但是您的ISP为您分配了一个公共IP地址,Internet上的其他设备可以看到该地址。下面是它的工作原理以及如何找到这些IP地址。 IP地址(或Internet协议地址)标识网络上的每台联网计算机和设备。当您...

  • 发布于 2021-04-08 06:44
  • 阅读 ( 199 )

什么是ipv6,为什么它很重要?

公共互联网上的IPv4地址越来越少。2011年北电破产时,微软斥资750万美元收购了北电666624个IP地址,相当于每个IP地址8美元。IPv4存在技术问题,IPv6是解决方案。 不幸的是,IPv6的部署被推迟了太久。如果IPv6在几年前就实现了,...

  • 发布于 2021-04-09 02:20
  • 阅读 ( 154 )

tor真的是匿名和安全的吗?

有些人认为Tor是一种完全匿名的、私密的、安全的访问互联网的方式,而没有人能够监视你的浏览并追踪到你——但这是吗?其实没那么简单。 Tor不是完美的匿名和隐私解决方案。它有几个重要的限制和风险,如果你要使用它...

  • 发布于 2021-04-09 04:35
  • 阅读 ( 307 )
proc0170
proc0170

0 篇文章

相关推荐