11 · Introducing the TCP_IP Internet Layer, IPv4 Addressing, and Subnets認識 TCP/IP 網際網路層、IPv4 定址與子網路

Private vs. Public IPv4 Addresses私有與公有 IPv4 位址

As the internet began to grow exponentially in the 1990s, it became clear that if the current growth trajectory continued, eventually, there would not be enough IPv4 addresses for everyone who wanted one. Work began on a permanent solution, which would become IPv6, but several other solutions were developed in the interim. These solutions included Network Address Translation (NAT), classless interdomain routing (CIDR), private IPv4 addressing, and VLSM.

隨著網際網路在 1990 年代呈指數成長,人們逐漸明白,若這樣的成長趨勢持續下去,遲早會沒有足夠的 IPv4 位址供每個想要的人使用。當時已開始研發一個永久解決方案,也就是後來的 IPv6,但在此期間也開發出幾種其他解決方案,包括網路位址轉換(NAT)、無級別跨網域路由(CIDR)、私有 IPv4 定址,以及 VLSM。

Public IPv4 Addresses

公有 IPv4 位址

Hosts that are publicly accessible over the internet require public IP addresses. Internet stability depends directly on the uniqueness of publicly used network addresses. Therefore, a mechanism is needed to ensure that addresses are, in fact, unique. This mechanism was originally managed by the InterNIC. The IANA succeeded the InterNIC. The IANA carefully manages the remaining supply of IPv4 addresses to ensure that duplication of publicly used addresses does not occur. Duplication would cause instability on the internet and compromise its ability to deliver packets to networks using the duplicated addresses.

可透過網際網路公開存取的主機需要公有 IP 位址。網際網路的穩定性直接取決於公開使用的網路位址是否唯一。因此,需要有一種機制來確保位址確實是唯一的。這個機制最初由 InterNIC 管理,後來由 IANA 接手。IANA 謹慎管理剩餘的 IPv4 位址供應量,以確保不會發生公開使用位址重複的情況。位址重複會導致網際網路不穩定,並影響其將封包遞送至使用重複位址之網路的能力。

With few exceptions, businesses and home internet users receive their IP address assignment from their Local Internet Registry (LIR), which typically is their ISP. These IP addresses are called provider-aggregatable (as opposed to provider-independent addresses) because they are linked to the ISP. If you change ISPs, you will need to readdress your internet-facing hosts.

除少數例外情況外,企業與家用網際網路使用者的 IP 位址都是由其本地網際網路註冊機構(LIR)指派,通常也就是他們的 ISP。這些 IP 位址稱為供應商聚合位址(provider-aggregatable),與供應商獨立位址(provider-independent)相對,因為它們與 ISP 綁定。若你更換 ISP,就需要為你面向網際網路的主機重新指派位址。

The following table provides a summary of public IPv4 addresses.

下表摘要說明公有 IPv4 位址。

IPv4 Address Class
IPv4 位址級別
Public IPv4 Address Range
公有 IPv4 位址範圍
A
A
1.0.0.0 to 9.255.255.25511.0.0.0 to 126.255.255.255
1.0.0.0 到 9.255.255.25511.0.0.0 到 126.255.255.255
  • 1.0.0.0 to 9.255.255.2551.0.0.0 到 9.255.255.255
  • 11.0.0.0 to 126.255.255.25511.0.0.0 到 126.255.255.255
B
B
128.0.0.0 to 172.15.255.255172.32.0.0 to 191.255.255.255
128.0.0.0 到 172.15.255.255172.32.0.0 到 191.255.255.255
  • 128.0.0.0 to 172.15.255.255128.0.0.0 到 172.15.255.255
  • 172.32.0.0 to 191.255.255.255172.32.0.0 到 191.255.255.255
C
C
192.0.0.0 to 192.167.255.255192.169.0.0 to 223.255.255.255
192.0.0.0 到 192.167.255.255192.169.0.0 到 223.255.255.255
  • 192.0.0.0 to 192.167.255.255192.0.0.0 到 192.167.255.255
  • 192.169.0.0 to 223.255.255.255192.169.0.0 到 223.255.255.255

LIRs obtain IP address pools from their Regional Internet Registry (RIR):

LIR 會向其區域網際網路註冊機構(RIR)取得 IP 位址池:

  • African Network Information Center (AFRINIC)非洲網路資訊中心(AFRINIC)
  • Asia Pacific Network Information Center (APNIC)亞太網路資訊中心(APNIC)
  • American Registry for Internet Numbers (ARIN)美國網際網路號碼註冊機構(ARIN)
  • Latin American and Caribbean Network Information Center (LACNIC)拉丁美洲及加勒比海網路資訊中心(LACNIC)
  • Rseaux IP Europens Network Coordination Centre (RIPE NCC)歐洲 IP 網路資源協調中心(RIPE NCC)

With the rapid growth of the internet, public IPv4 addresses began to run out. New mechanisms such as NAT, CIDR, VLSM, and IPv6 were developed to help solve the problem.

隨著網際網路快速成長,公有 IPv4 位址開始告罄。因此開發出 NAT、CIDR、VLSM 與 IPv6 等新機制,協助解決這個問題。

Private IPv4 Addresses

私有 IPv4 位址

Internet hosts require a globally routable and unique IPv4 address, but private hosts that are not connected to the internet can use any valid address, as long as it is unique within the private network. However, because many private networks exist alongside public networks, deploying random IPv4 addresses is strongly discouraged.

網際網路上的主機需要全球可路由且唯一的 IPv4 位址,但未連上網際網路的私有主機可使用任何有效位址,只要在私有網路內是唯一的即可。不過,由於許多私有網路與公有網路並存,強烈不建議隨意部署 IPv4 位址。

In February 1996, the IETF published RFC 1918, "Address Allocation for Private Internets," to ease the accelerating depletion of globally routable IPv4 addresses and provide companies with an alternative to using arbitrary IPv4 addresses. Three blocks of IPv4 addresses (one Class A network, 16 Class B networks, and 256 Class C networks) are designated for private, internal use.

1996 年 2 月,IETF 發布了 RFC 1918「私有網際網路的位址分配」(Address Allocation for Private Internets),以緩解全球可路由 IPv4 位址加速耗盡的問題,並為企業提供使用任意 IPv4 位址以外的替代方案。三個區塊的 IPv4 位址(一個 A 級網路、16 個 B 級網路,以及 256 個 C 級網路)被指定供私有、內部使用。

Addresses in these ranges are not routed on the internet backbone. Internet routers are configured to discard private addresses. In a private intranet, these private addresses can be used instead of globally unique addresses. When a network that uses private addresses must connect to the internet, private addresses must be translated to public addresses. This translation process is called NAT. A router is often the network device that performs NAT.

這些範圍內的位址不會在網際網路骨幹網路上被路由。網際網路路由器會設定為捨棄私有位址。在私有內部網路中,可以使用這些私有位址取代全球唯一位址。當使用私有位址的網路必須連接到網際網路時,私有位址必須轉換為公有位址,此轉換程序稱為 NAT。路由器通常是執行 NAT 的網路裝置。

The following table provides a summary of private IPv4 addresses.

下表摘要說明私有 IPv4 位址。

IPv4 Address Class
IPv4 位址級別
Private IPv4 Address Range
私有 IPv4 位址範圍
A
A
10.0.0.0/8
10.0.0.0/8
B
B
172.16.0.0/12
172.16.0.0/12
C
C
192.168.0.0/16
192.168.0.0/16
Determine which class the IPv4 address 172.32.11.7 belongs to and whether it belongs to the range of the public or private IPv4 addresses. Which option represents the correct description?判斷 IPv4 位址 172.32.11.7 屬於哪個級別,以及它屬於公有還是私有 IPv4 位址範圍。哪個選項的描述正確?