Description
Return priority from the top three TCI bits, dropEligible from bit 12, and vlanId from the low 12 bits.
An Ethernet VLAN tag contains a protocol identifier and a control field whose bits encode priority, a one-bit marker, and a VLAN identifier. Octet order and bit positions matter when extracting fields. Reading a tag does not validate a complete frame, authorize a VLAN assignment, or configure a network.
Return priority from the top three TCI bits, dropEligible from bit 12, and vlanId from the low 12 bits.
When to use this tool
Use Vlan Tag TPID TCI Field Split when you have exactly the four tag octets and need their supplied field values.
How to use the tool and how it works
- Enter bytes. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read tpid, priority, dropEligible, vlanId. Inspect dropEligible before interpreting the associated values.
Require exactly four integer bytes from zero through 255. Read TPID=256*bytes[0]+bytes[1] and TCI=256*bytes[2]+bytes[3] in network byte order. Return priority from the top three TCI bits, dropEligible from bit 12, and vlanId from the low 12 bits.1
The four-octet 802.1Q layout groups a 16-bit protocol identifier with control-field portions of three, one, and twelve bits. The parser extracts that layout without validating a full frame.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| bytes | Exactly four integer octets of the TPID+TCI tag in network byte order. | Required. Array of safe integer; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| tpid | Tpid | Required. Safe integer. |
| priority | Priority | Required. Safe integer. |
| dropEligible | Boolean value of TCI bit 12 as named by this implementation. | Required. Boolean. |
| vlanId | Raw low twelve bits, 0..4095; reserved/special use is not validated. | Required. Safe integer. |
{
"input": {
"bytes": [
129,
0,
176,
7
]
},
"output": {
"tpid": 33024,
"priority": 5,
"dropEligible": true,
"vlanId": 7
}
} Limitations and assumptions
- The input is the tag's four octets, not an entire Ethernet frame. Any 16-bit TPID and VLAN field value are returned, including reserved/special IDs; no TPID whitelist, VLAN assignment, nested tags, frame length, checksum, network configuration, or packet transmission is validated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a full Ethernet/VLAN parser for frame structure, tag stacks, payload protocol, and checksums. Validate protocol identifiers and VLAN-use rules separately when interpreting or applying raw extracted fields.
References
Similar or alternative tools
- Number: Unsigned Word Maximum Decimal Digits
Determine exact maximum unsigned word value and required decimal display digits for a supplied bit width.
- Radix Integer Single Digit Borrow
Return the nonnegative remainder modulo radix as digit and outgoingBorrow one only when the raw subtraction is negative.