处理具有未知 IPv6 扩展标头的数据包 [英] Processing packets with unknown IPv6 extension headers

查看:18
本文介绍了处理具有未知 IPv6 扩展标头的数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否应该丢弃带有未知 IPv6 扩展标头的数据包?

Should one discard a packet with an unknown IPv6 extension header?

我无法通过检查 RFC 找到这个问题的答案.IPv6 Essentials 一书在第 22 页指出:

I could not find an answer to this question by examining the RFC. The book IPv6 Essentials states on page 22:

如果一个节点需要下一个头,但无法识别下一个头字段中的值,则需要丢弃该数据包并向数据包的源发送 ICMPv6 参数问题消息.

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 堆栈知道如何处理标头,否则无法丢弃带有自定义扩展标头的 IPv6 数据包.或者等效地,如果路径上的单个 IPv6 设备不知道如何处理自定义标头,它会丢弃数据包.

I read this as: a IPv6 packet with a custom extension header cannot will be dropped unless all IPv6 stacks along the path know how to deal with the header. Or equivalently, if a single IPv6 device along the path does not know how to handle a custom header, it discards the packet.

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

This seems at odds with the general idea of extension: I cannot introduce a new extension without upgrading the whole network, even if the custom extension does not influence a generic IPv6 stack.

推荐答案

来自 RFC2460(Internet 协议,版本 6 (IPv6)):

From RFC2460 (Internet Protocol, Version 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.

由于扩展标头使用 Next Header 字段,我将此解释为意味着您应该丢弃数据包并返回 ICMP 错误.请注意,他仅适用于目标主机.路由器应该忽略所有扩展头:

As extension headers use the Next Header field I'd interpret this as meaning you're expected to discard the packet and send an ICMP error back. Note that his only applies to the destination host. Routers are supposed to ignore all extension headers:

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.

这篇关于处理具有未知 IPv6 扩展标头的数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆