Use it when one VLAN does not work across a link while others do, when a device ends up in the wrong network, or when setting up a trunk.
VLAN & 802.1Q Trunk Reference
A VLAN is a separate Layer 2 network inside a switch. A trunk carries several VLANs over one link, marking each frame with its VLAN number in an 802.1Q tag; an access port belongs to a single VLAN and carries no tag.
VLAN and 802.1Q trunk checks
Cisco IOS / IOS XE switches. Check both ends of the link; replace placeholders.
| Observed state | Possible cause | Command | Observation and next check |
|---|---|---|---|
| Host has no connectivity in its VLAN | Access port is in the wrong VLAN, or the VLAN does not exist | show interfaces <interface> switchport | Operational mode static access and the intended access VLAN. Next: show vlan brief: the VLAN is active and lists the port. |
| VLAN missing on the switch | VLAN never created, or removed by VTP | show vlan brief | The VLAN is listed as active with its access ports. Next: show vtp status: compare VTP mode, domain and revision before creating VLANs. |
| Link should trunk but does not | Mode mismatch (access on one side, or nonegotiate against a DTP-only peer) | show interfaces trunk | The port is listed with status trunking. Next: Compare show interfaces <interface> switchport on both ends. |
| VLAN does not cross the trunk | VLAN not allowed, not active, or not forwarding on the trunk | show interfaces trunk | The VLAN appears in allowed, allowed and active, and forwarding state and not pruned. Next: Fix switchport trunk allowed vlan; check show spanning-tree vlan <vlan-id> for a blocked port. |
| Native VLAN mismatch | Different native VLAN configured on each end | show interfaces trunk | Native vlan is the same on both ends. CDP logs %CDP-4-NATIVE_VLAN_MISMATCH when they differ. Next: Align switchport trunk native vlan on both ends; avoid user traffic in the native VLAN. |
Example output and interpretation
Illustrative output · not captured Evidence
Switch# show interfaces trunk Port Mode Encapsulation Status Native vlan Gi1/0/1 on 802.1q trunking 1 Port Vlans allowed on trunk Gi1/0/1 1-4094 Port Vlans allowed and active in management domain Gi1/0/1 1,10,20 Port Vlans in spanning tree forwarding state and not pruned Gi1/0/1 1,10
Illustrative output: VLAN 20 is allowed and active but not in the last list, so it is not forwarding on this trunk (spanning tree blocking or pruning). Check show spanning-tree vlan 20 before changing the allowed list.
Technical sources
Detailed reference and supporting material
Additional explanation, verification and reference tables.
Operational reference
Fast context before you go deeper.
1. show vlan brief — does the VLAN exist on this switch? On every switch in the path?
2. show interfaces trunk — is it in the allowed list, on both ends of each trunk?
3. Native VLAN the same on both ends?
4. show interfaces <interface> switchport — is the device's port an access port in the right VLAN?
5. Others broke after a change → allowed vlan entered without add.
access port in the right VLAN → VLAN exists and is active on each switch → allowed on each trunk, both ends → native VLAN equal → not blocked by spanning tree on every path → frames delivered in the same VLAN at the far end
Context & applicabilityCommon mistakes · platform/version boundaries
Additional verification procedures
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Typical faults & boundaries Narrow the fault
- One VLAN does not work across a link; others do. It is missing from the allowed list on one side, or not created on one of the switches.
- Other VLANs stopped working after one was added.
allowed vlan 30was entered withoutadd. - The log reports a native VLAN mismatch. The two ends have different native VLANs; untagged traffic ends up in the wrong VLAN.
- One end is a trunk and the other an access port. Only the access VLAN, if it happens to equal the native VLAN, gets through.
- A device is in the wrong network. Its access port is in the wrong VLAN.
- The port's VLAN was deleted. The port goes inactive until the VLAN is recreated or the port is reassigned.
- The VLAN is allowed but not forwarding on the trunk. Spanning tree blocks it there, or it was pruned.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
A VLAN works end to end only if it exists on every switch in the path and is allowed on every trunk. switchport trunk allowed vlan 30 replaces the list — use add. The native VLAN is untagged and must be the same on both ends.
show vlan brief— the VLANs that exist and their access ports.show interfaces trunk— trunk ports, native VLAN, and VLANs allowed and forwarding.show interfaces <interface> switchport— one port's mode, access VLAN and native VLAN.show spanning-tree vlan <id>— whether the VLAN is blocked on a trunk.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
A VLAN is a separate Layer 2 network inside a switch: devices in different VLANs cannot reach each other without a router. A trunk is a link that carries several VLANs at once, keeping them apart by marking each frame with its VLAN number using an 802.1Q tag.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
Most "it works on this switch but not on that one" faults in a switched network are VLAN or trunk faults. A VLAN has to exist on every switch along the way and be allowed on every trunk between them; one gap anywhere cuts that VLAN off while everything else keeps working.
ReferenceHow it works1 section · depth on demand
How it works
Access ports belong to one VLAN. Frames enter and leave untagged; the switch remembers which VLAN they belong to.
interface GigabitEthernet1/0/10
switchport mode access
switchport access vlan 20
Trunk ports carry many VLANs. On the way out, the switch inserts a 4-byte tag containing the VLAN number; the receiving switch reads it, removes it, and handles the frame in that VLAN.
interface GigabitEthernet1/0/1
switchport mode trunk
switchport trunk allowed vlan 10,20,30
switchport trunk native vlan 99
Three settings on a trunk decide what gets through:
- Allowed VLANs. All VLANs by default.
switchport trunk allowed vlan 10,20replaces the list; to add one, useallowed vlan add 30— leaving outaddremoves the others. - Native VLAN. Frames in this one VLAN are sent without a tag, and untagged frames received are placed in it. It is VLAN 1 by default and must be the same on both ends.
- Existence. A VLAN is only forwarded if it has been created on the switch (
vlan 20) and is active.
For a VLAN to work end to end, it must exist on every switch in the path and be allowed on every trunk in the path — and not be blocked by spanning tree on all of them.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
802.1Q trunks: tags, native VLAN and allowed lists
A trunk carries several VLANs on one link by adding a 4-byte tag to frames. The Wireshark VLAN wiki describes the tag:
- EtherType: 0x8100.
- Priority: 3 bits.
- CFI/DEI: 1 bit.
- VLAN ID: 12 bits.
- Inner EtherType: the original type follows the tag.
The maximum user data stays at 1500 bytes, so a tagged frame can be 1518 bytes, 4 more than an untagged one. On a trunk, frames for the native VLAN are sent untagged. Every other VLAN is tagged.
Trunk settings and their effect
| Setting | Command | Effect |
|---|---|---|
| Mode | switchport mode trunk | Always trunk |
| Negotiation | switchport nonegotiate | No DTP frames |
| Native VLAN | switchport trunk native vlan 999 | Which VLAN is untagged |
| Allowed VLANs | switchport trunk allowed vlan 110,120,999 | Which VLANs may cross |
| Tag the native VLAN | vlan dot1q tag native (global) | All VLANs tagged; protects against VLAN hopping |
VLAN ID ranges
| Range | Use |
|---|---|
| 0 | Priority-tagged frames (no VLAN) |
| 1 | Default VLAN; avoid for users |
| 2–1001 | Normal range |
| 1002–1005 | Reserved (legacy Token Ring/FDDI) |
| 1006–4094 | Extended range |
| 4095 | Reserved |
Trunk mismatch symptoms
| Mismatch | Symptom |
|---|---|
| A VLAN missing from the allowed list on one side | That VLAN is down across the link; others work |
| Native VLAN differs | Untagged traffic leaks between VLANs; CDP reports a mismatch |
| Trunk on one side, access on the other | Only one VLAN works, or nothing |
| VLAN not created on the far switch | Frames dropped there |
SW1# show interfaces TenGigabitEthernet1/1/1 trunk
SW1# show interfaces TenGigabitEthernet1/1/1 switchport | include Mode|Native|Trunking VLANs|Negotiation
host$ sudo tcpdump -eni eth1 -c 5 vlan
11:50:02.101 a4:bb:6d:55:01:64 > 00:00:0c:9f:f0:6e, ethertype 802.1Q (0x8100), length 102: vlan 110, p 0, ethertype IPv4, 10.110.0.64 > 10.30.0.15: ICMP echo request
The capture shows the tag directly: vlan 110, p 0, then the inner EtherType IPv4. Many NICs remove VLAN tags before the capture tool sees them, so capture on a SPAN port or a NIC that keeps tags.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → VLAN & 802.1Q Trunk Reference. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Port VLAN ID: the VLAN assigned to untagged ingress frames on a VLAN-aware bridge or switch port.
Switching · primarySVIA Switched Virtual Interface is a Layer 3 interface bound to a VLAN on a multilayer switch.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
VLAN & Trunk Fast Check
Compact VLAN/trunk verification flow.
30-second flow
show interfaces status → port state/VLAN
show interfaces switchport → admin/operational mode
show interfaces trunk → native/allowed/forwarding VLANs
show vlan brief → VLAN exists
show spanning-tree vlan <id> → forwarding path
Common misses: wrong access VLAN · VLAN absent · not allowed on trunk · native mismatch · STP blocking.