Chapter 4: Layer 2 Interface Configuration 55
Section 4-1
Table 4-1 Switch Commands to Display Layer 2 Switching Table Content Information
Display Function Command
Display dynamically learned addresses based
on a port or VLAN number
(exec) show mac-address-table dynamic
Display statically defined addresses based
on a port or VLAN number
(exec) show mac-address-table static
[address mac-addr | detail | interface
interface interface-number | protocol
protocol | vlan vlan-id]
Display the port or VLAN associated with a
MAC address
(exec) show mac-address-table address
mac-addr [detail | {interface interface
interface-number} | {protocol protocol} |
{vlan vlan-id} | all]
Display the switching table aging time
(exec) show mac-address-table aging-time
[vlan vlan-id]
Display the switching table address count
and size
(exec) show mac-address-table count [vlan
vlan-id] [slot slot-num]
If you need to find a list of all the MAC addresses that have been learned on a specific
switch port, you would enter the following command (for example):
(exec) show mac-address-table dynamic interface gigabit 0/1
The switch produces output like this:
switch-ios# show mac-address-table dynamic interface gig 0/1
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
————————— —————— —— ——————————
0000.0c45.2100 Dynamic 999 GigabitEthernet0/1
0000.1b04.2f76 Dynamic 64 GigabitEthernet0/1
0000.489a.3b0b Dynamic 57 GigabitEthernet0/1
Tip If you need to locate a specific MAC address within a large network and you have no
idea where to start, begin looking on a core layer switch near the center of the network.
Look for the MAC address in the switching table there. After finding it, move to the neigh-
boring switch that connects to the destination port.
Keep looking for the address in the switching tables and then move to the next neighboring
switch. Repeat this process until you reach the edge of the network, where the device is
physically connected.