Back to Learning
CCNA · 200-301FreeBeginner

VLANs, Trunking & Spanning Tree

A native VLAN mismatch is silently dropping traffic between two hosts on the same VLAN. Diagnose it and fix it yourself, live, right below.

VLANs, Trunking & Spanning Tree

SW-DIST · SW-ACC1 · SW-ACC2 · PC1

The problem

Two hosts sit on the same VLAN on different access switches, but they can't reach each other, even though both interfaces show up and no STP blocking is reported.

What you'll practice

  • Configure 802.1Q trunks and set the native VLAN correctly
  • Create and assign access VLANs across multiple switches
  • Influence and verify Spanning Tree root election
  • Configure inter-VLAN routing (router-on-a-stick or SVIs)
  • Diagnose a VLAN mismatch or STP loop

1. Configure 802.1Q trunks and set the native VLAN correctly

Trunks carry traffic for multiple VLANs using 802.1Q tagging. Untagged frames belong to the native VLAN. If native VLANs mismatch across a trunk, frames enter the wrong VLAN at the far end or trigger CDP native VLAN mismatch alerts.

2. Create and assign access VLANs across multiple switches

Access ports connect end hosts to specific VLAN broadcast domains. You will verify access port membership with show vlan brief and show interface switchport to ensure hosts are in their designated VLANs.

3. Influence and verify Spanning Tree root election

Spanning Tree Protocol (STP) prevents layer 2 loops by electing a Root Bridge based on bridge priority and MAC address. You will inspect root election and port states (Forwarding vs Blocking) across the campus switches.

4. Configure inter-VLAN routing with SVIs

Switched Virtual Interfaces (SVIs) on distribution switches provide Layer 3 default gateways for hosts on different VLANs, enabling inter-VLAN communication across the network.

5. Diagnose a VLAN mismatch or STP loop

You will use console logs, show interfaces trunk, and CDP alerts to spot trunk misconfigurations and restore end-to-end host reachability across the switched campus.

The topology

A three-switch campus topology, one distribution switch and two access switches with attached hosts, mirrors a small branch network, enough to see trunk negotiation, STP topology changes and VLAN routing interact for real.

Commands to run yourself

The real diagnostic commands for this lab, copy-paste ready. Run these in the same order to reproduce the investigation on your own session.

Verify VLAN creation and access ports
show vlan brief
Check active trunk links and native VLANs
show interfaces trunk
Inspect detailed switchport configuration
show interface switchport
Check for CDP native VLAN mismatch alerts
show logging | include Native
Inspect Spanning Tree root and port states
show spanning-tree vlan 10
Et0/0Et0/1Et0/0Et0/0SW-DISTroot, pri 4106SW-ACC1trunk Et0/0SW-ACC2trunk Et0/0PC110.10.10.11VLAN 10PC310.10.20.11VLAN 20PC210.10.10.12VLAN 10PC410.10.20.12VLAN 20
Check trunk status on both access switches

Inside a real session

More genuine captures from this lab running on the platform, at full size so the console text stays readable.

Real console output on SW-DIST showing repeated %CDP-4-NATIVE_VLAN_MISMATCH log messages naming SW-ACC1 Ethernet0/0
Real console output captured live: SW-DIST logs the exact native VLAN mismatch against SW-ACC1's trunk port, repeating on every CDP cycle.
PC1 console showing four successful ping replies from 10.10.10.12 after the native VLAN mismatch is fixed
After the fix: PC1 reaches PC2 across the switch block, captured live from PC1's own console.
show spanning-tree vlan 10 output on SW-DIST showing a stable root bridge with both trunk interfaces in Desg FWD state
STP root election verified stable: SW-DIST holds priority 4106 as root, both trunk ports forwarding.
Loading the fix…

Frequently asked

Is this enough for the CCNA 200-301 switching topics?

Yes. Trunking, VLANs, STP and inter-VLAN routing are core CCNA switching blueprint items, and this lab covers all of them hands-on.

How is this different from Packet Tracer?

Real Cisco IOS on virtualized switch platforms. STP timers, trunk negotiation and CLI output behave like production gear, not a simplified simulation.

Ready to run this lab yourself?

No setup, no image sourcing. Book a session or ask for a live demo.