数据包中的IP ID=0是异常的数据包吗

首先先给结论,数据包中的IP ID=0(IP ID 0x0000)是正常的数据包。

在RFC791中是这样定义IP ID(IP Identification)的:

Identification field is used for proper reassembly of the fragmented IP datagrams. The source host must put a unique value in this field before transmitting the IP datagram, even if it not fragmented. If this IP datagram happens to be fragmented by a router in the path (due to a smaller MTU), then this number is copied into all the fragments of the original IP datagram. The receiving host uses this number to identify the fragments of this IP datagram to reassemble and get the original IP datagram.(标识字段用于正确重组分段的 IP 数据报。源主机必须在传输 IP 数据报之前在此字段中放置一个唯一值,即使它没有分片。如果此 IP 数据报恰好被路径中的路由器分段(由于较小的 MTU),则此编号将复制到原始 IP 数据报的所有分段中。接收主机用这个编号来识别这个IP数据报的分片,重新组装得到原始IP数据报。)

也就是说IP ID只是用来分片和重组的,如果数据包分片字段中“Don't Fragment”为1的帧中,计算机不需要读取IP Identification 字段,就能完成数据帧的传输,因此一些堆栈将其设置为任意值,如 0x0000,只要它们设置 Don't Fragment 位,就是符合 RFC 的定义的,虽然这增加了网络分析时的难度。

另外如果数据包分片字段中“Don't Fragment”为0,且在“More Fragment”为1的分片数据帧中,计算机需要读取IP Identification 字段,完成数据包的重组,则会在IP ID字段中增加

在网络中遇到过负载均衡设备、防火墙和苹果系统的设备也偶尔会看到将IP ID 设置成0x0000的数据帧。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值