Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

VLAN & 802.1Q Trunk Reference

Direct answer

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.

First checks

VLAN and 802.1Q trunk checks

Cisco IOS / IOS XE switches. Check both ends of the link; replace placeholders.

Observed statePossible causeCommandObservation and next check
Host has no connectivity in its VLANAccess port is in the wrong VLAN, or the VLAN does not existshow 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 switchVLAN never created, or removed by VTPshow 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 notMode 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 trunkVLAN not allowed, not active, or not forwarding on the trunkshow 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 mismatchDifferent native VLAN configured on each endshow 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
Command lookup Jump straight to Cisco syntax
Detailed reference and supporting material

Additional explanation, verification and reference tables.

At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Verificationaccess port in the right VLAN → VLAN exists and is active on each switch → allowed on each trunk, both ends → native VLAN equal → not block…
Scope / prerequisiteUse it when one VLAN does not work across a link while others do, when a device ends up in the wrong network, or when s…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
When to use this

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.

First 30 seconds

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.

Operational verification

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
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
Additional verification procedures
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 30 was entered without add.
  • 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 references

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.

observation · 1
Key points

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.

Key checks
  • 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,20 replaces the list; to add one, use allowed vlan add 30 — leaving out add removes 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

SettingCommandEffect
Modeswitchport mode trunkAlways trunk
Negotiationswitchport nonegotiateNo DTP frames
Native VLANswitchport trunk native vlan 999Which VLAN is untagged
Allowed VLANsswitchport trunk allowed vlan 110,120,999Which VLANs may cross
Tag the native VLANvlan dot1q tag native (global)All VLANs tagged; protects against VLAN hopping

VLAN ID ranges

RangeUse
0Priority-tagged frames (no VLAN)
1Default VLAN; avoid for users
2–1001Normal range
1002–1005Reserved (legacy Token Ring/FDDI)
1006–4094Extended range
4095Reserved

Trunk mismatch symptoms

MismatchSymptom
A VLAN missing from the allowed list on one sideThat VLAN is down across the link; others work
Native VLAN differsUntagged traffic leaks between VLANs; CDP reports a mismatch
Trunk on one side, access on the otherOnly one VLAN works, or nothing
VLAN not created on the far switchFrames 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Technical changelog & impact

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.

Terminology layer

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.

Aliases that resolve here
vlan trunk802.1qdot1qnative vlanallowed vlan
Embedded quick reference

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.

Confirmation

Confirm action

Continue?