Virtual LANs, IEEE 802.1Q Trunk Tagging

In Networking Unit 2 (Managing My Shared Connections).

What to practice

  • Configure access ports, IEEE 802.1Q trunk ports, Native VLAN consistency, and Router-on-a-Stick / Layer 3 SVI inter-VLAN routing.
  • Count collision domains and broadcast domains in multi-switch, multi-VLAN topologies.
  • Determine STP/RSTP Root Bridge election, Root Ports, Designated Ports, and Blocking/Alternate Ports from Bridge IDs and link costs.

Limited preview notice: AP Networking is not yet open to all schools. College Board lists 2026-27 as its third and final pilot year, with a multiple-choice pilot exam in May 2027 for pilot schools, availability for all schools in 2027-28, and the AP Networking Exam in May 2028. This free preview teaches networking foundations. It is not a complete course, it is not for sale, and College Board does not endorse it.

Framework

Broadcast Domains = Number of Configured VLANs | Collision Domains = Number of Full-Duplex Switch Ports | IEEE 802.1Q Tag = 4 Bytes (12-bit VLAN ID supporting 2^12 = 4,096 IDs; usable VLANs 1..4094) | STP Bridge ID (BID) = Bridge Priority (default 32,768, multiples of 4,096) + Extended System ID + Switch MAC [Lowest BID elects Root Bridge]

In this chapter, Virtual LANs (VLANs) logically partition a physical Layer 2 switch into multiple isolated broadcast domains (e.g., VLAN 10 Engineering, VLAN 20 Finance, VLAN 30 Guest), improving security and containment of broadcast traffic. Access ports belong to a single VLAN and carry untagged frames, whereas Trunk ports carry traffic for multiple VLANs between switches or routers by inserting a 4-byte IEEE 802.1Q tag (containing a 12-bit VLAN ID, 0-4095, with 1-4094 usable) into the Ethernet header and recomputing the 4-byte FCS. Traffic on the Native VLAN traverses an 802.1Q trunk untagged (and must match on both ends to prevent VLAN hopping). Because Layer 2 switches cannot forward between different VLANs, Inter-VLAN Routing requires a Layer 3 router (Router-on-a-Stick with 802.1Q subinterfaces) or a Layer 3 Switch with Switched Virtual Interfaces (SVIs). To prevent redundant switch links from causing broadcast storms, Spanning Tree Protocol (STP / RSTP 802.1w) elects the switch with the lowest Bridge ID (Priority + MAC) as Root Bridge and places redundant loop paths into Blocking/Discarding state.

Worked VLAN Broadcast/Collision Domain Count & STP Root Bridge Election Audit

A floor network uses a 24-port Layer 2 switch with 18 active full-duplex access ports divided across 3 VLANs (VLAN 10, VLAN 20, VLAN 30) and connected to a router via an 802.1Q trunk port (19 active ports total). Count the collision domains and broadcast domains. Next, among three interconnected switches — SW1 (Priority 32768, MAC 00:1B:54:AA:10:01), SW2 (Priority 24576, MAC 00:1B:54:FF:99:99), and SW3 (Priority 32768, MAC 00:1B:54:11:02:03) — determine which switch is elected STP Root Bridge.

Step 1 (Count Collision Domains): Every active full-duplex switch port forms its own dedicated collision domain = 19 collision domains.

Step 2 (Count Broadcast Domains): Each VLAN is an isolated broadcast domain bridged across the trunk = 3 broadcast domains (VLAN 10, VLAN 20, VLAN 30).

Step 3 (Compare STP Bridge Priorities First): SW2 has Priority 24576, which is strictly lower than SW1 (32768) and SW3 (32768).

Step 4 (Elect STP Root Bridge): SW2 is elected Root Bridge because STP selects the lowest Bridge ID (comparing Priority first, and using lowest MAC address only as a tie-breaker when priorities are equal).

In STP elections, lower numerical values win (lowest Bridge Priority, then lowest MAC address, then lowest Root Path Cost).

Practice procedure

For 802.1Q frame size: add 4 bytes to the untagged Ethernet frame size (standard max frame rises from 1,518 bytes to 1,522 bytes).

Common mistakes

Choosing the switch with the highest Bridge Priority or highest MAC address as the STP Root Bridge (STP always elects the lowest Bridge ID).

Connecting two hosts in different VLANs (e.g., VLAN 10 and VLAN 20) to the same Layer 2 switch and expecting them to ping each other without a Layer 3 router or SVI.

Key terms

Term: IEEE 802.1Q Tagging

Definition: The standard trunking protocol that inserts a 4-byte tag (including a 12-bit VLAN ID) into an Ethernet frame header.

Term: Switched Virtual Interface (SVI)

Definition: A logical Layer 3 IP interface configured on a multilayer switch to provide default-gateway routing for a VLAN.

Term: Root Bridge (STP)

Definition: The reference switch with the lowest Bridge ID (Priority + MAC) at the logical center of the Spanning Tree loop-free topology.

Term: Broadcast Storm

Definition: A catastrophic network outage caused by Layer 2 broadcast frames looping infinitely around redundant switch links when STP is disabled.

Use this chapter companion

Review the lesson, attempt the original practice, then check the explanation. Your printed study guide remains complete without the website.

Independence

Skill by Skill Prep is independent. SAT® and AP® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website or book. PSAT/NMSQT® is a registered trademark of the College Board and the National Merit Scholarship Corporation, which are not affiliated with, and do not endorse, this site. Bluebook™ is a trademark of the College Board. ACT® is a trademark of ACT Education Corp., which is not affiliated with and does not endorse this website or book. Desmos is a trademark of Desmos Studio PBC. Practice results describe these questions, not official scores or admission predictions.

Last updated .