Labs · · 4 min read

Lab na-01 - Switching Fundamentals and the CAM Table

Lab na-01 - Switching Fundamentals and the CAM Table - PingLabz Labs article title card

Layer 2 switching boils down to one mechanism: the CAM table (Content-Addressable Memory), also called the MAC address table. The switch builds it dynamically by reading the source MAC of every frame it receives and noting which port that frame came from. Once a destination MAC appears in the table, the switch forwards subsequent frames out the matching port instead of flooding them everywhere. This lab opens that table on a Cisco IOSvL2 switch and watches it populate.

Three switches in a triangle. Three switches, one teaching point.

What you will learn

  • What the CAM table actually contains and why it is the heart of L2 switching
  • The difference between dynamic, static, and "interface" MAC entries
  • How traffic between two devices populates the table
  • How the table ages out entries (the MAC aging timer)
  • The single show command you reach for first when debugging a switching problem

What this lab does NOT cover

  • Port security based on MAC addresses (covered in lab sec-04)
  • DHCP snooping and the binding table (covered in lab sec-05)
  • VLAN-specific MAC tables - we look at VLAN 99 (the native VLAN) for clarity here

Topology

Three IOSvL2 switches (SW1, SW2, SW3) in a triangle with dot1q trunks on Gi0/0 and Gi0/1, and an LACP EtherChannel between SW1 and SW2.

Download the STP+VLAN Reference Lab .yaml

Drop this into CML's Import dialog. Three IOSvL2 switches in a triangle with VLANs 10/20/99, dot1q trunks, rapid-PVST root election, and an LACP EtherChannel between SW1 and SW2.

Download STP+VLAN Reference Lab

Read next

Terminal card showing a repeating CDP native VLAN mismatch log naming Ethernet0/0 native VLAN 1 against SW2 Ethernet0/0 native VLAN 99
VLANs ·

Native VLAN Mismatch: Read the CDP Log, Fix the Trunk

%CDP-4-NATIVE_VLAN_MISMATCH hands you both interfaces and both native VLANs in one line. The real damage is underneath it: untagged frames get re-homed at the trunk boundary and two VLANs quietly become one. Captured live on IOS XE 17.18.2 in CML.