Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Processing packets with unknown IPv6 extension headers

Question

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

Details

I could not find an answer to this question by examining the RFC. The book IPv6 Essentials states on page 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.

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.

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.

like image 269
mavam Avatar asked Mar 23 '12 23:03

mavam


People also ask

Which extension headers are supported by IPv6 packets?

RFC 2460 defines six IPv6 extension headers: Hop-by-Hop Options header, Destination Options header, Routing header, Fragment header, Authentication header, and Encapsulating Security Payload header. This header carries information that every node must examine along the delivery path of a packet.

What is an IPv6 extension header?

IPv6 extension headers contains supplementary information used by network devices (such as routers, switches, and endpoint hosts) to decide how to direct or process an IPv6 packet. The length of each extension header is an integer multiple of 8 octets. This allows subsequent extension headers to use 8-octet structures.

What is IPv6 packet format?

An IPv6 packet is the smallest message entity exchanged using Internet Protocol version 6 (IPv6). Packets consist of control information for addressing and routing and a payload of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers.

What is extension in IPv6 than IPv4?

An IPv6 address is 4 times larger than IPv4, but surprisingly, the header of an IPv6 address is only 2 times larger than that of IPv4. IPv6 headers have one Fixed Header and zero or more Optional (Extension) Headers. All the necessary information that is essential for a router is kept in the Fixed Header.


1 Answers

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.

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.
like image 91
Kristof Provost Avatar answered Sep 21 '22 16:09

Kristof Provost