gpt4 book ai didi

networking - 处理具有未知 IPv6 扩展 header 的数据包

转载 作者:行者123 更新时间:2023-12-03 23:46:08 24 4
gpt4 key购买 nike

问题

是否应该丢弃具有未知 IPv6 扩展 header 的数据包?

细节

我无法通过检查 RFC 找到这个问题的答案。 .本书IPv6 Essentials第 22 页上的状态:

If a node is required the next header but cannot identify the value in the Next Header field, it is required to discard the packet and send an ICMPv6 Parameter Problem message back to the source of the packet.



我将其解读为:除非路径上的所有 IPv6 堆栈都知道如何处理 header ,否则不能丢弃具有自定义扩展 header 的 IPv6 数据包。或者等效地,如果路径上的单个 IPv6 设备不知道如何处理自定义 header ,它会丢弃该数据包。

这似乎与扩展的一般概念不一致:我无法在不升级整个网络的情况下引入新扩展,即使自定义扩展不会影响通用 IPv6 堆栈。

最佳答案

来自 RFC2460(互联网协议(protocol),版本 6 (IPv6)):

If, as a result of processing a header, a node is required to proceed
to the next header but the Next Header value in the current header is
unrecognized by the node, it should discard the packet and send an
ICMP Parameter Problem message to the source of the packet, with an
ICMP Code value of 1 ("unrecognized Next Header type encountered")
and the ICMP Pointer field containing the offset of the unrecognized
value within the original packet. The same action should be taken if
a node encounters a Next Header value of zero in any header other
than an IPv6 header.

由于扩展 header 使用 Next Header 字段,我将其解释为意味着您应该丢弃数据包并返回 ICMP 错误。
请注意,他仅适用于目标主机。路由器应该忽略所有扩展头:
With one exception, extension headers are not examined or processed
by any node along a packet's delivery path, until the packet reaches
the node (or each of the set of nodes, in the case of multicast)
identified in the Destination Address field of the IPv6 header.

关于networking - 处理具有未知 IPv6 扩展 header 的数据包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9847923/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com