redzilla
All tools
Layer 2

Q-in-Q (802.1ad)

Build or decode a frame with 802.1ad double tagging: the provider S-TAG (0x88a8) and the customer C-TAG (0x8100), each with PCP, DEI and VLAN ID in binary, plus the 8-byte overhead.

Mode
S-TAG Provider tag TPID 0x88A8

Usable: 1–4094. Assigned by the operator to separate customers.

C-TAG Customer tag TPID 0x8100

Usable: 1–4094. The original VLAN of the customer's network.

redzilla.cl — qinq
 
S-TCI
C-TCI
Double tag
S-VID · service VLAN
C-VID · customer VLAN
Q-in-Q overhead
8 bytes
2 tags × 4 bytes

Binary breakdown of each TCI (16 bits)

PCP (3 bits) DEI (1 bit) VID (12 bits)

802.1ad double-tagged frame structure

Order after the source MAC, two 4-byte tags are stacked: first the S-TAG (outer) and then the C-TAG (inner), before the EtherType.

S-TAG from the provider, TPID 0x88A8 (802.1ad). Its VID (S-VID) identifies the service or the customer inside the operator's network.

C-TAG from the customer, TPID 0x8100 (802.1Q). Its VID (C-VID) is the original VLAN the customer carries untouched.

TCI PCP = (TCI >> 13) & 0x7 · DEI = (TCI >> 12) & 0x1 · VID = TCI & 0x0FFF.

Overhead 8 bytes total. The trunk MTU must absorb them: with a 1500-byte payload, the double-tagged frame reaches 1526 bytes on the wire (jumbo / baby-giant frames are often used).

Runs locally in your browser · no sign-up · nothing leaves your browser

Was this tool useful?
Disclaimer We take great care to keep every tool accurate and review it thoroughly; even so, we can't guarantee it is free of errors or take responsibility for how the results are used. We recommend double-checking anything critical.
Found an error? Let us know →