Managed Switch CAM Tables, 802.1Q VLANs & IP Routing
Mastering Layer 2 switch forwarding operations, 802.1Q trunking encapsulation, inter-VLAN routing, and static vs dynamic IP routing protocols.
2. Layer 2 Managed Switch Operations (CAM Table)
A Layer 2 Ethernet switch builds a Content Addressable Memory (CAM) Table mapping MAC addresses to physical switch ports.
- Learning Phase: When an incoming Ethernet frame arrives on Port 1, the switch inspects the Source MAC address. If not present in the CAM table, it records the Source MAC $\rightarrow$ Port 1 mapping with a 300-second aging timer.
- Forwarding Phase: The switch inspects the Destination MAC address:
• If Destination MAC is in CAM Table $\rightarrow$ Filtered & forwarded strictly to that single port.
• If Destination MAC is unknown or broadcast (FF:FF:FF:FF:FF:FF) $\rightarrow$ Flooded to all active ports except the receiving port.
3. Virtual Local Area Networks (VLANs) & IEEE 802.1Q Trunking
VLAN Benefits
- Broadcast Containment: Prevents broadcast storms from flooding entire building LAN.
- Departmental Security: Isolates Finance data from General Student traffic.
- Cost Reduction: Eliminates need for separate physical switches per department.
Trunk Link Encapsulation
Trunk links carry traffic for multiple VLANs across switch-to-switch connections by inserting a 4-byte 802.1Q Tag into the Ethernet frame header containing a 12-bit VLAN ID (VLAN 1 - 4094).
4. Inter-VLAN Routing Architectures
Router-on-a-Stick vs. Layer 3 Switch SVI
Router-on-a-Stick (Legacy)
A single physical router interface connects to a switch trunk port using logical subinterfaces (e.g. GigabitEthernet0/0.10). Performs 802.1Q decapsulation and routing.
Layer 3 Switch SVI (Modern Enterprise)
High-speed hardware ASIC routing using Switch Virtual Interfaces (e.g. interface vlan 10). Delivers wire-speed routing without external router bottleneck.