VLAN and Switching Interview Questions & Answers
Switching questions test whether you understand Layer 2 — VLANs, trunking, spanning tree — deeply enough to troubleshoot. Interviewers love scenario questions ("two PCs can't ping — walk me through it"). Anchor these in the VLAN guide and STP guide.
How to prepare
Switching interviews are heavy on "why" and "what breaks". Know the native VLAN, how trunks tag frames, how the STP root is chosen, and the classic faults: native VLAN mismatch, VLAN not allowed on a trunk, a Layer 2 loop. Being able to reason about MAC flapping marks you as experienced.
Frequently asked questions
What is a VLAN and why use one?
A Virtual LAN is a logical Layer 2 segment. VLANs separate broadcast domains for security, performance and organisation without needing separate physical switches.
What is the difference between an access port and a trunk port?
An access port carries one VLAN to an end device; a trunk carries multiple VLANs between switches, tagging frames with 802.1Q.
What is the native VLAN?
The one VLAN whose traffic crosses an 802.1Q trunk untagged. It must match on both ends, or you get a native VLAN mismatch (and CDP warnings).
How does a switch build its MAC address table?
It records the source MAC and ingress port of every frame it receives, then forwards future frames for that MAC out the learned port.
How is the STP root bridge elected?
The switch with the lowest bridge ID (priority + MAC address) becomes root. Lower a switch's priority to make it the root deliberately.
Two PCs in the same VLAN on different switches can't ping — what do you check?
Is the inter-switch link trunking? Is the VLAN allowed on the trunk and existing on both switches? Is STP forwarding it? Are both ports in the right VLAN?
What does port security protect against?
Unauthorised devices and MAC-flooding attacks — it limits which/how many MACs may use a port, with protect/restrict/shutdown responses.
What causes MAC address flapping?
Usually a Layer 2 loop — the same MAC learned on multiple ports rapidly. Investigate spanning tree immediately.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.