▸Protocol notes for this page (click to expand)

QinQ (802.1Q-in-802.1Q)

What it is for

There are only 4094 VLANs. A carrier provides layer-2 circuits to hundreds of customers, and each customer uses VLANs too, so customer A's VLAN 10 collides with customer B's VLAN 10.

QinQ (802.1ad) adds a carrier tag outside the customer's existing tag. Inside the carrier network, devices forward by the outer tag only, whatever VLANs the customer uses inside.

What each tag is for

Outer (S-tag, TPID 0x88a8): the only tag carrier devices look at; it identifies the customer;
Inner (C-tag, TPID 0x8100): the customer's own VLAN, carried transparently and not interpreted by the carrier.

So the customer's tag leaves the carrier network unchanged, and the carrier network is a transparent layer-2 link to the customer.

Common misconceptions

A double-tagged frame can be up to 1526 bytes. Every device in the carrier network must support that size; otherwise small packets get through and large ones are dropped. This is the most common QinQ fault.

The outer tag is added by the carrier on the PE; the customer can neither see nor change it.

The standard outer TPID is 0x88a8. Some devices default to 0x8100; if the two ends differ, the outer tag cannot be parsed.