Skip to content

Main content

Vlan Tag TPID TCI Field Split Tool

Compute vlan tag tpid tci field split from explicit bounded inputs.

Loading tool…

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

  1. Enter bytes. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
bytesExactly four integer octets of the TPID+TCI tag in network byte order.Required. Array of safe integer; maximum items 256.
Output fieldInterpretationReturned shape
tpidTpidRequired. Safe integer.
priorityPriorityRequired. Safe integer.
dropEligibleBoolean value of TCI bit 12 as named by this implementation.Required. Boolean.
vlanIdRaw low twelve bits, 0..4095; reserved/special use is not validated.Required. Safe integer.
json
{
  "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

  1. Calculation and input contract: network/vlan-tag-tpid-tci-field-split — tool.io

  2. Inter-Switch Link and IEEE 802.1Q Frame Format — Cisco Systems

Similar or alternative tools