CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

When network administrators ask how to check a Cisco switch MAC address, they are usually trying to accomplish one of two distinct tasks: discovering the physical hardware (base) MAC address of the switch chassis itself, or viewing the switch’s forwarding table to see which endpoint MAC addresses reside on which switch ports.

Whether you are performing asset inventory, configuring DHCP reservations, tracking down an unauthorized endpoint, or troubleshooting VLAN routing, Cisco IOS and IOS-XE provide robust command-line tools to inspect both system-level and interface-level MAC information. This guide covers how to retrieve the switch’s base MAC address, inspect and filter the forwarding database (CAM table), understand the distinction between MAC and ARP tables, and clear stale dynamic entries.


Finding the Switch’s Base System MAC Address

Every Cisco switch has a permanent base hardware MAC address burned into its EEPROM. This address serves as the identity for the switch chassis and forms the basis for local protocols such as Spanning Tree Protocol (STP Bridge ID), LACP System ID, and default switch virtual interfaces (SVIs).

Follow these steps to locate the base MAC address of your switch:

Step 1: Access Privileged EXEC Mode

Connect to your switch via console or SSH and enter privileged EXEC mode:

Switch> enable
Switch#

Step 2: Run the Version Command

The quickest method to identify the base hardware MAC across almost all Cisco Catalyst and Nexus platforms is the show version command:

Switch# show version

In the output, scan down to the hardware inventory section. Look for the field labeled Base Ethernet MAC Address or Base MAC Address:

cisco WS-C3850-24P (MIPS) processor with 4194304K bytes of physical memory.
Processor board ID FOC12345678
Base Ethernet MAC Address          : f4:cf:e2:11:22:00
Motherboard Assembly Number        : 73-15802-04

Step 3: Check Chassis and Stack MAC Addresses (Alternative Methods)

If your switch is part of a Cisco Catalyst StackWise cluster or a modular chassis, use targeted platform commands:

  • For StackWise Switches: Run show switch to view the MAC address assigned to each stack member and identify which member’s MAC currently serves as the active stack master MAC:
    “`text
    Switch# show switch
    Switch/Stack Mac Address : f4cf.e211.2200 – Local Mac Address
    Mac persistency wait time: Indefinite
    H/W Current
    Switch# Role Mac Address Priority Version State

*1 Active f4cf.e211.2200 15 V02 Ready
2 Standby f4cf.e233.4400 1 V02 Ready
* **For Default VLAN Interface:** Inspecting SVI VLAN 1 often reveals the Burned-In Address (BIA):text
Switch# show interfaces vlan 1
Vlan1 is up, line protocol is up
Hardware is EtherSVI, address is f4cf.e211.2200 (bia f4cf.e211.2200)
“`


Viewing the MAC Address Table in Cisco IOS and IOS-XE

While the base MAC identifies the switch itself, switches spend most of their time maintaining a dynamic Layer 2 forwarding database known as the MAC address table (or Content Addressable Memory/CAM table). As devices transmit frames, the switch inspects incoming source MAC addresses and maps them to physical ports and VLANs.

Step 1: Display the Entire MAC Address Table

To view all MAC addresses currently learned by the switch, execute:

Switch# show mac address-table

(Note: Older legacy Cisco IOS releases use show mac-address-table with a hyphen. Modern IOS and IOS-XE support both syntax variations or automatically alias to the unhyphenated command).

The output displays entries organized across four primary columns:

          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
 All    0100.0ccc.cccc    STATIC      CPU
   1    f4cf.e211.2200    STATIC      VLAN1
  10    001a.a012.3456    DYNAMIC     Gi1/0/1
  10    001a.a098.7654    DYNAMIC     Gi1/0/2
  20    0025.b511.2233    DYNAMIC     Po1
Total Mac Addresses for this module: 5

Step 2: Interpret the Entry Types

  • Vlan: The broadcast domain where the MAC address was observed.
  • Mac Address: The 48-bit address formatted in Cisco’s dotted quad format (xxxx.xxxx.xxxx).
  • Type:
  • DYNAMIC: Learned automatically from incoming Ethernet frames; subject to the aging timer (default is 300 seconds).
  • STATIC: Configured manually or reserved internally by the system (e.g., multicast addresses or the switch CPU).
  • Ports: The physical port, EtherChannel (e.g., Po1), or internal process (e.g., CPU) associated with that address.

Step 3: Filter Output by VLAN or Interface

Running a full dump on an enterprise access switch with hundreds of endpoints can generate overwhelming output. Scope down the view using parameters:

  • Filter by VLAN:
    text
    Switch# show mac address-table vlan 10
  • Filter by Physical Interface:
    text
    Switch# show mac address-table interface gigabitethernet 1/0/1
  • Filter by Dynamic Entries Only:
    text
    Switch# show mac address-table dynamic

Locating a Specific Connected Device Port by MAC Address

When responding to security alerts, network audits, or IP conflicts, you frequently need to identify the exact physical port to which an endpoint is attached.

Step 1: Format the Target MAC Address

Cisco equipment parses MAC addresses using three groups of four hexadecimal characters separated by periods (aaaa.bbbb.cccc), rather than colons (aa:bb:cc:dd:ee:ff) or hyphens (aa-bb-cc-dd-ee-ff).

Convert your target address first:
* Target: 00:1A:A0:12:34:56
* Cisco format: 001a.a012.3456

Step 2: Query the Specific MAC Address

Query the database directly using the address keyword:

Switch# show mac address-table address 001a.a012.3456

Alternatively, use output modifiers if you only recall part of the address:

Switch# show mac address-table | include 3456

Output:

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    001a.a012.3456    DYNAMIC     Gi1/0/12

Step 3: Determine Direct Connection vs. Trunk Port

Examine the value in the Ports column:
1. Access Port (e.g., Gi1/0/12): If the port connects to a single host or IP phone, you have found the physical wall jack or patch panel connection.
2. Uplink/Trunk/Port-Channel (e.g., Po1 or Te1/1/1): If the port points to an uplink connecting to another switch, the endpoint is located further down the network topology. Run Cisco Discovery Protocol (show cdp neighbors) or Link Layer Discovery Protocol (show lldp neighbors) on that uplink interface to find the next downstream switch, log into that switch, and repeat the query.


Cisco MAC Address Table vs. ARP Table

A frequent point of confusion during network troubleshooting is deciding whether to run show mac address-table or show ip arp. While both tables bind network identifiers together, they operate at different layers of the OSI model and serve entirely different forwarding roles.

The table below contrasts their architecture, purpose, and management on a Cisco switch:

CriterionMAC Address Table (CAM Table)ARP Table (Address Resolution Protocol)
OSI LayerLayer 2 (Data Link)Layer 3 (Network)
Mapping PairMAC Address $\leftrightarrow$ Physical Switch Port + VLANIP Address $\leftrightarrow$ MAC Address
Primary PurposeDirects local frame delivery through switching ASICs to avoid floodingResolves Layer 3 IP destinations to Layer 2 physical addresses for frame encapsulation
Population MethodPassive inspection of the source MAC address on incoming framesActive query/response messaging (RFC 826 ARP requests and replies)
Default Aging Timer300 seconds (5 minutes)14,400 seconds (4 hours)
Primary Inspection Commandshow mac address-tableshow ip arp
Primary Flush Commandclear mac address-table dynamicclear ip arp
Platform RelevancePresent on all Layer 2 and Layer 3 switchesPresent on Layer 3 switches, routers, and SVIs; minimal on unrouted L2 switches

Key Rule of Thumb: If you know an IP address and need to find the host’s switch port, first run show ip arp <ip-address> on your default gateway/Layer 3 switch to find the associated MAC address. Once you have the MAC address, run show mac address-table address <mac-address> on the relevant Layer 2 switch to find the physical port.


Flushing and Clearing Dynamic MAC Address Table Entries

When you disconnect a device and plug it into a different switch port, or when resolving network loops and spanning-tree topology changes, the switch may temporarily retain old port bindings until the 300-second aging timer expires. Clearing dynamic entries forces the switch to re-learn active hosts immediately.

Follow these steps to clear table entries safely:

Step 1: Identify the Scope of the Clear

Flushing the entire MAC table forces the switch to flood unknown unicast frames out all ports in the affected VLANs until hosts reply. To avoid unnecessary network flooding, clear specific addresses, interfaces, or VLANs whenever possible.

Step 2: Execute the Targeted Clear Command

Use the clear mac address-table dynamic command with appropriate modifiers:

  • Clear a single device:
    text
    Switch# clear mac address-table dynamic address 001a.a012.3456
  • Clear all MACs learned on a specific interface:
    text
    Switch# clear mac address-table dynamic interface gigabitethernet 1/0/1
  • Clear all dynamic MACs across an entire VLAN:
    text
    Switch# clear mac address-table dynamic vlan 10
  • Clear all dynamic MAC addresses globally:
    text
    Switch# clear mac address-table dynamic

Step 3: Verify Table Regeneration

Confirm that stale entries have cleared and new frames are populating correctly:

Switch# show mac address-table dynamic interface gigabitethernet 1/0/1

Cisco IOS/IOS-XE Command Reference: MAC Address Table Syntax

This section provides a formal, reference-grade specification for commands that inspect and manage the MAC address forwarding table in Cisco IOS and Cisco IOS-XE releases.

Command Syntax

show mac address-table [address mac-addr] [interface interface-id] [vlan vlan-id] [dynamic | static] [aging-time] [count]

Parameter Definitions

  • address mac-addr
    (Optional) Filters output for a specific 48-bit MAC address. Must be entered in four-digit hexadecimal notation separated by periods (xxxx.xxxx.xxxx).
  • interface interface-id
    (Optional) Limits the query to entries learned on a specified physical port (gigabitethernet1/0/1, tengigabitethernet1/0/1) or logical interface (port-channel 1).
  • vlan vlan-id
    (Optional) Restricts output to entries associated with a specific VLAN number (1–4094).
  • dynamic
    (Optional) Displays only dynamically learned entries subject to aging. Excludes static entries, CPU entries, and system-reserved multicast groups.
  • static
    (Optional) Displays administratively defined static entries and system-internal addresses.
  • aging-time
    (Optional) Displays the configured global or per-VLAN CAM aging timeout (default: 300 seconds).
  • count
    (Optional) Summarizes total active, dynamic, and static MAC addresses without listing individual records.

Command Modes

  • Privileged EXEC (#)
  • User EXEC (>)

Syntax Variations Across Cisco Software Platforms

  • Cisco IOS-XE (Catalyst 9000, 3850, 3650):
    Uses the modern unhyphenated command show mac address-table. Entering show mac-address-table is accepted as an alias.
  • Classic Cisco IOS (Catalyst 2960, 3560, 3750 prior to 12.2S):
    Earlier software versions required show mac-address-table. If show mac address-table produces a syntax error on legacy hardware, insert the hyphen.
  • Cisco NX-OS (Nexus Series Switches):
    Nexus switches use the NX-OS syntax show mac address-table dynamic or show mac address-table loop-detect.

Conclusion

Checking a Cisco switch MAC address comes down to distinguishing between the switch’s own identity and the devices transmitting through it. Use show version or show switch when you require the physical base MAC address of the switch chassis for inventory and network design. When tracking down connected workstations, servers, and access points, use show mac address-table paired with interface, VLAN, or address filters to map Layer 2 devices to their physical access ports. Understanding these commands and how the Layer 2 CAM table coordinates with the Layer 3 ARP table gives you complete visibility over device connectivity across your switching fabric.

Please follow and like us:
Last modified: November 17, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.