# 互联网协议

互联网协议（Internet Protocol，IP）是互联网主要的网络层协议：它通过一个互联的分组交换网络系统，将称为数据报的数据块从源主机传送到目的主机，使用定长地址来标识端点<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup>。目前有两个版本在使用。IPv4于1981年9月在RFC 791中规定，使用32位地址；IPv6于2017年7月在RFC 8200中规定，作为IPv4的继任者，使用128位地址<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup><sup> • </sup><sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup>。IP最常与[传输控制协议](https://www.edgepedia.org/zh/transmission-control-protocol)（Transmission Control Protocol，TCP）一起部署，两者合称TCP/IP<sup>[3](https://www.darpa.mil/about/innovation-timeline/tcp-ip)</sup>。

| 关键事实 | 详情 |
|---|---|
| 功能 | 通过互联的分组交换网络将数据报从源传输到目的地；为“小分组”网络提供长数据报的分片与重组<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup> |
| 服务模型 | 仅尽力而为：没有端到端数据可靠性、流量控制、排序或其他主机到主机服务的机制<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup> |
| IPv4 | 美国国防部标准互联网协议，RFC 791，1981年9月，取代RFC 760；32位地址，约43亿个唯一地址<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup><sup> • </sup><sup>[4](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 | RFC 8200（2017年7月），废止RFC 2460；将地址从32位扩展到128位，约\( 2^{128} \)个地址<sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup><sup> • </sup><sup>[4](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> |
| 起源 | 由国防高级研究计划局的罗伯特·卡恩（Robert Kahn）和斯坦福大学的温顿·瑟夫（Vinton Cerf）创建，作为在阿帕网上发送分组的新协议<sup>[3](https://www.darpa.mil/about/innovation-timeline/tcp-ip)</sup> |
| 旗帜日切换 | 阿帕网于1983年1月1日从NCP切换到TCP/IP；TCP/IP自1980年起一直是国防标准<sup>[5](https://www.internetsociety.org/internet/history-internet/brief-history-internet/)</sup> |
| 当今采用情况 | 谷歌于2026年3月首次测得50%的用户使用IPv6；亚太互联网络信息中心测得全球42%的IPv6能力<sup>[6](https://blog.apnic.net/2026/04/28/google-hits-50-ipv6/?trk=article-ssr-frontend-pulse_little-text-block)</sup> |

## IP的工作原理

IP的范围刻意收得很窄。RFC 791指出，该协议仅限于在互联的网络系统中将一包比特（即互联网数据报）从源传送到目的地所必需的功能；它不提供任何机制来增强端到端数据可靠性、流量控制、排序或主机到主机协议中常见的其他服务<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup>。可靠性和排序改由运行在IP之上的传输协议（如TCP）提供。端到端传输的单位是IP数据报，它由IP首部及其后的传输层数据组成<sup>[7](https://www.rfc-editor.org/rfc/rfc1122.html)</sup>。

**分片与生存期控制。** 由于路径上的网络可能接受不同的最大分组尺寸，当需要通过“小分组”网络传输时，IP提供了长数据报的分片与重组<sup>[1](https://www.rfc-editor.org/info/rfc791/)</sup>。在IPv4中，生存时间（Time to Live，TTL）字段限制数据报的生存期并终止路由环路；尽管TTL名义上是以秒为单位的时间，但每个路由器都必须将该字段至少减一，使其具有跳数的属性<sup>[8](https://www.rfc-editor.org/info/rfc1812/)</sup>。IPv6用8位的跳数限制（Hop Limit）字段取代TTL，这是一个无符号整数，由每个转发该分组的节点减1<sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup>。

**路径MTU发现。** 在IPv6中，路由器不对传输中的分组进行分片；由源端发现路径上最小的链路最大传输单元。RFC 8201规定的路径MTU发现依赖于ICMPv6“分组过大”消息：当分组对某一跳来说过大时，该节点将其丢弃并返回这样一条消息，源端则减小其假定的路径MTU<sup>[9](https://www.rfc-editor.org/info/rfc8201/)</sup>。如果ICMPv6消息被阻断，连接可以完成TCP三次握手，然后在数据传输期间挂起，这种状态称为黑洞连接<sup>[9](https://www.rfc-editor.org/info/rfc8201/)</sup>。

## 阿帕网中的起源

IP出自国防高级研究计划局（DARPA）的分组交换研究计划。罗伯特·卡恩于1972年加入DARPA信息处理技术办公室担任项目经理，他邀请斯坦福大学的温顿·瑟夫合作，为在阿帕网上发送数据分组开发新的通信协议；成果就是传输控制协议和互联网协议<sup>[3](https://www.darpa.mil/about/innovation-timeline/tcp-ip)</sup>。阿帕网本身是DARPA的第一个分组交换网络，于1969年开始运行，而至今仍在记录互联网协议的[征求意见稿](https://www.edgepedia.org/zh/request-for-comments)（Request for Comments）系列，最初就是作为其协议笔记开始的<sup>[10](https://www.internetsociety.org/internet/history-internet/brief-history-internet-related-networks/)</sup>。

**1983年的切换。** 阿帕网最初运行网络控制程序（Network Control Program，NCP），该程序专为阿帕网设计，不具备互联网络能力<sup>[11](https://www.tomshardware.com/networking/arpanet-standardized-tcp-ip-on-this-day-in-1983-43-year-old-standard-set-the-foundations-for-todays-internet)</sup>。1983年1月1日，阿帕网的系统架构师将所有主机从NCP切换到TCP/IP，这是一次“旗帜日”过渡，要求每台主机同时转换；社区为此筹划了数年，而过渡进行得异常顺利<sup>[5](https://www.internetsociety.org/internet/history-internet/brief-history-internet/)</sup><sup> • </sup><sup>[11](https://www.tomshardware.com/networking/arpanet-standardized-tcp-ip-on-this-day-in-1983-43-year-old-standard-set-the-foundations-for-todays-internet)</sup>。TCP/IP早在三年前即1980年就被采纳为国防标准，到1984年，美国和欧洲已有100多所大学和研究机构使用它联网<sup>[5](https://www.internetsociety.org/internet/history-internet/brief-history-internet/)</sup><sup> • </sup><sup>[11](https://www.tomshardware.com/networking/arpanet-standardized-tcp-ip-on-this-day-in-1983-43-year-old-standard-set-the-foundations-for-todays-internet)</sup>。这次过渡还使阿帕网得以拆分为支持作战军事需求的MILNET和支持研究的阿帕网<sup>[5](https://www.internetsociety.org/internet/history-internet/brief-history-internet/)</sup>。

## IPv4与地址短缺

IPv4的32位寻址提供约43亿个唯一地址，开发者很早就认识到互联网的增长将耗尽这一地址池<sup>[4](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>。一种广泛部署的应对措施是网络地址转换器（Network Address Translator，NAT），它在RFC 1631中引入并在RFC 3022中详述，在本地网络使用的私有地址与全球可路由地址之间进行转换，并在此过程中操作IP、TCP、UDP和ICMP首部<sup>[12](https://www.rfc-editor.org/info/rfc3022/)</sup>。NAT会妨碍那些在有效载荷中携带IP地址的应用程序的连通性，这一复杂问题记录在RFC 3027中<sup>[13](https://www.rfc-editor.org/info/rfc3027/)</sup>。随着IPv4地址空间接近耗尽，IPv4地址获得了市场价值，一些公司已接受其作为贷款抵押品<sup>[4](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>。

版本号5无法用于继任者：[互联网流协议](https://www.edgepedia.org/zh/internet-stream-protocol)（Internet Stream Protocol）这一数据流实验已在开发文档中占用了v5的编号，因此下一个版本被编号为6<sup>[14](https://www.tomshardware.com/networking/ipv5-and-the-internet-stream-protocol-a-data-streaming-experiment-rendered-unnecessary-by-broadband)</sup>。

## IPv6

IPv6被设计为IPv4的继任者。其变化主要体现在扩展的寻址能力上，将地址大小从32位增加到128位，以支持更多层次的寻址结构、多得多的可寻址节点以及更简单的自动配置<sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup>。\( 2^{128} \)的地址空间大约相当于340万亿亿亿个地址<sup>[4](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分组携带一个固定的基本首部，其后是零个、一个或多个扩展首部，每个扩展首部由前一首部的下一首部（Next Header）字段标识；下一首部字段使用与IPv4协议字段相同的值，例如6表示TCP，17表示UDP<sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup>。除逐跳选项首部外，其他扩展首部在分组到达目的地之前不会由中间节点处理；逐跳选项首部如果存在，必须紧跟在IPv6首部之后<sup>[2](https://www.rfc-editor.org/info/rfc8200/)</sup>。

## 采用与过渡

IPv6的部署多年来进展缓慢。当亚太互联网络信息中心在2011年底开始大规模测量时，被测互联网用户群中只有0.3%（约每300个用户中有1个）能够成功使用IPv6访问网络对象<sup>[15](https://labs.ripe.net/author/gih/what-drives-ipv6-deployment/)</sup>。由[互联网协会](https://www.edgepedia.org/zh/internet-society)主导的2012年6月6日“世界IPv6启动日”是一个重要的催化剂，全球各地的公司永久性地为其网站和服务启用了IPv6<sup>[16](https://www.internetsociety.org/deploy360/ipv6/faq/)</sup><sup> • </sup><sup>[17](https://www.internetsociety.org/history/)</sup>。

**当前水平。** 谷歌的追踪图表显示，2026年3月28日全球用户中首次有50%通过IPv6访问其服务，而APNIC实验室的独立测量截至2026年4月记录到全球42%的IPv6能力；两项测量存在差异主要是因为权重模型不同，不过在单个经济体层面上它们大体一致<sup>[6](https://blog.apnic.net/2026/04/28/google-hits-50-ipv6/?trk=article-ssr-frontend-pulse_little-text-block)</sup>。采用情况因国家而异，差异相当大<sup>[18](https://research.google/pubs/evaluating-ipv6-adoption-in-the-internet/)</sup>。

**过渡机制。** 由于IPv4和IPv6不能直接互操作，网络使用多种技术。双栈运行——端点同时具有原生IPv4和IPv6连接——是网络端点的首选方案<sup>[19](https://labs.ripe.net/author/emileaben/6to4-how-bad-is-it-really/)</sup>。隧道和转换方法通过封装或双重转换，在纯IPv6网络中承载IPv4分组<sup>[20](https://arxiv.org/abs/1612.00309)</sup>。对于纯IPv6网络，NAT64（无论是否搭配464XLAT）是终端主机支持最广泛的机制，而DHCPv4的“仅IPv6首选选项”（RFC 8925）让管理员在所谓的“IPv6为主”网络中指示主机优先使用IPv6<sup>[21](https://datatracker.ietf.org/doc/html/rfc8925)</sup>。早期的自动过渡技术存在可靠性问题：2010至2011年前后的测量发现，大约15%的6to4连接在TCP握手阶段失败，这降低了用户体验，使一些大型内容提供商不愿启用IPv6<sup>[19](https://labs.ripe.net/author/emileaben/6to4-how-bad-is-it-really/)</sup><sup> • </sup><sup>[22](https://labs.ripe.net/author/emileaben/6to4-why-is-it-so-bad/)</sup>。

## References

1. [RFC 791: Internet Protocol (September 1981), RFC Editor](https://www.rfc-editor.org/info/rfc791/)
2. [RFC 8200: Internet Protocol, Version 6 (IPv6) Specification (July 2017), RFC Editor](https://www.rfc-editor.org/info/rfc8200/)
3. [TCP/IP, DARPA Innovation Timeline](https://www.darpa.mil/about/innovation-timeline/tcp-ip)
4. [IPv6 usage reaches historic 50% across Google services, Tom's Hardware (April 2026)](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)
5. [A Brief History of the Internet, Internet Society](https://www.internetsociety.org/internet/history-internet/brief-history-internet/)
6. [Google hits 50% IPv6, APNIC Blog (April 2026)](https://blog.apnic.net/2026/04/28/google-hits-50-ipv6/?trk=article-ssr-frontend-pulse_little-text-block)
7. [RFC 1122: Requirements for Internet Hosts, Communication Layers, RFC Editor](https://www.rfc-editor.org/rfc/rfc1122.html)
8. [RFC 1812: Requirements for IP Version 4 Routers (June 1995), RFC Editor](https://www.rfc-editor.org/info/rfc1812/)
9. [RFC 8201: Path MTU Discovery for IP version 6 (July 2017), RFC Editor](https://www.rfc-editor.org/info/rfc8201/)
10. [A Brief History of the Internet & Related Networks, Internet Society](https://www.internetsociety.org/internet/history-internet/brief-history-internet-related-networks/)
11. [ARPANET standardized TCP/IP on this day in 1983, Tom's Hardware (January 2026)](https://www.tomshardware.com/networking/arpanet-standardized-tcp-ip-on-this-day-in-1983-43-year-old-standard-set-the-foundations-for-todays-internet)
12. [RFC 3022: Traditional IP Network Address Translator (February 2001), RFC Editor](https://www.rfc-editor.org/info/rfc3022/)
13. [RFC 3027: Protocol Complications with the IP Network Address Translator, RFC Editor](https://www.rfc-editor.org/info/rfc3027/)
14. [IPv5 and the Internet Stream Protocol, Tom's Hardware](https://www.tomshardware.com/networking/ipv5-and-the-internet-stream-protocol-a-data-streaming-experiment-rendered-unnecessary-by-broadband)
15. [What Drives IPv6 Deployment?, RIPE Labs / Geoff Huston, APNIC](https://labs.ripe.net/author/gih/what-drives-ipv6-deployment/)
16. [FAQ on IPv6 adoption and IPv4 exhaustion, Internet Society](https://www.internetsociety.org/deploy360/ipv6/faq/)
17. [Our History, Internet Society](https://www.internetsociety.org/history/)
18. [Evaluating IPv6 Adoption in the Internet, Google Research](https://research.google/pubs/evaluating-ipv6-adoption-in-the-internet/)
19. [6to4, How Bad is it Really?, RIPE Labs (December 2010)](https://labs.ripe.net/author/emileaben/6to4-how-bad-is-it-really/)
20. [Comparison Between IPv4 to IPv6 Transition Techniques, arXiv](https://arxiv.org/abs/1612.00309)
21. [RFC 8925: IPv6-Only Preferred Option for DHCPv4, IETF](https://datatracker.ietf.org/doc/html/rfc8925)
22. [6to4, Why is it so Bad?, RIPE Labs (March 2011)](https://labs.ripe.net/author/emileaben/6to4-why-is-it-so-bad/)

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

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Internet protocol suite

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/internet-protocol

English original: https://www.edgepedia.org/internet-protocol
