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.