SixXS::Sunset 2017-06-06

What determines the IPv4 or IPv6 stack a packet goes into ?
[be] Shadow Hawkins on Thursday, 08 December 2011 10:22:12
Hello all, Recently, I went through quite a lot of IPv6- related RFC's, to get to know the way IPv6 works. I started to ask myself in that process : exactly what is it that determines the stack "some" packet is going into (IPv4 stack or IPv6 stack) ? I can't remember having seen anything about that in any of these RFC's. On the one hand, I tend to say that the stack a packet is going in, is determined by the Ethernet frame's header, in which 0x0800 or 0x86DD is the decision maker. On the other hand, I've read in some IPv6 publication that the decision maker is the "Version" field of the IP packet. Can anyone say with certainty which one of both it really is ? Preferably refering to the related RFC ? Or maybe this is something which is rather "OS" or "implementation" dependent ? And continuing on that : what is to be done by the OS in case of mismatch between both, like e.g. if an Ethernet header specifies 0x86DD ("IPv6 packet following"), but the IP header's "Version" specifies 4 ? Any RFC specifying the behaviour in such cases ?
What determines the IPv4 or IPv6 stack a packet goes into ?
[ch] Jeroen Massar SixXS Staff on Thursday, 08 December 2011 10:33:20
For Ethernet as good as always the Ethernet field. For tunneling mechanisms, it is that tunneling mechanisms header that determines it in a same way. If the version field does not match, eg Ethernet indicates IPv4 while the IP version field indicates IPv6 then the packet likely simply gets dropped, at least that is what I have seen all the implementations I have come across. There are tunneling mechanisms without a 'packet type' kind of header, in that case they assume IP and then of course they just look at the version number.
What determines the IPv4 or IPv6 stack a packet goes into ?
[be] Shadow Hawkins on Thursday, 08 December 2011 12:04:10
OK, this sounds as I expected (talking more especially about the "simple", "normal", "not-tunneling" case). Would you happen to know if this is RFC- specified somewhere ? Then this would also mean that the publication I'm talking about is wrong, not so ? For those who have it at hand : from "Migrating to IPv6" by Marc Blanchet (John Wiley & Sons) I understand, from Par 3.4.1, first 2 sentences, that it is the IP header's version field which determines the OS' stack the packet is relayed to. Anyhow, it puzzles me why there is this redundant information in both the Ethernet as well as in the IP header...
What determines the IPv4 or IPv6 stack a packet goes into ?
[ch] Jeroen Massar SixXS Staff on Thursday, 08 December 2011 12:29:59
Would you happen to know if this is RFC- specified somewhere ?
There are a variety of "IPvX over Y" RFCs.
that it is the IP header's version field which determines the OS' stack the packet is relayed to.
That is correct. You are just reading it a bit wrong. And note that Marc Blanchet is one of the few people who actually knows what he is talking of when concerning IPv6. I don't have that book in my little collection though. The steps for IPv6 over Ethernet are: - Parse the Ethernet Header - Look at the Ether Type: if 0x0800 pass it to the IPv4 stack, if 0x08dd pass it to the IPv6 stack, etc Then the IP stack, which could be a combined IPv4/IPv6 stack or a split IPv4/IPv6 stack kicks in: - if version is 4 parse the rest as IPv4 - if version is 6 parse the rest as IPv6 Thus there is nothing wrong with that text, the check just happens on two layers. Even AICCU does this for AYIYA, and sixxsd does it also for proto-41: it first checks Ethernet or AYIYA what it states to be inside the packet, and then checks the version number if that is really in there.
Anyhow, it puzzles me why there is this redundant information in both the Ethernet as well as in the IP header...
IP can be carried in anything else, this way one can do fast switching on the Ethernet level and one could use IP outside of the Ethernet header or anything else and still know what it is. It is 'redundant' but that gives an extra level of verification too, as one should never have an Ethernet frame stating IPv6 while IPv4 is in there for instance.

Please note Posting is only allowed when you are logged in.

Static Sunset Edition of SixXS
©2001-2017 SixXS - IPv6 Deployment & Tunnel Broker