跳至內容

專用網路

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

網際網路的位址架構中,專用網路是指遵守 RFC 1918 (針對 IPv4 網路)和 RFC 4193 (針對 IPv6 網路)規範,使用專用IP位址空間的網路。私有 IP 無法直接連接網際網路,需要使用網路位址轉換(Network Address Translator,NAT)或者代理伺服器(Proxy Server)來實現。與公網 IP 相比,私有 IP 是免費的,同時節省了 IP 位址資源,適合在區域網路使用。

用途

  • 私有IP無法直接被網際網路所訪問,因此,相對於公網IP位址,它更加安全。
  • 私有IP常被用於家庭,學校和企業的區域網路

IPv4 私有位址

IPv4 的私有IP定義在 RFC 1918

RFC1918 規定區塊名 IP位址區段 IP數量 分類網路 說明 最大CIDR區塊 (子網路遮罩 主機端位長
24位元區塊 10.0.0.0 – 10.255.255.255 16,777,216 單個A類網路 10.0.0.0/8 (255.0.0.0) 24位元
20位元區塊 172.16.0.0 – 172.31.255.255 1,048,576 16個連續B類網路 172.16.0.0/12 (255.240.0.0) 20位元
16位元區塊 192.168.0.0 – 192.168.255.255 65,536 256個連續C類網路 192.168.0.0/16 (255.255.0.0) 16位元

共享位址

Shared Address Space(RFC 6598), IANA 於 2012 年將 100.64.0.0/10 定義用於運營商級 NAT ( Carrier-Grade NAT, CGN )場景。這些位址與 RFC1918 中定義的私有 IP 是不同的,只能用於運營商的內部網路,雖然在某些特性中與私有 IP 相同,但在定義上不能劃為私有位址(更不是公用位址)。

IPv6 私有位址

IPv6的私有IP定義在 RFC 4193 , 位址塊 fc00::/7 已保留。這些位址稱為唯一本地位址( Unique Local Addresses, ULA )。它們被定義為單播位址,並在路由字首中包含一個 40 位的亂數,以防止在兩個私有網路互連時發生衝突。

根據 RFC 4193 第三章第二節,第 8 位設計為「 L 位」。其二進位值為 1 時授權予本地分配,為 0 時的作用暫未定義。[1]故而造成「唯一本地位址 RFC 定義是 fc00::/7 範圍,但網路硬體生產廠商都設計其路由系統的唯一本地位址都在 fd00::/8 範圍內」的現象。

位址快 字首 L 位 全域路由 ID 子網路 ID 介面 ID 可用位址數量
fc00::/7 7 位 1 位 40 位 16 位 64 位 2121
fc00::/8 f c xx:xxxx:xxxx :yyyy :zzzz:zzzz:zzzz:zzzz 2120
fd00::/8 f d xx:xxxx:xxxx :yyyy :zzzz:zzzz:zzzz:zzzz 2120

儘管在本地使用,但唯一本地位址的 IPv6 位址範圍是全域的。

鏈路本地位址

RFC的定義參考

  • RFC 1918"Address Allocation for Private Internets"
  • RFC 2036"Observations on the use of Components of the Class A Address Space within the Internet"
  • RFC 2050"Internet Registry IP Allocation Guidelines"
  • RFC 2101"IPv4 Address Behaviour Today"
  • RFC 2663"IP Network Address Translator (NAT) Terminology and Considerations"
  • RFC 3022"Traditional IP Network Address Translator (Traditional NAT)"
  • RFC 3330"Special-Use IPv4 Addresses" (superseded)
  • RFC 5735"Special-Use IPv4 Addresses"
  • RFC 3879"Deprecating Site Local Addresses"
  • RFC 3927"Dynamic Configuration of IPv4 Link-Local Addresses"
  • RFC 4193"Unique Local IPv6 Unicast Addresses"
  • RFC 6598 - "IANA-Reserved IPv4 Prefix for Shared Address Space"
  1. ^ Set to 1 if the prefix is locally assigned. Set to 0 may be defined in the future. RFC 4193 Section 3.1