# 802.1Q tag decoder and trunk VLAN calculator

> Decode an 802.1Q tag or a frame's start: TPID, PCP with its traffic type, DEI and VID with the bits laid out, stacked 802.1ad tags and the EtherType that follows, named from IANA's list. Or paste the trunk lines of both ends, in Cisco IOS XE, Junos, AOS-CX, RouterOS, Switch Engine, Fabric Engine, Arista EOS or Huawei VRP syntax, and see which VLANs cross, which one end drops, and where the native VLANs disagree.

- Tool: https://ronutz.com/en/tools/vlan-tag-and-trunk-calculator
- Family: Networking

---

## 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](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf), 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](https://standards.ieee.org/ieee/802.1Q/10323/) 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](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) (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](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) 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](https://ronutz.com/en/learn/big-endian-and-little-endian) 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](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) gives the same eight today.
- **DEI**, one bit. The current IEEE [bridge model](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) 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](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html)). 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](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.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](https://ronutz.com/en/learn/vlans-and-8021q-trunking) describes.

**After the tags.** [RFC 9542](https://www.rfc-editor.org/rfc/rfc9542.txt) (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](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) 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](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) and the [17.18 command reference](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html), read in a browser because Cisco's site refuses automated reads; the [17.17 command reference](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html), 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](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html)); the page notes them when the list holds them.
- **Juniper Junos with ELS** ([bridging and VLANs](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html); [Ethernet Switching User Guide](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf), 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](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm), read via WebFetch and in a browser, [vlan trunk native](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) and [vlan trunk native tag](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm), 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](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/)). 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](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf)). `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](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml), [9.4 command references](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf)). `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](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans), 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](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands), and the [Ethernet Switching configuration guide, Adding and Removing VLAN Tags](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/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](https://ronutz.com/en/materials/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](https://ronutz.com/en/learn/vlans-and-8021q-trunking) 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](https://www.rfc-editor.org/rfc/rfc3986) (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](https://ronutz.com/en/api), 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

- [IEEE P802.1ad/D2.4, Provider Bridges, unapproved draft amendment to IEEE Std 802.1Q, 27 September 2004](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf) (read 2026-11-08): clause 9, Figure 9-1, Tables 9-1, 9-2, 6-5 and G-2, Annex G.4
- [IEEE 802.1, ieee802-dot1q-types YANG module, revision 2023-10-26](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) (read 2026-11-08): c-vlan, s-vlan, vlanid, vlan-index-type, priority-type, pcp-selection-type
- [IEEE 802.1, ieee802-dot1q-bridge YANG module, revision 2023-10-26](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) (read 2026-11-08): pvid, use-dei
- [IEEE 802.1, IEEE8021-Q-BRIDGE-MIB, LAST-UPDATED 2022-11-08](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.mib) (read 2026-11-08): ieee8021QBridgePvid
- [IEEE Standards Association, IEEE 802.1Q-2022](https://standards.ieee.org/ieee/802.1Q/10323/) (read 2026-11-08): Active Standard
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, April 2024](https://www.rfc-editor.org/rfc/rfc9542.txt) (read 2026-11-08): sections 2.1.1, 2.1.4 and 3; BCP 141, obsoletes RFC 7042, neither obsoleted nor updated ([RFC index](https://www.rfc-editor.org/rfc-index.xml), read the same day)
- [IANA, IEEE 802 Numbers, Ethertypes, last updated 2024-11-03](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) (read 2026-11-08)
- [HPE Aruba Networking, AOS-CX 10.14 Quality of Service Guide, End-to-end QoS behavior](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) (read 2026-11-08 via WebFetch)
- [Juniper Networks, Bridging and VLANs](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) and [802.1Q VLAN IDs and Ethernet Interface Types](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html) (read 2026-11-08)
- [Juniper Networks, Ethernet Switching User Guide, published 2026-09-23](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf) (read 2026-11-08)
- [Cisco, Catalyst 9300 IOS XE 17.18 VLAN Configuration Guide, Configuring VLAN Trunks](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) (read 2026-11-08 via WebFetch, and again in a browser on 2026-11-08: the site refuses automated reads) and [Configuring VLANs](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html) (read 2026-11-08 via WebFetch), updated 31 July 2025
- [Cisco, Catalyst 9300 IOS XE 17.18 Command Reference, VLAN Commands: switchport trunk](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html) (read in a browser on 2026-11-08: the site refuses automated reads)
- [Cisco, Catalyst 9300 IOS XE 17.17 Command Reference, VLAN Commands](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html) (read 2026-11-08 via WebFetch)
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide, vlan trunk allowed](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm) (read 2026-11-08 via WebFetch, and again in a browser on 2026-11-08: the site refuses automated reads)
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide, vlan trunk native](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) and [vlan trunk native tag](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm) (read in a browser on 2026-11-08: the site refuses automated reads)
- [Arista Networks, EOS 4.37.0F User Manual, Virtual LANs (VLANs)](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans) (read in a browser on 2026-11-08: the site refuses automated reads)
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, VLAN Configuration Commands](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands) (read in a browser on 2026-11-08: the site refuses automated reads)
- [Huawei, S5700 and S6700 V200R025C00 Configuration Guide - Ethernet Switching, Adding and Removing VLAN Tags](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/adding-and-removing-vlan-tags) (read in a browser on 2026-11-08: the site refuses automated reads): Table 4-2
- [MikroTik, RouterOS Manual 7.24, Bridging and Switching](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/) (read 2026-11-08)
- [Extreme Networks, Switch Engine v33.7.1 Command References](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf) (read 2026-11-08): pages 1569, 1605, 1608 and 1782
- [Extreme Networks, Fabric Engine v9.4 User Guide, Add or Remove Ports in a VLAN](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml) and [Command References](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf) (read 2026-11-08)
- [RFC 3986, Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986) (read 2026-11-08): section 3.5, the fragment, which carries a Share results link's values

## Standards and references

- [IEEE P802.1ad/D2.4, Provider Bridges (unapproved draft amendment to IEEE Std 802.1Q, 27 September 2004): clause 9 and Tables 9-1, 9-2, 6-5 and G-2](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf) - the tag: TPID then TCI (PCP bits 8 to 6, then CFI in a C-TAG or DE in an S-TAG, then the 12-bit VID); C-TAG 81-00; VID 0 the null VLAN ID, 1 the default PVID, FFF reserved and never transmitted; the PCP decoding under 8P0D, 7P1D, 6P2D and 5P3D; the traffic type of each priority; the S-TAG outside the C-TAG
- [IEEE 802.1, ieee802-dot1q-types YANG module, revision 2023-10-26: c-vlan (81-00), s-vlan (88-A8), vlanid 1..4094, vlan-index-type, priority-type, pcp-selection-type](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) - the two tag types and their EtherTypes as 802.1Q has them today; the VLAN ID range; values 0 and 4095 not permitted as VLAN indices; the four PCP selections
- [IEEE 802.1, ieee802-dot1q-bridge YANG module, revision 2023-10-26: pvid (default 1) and use-dei](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) - the Drop Eligible Indicator in the VLAN tag, used only when use-dei is True and otherwise transmitted as zero and ignored on receipt; the PVID, "the primary (default) VID assigned to a specific Bridge Port", default 1
- [IEEE 802.1, IEEE8021-Q-BRIDGE-MIB (LAST-UPDATED 2022-11-08): ieee8021QBridgePvid](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.mib) - the PVID is "the VLAN-ID assigned to untagged frames or Priority-tagged frames received on this port": the rule by which an untagged frame lands in the receiver's native VLAN
- [IEEE Standards Association, IEEE 802.1Q-2022, Bridges and Bridged Networks: Active Standard](https://standards.ieee.org/ieee/802.1Q/10323/) - 802.1Q-2022 is the current, active edition; its full text is not public, which is why the public draft, YANG and MIB are read
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, April 2024 (BCP 141; obsoletes RFC 7042): sections 2.1.1, 2.1.4 and 3](https://www.rfc-editor.org/rfc/rfc9542.txt) - the M (group) and X (local) bits; the documentation MAC addresses; EtherTypes 0x0600 and above, lengths below 0x05DD, 0x8870 for LLC encapsulation; tags followed by another tag, an EtherType or an LSAP
- [IANA, IEEE 802 Numbers: Ethertypes (last updated 2024-11-03)](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) - the 216 rows packed in ethertypes.ts, shown as IANA publishes them; IANA's caveat that the list is contributed and unverified and that the IEEE Registration Authority keeps the public list
- [HPE Aruba Networking, AOS-CX 10.14 Quality of Service Guide (4100i, 6000, 6100), End-to-end QoS behavior: CoS and traffic type (read via WebFetch)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) - the same eight traffic types for CoS 0 to 7 as the draft's Table G-2, and "CoS 1 is deliberately set as the lowest CoS"
- [Juniper Networks, Bridging and VLANs (Junos OS, Layer 2 networking): VLAN IDs, TPIDs, native VLAN on switches with ELS](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) - VLAN IDs 0 and 4095 reserved by Junos; the TPID 0x9100 for Q-in-Q; an ELS trunk does not recognize untagged data packets without native-vlan-id, and the logical interface must be a member of the native VLAN; vlan members by name or ID
- [Juniper Networks, 802.1Q VLAN IDs and Ethernet Interface Types](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html) - "VLAN ID 0 is reserved for tagging the priority of frames"
- [Juniper Networks, Ethernet Switching User Guide (Junos OS), published 2026-09-23: vlan members ranges and set adding to the members](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf) - vlan members 120-130 and members 500-501 (ranges); successive set lines adding to members [ 1 sales support ]
- [Cisco, VLAN Configuration Guide, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), Configuring VLAN Trunks, updated 31 July 2025 (read via WebFetch; read again in a browser on 2026-11-08: the site refuses automated reads)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) - all VLANs allowed by default; no spaces in the list; VLAN 1 the default VLAN on all trunk ports, removable, management traffic continues; native VLAN 1 by default, untagged traffic forwarded in it, sent untagged on egress; the mismatch warning; nothing, in any sentence on the native VLAN, about a native VLAN left out of the allowed list
- [Cisco, VLAN Configuration Guide, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), Configuring VLANs, updated 31 July 2025 (read via WebFetch)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html) - VLAN IDs 1002 to 1005 reserved for Token Ring and FDDI VLANs, not forwarded by the device; VLAN 1 the default VLAN
- [Cisco, Command Reference, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), VLAN Commands: switchport trunk (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html) - the allowed list is the VLANs that "receive and send traffic on this interface in tagged format"; the native VLAN is for "sending and receiving untagged traffic"; VLAN 1 the default native VLAN; every VLAN list includes all VLANs by default; a packet of the native VLAN "is sent without a tag"; no sentence on a native VLAN left out of the allowed list
- [Cisco, Command Reference, Cisco IOS XE 17.17.x (Catalyst 9300 Switches), VLAN Commands: switchport trunk (read via WebFetch)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html) - the vlan-list format all | none | [add | remove | except] vlan-atom[,vlan-atom...]; all is 1 to 4094 and the default; the no forms; the native VLAN default 1; the allowed list is for traffic in tagged format
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk allowed (read via WebFetch; read again in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm) - the VLAN-LIST format; all meaning every VLAN configured on the switch, now and later; multiple VLAN IDs assigned; the no form removing; the last VLAN removed trunking all VLANs
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk native (read in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) - native VLAN 1 by default; setting it runs vlan trunk allowed all; a later allowed list keeps only the VLANs it names; the no form returns to VLAN 1; the example "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.)": a native VLAN left out of the allowed list is not carried
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk native tag (read in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm) - untagged incoming packets dropped except BPDUs; egress packets tagged
- [MikroTik, RouterOS Manual 7.24: Bridging and Switching, Bridge VLAN Filtering](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/) - vlan-ids lists (100-115,120); tagged and untagged ports of the bridge VLAN table; pvid 1 by default; frame-types admit-all by default, and a port that admits untagged frames added as untagged for its PVID; VLANs missing from the table dropped; several untagged VLANs on one port warned against
- [Extreme Networks, Switch Engine v33.7.1 Command References: configure vlan add ports (p. 1569), configure vlan tag (p. 1605), configure vlan untagged-ports auto-move (p. 1608), create vlan (p. 1782)](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf) - tagged or untagged ports, untagged by default; one untagged VLAN a port; Default (tag 1) untagged on all ports; tags 2 to 4094 (4095 for the management VLAN); auto-move inform by default
- [Extreme Networks, Fabric Engine v9.4 User Guide: Add or Remove Ports in a VLAN](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml) - vlan members add and remove with one VLAN ID, 1 to 4059; 4060 to 4094 reserved for internal use, and 3500 to 3998 with the vrf-scaling and spbm-config-mode boot flags; VLAN 1 the default VLAN
- [Extreme Networks, Fabric Engine v9.4 Command References: default-vlan-id (p. 139), untag-port-default-vlan (p. 345), encapsulation dot1q](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf) - default-vlan-id 0 to 4059; untag-port-default-vlan untags the default VLAN, disabled by default; encapsulation dot1q enables tagging
- [Arista Networks, EOS 4.37.0F User Manual, Virtual LANs (VLANs): switchport mode, switchport trunk allowed vlan, switchport trunk native vlan (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans) - trunk mode: "Untagged traffic is associated with the interface's native VLAN"; default mode access; allowed vlan v_range ("number, range, or comma-delimited list of numbers and ranges"), add, all, except, none, remove, all by default ("interfaces handle tagged traffic for all VLANs"), no and default restoring all; native vlan default 1, the no and default forms "restore vlan 1 as the trunk mode native VLAN", native traffic leaving untagged unless egress priority tagging sends "priority tagged Ethernet frames in place of untagged frames"; tag ("tag interface drops all untagged frames"; nothing on the native VLAN's egress then, so an allowed native VLAN is not confirmed); the example output "Trunking Native Mode VLAN: 1 (inactive)" for an allowed list of 6-10, read as not carried
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, VLAN Configuration Commands: port link-type, port trunk allow-pass vlan, port trunk pvid vlan (read in a browser on 2026-11-08: the site refuses automated reads)](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands) - port link-type default negotiation-desirable (negotiation-auto on the S5736-S); allow-pass vlan { vlan-id1 [ to vlan-id2 ] }&<1-10> | all ("Adds a trunk interface to all VLANs"), cumulative across lines, the undo form removing; allow-pass only-vlan for a trunk negotiated through LNP only (prerequisite port link-type negotiation); "By default, a trunk interface is in VLAN 1"; a VLAN that does not exist does not take effect (said, not modelled); pvid vlan 1 to 4094, default 1, the latest line winning, the undo form restoring the default, forwarded "only after it is added to the default VLAN using the port trunk allow-pass vlan command"
- [Huawei, S5700 and S6700 V200R025C00 Configuration Guide - Ethernet Switching, VLAN Configuration, Adding and Removing VLAN Tags: Table 4-2 (read in a browser on 2026-11-08: the site refuses automated reads)](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/adding-and-removing-vlan-tags) - a trunk port: an untagged frame takes the default VLAN ID and is transmitted when that VLAN is permitted, discarded when it is denied; a tagged frame accepted only when its VLAN is permitted; on egress the default VLAN's frames leave untagged when permitted, other permitted VLANs tagged
- [RFC Editor, RFC index (XML): the current status of RFC 9542 and RFC 7042](https://www.rfc-editor.org/rfc-index.xml) - RFC 9542 (BCP 141) obsoletes RFC 7042 and is neither obsoleted nor updated

## Related reading

- [Layer 2 redundancy: LAG, MLAG and spanning tree](https://ronutz.com/en/learn/layer-2-redundancy-lag-mlag-and-spanning-tree.md): Redundant links at layer 2 either get blocked by spanning tree or bundled by link aggregation, and a bundle that ends on two switches needs a pair that agrees on who it is. The numbers behind STP and RSTP convergence, the guards that stop loops, multi-chassis link aggregation in five vendors' own documents, stacking and virtual chassis, the IEEE's DRNI, and EVPN multihoming as the standard answer. After reading, you can predict how each design fails, compute its timers, and know what to test before you trust it.
- [Least and most significant bit: bit numbering and bit order](https://ronutz.com/en/learn/least-and-most-significant-bit.md): Every bit of a binary number has a weight, and the least significant bit is worth 1 while the most significant bit is worth the most and, in two's complement, carries the sign. What significance means, why LSB and MSB sometimes mean bytes, the three ways documents number bits (LSB 0, MSB 0 and 1-based) and the same field read all three ways, the order bits travel on Ethernet, a UART, PPP, I2C and SPI, canonical and bit-reversed MAC addresses, masks, shifts, parity and reflected CRCs, the bugs a wrong order causes, and three cases on this site: Huawei's PortState printed bit 1 first, the I/G and U/L bits of a MAC address, and the DNS header flags.
- [The Ethernet frame, field by field: preamble to FCS, the 802.1Q tag, and the sizes that matter](https://ronutz.com/en/learn/the-ethernet-frame-field-by-field.md): Every Ethernet frame is the same short sequence of fields: a preamble to wake the receiver, two addresses, one field that is either a length or a type, the payload, and a checksum. What each field holds, why the minimum is 64 octets and the maximum 1518, where the 802.1Q tag goes and what it carries, and why jumbo frames are not in the standard.
- [VLAN hopping: switch spoofing, double tagging and the trunk settings that close both](https://ronutz.com/en/learn/vlan-hopping-switch-spoofing-and-double-tagging.md): A VLAN boundary rests on three decisions a switch makes about every frame: which VLAN a frame belongs to, which ports accept tags, and which VLAN travels untagged on a trunk. VLAN hopping attacks each of them. This part explains the IEEE 802.1Q classification rules those decisions come from, works through switch spoofing with the trunk-negotiation table and double tagging with the frame written out byte by byte at each switch, follows the voice VLAN and the 2022 VLAN 0 bypass of layer 2 filters, and gives the settings that close every path, from the vendors' guides, the NSA's hardening guidance and the DISA checklist. After reading, you can compute a tag by hand, predict whether a given frame crosses a VLAN boundary, say why double tagging is one-way, and audit a trunk and an access port for the settings that matter.
- [VLANs and 802.1Q trunking: tagged, untagged, native, and the voice VLAN](https://ronutz.com/en/learn/vlans-and-8021q-trunking.md): A VLAN turns one switched network into several that cannot hear each other's broadcasts, and 802.1Q is how a single cable carries many of them at once. Access and trunk ports in the standard's own terms, the native VLAN and the mismatch that loops a network, the VLAN-hopping attacks and the settings that stop them, the voice VLAN behind every desk phone, and why traffic between VLANs always needs a router.
