Week 5 · Lesson 10

MAC Address Table

A switch is not configured with a map of which device sits on which port. It builds that map itself, frame by frame, by watching source MAC addresses. This lesson explains where that map lives, how it is learned, how it is used to forward, and how entries age out.

CCNA 200-301 Domain 1.0 Network Fundamentals Verified 2026-10-11
Learning objectives
Part 1

Where the table lives

A Layer-2 switch forwards frames using a table of MAC addresses and the ports they are reachable through. Cisco calls this structure the MAC address table; it is also known as the CAM table, for Content-Addressable Memory, the specialised memory inside the switch that makes these lookups extremely fast. Unlike a normal list that you search from the top, CAM is exact-match memory: the switch hands it a MAC address and CAM returns the matching entry in a single, near-instant operation. That is what allows a switch to forward millions of frames per second in hardware.

Definition — MAC address table A table on the switch that maps a MAC address (together with its VLAN) to the switch port through which that address was seen. The switch consults it to decide where to send each frame; it is stored in fast CAM memory.
Note The table is per VLAN. A switch with several VLANs keeps a separate mapping for each, so the same MAC could appear on different ports in different VLANs. For CCNA you can think of it as one table whose first column is the VLAN ID.
In this lesson · select a part to jump

Key ideas & exam traps · select one

Part 2

What the table stores

A typical entry has four pieces of information:

ColumnMeaning
VLANThe VLAN in which the MAC was seen (default VLAN 1).
MAC addressThe 48-bit address, shown in Cisco dotted notation.
TypeHow the entry got there: DYNAMIC (learned), STATIC (manually added), or SECURE (added by port security).
Port / AgeThe port the address is reachable through; many displays also show an age timer for dynamic entries.
Part 3

How the switch learns

Switches start with an empty table and learn by watching traffic. For every frame that arrives on a port, the switch reads the frame’s source MAC address and records a mapping: that source MAC is reachable out of the port the frame came in on (the ingress port). If the address is not already known, the switch adds a new dynamic entry. If it is known but the port has changed — because the device moved — the switch updates the entry to point to the new port.

Exam tip Memorise this sentence: switches learn from the SOURCE MAC and forward based on the DESTINATION MAC. Every learning/flooding question on the exam turns on it. The switch never learns from a destination address and never forwards based on a source address.

Learning is automatic and needs no configuration. A device announces itself to the switch simply by sending any frame at all. The switch does not care what protocol is inside; it only reads the Layer-2 header.

Part 4

How the switch forwards

Once it has read the addresses, the switch looks up the destination MAC in the table and acts on what it finds:

Watch out The switch never floods a frame back out of its ingress port. When you count the ports a flood leaves by, subtract the incoming port. This subtlety appears in exam questions that show a switch with n ports and a single frame arriving.
Part 5

Broadcast and multicast

Frames whose destination is a group address cannot be sent to “the one port” because they are meant for more than one recipient:

So the default rule for a switch is simple: known unicast goes to one port; everything else (unknown unicast, broadcast, multicast) is flooded to all other ports.

Part 6

Aging, dynamic, static, and secure

Because devices move and addresses change, learned entries do not live forever. Each dynamic entry has an age timer. Every time the switch sees a frame from that source MAC, the timer resets. If the timer expires, the entry is removed and the switch must learn the address again the next time it appears. On Cisco switches the default aging time is 300 seconds (5 minutes).

TypeHow it is createdAges out?
DynamicLearned automatically from a source MAC; the default.Yes — after the aging time (default 300 s) of inactivity.
StaticConfigured by an administrator for a specific port.No — it stays until you remove it.
SecureCreated by port security when a permitted MAC is seen.Persists for the port; treated like a static entry while it is allowed.

You normally let the switch learn everything automatically. A static entry is useful when you want to pin a known device — say a server or a printer — to a fixed port, or when port security must restrict which MAC addresses may use a port.

Switch(config)# mac address-table static 0026.5a1b.3f00 vlan 10 interface gigabitethernet0/24
Switch(config)# mac address-table aging-time 300
Switch(config)# end
Command form mac address-table static mac-addr vlan vlan-id interface interface-id binds a MAC address to a specific port permanently. The aging-time command changes how long dynamic entries survive; the default is 300 seconds.
Part 7

Reading the table in IOS

The command to view the table is show mac address-table. Here is realistic output from a small access switch:

Switch# show mac address-table
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
   1    0001.9715.6a02    DYNAMIC     Gi0/1
   1    0001.9715.6a03    DYNAMIC     Gi0/2
  10    0050.0f2a.9c11    DYNAMIC     Gi0/10
  10    0050.0f2a.9c12    DYNAMIC     Gi0/11
  10    0026.5a1b.3f00    STATIC      Gi0/24
  10    00d0.ba76.5c4a    SECURE      Gi0/12
Total Mac Addresses for this criterion: 6

Switch# show mac address-table dynamic
Switch# show mac address-table address 0050.0f2a.9c11
Switch# clear mac address-table dynamic

A few practical notes on that output:

Hosts PC 1 PC 2 PC 3 PC 4 Switch learns source forwards dest Gi0/1 Gi0/2 Gi0/3 Gi0/4 MAC address table VLAN MAC ADDRESS TYPE PORT 1 0001.9715.6a02 DYNAMIC Gi0/1 1 0001.9715.6a03 DYNAMIC Gi0/2 1 0001.9715.6a04 DYNAMIC Gi0/3 1 0001.9715.6a05 DYNAMIC Gi0/4 PC 1 to PC 3: frame leaves Gi0/3 only.
The switch learns each host’s MAC from the source address of frames arriving on its port, filling the table. When PC 1 sends to PC 3 (a known unicast), the switch forwards the frame out of Gi0/3 alone rather than flooding.
Part 8

A worked timeline

Watch how a table fills at boot, and how a static entry behaves differently. The switch has just powered on, so its dynamic table is empty, but an administrator has already saved one static entry: the server on Gi0/24.

TimeEventTable after the eventAction taken
t0Switch bootsStatic: server → Gi0/24 only—
t1PC 1 sends a frame to PC 2+ PC 1 → Gi0/1Learns PC 1 from SA; PC 2 unknown, so it floods
t2PC 2 replies to PC 1+ PC 2 → Gi0/2Learns PC 2 from SA; PC 1 is now known, so it forwards to Gi0/1 only
t3PC 3 sends a broadcast+ PC 3 → Gi0/3Learns PC 3; broadcast is flooded to all other ports
t4300 s pass with no traffic from PC 3PC 3 entry removedDynamic entry ages out; the static server entry remains
t5A frame arrives for PC 3unchangedPC 3 is unknown again, so the switch floods until PC 3 speaks

Two lessons fall out of that timeline. First, the switch only ever knows an address after it has heard from that address — a silent device is unknown. Second, the static entry never ages, so the server stays pinned to Gi0/24 the whole time. This is exactly why a stale dynamic entry (from a device that moved) is refreshed automatically: the new port’s traffic overwrites the old mapping.

Reference table · select a row

Key terms

The vocabulary you need

Every term below appears in the lesson text above. Select one to read its definition, then use the quiz at the end to check what stuck.

Key terms · select a term

Part 9 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics. cisco.com.
  2. IETF. Request for Comments (RFCs). rfc-editor.org.
  3. IANA. Internet Assigned Numbers Authority registries. iana.org.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.