PracticeLabs
Week 3Lesson 1Required28 min estimated0% progress

Switch MAC Learning and Forwarding

Trace how a switch learns source MAC addresses, floods unknown-unicast and broadcast frames, forwards known unicast, and ages out stale entries — then read the result in show mac address-table.

Lesson orientation

What you'll learn (4 objectives)~28 min: video → lesson → check → apply → lab prep

Learning objectives

  • Explain how a switch populates its MAC address table from the source MAC of every received frame
  • Distinguish flooding of unknown-unicast and broadcast frames from unicast forwarding of known destinations
  • Predict a switch's forwarding decision — flood, forward, or filter — given the current MAC table
  • Read show mac address-table and explain why entries age out and relearn

Terms you will see

MAC address tableCAM tableForwardFloodFilterKnown unicastUnknown unicastIngress portAging timeDynamic entry

Time breakdown

  • Read the notes14 min
  • Packet Walk tool8 min
  • Forwarding-decision practice6 min

Assigned video

Opens on YouTube
Recommended video

Free CCNA | Ethernet LAN Switching (Part 2) | Day 6 | CCNA 200-301 Complete Course

By Jeremy's IT Lab · Opens externally on YouTube

Assigned watch
~8 min

The link opens in a new browser tab. Return here when you finish watching.

Watch for these concepts

  • The switch recording each source MAC against the port it arrived on
  • The first frame to an unknown destination being flooded, not dropped
  • Forwarding out a single port once both addresses are known
  • What show mac address-table looks like as entries appear

Go beyond the video

The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.

Watch the concept → understand it → visualize it → practice it → apply it.

The table is the whole story

A switch keeps one structure that drives every forwarding decision: the MAC address table, also called the CAM table or forwarding table. Each entry maps a MAC address to a port — and, once VLANs exist, to a VLAN as well. The switch consults this table for every single frame and does exactly one of three things: forward it out one port, flood it out many, or filter it, meaning drop it.

Learning happens on ingress, from the source MAC
This is the most-missed idea in switching. A switch learns from the source MAC address, never the destination. When a frame arrives on Gi0/1 with source MAC aaaa.aaaa.aaaa, the switch records that aaaa.aaaa.aaaa lives out Gi0/1 — regardless of where the frame is headed. Learning is a side effect of receiving. The switch is constantly taking attendance based on who is talking.

Forwarding then happens on egress, using the destination MAC. Those two halves — learn from the source on the way in, look up the destination on the way out — account for essentially all of a switch's behaviour, and every later topic this week is a refinement of them.

Forward, flood, or filter

What the switch does with a frame, by destination MAC
DestinationIn the table?ActionPorts used
Known unicastYesForwardThe one mapped port, and nowhere else
Known unicast, mapped to the ingress portYesFilter (drop)None — the destination is already on that side
Unknown unicastNoFloodEvery other port in the VLAN
Broadcast (ffff.ffff.ffff) or unknown multicastn/aFloodEvery other port in the VLAN

Flooding an unknown unicast is not an error and not a failure mode — it is how a switch reaches a destination it has not heard from yet. The destination replies, that reply teaches the switch which port it lives on, and the next frame is forwarded rather than flooded. One round trip ends the flooding for that conversation.

A broadcast is different: it has no single owner, so there is never a single port to forward toward. It is always flooded to every port in the VLAN except the one it arrived on. That behaviour is exactly why a VLAN is called a broadcast domain, which is the subject of the next lesson.

Three frames on an empty switch

Follow three frames on a switch that has just powered on with an empty table. Hosts A through D sit on Gi0/1 through Gi0/4.

How the table fills in over one round trip
#FrameTable beforeSwitch actionTable after
1A → B (B unknown)emptyLearn A on Gi0/1; flood to Gi0/2, Gi0/3, Gi0/4A → Gi0/1
2B → A (the reply)A → Gi0/1Learn B on Gi0/2; forward to Gi0/1 onlyA → Gi0/1, B → Gi0/2
3A → BA → Gi0/1, B → Gi0/2Forward to Gi0/2 onlyunchanged

By the second frame the flooding is over. One round trip is all it takes to learn both ends of a conversation, which is why a healthy switched network floods very little despite flooding being its default for anything unknown.

Aging keeps the table honest

Dynamic entries are not permanent. Each carries a timer that resets every time the switch hears from that MAC again. If a host stays silent longer than the aging time — the Cisco default is 300 seconds — its entry is removed. The next frame it sends relearns it.

Aging is why the table reflects who is currently active rather than everything ever seen, and it explains a symptom that otherwise looks like a fault: an idle server can temporarily vanish from the table, and inbound frames for it get flooded until it says something. That is normal behaviour, not a problem to fix.

Relearning also handles movement. If a host is recabled from Gi0/2 to Gi0/4, the switch sees its source MAC arriving on a new port and updates the existing entry rather than adding a second one. MAC learning is not append-only — an entry moves, which is how a switch follows a host around the network.

Reading the table

show mac address-table
Switch# show mac address-table
          Mac Address Table
-------------------------------------------
Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0011.1111.1111    DYNAMIC     Gi0/1
   1    0022.2222.2222    DYNAMIC     Gi0/2
   1    0033.3333.3333    DYNAMIC     Gi0/3

Four columns, and each earns its place. Vlan is the broadcast domain the entry belongs to — from the next lesson onward this stops always reading 1. Mac Address and Ports are the mapping itself. Type distinguishes DYNAMIC entries, which were learned from traffic and will age out, from STATIC entries, which were configured and will not.

Troubleshooting — one server's traffic reaching every port
Symptom: a capture shows frames destined for a single quiet server being delivered to every port in the VLAN rather than just the server's. Diagnosis: the server has not transmitted within the aging time, so its MAC aged out. Every inbound frame is now an unknown unicast and is flooded until the server sends something. Fix: confirm with show mac address-table that the MAC is absent; any frame from the server — even a ping reply — relearns it and the flooding stops. Persistent flooding of an actively talking host is a different problem, pointing at table instability or an asymmetric path rather than normal aging.

What you should retain

  • Learn from the source MAC on ingress, mapping it to the port the frame arrived on.
  • Look up the destination MAC on egress: forward for a known unicast, flood for an unknown unicast or broadcast, filter when the destination is already on the ingress port.
  • Flooding is normal, not a failure — the reply ends it after one round trip.
  • Dynamic entries age out after 300 seconds of silence by default, and relearn on the next frame.
  • A recabled host's entry moves to the new port rather than duplicating.
  • show mac address-table is the ground truth for what the switch has actually learned.
Pause and predictNot scored — nothing is recorded

Before you read on

Using the table above — A on Gi0/1, B on Gi0/2, C on Gi0/3, and Host D on Gi0/4 which has never transmitted — work out four cases. (1) A sends a unicast to B: which ports? (2) A sends a unicast to D: which ports, and what is learned? (3) C sends a broadcast: which ports? (4) B sends to A, but B's cable was just moved from Gi0/2 to Gi0/4 — what happens to the table?

Interactive tool
Required~8 min

Packet Walk

Step a frame through the switch and watch the two halves happen separately — the MAC table updating on ingress from the source address, then the forwarding decision resolving on egress from the destination. Seeing them as distinct events is what makes the learn-from-source rule stick.

Study deeper

Topic guides extend this lesson — they do not replace the first-party walkthrough above.

Device Configuration & Verification

For the full show mac address-table field reference and the other core switch verification commands