MAC address table

📘 CCNA 200-301 v1.1

1.13 Describe switching concepts


1.13.d MAC address table

1. What is a MAC Address Table?

A MAC address table (also called a CAM table, where CAM stands for Content Addressable Memory) is a database inside a switch that stores information about which devices are connected to which switch ports.

Each entry in this table maps:

  • a MAC address (the unique identifier of a device’s network interface card),
  • to a specific switch port,
  • and sometimes includes a VLAN ID (if VLANs are configured).

This allows the switch to know exactly where to send Ethernet frames.


2. Purpose of the MAC Address Table

The MAC address table helps the switch perform efficient frame forwarding at Layer 2 (Data Link Layer) of the OSI model.

Without it, the switch wouldn’t know where to send frames and would have to flood frames out of all ports (like a hub).
With it, the switch can unicast frames directly to the correct destination port.


3. Information Stored in the MAC Address Table

Each entry typically includes:

FieldDescription
MAC AddressThe unique Layer 2 address of a device connected to the switch
VLAN IDThe VLAN number where the device belongs (if VLANs are used)
Interface (Port)The switch port number where the device is physically connected
TypeIndicates if the entry is dynamic (learned automatically) or static (manually configured)
Aging TimerThe time after which unused entries are removed from the table

4. How a Switch Builds the MAC Address Table

This process is known as MAC learning (covered in 1.13.a, but important to review here briefly):

  1. Frame Reception:
    When a switch receives a frame on one of its ports, it checks the source MAC address of that frame.
  2. Learning:
    The switch records the source MAC address and associates it with the port where the frame came from.
    Example:
    If a frame with source MAC 00:11:22:33:44:55 arrives on port Fa0/1,
    the switch adds this entry:
    00:11:22:33:44:55 → Fa0/1.
  3. Forwarding Decision:
    Then, the switch looks at the destination MAC address in the same frame:
    • If it exists in the MAC address table, the switch forwards the frame to the specific port associated with that MAC.
    • If it does not exist, the switch floods the frame out of all ports (except the one it was received on).

5. Types of MAC Address Table Entries

There are two main types of entries in the MAC address table:

a) Dynamic Entries

  • Automatically learned by the switch when frames are received.
  • Stored in RAM (volatile memory).
  • Removed after a certain period (default 300 seconds) if no frames are seen from that MAC (aging process).
  • Example:
    Learned when a PC sends a frame.

b) Static Entries

  • Manually configured by a network administrator.
  • Do not age out.
  • Useful for security or for devices that should always be reachable through a specific port.
  • Example (Cisco command): Switch(config)# mac address-table static 00aa.bbcc.ddee vlan 10 interface fa0/5

6. MAC Address Table Aging

  • Aging is the process of removing old or inactive MAC entries from the table.
  • Default aging time: 300 seconds (5 minutes) on most Cisco switches.
  • When a device stops sending frames for longer than this time, its MAC entry is deleted.
  • The purpose is to keep the table up to date and prevent it from filling with inactive devices.

You can view or change aging time:

Switch(config)# mac address-table aging-time 600

7. Viewing the MAC Address Table

To see what is in the table:

Switch# show mac address-table

Output example:

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    0011.2233.4455    DYNAMIC     Fa0/1
  20    00aa.bbcc.ddee    STATIC      Fa0/2

Meaning:

  • VLAN 10 → MAC 0011.2233.4455 → learned dynamically on port Fa0/1
  • VLAN 20 → MAC 00aa.bbcc.ddee → manually configured static entry on port Fa0/2

8. MAC Address Table Overflow (Important for Exam)

If too many devices are connected (for example, through a hub or another switch), and the number of MAC addresses exceeds the switch’s capacity:

  • The MAC address table overflows.
  • The switch forgets entries quickly or floods more frames.
  • This can degrade performance or even cause security issues, because traffic may be visible to unintended devices.

9. Clearing the MAC Address Table

If you want to manually clear all learned entries:

Switch# clear mac address-table dynamic

This forces the switch to relearn MAC addresses.


10. Importance in Network Operation

The MAC address table is essential for:

  • Efficient frame forwarding
  • Reducing unnecessary flooding
  • Supporting VLAN segmentation
  • Maintaining Layer 2 security

Without a MAC address table, the switch would behave like a hub—sending traffic everywhere and reducing network efficiency.


11. Exam Tip (CCNA 200-301 Focus)

Cisco loves to test this area.
Make sure you understand:

✅ The purpose of the MAC address table
✅ The difference between static and dynamic entries
✅ The aging process
✅ How to view and clear the table using Cisco commands
✅ What happens when a destination MAC is not in the table (→ flooding)
✅ The role of VLAN IDs in MAC entries


Summary Table

ConceptDescription
FunctionStores MAC-to-port mappings for frame forwarding
Table TypeDynamic (learned), Static (manual)
Default Aging300 seconds
Flooding TriggerUnknown destination MAC
Command to Viewshow mac address-table
Command to Clearclear mac address-table dynamic
Memory TypeStored in CAM (Content Addressable Memory)

✅ In Short:

A MAC address table allows a switch to know which device (MAC address) is connected to which port.
It learns this automatically, keeps it updated with aging, and uses it to send frames efficiently only to the correct port.


Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee