What it does

A VLAN (virtual local area network) keeps its frames apart from every other VLAN's, and on a link that carries several of them each frame says which VLAN it belongs to with a four-octet IEEE 802.1Q tag. This tool answers the two questions that come up most when a trunk does not behave, in two modes:

  • 802.1Q tag. Paste the octets of a tag, or of the start of a frame (destination MAC, source MAC, then the tags), in hexadecimal. The page shows each tag's TPID, PCP, DEI and VID with its 32 bits drawn octet by octet, the traffic type of the PCP and how it decodes under the four PCP selections, stacked tags (Q-in-Q, 802.1ad), and the EtherType, length or neither that follows, named from IANA's list.
  • Trunk VLANs. Paste the trunk port's lines of the two ends of a link, each in its own vendor's syntax: Cisco IOS XE, Juniper Junos, HPE Aruba AOS-CX, MikroTik RouterOS, Extreme Switch Engine, Extreme Fabric Engine, Arista EOS or Huawei VRP, the eight vendors of the switch course. The page shows what each end carries, what it sends tagged and untagged, and, VLAN by VLAN and in both directions, whether a frame arrives in the same VLAN, lands in another one, is dropped, or depends on a behaviour the vendor pages read do not state.

Everything is computed in your browser.

The tag: what it reads

The tag format is in clause 9 of IEEE P802.1ad/D2.4, the public IEEE 802.1 draft of 2004 that carries the 802.1Q text as amended. It is an unapproved draft, and the current edition, 802.1Q-2022, is "Active Standard" at the IEEE Standards Association but not public; the tool reads the draft for the layout and the tables 802.1Q has kept, and the IEEE's current YANG types module (revision 2023-10-26) beside it.

  • TPID, two octets: 0x8100 is the C-TAG, "An 802.1Q Customer VLAN, using the 81-00 EtherType", and 0x88A8 the S-TAG, "An 802.1Q Service VLAN, using the 88-A8 EtherType originally introduced in 802.1ad, and incorporated into 802.1Q (2011)" (YANG types). 0x9100 is read as a tag too, only because Juniper's bridging page says "Junos OS switches support the TPID value 0x9100 for Q-in-Q"; it is not an 802.1Q tag type, IANA's list does not name it, and the page says it reads its TCI with the 802.1Q layout on that page's word alone. No other value is read as a tag.
  • TCI, two octets: the PCP in the first three bits, then one bit, then the 12-bit VID (P802.1ad/D2.4, Figure 9-1). The PCP sits in the first octet, so each two-octet field is read with its first octet as the high-order one: the big-endian order, network byte order, that Big-endian and little-endian: byte order explained explains.
  • PCP, 0 to 7. With the default selection, 8P0D, PCP n is priority n; a port set to 7P1D, 6P2D or 5P3D reads some values as another priority or as drop eligible (Table 6-5), and the page shows all four. The traffic type is the one Table G-2 gives for the priority: 1 Background (BK), 0 Best Effort (BE), 2 Excellent Effort (EE), 3 Critical Applications (CA), 4 Video (VI), 5 Voice (VO), 6 Internetwork Control (IC), 7 Network Control (NC). Background sits at 1 on purpose: "the value 1 effectively communicates a lower priority than 0" (Annex G.4). HPE Aruba's AOS-CX QoS guide gives the same eight today.
  • DEI, one bit. The current IEEE bridge model calls it the Drop Eligible Indicator: with use-dei True a port marks the frame drop eligible; otherwise "the DEI shall be transmitted as zero and ignored on receipt". In the 2004 C-TAG the same bit was the CFI, the Canonical Format Indicator (section 9.6); in the S-TAG it was always DE (section 9.7).
  • VID, 0 to 4095. Table 9-2 gives three values a meaning: 0 is "The null VLAN ID", a tag that "contains only priority information"; 1 is "The default PVID value used for classifying frames on ingress"; FFF (4095) is "Reserved for implementation use" and shall not be "transmitted in a tag header". The YANG vlanid range is 1 to 4094, and Juniper reserves 0 and 4095 too ("VLAN ID 0 is reserved for tagging the priority of frames", 802.1Q VLAN IDs). A priority-tagged frame lands in the receiving port's PVID, "the VLAN-ID assigned to untagged frames or Priority-tagged frames received on this port" (IEEE8021-Q-BRIDGE-MIB).

Stacked tags. Tags repeat until a type that is not a TPID (at most eight). Provider bridging puts the S-TAG outside and the customer's C-TAG inside ("the MSDU of the associated frame can contain a Customer VLAN tag", section 9.7), so the page warns about an S-TAG inside a C-TAG, and about two C-TAGs in a row, which is not 802.1ad stacking and is also the shape of the double-tagging case the VLAN article describes.

After the tags. RFC 9542 (BCP 141, which obsoletes RFC 7042), section 3: EtherTypes "are equal to or larger than 0x0600", a length "must ... be less than 0x5DD, or it could be mistaken as an EtherType", and "the LLC encapsulation EtherType 0x8870" may stand in for a length. So 0x0000 to 0x05DC reads as a length (an IEEE 802.3 frame with LLC next), 0x05DD to 0x05FF as neither, and the rest as an EtherType, named as IANA's list describes it (last updated 2024-11-03; the narrowest row wins where two overlap). IANA notes that the list "is contributed unverified information" and that the IEEE Registration Authority keeps the public list; a value IANA does not list is shown as unlisted, never guessed.

Addresses. When the octets start at a destination MAC, the page shows both addresses with RFC 9542's M bit ("If it is a one, the address is groupcast (multicast or broadcast)") and X bit (local), section 2.1.1, flags RFC 9542's documentation addresses (00-00-5E-00-53-00 to -FF, 01-00-5E-90-10-00 to -FF, section 2.1.4), and warns when a source address has the M bit set.

Where the octets start. Auto reads octets that start with 0x8100, 0x88A8 or 0x9100 as a tag, and anything else of 14 octets or more as a frame's start, and says which it chose; the two other choices force one or the other (a destination MAC can begin with 81-00).

Trunks: what each vendor's lines mean

Paste the trunk port's lines as the switch shows them; lines that are not about the trunk's VLANs are listed as not read. A bare list such as 10,20,30-40 also works. Each vendor's rules come from its own documentation, read on 8 November 2026:

  • Cisco IOS XE (Catalyst 9300; VLAN trunks, 17.18 and the 17.18 command reference, read in a browser because Cisco's site refuses automated reads; the 17.17 command reference, read via WebFetch). switchport trunk allowed vlan takes "all | none | [add | remove | except]vlan-atom [,vlan-atom...]"; all "specifies all VLANs from 1 to 4094. This is the default"; "Do not enter any spaces between comma-separated VLAN parameters or in hyphen-specified ranges"; the no form "resets the list to the default list". switchport trunk native vlan sets the native VLAN "for sending and receiving untagged traffic", "VLAN 1 is the default native VLAN ID on the port", and "If a packet has a VLAN ID that is the same as the sending-port native VLAN ID, the packet is sent without a tag"; the allowed list is the VLANs that "receive and send traffic on this interface in tagged format". VLANs 1002 to 1005 are "reserved for Token Ring and FDDI VLANs" and the device "does not forward FDDI, FDDI-Net, TrCRF, or TrBRF traffic" (VLANs, 17.18); the page notes them when the list holds them.

  • Juniper Junos with ELS (bridging and VLANs; Ethernet Switching User Guide, 23 September 2026). vlan members takes one VLAN or several between [ and ], by ID, by range (members 120-130) or by name; successive set lines add to the members (the guide's own example ends with members [ 1 sales support ]), and names resolve through the set vlans NAME vlan-id N lines pasted with them. native-vlan-id sets the native VLAN. A trunk "recognizes untagged control packets, but it does not recognize untagged data packets" without it, and the logical interface "must be configured with the same VLAN ID as the native VLAN ID", so a native VLAN that is not a member receives nothing untagged. members all is refused: the pages read do not say which VLANs it stands for on ELS.

  • HPE Aruba AOS-CX (10.16 Layer 2 Bridging Guide: vlan trunk allowed, read via WebFetch and in a browser, vlan trunk native and vlan trunk native tag, read in a browser because the site refuses automated reads; the command-reference addresses cited before for the two native pages now answer 404 Not Found). The list is "a single ID, or a series of IDs separated by commas (2, 3, 4), dashes (2-4), or both (2-4,6)"; all is "all the VLANs currently configured on the switch and any new VLANs that are configured in the future", which the tool counts as 1 to 4094 and says so. "By default, VLAN ID 1 is assigned as the native VLAN ID", and setting a native VLAN makes the switch run vlan trunk allowed all, so "To only allow specific VLANs on the trunk, issue the vlan trunk allowed command specifying only specific VLANs" after it. A list after all replaces it; a list after a list adds to it ("Multiple VLAN IDs can be assigned"), which is the tool's reading of the two pages. no vlan trunk allowed removes VLANs, and when the last one goes the trunk "will trunk all the VLANs currently defined on the switch". With vlan trunk native ... tag, "Incoming packets that are untagged are dropped except for BPDUs" and "Egress packets are tagged". A native VLAN left out of the allowed list is not carried: the native page's own example is "Assigning native VLAN ID 20 to trunk interface 1/1/2 and then removing it from the list of allowed VLANs. (Only allow VLAN 10 on the trunk.)"

  • MikroTik RouterOS (7.24 manual, bridge VLAN filtering). Each bridge VLAN entry's vlan-ids ("vlan-ids=100-115,120,122,128-130") with tagged= or untagged= makes the port a tagged or untagged member; pvid (default 1) "specifies which VLAN the untagged ingress traffic is assigned to"; with frame-types at its default, admit-all, the port is "automatically added as untagged" for its PVID; frame-types=admit-only-vlan-tagged on the port admits tagged frames only. The tool reads every entry pasted as one that lists the trunk port, and warns when the port leaves untagged in several VLANs, which RouterOS warns against.

  • Extreme Switch Engine (33.7.1 command references). configure vlan NAME|ID add ports ... tagged|untagged ("Default: Untagged."), delete ports, and names from create vlan NAME tag N (tags 2 to 4094: "tag 1 is assigned to the default VLAN, and tag 4095 is assigned to the management VLAN"). The Default VLAN "initially contains all ports" and "is untagged on all ports". "Untagged ports can only be a member of a single VLAN", and with configure vlan untagged-ports auto-move at its default, inform, an untagged add moves the port from its old untagged VLAN with a notice; with auto-move off the tool refuses the line, as the switch would.

  • Extreme Fabric Engine (9.4 user guide, 9.4 command references). vlan members add|remove takes one VLAN ID, 1 to 4059: "the system reserves VLAN IDs 4060 to 4094 for internal use", and 3500 to 3998 too with the vrf-scaling and spbm-config-mode boot flags. default-vlan-id and untag-port-default-vlan ("Untags the default VLAN for the port", disabled by default) make the native VLAN.

  • Arista EOS (EOS 4.37.0F User Manual, Virtual LANs, read in a browser because the site refuses automated reads). In trunk mode "The interface may be a member of multiple VLANs, as configured by the switchport trunk allowed vlan command" and "Untagged traffic is associated with the interface's native VLAN"; the default mode is access, and the tool reads the lines pasted as a trunk port's and says so when switchport mode trunk is missing. switchport trunk allowed vlan takes a list ("Valid v_range formats include number, range, or comma-delimited list of numbers and ranges"), add, remove, except, all or none; "By default, interfaces handle tagged traffic for all VLANs", and the no and default forms restore all. switchport trunk native vlan takes a VLAN ("The default native VLAN for all interfaces is VLAN 1"), whose frames leave untagged unless egress priority tagging sends "priority tagged Ethernet frames in place of untagged frames"; its no and default forms "restore vlan 1 as the trunk mode native VLAN". With tag the "interface drops all untagged frames"; the manual does not say whether the native VLAN's own frames then leave tagged, so a native VLAN that is in the allowed list is marked not confirmed in that direction. A native VLAN left out of the allowed list is read as not carried, and the page says what that rests on: no sentence of the manual, but Arista's own example, whose allowed list of 6-10 prints "Trunking Native Mode VLAN: 1 (inactive)" where other examples print "1 (default)".

  • Huawei VRP (S5700 and S6700 V200R025C00: the command reference, VLAN configuration commands, and the Ethernet Switching configuration guide, Adding and Removing VLAN Tags, both read in a browser because the site refuses automated reads). port link-type trunk makes the port a trunk (the default is negotiation-desirable, negotiation-auto on the S5736-S). port trunk allow-pass vlan takes VLAN IDs separated by spaces, to for a range, at most ten items in one command, or all ("Adds a trunk interface to all VLANs"); "If you run the port trunk allow-pass vlan command multiple times in the same interface view, the interface is added to all the specified VLANs", and the undo form removes them. "By default, a trunk interface is in VLAN 1." port trunk pvid vlan sets the default VLAN (default 1; a later line replaces it, and the undo form "restores the default VLAN of a trunk interface to the default setting"), but "does not add the trunk interface to the default VLAN": "A trunk interface forwards frames with the default VLAN ID only after it is added to the default VLAN using the port trunk allow-pass vlan command". Table 4-2 of the guide gives the rest: an untagged frame takes the default VLAN ID and is transmitted when that VLAN is permitted, discarded when it is denied; a tagged frame is accepted only when its VLAN is permitted; on the way out the default VLAN's frames leave untagged and the other permitted VLANs tagged. "If a specified VLAN does not exist, the configuration does not take effect": the tool cannot see which VLANs exist on a switch, so it counts every VLAN the lines name and says so. port trunk allow-pass only-vlan is refused with the reason: it "configures VLANs allowed by the interface that is configured as a trunk interface through LNP negotiation", after port link-type negotiation, and the tool reads static trunks.

Trunks: how the two ends are compared

For each VLAN from 1 to 4094 and each direction, the sending end sends the VLAN untagged when it is that end's native (untagged) VLAN, tagged when it is in the end's list, and not at all otherwise. A tagged frame lands in the VLAN its tag names when the receiving end carries that VLAN, and is dropped when it does not. An untagged frame lands in the receiving end's native VLAN, its PVID (the IEEE MIB's definition above): the same VLAN when the two natives agree, another one when they do not, and nowhere at an end that drops untagged data frames (Junos without a native VLAN, AOS-CX with a tagged native VLAN, Arista with native vlan tag, RouterOS admitting tagged frames only) or whose native VLAN is not carried (below).

The result lists the VLANs that arrive in the same VLAN both ways, those that go only from A to B or only from B to A, those that land in another VLAN, and those that are not confirmed, then a table of runs of VLANs with the same fate, and each end's reading line by line.

Native VLAN mismatch. When the two ends place untagged frames in different VLANs, the page says so with Cisco's warning: if the native VLAN on one end differs from the other, "spanning-tree loops might result"; "Make sure the native VLAN for an IEEE 802.1Q trunk is the same on both ends".

A native VLAN left out of the allowed list. This is the classic pitfall, and the vendors read do not all say the same. On AOS-CX it is not carried (the native page's example above); on Arista EOS the tool reads it as not carried from Arista's example output; on Huawei VRP the default VLAN's frames are forwarded "only after it is added to the default VLAN"; on Junos the interface "must be configured with the same VLAN ID as the native VLAN ID". At those ends nothing crosses untagged, and the page says so at the top as well as in the end's reading.

Not confirmed, never guessed. On Cisco IOS XE and Fabric Engine the pages read do not say whether such a native VLAN is carried: Cisco's 17.18 command reference and VLAN guide, in every sentence on the native VLAN, only say the allowed list is for traffic "in tagged format" and the native VLAN for "sending and receiving untagged traffic". The page marks that VLAN not confirmed, says why, and suggests adding it to the list. The same holds for untagged arrivals at a Switch Engine port untagged in no VLAN, at a Fabric Engine port with untag-port-default-vlan off, and for the way an allowed native VLAN leaves an Arista port set to native vlan tag. The verdict is green only when every VLAN sent crosses both ways in its own VLAN and nothing is warned about.

What it refuses, and why

  • Tag mode: text that is not hexadecimal, an odd number of digits, more than 128 octets or 4,000 characters, more than eight tags, a tag cut short, a frame's start under 14 octets, octets forced to start at a TPID that is not one, and an unknown start.
  • Trunk mode: VLAN 0 ("The null VLAN ID ... shall not be configured") and 4095 (reserved, Table 9-2), IDs above 4094 or with leading zeros, backwards ranges, empty list items, spaces inside a Cisco or AOS-CX list, Fabric Engine IDs from 4060 and lists in its one-VLAN commands, default-vlan-id 0 (the range allows it but the reference does not say what it means), Fabric Engine options the pages do not describe, unresolved VLAN names, a Switch Engine VLAN created without a tag but added as tagged, tags outside 2 to 4094, a RouterOS VLAN that is both tagged and untagged on the port, an Arista or Huawei port that is not a trunk (switchport mode access, port link-type hybrid and the like), an Arista list with spaces, a Huawei list with commas or hyphens, more than ten items or a to without its second VLAN, Huawei's port trunk allow-pass only-vlan (a command for trunks negotiated through LNP), an end with no trunk line, an end over 64 lines, 256 characters a line or 4,000 characters, and an unknown vendor.

Worked examples

The Examples are the VLAN lab of chapter 2.3 of the open course LAN Switch Operations and Maintenance, its MODERN CLI block B12: VLAN 10 USERS, 20 VOICE and 99 MGMT tagged on the trunk, 999 as the native VLAN, and the frames use RFC 9542's documentation addresses.

  • Tag: 00 00 5e 00 53 01 00 00 5e 00 53 02 81 00 a0 14 08 00 is a frame from 00-00-5E-00-53-02 to 00-00-5E-00-53-01 with a C-TAG of TCI 0xA014: PCP 5 (101, Voice), DEI 0, VID 20, the lab's VOICE VLAN; then EtherType 0x0800, which IANA's list describes as "Internet Protocol version 4 (IPv4)". Under 7P1D, 6P2D and 5P3D the same PCP 5 decodes to priority 4.
  • Chips: an S-TAG with VID 100 outside a C-TAG with VID 10, then IPv6; a priority tag (VID 0, PCP 5, then ARP); VID 4095; the Junos 0x9100 TPID; and a frame to a documentation group address whose type field is 0x002E, a length of 46 octets.
  • Trunk: the lab's Cisco end (switchport trunk allowed vlan 10,20,99, switchport trunk native vlan 999 and switchport trunk allowed vlan add 999) against its Junos end (vlan members [ USERS VOICE MGMT ] resolved to 10, 20 and 99, native-vlan-id 999 and vlan members 999). VLANs 10, 20 and 99 arrive tagged in the same VLAN both ways, and 999 untagged.
  • The lab on two other vendors: the Switch Engine lines (the untagged NATIVE999 add moves the port out of Default with auto-move's notice) against the RouterOS lines: 10, 20, 99 and 999 all arrive in the same VLAN both ways. The same holds for the Arista lines (switchport trunk native vlan 999, then allowed vlan add 999) against the Huawei lines (port trunk pvid vlan 999, port trunk allow-pass vlan 999 and undo port trunk allow-pass vlan 1).
  • The pitfall, on four vendors: two chips keep the lab's lines without 999 in the allowed list. Cisco against AOS-CX: 10, 20 and 99 cross, and 999 is not confirmed from Cisco's end and not carried at AOS-CX's. Arista against Huawei: 10, 20 and 99 cross, and 999 crosses in neither direction, not carried at Arista's end (Arista's example output) and not forwarded at Huawei's (the PVID was never added with allow-pass). Both verdicts are amber.
  • A mismatch: a Cisco end with native VLAN 1 against an AOS-CX end with native VLAN 10, both allowing 1, 10 and 20: VLAN 20 crosses; untagged frames of VLAN 1 from Cisco land in VLAN 10, and untagged frames of VLAN 10 from AOS-CX land in VLAN 1.

What it does not do

It reads configuration lines, not a running switch: it assumes every VLAN named exists on both switches, the link is up and a trunk at both ends, and nothing else (pruning, spanning tree, VLAN registration with MVRP) removes a VLAN. It does not negotiate trunking (DTP), follow a VLAN through more than one link, translate VLANs, or read a whole capture file: paste the first octets of one frame. The VLAN article's trunk lab follows one frame across a trunk step by step.

Share results

Under the verdict, Share results builds a link to this page, only when you press it, that carries after the # the octets as typed (input, and start when it is not auto) in the tag mode, or mode=trunk with both ends' vendor and lines as typed (avendor, aconfig, bvendor, bconfig) in the trunk mode. The other mode's fields are not carried. The popover adds a caution: a frame's octets include two MAC addresses, which identify devices, and trunk lines carry interface and VLAN names, which describe a private network.

RFC 3986 (section 3.5, read 2026-11-08) has the fragment "separated from the rest of the URI prior to a dereference", so these values are not sent to the server when the link is opened; they stay in the address bar and the history of whoever opens it, and anyone who has the link can read them.

  • How long. A link carries at most 16,384 characters, the bound the site uses for every value after the #.
  • Opening a link. The mode and its fields are set as typing would set them (an absent start is auto), the other mode keeps its values, and the page computes. A link with an unknown mode, start or vendor (a vendor is one of the eight ids listed under API), a field of the other mode, a blank or missing field, or a value over the bounds is ignored. Accepted or not, the values then leave the page's own address at once, without a request.

Provenance

The engine is bit arithmetic, a table lookup and set arithmetic, with no clock, no network and no randomness. It ships 176 golden vectors (set vlan-tag-and-trunk-calculator-golden-2026-11-08b): 71 computed ones (33 tag readings and 38 trunk comparisons, the Examples and chips included), 46 that pin the sentences carrying the rules and the runs of the fate table, 51 refusals and 8 API bodies. Every computed expected value was derived by a separate Python implementation, not by running this engine: its own hexadecimal parser and bit arithmetic, its own reading of IANA's XML, Tables 6-5 and G-2 retyped by PCP, and its own parser for each vendor with Python sets for the VLAN arithmetic. A cross-check of every one of its 1,687 fields against the engine found no difference.

API

The same engine answers /api/v1/vlan-tag-and-trunk-calculator on the site's HTTP API; the contract is on the API page, which also says whether this site serves the API.

  • Request. A JSON object. Tag: {"mode": "tag", "input": "81 00 a0 14 08 00"}, with start (auto, tpid or mac) optional. Trunk: {"mode": "trunk", "a": {"vendor": "cisco-ios-xe", "config": "switchport trunk allowed vlan 10,20"}, "b": {"vendor": "aruba-aos-cx", "config": "vlan trunk allowed 10,20"}}; vendors are cisco-ios-xe, juniper-junos, aruba-aos-cx, mikrotik-routeros, extreme-switch-engine, extreme-fabric-engine, arista-eos and huawei-vrp.
  • Response, tag. mode, start, startAuto, octets, hex, destination and source (hex, colon, group, local, documentation, or null), tags (each: index, offset, tpid, kind, name, tci, bits, pcp, pcpBits, acronym, trafficType, decodings, dei, vid, vidHex, vidBits, vidMeaning, notes), next (value, number, kind, name, text, or null), after, verdict, warnings and notes.
  • Response, trunk. mode, a and b (each: end, vendor, vendorName, allowed, allowedCount, allowedText, tagged, taggedText, untaggedOut, untaggedIn, untaggedInVlan, native, nativeConfirmed, allConfigured, read, notRead, warnings, notes), carried, carriedCount, carriedText, aOnly, aOnlyText, bOnly, bOnlyText, crossed, crossedText, unconfirmed, unconfirmedText, rows (each: from, to, ab and ba with as, outcome and into), nativeMismatch, verdict, warnings and notes. VLAN lists are runs [low, high] and text such as 10,20,30-40.
  • Errors. HTTP 400, invalid_input, with the engine's message, for example End B, line 2: port trunk allow-pass only-vlan applies only to an interface negotiated as a trunk: ....

Sources