Routing & Switching

Cisco switch show MAC address lookup

In this post, we will look at how to lookup a mac address on a Cisco switch.

List dynamic MAC addresses

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

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    0050.7966.6801    DYNAMIC     Gi1/3
  10    0050.7966.6802    DYNAMIC     Gi0/1
  10    0050.7966.6803    DYNAMIC     Gi0/2
  20    0050.7966.6804    DYNAMIC     Gi0/3
  20    0050.7966.6805    DYNAMIC     Gi1/0
  20    0050.7966.6807    DYNAMIC     Gi1/1
Total Mac Addresses for this criterion: 6

List MAC addresses on a specific VLAN

Switch#show mac address-table dynamic vlan 10
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  10    0050.7966.6801    DYNAMIC     Gi1/3
  10    0050.7966.6802    DYNAMIC     Gi0/1
  10    0050.7966.6803    DYNAMIC     Gi0/2
Total Mac Addresses for this criterion: 3
Switch#
Switch#
Switch#show mac address-table dynamic vlan 20
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  20    0050.7966.6804    DYNAMIC     Gi0/3
  20    0050.7966.6805    DYNAMIC     Gi1/0
  20    0050.7966.6807    DYNAMIC     Gi1/1
Total Mac Addresses for this criterion: 3

Address to lookup in the table

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

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  20    0050.7966.6804    DYNAMIC     Gi0/3
Total Mac Addresses for this criterion: 1

List MAC addresses on a specific interface

Switch#show mac address-table dynamic interface Gi0/3
          Mac Address Table
-------------------------------------------

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  20    0050.7966.6804    DYNAMIC     Gi0/3
Total Mac Addresses for this criterion: 1

Number of MAC addresses in the table

Switch#show mac address-table count 

Mac Entries for Vlan 1:
---------------------------
Dynamic Address Count  : 0
Static  Address Count  : 0
Total Mac Addresses    : 0

Mac Entries for Vlan 10:
---------------------------
Dynamic Address Count  : 3
Static  Address Count  : 0
Total Mac Addresses    : 3

Mac Entries for Vlan 20:
---------------------------
Dynamic Address Count  : 3
Static  Address Count  : 0
Total Mac Addresses    : 3

Total Mac Address Space Available: 70013688

Clear all dynamic entry type by address, interface, VLAN, or all

Switch#clear mac address-table dynamic ?
  address    address keyword
  interface  interface keyword
  vlan       vlan keyword
  <cr>

List of interface status with useful information

Switch#show interfaces status

Port      Name               Status       Vlan       Duplex  Speed Type 
Gi0/0                        notconnect   10           auto   auto unknown
Gi0/1                        connected    10           auto   auto unknown
Gi0/2                        connected    10           auto   auto unknown
Gi0/3                        connected    20           auto   auto unknown
Gi1/0                        connected    20           auto   auto unknown
Gi1/1                        connected    20           auto   auto unknown
Gi1/2                        notconnect   1            auto   auto unknown
Gi1/3                        connected    10           auto   auto unknown