【问题标题】:Processing packets with unknown IPv6 extension headers处理具有未知 IPv6 扩展标头的数据包
【发布时间】:2012-04-08 12:40:15
【问题描述】:

问题

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

详情

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

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

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

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

【问题讨论】:

  • +1 为您的模板。我刚刚成为 Question-Details 方法的忠实粉丝
  • 不是当“问题”部分适合标题时!

标签: networking network-programming network-protocols ipv6 packet


【解决方案1】:

来自 RFC2460(互联网协议,版本 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 错误。 请注意,他仅适用于目标主机。路由器应该忽略所有扩展头:

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.

【讨论】:

  • 啊,所以关键的见解是路由器忽略扩展标头,它允许在终端主机或中间盒上部署自定义扩展。谢谢!
  • 路由器忽略所有扩展头,除非扩展头是数字0,即逐跳扩展头。
猜你喜欢
  • 2013-07-05
  • 2013-01-23
  • 2013-07-16
  • 1970-01-01
  • 2013-07-06
  • 1970-01-01
  • 2011-08-05
  • 2012-10-26
  • 2014-05-22
相关资源
最近更新 更多