Tuesday, May 1, 2018

Ethertypes and QnQ

Today I was setting up an old JDSU test set that doesn't allow setting an Ethertype value for untagged and tagged traffic, only for QnQ, and after mucking with it I decided I needed to research this further. I thought I'd write this up to either be helpful to the community and/or ask for any worthwhile additional information I may have overlooked.

As of this morning, I understood VLAN tags have no field containing data about whether or not that tag is a C-tag or an S-tag. A router will strip off a VLAN tag and process the packet based on that, and the only difference is that it's possible to configure a router with QnQ, at which point the router then continues to look at the packet to see if there's an additional VLAN tag inside the first one, and if there is, act on that as well. As I understood it, if a router's not configured with QnQ the existence of any additional VLAN tags inside the first are immaterial. That being said, I remember configuring Cisco devices a few years ago where we also had to be aware of Ethertype settings. It's been a while so I forget the specifics, but I remember we had to know whether to configure our equipment to use Ethertype 0x8100 or 0x88A8. We never got clear information on what that was about, just that both sides had to match.

Today I was working with a router whose port was configured to be an NNI, and the port was set to expect an Ethertype of 88A8. I didn't think our JDSU specifically needed to be configured for QnQ, I expected that it should be able to pass traffic with only 1 VLAN tag. From the point of view of an ISP I'd expect my customer actually should be sending untagged traffic across my circuit (assuming they have routers at each end, though not everyone does). But this didn't work. I had to specifically set the JDSU for QnQ and tell it to use Ethertype 88A8. Only then could it pass traffic. The inner VLAN was immaterial, but I had to set the JDSU for QnQ and 88A8 before the router would recognize the traffic. Based on what I wrote in my first paragraph I assumed this is because of the 88A8, not that the VLAN tags have any indication of one being an S-tag or C-tag, right?

So I went to 'ze Googles'.

This page seems to say 8100 = regular VLAN traffic and 88A8 = QnQ.

However this page seems to indicate 8100 can also be used on double tagged frames.

The wiki page for 802.1Q matches the first Cisco page I linked to (8100 = regular VLAN traffic and 88A8 = QnQ).

Seeking consensus I keep looking.

The wiki page on Ethertype says 8100 is for a "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path Bridging IEEE 802.1aq with NNI compatibility" and 88A8 is for "Provider Bridging (IEEE 802.1ad) & Shortest Path Bridging IEEE 802.1aq". This seems to indicate that 8100 should be used for QnQ, not 88A8 (the reverse of what seems to be indicated above). It lists 0x9100 as being for "VLAN-tagged (IEEE 802.1Q) frame with double tagging" but that's not an option on the gear I'm working with.

What's interesting are the pictures on that page. If a VLAN tag's needed it gets added before the Ethertype field. But it also says, "A QinQ arrangement would add another four octets tag containing two octets TPID using various EtherType values." I think that's poor English and is supposed to say "A QinQ arrangement would add another four octet tag containing a two octet TPID using various EtherType values." If I'm correct then I was right that Ethertype is not part of the first VLAN tag, but this page seems to be saying the Ethertype IS part of the second VLAN tag.

Clear as mud, right?

So off I go to read RFCs. RFC 5342 doesn't mention 8100 but states that 88A8 is for "Service VLAN tag identifier" which implies QnQ. This IANA page says 8100 is for a C-tag and 88A8 is for an S-tag.

All the other sites I'm seeing are either not IEEE or they're RFC drafts, which not being the published version I wouldn't trust.

So I guess I'm left with nothing concrete. Maybe some equipment automatically assigns the Ethertype based on whether or not you've configured it for QnQ while other equipment gives you the option to modify them separately. I guess the latter is better because it doesn't seem like you can trust the values. But apparently the bottom line is that both VLAN tag and Ethertype have to match or you're SOL, regardless of whether that's part of the VLAN tag or not.

Cheers.



No comments:

Post a Comment