What to practice
- Trace step-by-step CAM table learning, aging, known-unicast forwarding, and unknown-unicast/broadcast flooding.
- Contrast collision domains and broadcast domains across Layer 1 hubs, Layer 2 switches, and Layer 3 routers.
- Analyze ARP Request/Reply packet captures and identify Layer 2 ARP spoofing defense mechanisms (Dynamic ARP Inspection).
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
Switch Learning Rule: Inspect Frame Source MAC -> Record (Source MAC, Ingress Port, VLAN) in CAM Table | Switch Forwarding Rule: Inspect Destination MAC -> Known Unicast (Forward to 1 Port) vs. Unknown Unicast / Broadcast FF:FF:FF:FF:FF:FF (Flood to all active ports in VLAN except ingress port) | Address Resolution Protocol (ARP): Broadcast ARP Request (FF:FF:FF:FF:FF:FF) -> Unicast ARP Reply
In this chapter, Layer 2 Ethernet switches microsegment local networks so each full-duplex switch port forms its own independent collision domain while all ports in the same VLAN share a single broadcast domain. Switches build their Content Addressable Memory (CAM) MAC address table dynamically by inspecting the Source MAC address of every incoming frame and associating it with the ingress port. To forward a frame, the switch looks up the Destination MAC in its table: if a matching entry exists, it forwards the frame strictly out that single egress port (Known Unicast); if the Destination MAC is absent (Unknown Unicast) or is the Layer 2 broadcast address FF:FF:FF:FF:FF:FF, the switch floods the frame out all active ports in that VLAN except the port on which it arrived. When a host knows a target IPv4 address on its local subnet (or its default gateway IP) but lacks the corresponding MAC address, it broadcasts an ARP Request (FF:FF:FF:FF:FF:FF) and receives a unicast ARP Reply.
Worked Switch CAM Table Learning, Unknown Unicast Flooding & Cross-Subnet ARP Trace
An 8-port Layer 2 switch currently has active hosts on all 8 ports (VLAN 10) and only one learned CAM entry: AA:AA:AA:00:00:01 -> Port 1. Host A (on Port 1, MAC AA:AA:AA:00:00:01) sends an Ethernet frame to Host D (on Port 4, MAC DD:DD:DD:00:00:04). Trace how many switch ports transmit this first frame, how the switch updates its CAM table when Host D replies to Host A, and how many ports transmit Host D's reply.
Step 1 (Ingress Learning on Frame 1): Frame 1 enters Port 1 with Source MAC AA:AA:AA:00:00:01 (already mapped to Port 1; aging timer refreshes).
Step 2 (Unknown Unicast Flooding on Frame 1): Destination MAC DD:DD:DD:00:00:04 is not in the CAM table, so the switch floods Frame 1 out all 8 - 1 = 7 other active ports (Ports 2 through 8).
Step 3 (Ingress Learning on Host D's Reply): When Host D replies from Port 4 with Source MAC DD:DD:DD:00:00:04 and Destination MAC AA:AA:AA:00:00:01, the switch records DD:DD:DD:00:00:04 -> Port 4 in its CAM table.
Step 4 (Known Unicast Forwarding on Reply): Because Destination MAC AA:AA:AA:00:00:01 is known on Port 1, the switch forwards Host D's reply out only 1 port (Port 1).
Switches learn from the Source MAC and forward based on the Destination MAC; flooding sends a frame to (N_active - 1) ports in the same VLAN, never back out the ingress port.
Practice procedure
When a switch with N active ports in a VLAN floods an ARP broadcast or unknown unicast frame, count exactly (N - 1) egress ports.
Common mistakes
Claiming that a switch learns MAC addresses by reading the Destination MAC field of incoming frames (doing so would map unlearned destinations to the sender's port!).
Thinking that when Host A sends a packet to a remote web server on a different subnet, Host A puts the remote web server's MAC address in the Ethernet frame (Host A uses ARP to resolve and address the frame to its local Default Gateway router's MAC address).
Key terms
Term: MAC Address Table (CAM Table)
Definition: High-speed switch memory mapping learned 48-bit MAC addresses to physical switch ports and VLAN IDs.
Term: Unknown Unicast Flooding
Definition: Switch behavior of forwarding a unicast frame out all active ports in a VLAN (except ingress) when the Destination MAC is not yet in the CAM table.
Term: Address Resolution Protocol (ARP)
Definition: Protocol that dynamically maps a known local IPv4 address to its corresponding 48-bit Layer 2 MAC address.
Term: Collision Domain
Definition: A network segment where simultaneous transmissions collide; each full-duplex switch port is an isolated single-device collision domain.