# IPv6地址

IPv6地址是分配给运行第6版[互联网协议](https://www.edgepedia.org/zh/internet-protocol)的节点接口的128位标识符，用以取代IPv4的32位地址，可提供约\( 3.4 \times 10^{38} \)个可能的地址，[互联网协会](https://www.edgepedia.org/zh/internet-society)将其描述为340万亿万亿万亿个。<sup>[1](https://www.rfc-editor.org/info/rfc2460/)</sup><sup> • </sup><sup>[2](https://www.internetsociety.org/deploy360/ipv6/faq/)</sup>这些地址的格式与语义在RFC 4291《IP第6版寻址架构》中规定，该文档于2006年2月由Robert Hinden和Steve Deering发表；它废止了RFC 3513，而其本身又先后被六份后续RFC更新，涉及文本表示、转换、接口标识符和多播范围。<sup>[3](https://www.rfc-editor.org/info/rfc4291/)</sup>

| 关键事实 | 详情 |
|---|---|
| 长度 | 128位，由IPv4的32位扩展而来，以支持更多寻址层级、更多可寻址节点和更简单的自动配置<sup>[1](https://www.rfc-editor.org/info/rfc2460/)</sup> |
| 定义标准 | RFC 4291（2006年2月，Hinden与Deering），废止RFC 3513；由RFC 5952、6052、7136、7346、7371和8064更新<sup>[3](https://www.rfc-editor.org/info/rfc4291/)</sup> |
| 文本形式 | 八组以冒号分隔的16位十六进制数；RFC 5952要求使用小写，并以单个“::”压缩最长的零串<sup>[4](https://www.rfc-editor.org/info/rfc5952/)</sup> |
| 全局单播范围 | 2000::/3，即可路由的单播空间；链路本地地址使用fe80::/10，唯一本地地址使用fc00::/7<sup>[5](https://www.iana.org/assignments/iana-ipv6-special-registry)</sup> |
| 自配置 | SLAAC（RFC 4862）让主机将路由器通告的前缀与本地生成的接口标识符组合起来，无需服务器<sup>[6](https://www.rfc-editor.org/info/rfc4862/)</sup> |
| DNS记录 | AAAA资源记录存储IPv6地址，反向查询位于IP6.ARPA域下（RFC 3596）<sup>[7](https://www.rfc-editor.org/info/rfc3596/)</sup> |
| 采用情况 | 2026年3月28日，通过IPv6访问谷歌的用户比例首次达到50%；APNIC测得约43%的用户<sup>[8](https://www.tomshardware.com/networking/ipv6-usage-reaches-historic-50-percent-across-google-services-matching-ipv4-increased-usage-eases-pressure-on-the-ipv4-address-market-as-new-protocol-designed-in-1998-finally-hits-its-stride)</sup> |

## 结构与类型

IPv6延续了IPv4的模型，即一个子网前缀与一条链路相关联，而同一条链路可以分配多个子网前缀。<sup>[3](https://www.rfc-editor.org/info/rfc4291/)</sup>地址前缀以CIDR风格记法书写，即`ipv6-address/prefix-length`。<sup>[3](https://www.rfc-editor.org/info/rfc4291/)</sup>IANA的IPv6地址空间注册表将整个空间划分为若干大块：2000::/3是全局单播范围，可路由地址由此分配给各区域互联网注册管理机构；ff00::/8是多播；fc00::/7是唯一本地单播；fe80::/10是链路本地单播。<sup>[9](https://www.iana.org/assignments/ipv6-address-space)</sup>

若干地址块用于特殊用途，记录在IANA的IPv6特殊用途地址注册表中。环回地址::1/128标识本地节点自身，未指定地址::/128只能作为源地址出现。文档前缀2001:db8::/32于2004年7月分配，保留给手册和论文中的示例使用；第二个文档地址块3fff::/20于2024年7月加入。其他条目包括IPv4映射前缀::ffff:0:0/96、转换前缀64:ff9b::/96、Teredo（2001::/32）、6to4（2002::/16）以及段路由前缀5f00::/16。<sup>[5](https://www.iana.org/assignments/iana-ipv6-special-registry)</sup>

## 文本表示

单个IPv6地址可以有多种写法。RFC 4291允许省略每个16位字段的前导零，允许用“::”替换一段连续的一个或多个零组，并允许在低32位中嵌入IPv4地址，如`::FFFF:129.144.52.38`。<sup>[3](https://www.rfc-editor.org/info/rfc4291/)</sup>由于“::”只能出现一次，含有两段零组的地址就存在压缩位置的选择，而RFC 4291对十六进制使用大写还是小写未作偏好规定。<sup>[4](https://www.rfc-editor.org/info/rfc5952/)</sup>

**规范形式。** RFC 5952由IPv6维护工作组的S. Kawamura和M. Kawashima于2010年8月发表，以单一推荐表示法解决了这种灵活性：十六进制字符必须小写，字段中的前导零必须省略，“::”必须替换最长的零组串，若长度相同则替换最左侧的一段。<sup>[4](https://www.rfc-editor.org/info/rfc5952/)</sup>对于嵌有IPv4部分的地址，如IPv4映射地址，IPv4部分以点分十进制书写。在URI中，依照RFC 3986，IPv6字面量用方括号括起，因为裸露的冒号会与端口分隔符产生歧义。<sup>[4](https://www.rfc-editor.org/info/rfc5952/)</sup>

## 主机如何获取地址

无状态地址自动配置（SLAAC）规定于RFC 4862，是主机无需服务器即可配置自身地址的机制。路由器通告用于标识链路上各子网的前缀，主机生成接口标识符（许多情况下由接口的链路层地址导出），再将二者组合成一个地址。在没有路由器的情况下，主机仍可生成链路本地地址，这足以供同一链路上的节点之间通信。<sup>[6](https://www.rfc-editor.org/info/rfc4862/)</sup>在地址被分配之前，重复地址检测会验证其在链路上的唯一性；检查进行期间，暂定地址不用于正常流量。<sup>[6](https://www.rfc-editor.org/info/rfc4862/)</sup>

每个SLAAC地址带有两个生存期。地址处于首选状态时，其在新的通信中的使用不受限制；当它变为弃用状态时，新连接应使用其他地址，但现有通信可以继续，发往弃用地址的数据报仍必须处理。当有效生存期到期，绑定即失效，该地址可能被重新分配给其他地方。<sup>[6](https://www.rfc-editor.org/info/rfc4862/)</sup>需要对确切分配进行更严格控制的环境，可以改用[DHCPv6](https://www.edgepedia.org/zh/dhcpv6)，或将其与SLAAC并用；主机会接受来自两个来源的信息的并集。<sup>[6](https://www.rfc-editor.org/info/rfc4862/)</sup>

**隐私与稳定性。** 稳定的接口标识符会使设备可跨网络、跨时间被追踪。RFC 8981于2021年2月发表，废止了RFC 4941，规定了对SLAAC的一项扩展，通过生成临时地址来缓解这一问题；它作为SLAAC隐私扩展的一部分随机生成接口标识符。<sup>[10](https://www.rfc-editor.org/rfc/rfc8981.html)</sup><sup> • </sup><sup>[11](https://www.rfc-editor.org/rfc/rfc9099.html)</sup>与之互补的需求是在单一网络内的稳定性：RFC 8064结合RFC 7217的生成机制，使节点对每个网络前缀保持相同的接口标识符，从而在给定网络上拥有稳定地址，而在不同网络上拥有不同地址。<sup>[11](https://www.rfc-editor.org/rfc/rfc9099.html)</sup>

## DNS集成

[域名系统](https://www.edgepedia.org/zh/domain-name-system)通过RFC 3596获得IPv6支持，该文档定义了AAAA资源记录类型，用于将域名映射到IPv6地址，并定义了IP6.ARPA域，用于基于地址的查询，同时更新了现有查询类型的定义。<sup>[7](https://www.rfc-editor.org/info/rfc3596/)</sup>区域的名称服务器存在AAAA记录，本身并不保证仅靠IPv6即可达，因为整个委派链也必须在IPv6上完成解析。<sup>[12](https://arxiv.org/abs/2302.11393)</sup>

## 采用情况

IPv6于1998年设计，作为IPv4的继任者；IETF早在1994年就预测IPv4有限的地址池将在2005年至2011年间耗尽。<sup>[1](https://www.rfc-editor.org/info/rfc2460/)</sup><sup> • </sup><sup>[13](https://datatracker.ietf.org/doc/html/rfc1752)</sup>部署滞后了二十年，随后加速：谷歌对通过IPv6访问其服务的用户的测量于2026年3月28日首次达到50%，而APNIC的测量显示IPv6使用率约占互联网用户的43%，亚洲和美洲接近50%。<sup>[8](https://www.tomshardware.com/networking/ipv6-usage-reaches-historic-50-percent-across-google-services-matching-ipv4-increased-usage-eases-pressure-on-the-ipv4-address-market-as-new-protocol-designed-in-1998-finally-hits-its-stride)</sup>APNIC通过每天呈现2500万至3000万次广告展示来衡量部署情况，并按联合国统计司和ITU-T的互联网用户数对各经济体结果加权。<sup>[14](https://blog.apnic.net/2025/11/14/how-we-measure-ipv6/)</sup>由于两套测量系统从不同观测点观察流量，其数字存在差异。<sup>[15](https://blog.apnic.net/2016/07/08/vivas-measuring-ipv6-internets-core/)</sup>

该协议本身于2017年7月以RFC 8200（STD 86）达到[互联网标准](https://www.edgepedia.org/zh/internet-standard)地位，同样由Deering和Hinden撰写，废止了RFC 2460；其所引用的地址格式仍为RFC 4291。<sup>[16](https://www.rfc-editor.org/info/rfc8200/)</sup>

## References

1. [RFC 2460: Internet Protocol, Version 6 (IPv6) Specification, RFC Editor](https://www.rfc-editor.org/info/rfc2460/)
2. [FAQ on IPv6 Adoption and IPv4 Exhaustion, Internet Society](https://www.internetsociety.org/deploy360/ipv6/faq/)
3. [RFC 4291: IP Version 6 Addressing Architecture, RFC Editor](https://www.rfc-editor.org/info/rfc4291/)
4. [RFC 5952: A Recommendation for IPv6 Address Text Representation, RFC Editor](https://www.rfc-editor.org/info/rfc5952/)
5. [IANA IPv6 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv6-special-registry)
6. [RFC 4862: IPv6 Stateless Address Autoconfiguration, RFC Editor](https://www.rfc-editor.org/info/rfc4862/)
7. [RFC 3596: DNS Extensions to Support IP Version 6, RFC Editor](https://www.rfc-editor.org/info/rfc3596/)
8. [IPv6 usage reaches historic 50% across Google services, Tom's Hardware](https://www.tomshardware.com/networking/ipv6-usage-reaches-historic-50-percent-across-google-services-matching-ipv4-increased-usage-eases-pressure-on-the-ipv4-address-market-as-new-protocol-designed-in-1998-finally-hits-its-stride)
9. [IANA IPv6 Address Space](https://www.iana.org/assignments/ipv6-address-space)
10. [RFC 8981: Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6, RFC Editor](https://www.rfc-editor.org/rfc/rfc8981.html)
11. [RFC 9099: Operational Security Considerations for IPv6 Networks, RFC Editor](https://www.rfc-editor.org/rfc/rfc9099.html)
12. [How Ready Is DNS for an IPv6-Only World? arXiv](https://arxiv.org/abs/2302.11393)
13. [RFC 1752: The Recommendation for the IP Next Generation Protocol, IETF](https://datatracker.ietf.org/doc/html/rfc1752)
14. [How we measure: IPv6, APNIC Blog](https://blog.apnic.net/2025/11/14/how-we-measure-ipv6/)
15. [vizAS: Measuring IPv6 from the Internet's core, APNIC Blog](https://blog.apnic.net/2016/07/08/vivas-measuring-ipv6-internets-core/)
16. [RFC 8200: Internet Protocol, Version 6 (IPv6) Specification, RFC Editor](https://www.rfc-editor.org/info/rfc8200/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › IP protocol versions, variants, and options

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/ipv6-address

English original: https://www.edgepedia.org/ipv6-address
