IPv4 标识字段范围的问题

Problems with IPv4 identification field range

我使用 UDP 套接字 (IPv4) 向终端系统发送 64KB 数据包。当我使用 Wireshark 抓取终端系统的数据包时,我发现重组后的 IP 数据报的 IP 标识字段范围为 0x0000-0x7fff(0-32767),即当终端系统收到 ID 为 0x7fff 的数据报时,下一个数据报包含 0x0000 而不是 0x8000.

的 id 值

这让我很困惑。为什么不 0x0000-0xffff(0-65536)

我的发送程序是用 C# 代码编写的,运行 在 Windows7 上。网卡品牌是intel。

请帮忙。

标识字段的值是发送者的选择。它可以以发送者喜欢的任何方式分配。 RFC 791 对此进行了说明(强调):

The identification field is used to distinguish the fragments of one datagram from those of another. The originating protocol module of an internet datagram sets the identification field to a value that must be unique for that source-destination pair and protocol for the time the datagram will be active in the internet system. The originating protocol module of a complete datagram sets the more-fragments flag to zero and the fragment offset to zero.

因此发送系统可以自由地将其 identification 值限制为 0 - 0x7fff 只要任何一个数据报是 "unique ... for the time the datagram will be active."