Use it when a port is in the wrong VLAN or a VLAN is missing.
VLAN · Layer 2 Switch
On a Layer 2 switch, a VLAN is a separate broadcast domain: access ports belong to one VLAN, trunks carry many, and traffic between VLANs needs a router or Layer 3 switch.
1. VLANs separate broadcast domains.
2. Access ports in one VLAN.
3. VLAN must exist to forward.
4. Keep naming consistent.
5. Avoid VLAN 1 for users.
port → VLAN → broadcast domain
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
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.
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 Common mistakes Narrow the fault
- Creating the VLAN on one switch but not on the others in the path.
- VLAN not allowed on the trunk.
Step 4 Decision tree: first failed boundary 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.
- VLANs divide a switch into separate broadcast domains.
- Each VLAN usually maps to one IP subnet.
- Traffic between VLANs needs a router or Layer 3 switch.
show vlan brief— VLANs and portsshow interfaces <interface> switchport— access VLAN
ReferenceWhat it is1 section · depth on demand
What it is
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.
ReferenceWhy it matters1 section · depth on demand
Overview
On a Layer 2 switch, VLANs divide ports into separate broadcast domains. Each VLAN normally maps to one IP subnet; traffic between VLANs needs a Layer 3 device.
| Port type | VLAN handling |
|---|---|
| Access | One VLAN, untagged |
| Access + voice | Data untagged, voice tagged |
| Trunk | Many VLANs, 802.1Q tagged |
show vlan brief
show interfaces switchport
Documented example, not captured output.
Remove unused VLANs from trunks to limit flooding and the reach of spanning-tree problems.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
VLANs on a Layer 2 switch
A VLAN splits one switch into separate broadcast domains. Cisco's Catalyst 9000 VLAN guide defines it as a logical grouping that segments a network into smaller broadcast domains, and notes that traffic between VLANs must be routed, through SVIs or an external router.
VLAN ranges (VLAN guide)
| Range | IDs | Notes |
|---|---|---|
| Normal | 1–1005 | Stored in vlan.dat in flash; 2–1001 configurable |
| Reserved | 1002–1005 | Token Ring and FDDI; can't be removed |
| Extended | 1006–4094 | Not in the VLAN database unless VTP version 3 is used |
VLAN 1 (VLAN guide)
VLAN 1 exists on every switch, can't be deleted or renamed, and carries control traffic such as CDP, STP and VTP. Cisco advises against using it for user data.
SW1(config)# vlan 110
SW1(config-vlan)# name USERS
SW1(config)# vlan 120
SW1(config-vlan)# name VOICE
SW1(config)# interface GigabitEthernet1/0/5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 110
SW1(config-if)# switchport voice vlan 120
SW1# show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/40, Gi1/0/41
110 USERS active Gi1/0/1, Gi1/0/5, Gi1/0/6
120 VOICE active Gi1/0/5, Gi1/0/6
999 PARKING active Gi1/0/2, Gi1/0/3
Behaviour to know (VLAN guide)
| Point | Detail |
|---|---|
| Assigning a port to a missing VLAN | Creates the VLAN |
| Deleting a VLAN | Its ports become inactive until reassigned |
| Default names | VLAN0004 style, zero-padded |
| VTP server mode | VLAN deletion applies across the VTP domain |
| Extended VLANs with VTP v1/v2 | Need transparent mode and a saved configuration |
Design practice
| Practice | Reason |
|---|---|
| One VLAN per function (users, voice, printers, APs, management) | Policy and troubleshooting by VLAN |
| Unused ports in a parking VLAN and shut down | No accidental access |
| Keep VLANs local to an access block where possible | Smaller failure domains |
Documented example, not captured output.
Mechanics
For Network Devices → Layer 2 Switch → 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.
ReferenceConfiguration & state1 section · 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.
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 Devices → Layer 2 Switch → 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%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.