Use it when hosts in the same VLAN cannot reach each other, a port lands in the wrong VLAN, or a VLAN works on one switch but not across the network.
VLAN
A VLAN is a separate Layer 2 broadcast domain on shared switches. Each access port belongs to one VLAN; trunks carry several VLANs between switches with an 802.1Q tag; traffic between VLANs needs a router or a Layer 3 switch.
1. show vlan brief — does the VLAN exist and is it active? Is the access port listed?
2. show interfaces <if> switchport — operational mode access, correct access VLAN?
3. show interfaces trunk on each switch on the path — VLAN in "allowed and active" and "forwarding"?
4. show mac address-table vlan <id> — the hosts' MAC addresses learned on the expected ports?
5. show spanning-tree vlan <id> — uplinks forwarding?
VLAN exists on every switch → access port in the VLAN → each trunk allows and forwards the VLAN → spanning tree forwards it → MAC addresses learned on the expected ports → hosts reach each other
Context & applicabilityCommon mistakes · platform/version boundaries
- Creating the VLAN but forgetting the access-port assignment.
- Configuring the access VLAN but not carrying it on an upstream trunk.
- Assuming an operational trunk carries every VLAN.
- Treating an SVI IP address as evidence the SVI is up/up.
- Troubleshooting routing before proving the source/destination VLAN path.
- Making VLAN 1/native VLAN changes on only one side.
Operational reference
Fast context before you go deeper.
show vtp statusShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
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 Layered verification Verify boundary
Verify switchport mode, VLAN admission and STP state, then confirm the source/destination MAC learns on the expected logical interface during the original flow.
Path: Networking → Switching → VLAN. Local intent: VLAN reference for Layer 2 segmentation, access membership, VLAN identity, SVI boundaries and the separation between local VLAN state and end-to-end carriage.
Step 2 Verification path Verify boundary
Primary bounded procedure: Use show vlan brief for VLAN state and membership, then inspect trunk/switchport state on the actual path.
Exercise one safe negative or boundary case implied by mismatched trunk/native VLAN, inconsistent bundle parameters, blocked/discarding state, root change, MAC instability, partial member failure or err-disable.
For multi-device behavior, enumerate every expected peer, path, route target, member, VLAN, tunnel endpoint, controller node or next hop rather than accepting one healthy instance as closure. Where ECMP or redundancy exists, verify path diversity and failure behavior as well as steady state.
Step 3 Verification and output interpretation Verify boundary
Use show vlan brief to confirm that the intended VLAN exists and that access membership matches design. Use show interfaces trunk to confirm carriage across trunks and read the allowed/active/forwarding VLAN lists rather than only the word trunking. Use show spanning-tree vlan <id> when STP eligibility matters, and inspect the SVI separately if Layer 3 gateway state is part of the requirement. A useful verification chain is VLAN database → access membership → trunk carriage → STP forwarding → gateway/SVI → routing. Keep the target VLAN ID constant through the whole check so evidence from different broadcast domains is not accidentally mixed.
Step 4 Branching troubleshooting Narrow the fault
Concrete boundaries: physical link → switchport mode → access/trunk VLAN admission → allowed/native VLAN → STP state → MAC table → original frame.
Step 5 Where it fails Narrow the fault
Walk physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path and stop where observed state diverges.
Common failure classes are mismatched trunk/native VLAN, inconsistent bundle parameters, blocked/discarding state, root change, MAC instability, partial member failure or err-disable.
Closure requires original-test success plus independent verification that no collateral route, VLAN, peer, tunnel, queue, security policy or redundant path regressed. For VLAN, document the exact failure point and why adjacent layers are excluded. Source-backed expectations remain separate from observed Evidence.
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.
Subtopics
Go one level deeper into this subject.
VLAN creation reference for local VLAN state, VLAN IDs, names, operational activation and the distinction between creating a VLAN and carrying or routing that VLAN.
Subtopic Access PortAccess-port reference for untagged endpoint attachment, access VLAN classification, operational switchport state, voice VLAN coexistence and Layer-2 boundary semantics.
Subtopic Voice VLANVoice VLAN reference for IP-phone/data-device coexistence, tagged voice traffic, untagged data traffic, discovery signaling, QoS trust boundaries and segmentation limits.
Subtopic Default VLANDefault VLAN: VLAN 1.
Subtopic SVISwitched Virtual Interface reference for VLAN Layer-3 termination, line-protocol dependencies, gateway behavior, routing participation and separation from VLAN existence.
Subtopic Inter-VLAN RoutingInter-VLAN routing reference for routed boundaries between VLANs, gateway resolution, SVI/router models, RIB/CEF forwarding and policy boundaries.
A VLAN works end to end only if it exists on every switch on the path, the access port is in it, every trunk on the path allows and forwards it, and spanning tree forwards it. A VLAN that does not exist locally is not forwarded, even if a port is assigned to it.
show vlan brief— VLANs that exist and their access ports.show interfaces <if> switchport— administrative and operational mode, access VLAN, native VLAN.show interfaces trunk— trunks, native VLAN, allowed and forwarding VLANs.show mac address-table vlan <id>— MAC addresses learned in the VLAN and on which port.show spanning-tree vlan <id>— whether the ports forward in that VLAN.
ReferenceHow it works1 section · depth on demand
How VLAN forwarding works
A switch learns source MAC addresses per VLAN and forwards/broadcasts frames only within that VLAN unless traffic reaches a Layer 3 gateway. VLAN membership is therefore part of the forwarding lookup context: the same MAC address in two VLANs represents separate Layer 2 forwarding state.
Layer-2 forwarding depends on physical link state, switchport mode, VLAN admission on the port and the resulting MAC forwarding entry. A trunk can be operational while the required VLAN is pruned, absent or mapped differently. Close with Verify switchport mode, VLAN admission and STP state, then confirm the source/destination MAC learns on the expected logical interface during the original flow. and state what the evidence does not show.
ReferenceImportant terms & boundaries4 sections · depth on demand
In depth
A VLAN is a separate broadcast domain on shared switches
A VLAN groups switch ports into their own Layer 2 network. Broadcasts, unknown unicast and multicast stay inside the VLAN, and traffic between VLANs has to be routed. Cisco's Catalyst 9000 VLAN guide gives the ID ranges:
| Range | IDs | Notes |
|---|---|---|
| Normal | 1–1005 | Stored in vlan.dat in flash |
| Reserved | 1002–1005 | Token Ring and FDDI; can't be used for Ethernet |
| Extended | 1006–4094 | Not saved in the VLAN database unless VTP version 3 is used |
VLAN 1 exists from start-up, every port begins as a member, and it can't be deleted or renamed.
C9300(config)# vlan 20
C9300(config-vlan)# name USERS
C9300(config)# vlan 120
C9300(config-vlan)# name VOICE
C9300(config)# interface GigabitEthernet1/0/10
C9300(config-if)# switchport mode access
C9300(config-if)# switchport access vlan 20
C9300(config-if)# switchport voice vlan 120
C9300# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
20 USERS active Gi1/0/10
120 VOICE active Gi1/0/10
1002 fddi-default act/unsup
Why VLANs
| Goal | How VLANs help |
|---|---|
| Smaller broadcast domains | Fewer hosts receive each broadcast |
| Security boundaries | Traffic between groups must pass a router or firewall where policy applies |
| Function-based design | Users, voice, printers, management and guests separated on the same switches |
Documented guidelines
| Guideline | Detail |
|---|---|
| VLAN 1 | Carries control traffic (CDP, STP, VTP); the guide recommends not using it for user data |
| VTP | Must be in server or transparent mode to create VLANs |
| Names | 20 characters in VTP v1/v2, 128 in v3 |
| EtherChannel | VLAN changes must be made on the port-channel, or members are suspended |
| STP load | Virtual ports = trunks × active VLANs per trunk + non-trunk ports |
Design practice
Keep each VLAN within one access or distribution block, and route between blocks at Layer 3. VLANs stretched across a whole campus make spanning-tree failures campus-wide.
Documented example, not captured output.
Mechanics
For Switching → VLAN, stable identity is device + VLAN/instance + interface/port-channel + peer where relevant.
A healthy neighbor, route, VLAN, tunnel or controller object does not by itself show the whole path.
Follow the path in order: physical link → switchport/bundle membership → VLAN/instance state → STP/LAG decision → MAC forwarding → end-to-end frame path.
The durable invariants are: both ends agree on encapsulation/membership; loop-prevention state is intentional; active members are consistent; forwarding follows the selected topology.
Preserve device, VRF, VLAN, interface, address family, process or instance identity; exact prefixes/peers; direction; timestamps; platform/release; and the policy object that acted on traffic.
Important negative cases include mismatched trunk/native VLAN, inconsistent bundle parameters, blocked/discarding state, root change, MAC instability, partial member failure or err-disable.
Concept and state model
A VLAN creates a separate Layer 2 forwarding and broadcast domain. MAC learning, spanning-tree state and flooding are evaluated in VLAN context rather than across the entire switch. Access ports classify normal endpoint frames into a configured access VLAN, while tagged trunks preserve VLAN identity between switching devices. A VLAN existing in the local VLAN database is only one prerequisite: the VLAN must also be allowed and operational across every required trunk, forwarding under STP, and present at any required Layer 3 gateway boundary. An SVI belongs to a VLAN but represents Layer 3 state; it should not be conflated with the Layer 2 existence of the VLAN itself. The design distinction is important because a VLAN can exist and switch locally even when its SVI is down, absent or intentionally not configured.
Operational boundaries and common misconceptions
“VLAN active” is a local database/state fact, but it does not show that the VLAN reaches another switch. An access port in VLAN 10 does not show that VLAN 10 is allowed on the upstream trunk. A trunk carrying VLAN 10 does not show STP is forwarding it, and a forwarding VLAN does not show its SVI/default gateway works. VLAN mismatches are frequently scope errors: the correct VLAN may exist on both ends but be assigned to the wrong access port, omitted from one trunk, mapped differently by an external system, or intentionally pruned. An 802.1Q VLAN ID is significant per link and per switch: confirm the VLAN is defined, allowed and carried on every trunk hop, and note any VLAN translation or SVI where the Layer 2 domain ends.
ReferenceConfiguration & state2 sections · depth on demand
Lifecycle
Record device/platform, interface/VRF/VLAN/process identity, peer or destination scope and rollback point first.
Separate local device state from peer state and from the traffic consumer.
A route can exist without a resolved adjacency; a trunk can be up while the VLAN is absent; a BGP session can be Established while policy suppresses a prefix; a tunnel can be up while underlay or return-path reachability is broken.
Retirement is part of correctness: remove stale peers, routes, VLANs, policies, tunnel bindings, telemetry subscriptions or controller intent only after consumers are detached and alternate paths are verified.
Configuration model and design choices
A clear VLAN design uses deterministic IDs, meaningful names and explicit port roles. Access ports should be statically assigned where endpoint attachment is known, while trunks should have an intentional allowed-VLAN set instead of relying on accidental defaults. VLAN 1 and the native VLAN deserve explicit design treatment rather than implicit dependence. For inter-VLAN routing, create the Layer 3 gateway only where the routing boundary belongs and keep gateway redundancy, DHCP relay and policy separate from basic VLAN creation. Before deleting or renumbering a VLAN, account for access ports, trunks, SVIs, first-hop redundancy, DHCP scopes, ACLs, monitoring and any virtualization or wireless mappings that reference the VLAN ID.
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 Switching → VLAN. 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%Official Cisco vendor documentation reviewed for bounded reference claims: VLAN segmentation, membership and operational VLAN state. This is documentation-based technical verification, not lab or production-runtime proof. Deployment-specific applicability and runtime outcome remain separate evidence.
Basis: https://www.cisco.com/c/en/us/td/docs/switches/lan/c9000/lyr2-fwd/vlan/vlan-configuration-guide/configure-vlan.html · confidence 94%Commands commonly referenced together
Compact reference collections only; they are not a guided troubleshooting workflow.
VLAN → trunk → STP → MAC
Use when one VLAN works locally but not across the Layer-2 path.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.
Quick lookup tables
VLAN troubleshooting boundary map
Which check proves which forwarding boundary.
| Question | Command / evidence |
|---|---|
| Does the VLAN exist locally? | show vlan brief |
| Is the endpoint port in the intended VLAN/mode? | show interfaces switchport |
| Must the VLAN cross a trunk, and is it carried? | show interfaces trunk |
| Is the VLAN Layer 3 gateway/SVI up? | show interfaces vlan <id> / show ip interface brief |
| Is inter-VLAN routing installed? | show ip route |
| State looks correct but traffic still fails? | MAC/STP/ARP/endpoint/ACL evidence |
VLAN · reference boundaries
Compact technical reference for the most important state and interpretation boundaries.
| Layer | Reference question | Canonical check |
|---|---|---|
| VLAN database | Does the VLAN exist locally? | show vlan brief |
| Access membership | Is the endpoint port in the intended VLAN? | show vlan brief / interface switchport |
| Trunk carriage | Is the VLAN allowed and operational across the link? | show interfaces trunk |
| STP | Is the VLAN forwarding on the intended path? | show spanning-tree vlan <id> |
| Layer 3 boundary | Is the intended gateway/SVI available? | show ip interface brief / show ip route |
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
VLAN & trunk command cheat sheet
Trace a VLAN across the Layer-2 path
1. show vlan brief — local VLAN/access membership.
2. show interfaces trunk — trunk status and allowed/active VLANs.
3. show spanning-tree vlan <id> — forwarding/blocking path for the VLAN.
4. show mac address-table — actual MAC learning.
Compare both ends of every trunk; local VLAN existence is not end-to-end proof.
VLAN & trunk config skeleton
Minimal reference configuration with immediate verification
vlan 10
name USERS
!
interface GigabitEthernet1/0/10
switchport mode access
switchport access vlan 10
!
interface GigabitEthernet1/0/48
switchport mode trunk
switchport trunk allowed vlan 10,20
Verify with show vlan brief, show interfaces trunk and STP for the relevant VLAN. Keep native-VLAN expectations explicit on both ends.
VLAN & Trunk Fast Check
Native VLAN, allowed VLANs and forwarding state in a few checks.
Quick checks
show interfaces trunkshow vlan briefshow interfaces switchportshow spanning-tree vlan <vlan>show mac address-table vlan <vlan>
Remember
A trunk that is up/up does not mean the VLAN is allowed, active and forwarding along the whole path.
Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture device, interface/VRF/VLAN/process/peer identity, address family, platform/release, current state, timers/sequence/age where relevant, counters, policy hits and timestamp.