Pcornel
Networking · Network Fundamentals

Switching Concepts

Cheat sheet · https://pcornel.dk/topic.php?topic=149

Back to the Topic

Answer

A switch learns which MAC address is behind which port by reading the source address of every frame it receives. It forwards a frame out of the one port where the destination was learned — or floods it to all ports in the VLAN if the destination is unknown or broadcast.

Remember

Learning is from the source address, forwarding by the destination. Entries age out after 300 seconds without traffic. Unknown unicast, broadcast and multicast are flooded within the VLAN. The same MAC address appearing on two ports in turn points to a loop or a duplicate.

First checks

  • show mac address-table — all learned addresses with VLAN and port.
  • show mac address-table address <mac> — where one address is.
  • show mac address-table interface <interface> — what is behind one port.
  • show mac address-table aging-time — the ageing timer.
  • show mac address-table count — table size per VLAN.

Commands

show mac address-table [dynamic]
Inspect learned MAC-to-port mappings.
show vlan brief
Compact VLAN membership/status view.
show mac address-table address <mac>
show mac address-table count
show platform hardware fed switch active fwd-asic resource tcam utilization
show mac address-table aging-time
show mac address-table
show mac address-table interface <interface>
show mac address-table vlan <id>
clear mac address-table dynamic
show ip arp <ip>
show cdp neighbors

Verify in this order

frame arrives → source MAC learned on the ingress port and VLAN → destination looked up → known: forwarded out of one port; unknown or broadcast: flooded in the VLAN → entry refreshed by traffic or aged out

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=149

Confirmation

Confirm action

Continue?