Show mac-address-table command
From NetworkCommands
A command available on most Cisco switch platforms; used to display the device's layer 2 MAC address table, which contains MAC address to interface mappings (in other words, which interface a particular MAC address can be reached through.)
These mappings are continuously 'learnt' by the device through the inspection of the Ethernet header (which contains source and destination MAC addresses) of all frames entering the switch's interfaces. These are used by the device to switch frames between specific interfaces rather than broadcast them to all interfaces (as a hub does.) However, frames with a destination MAC addresses not in this table are broadcast or 'flooded' to all interfaces.
Contents |
Usage Syntax
show mac-address-table [options]
The available options are;
- address MAC-address - only display MAC address table information for the specified MAC-address
- interface interface-name/number - only display MAC address table information for entries learned on the specified interface
- vlan vlan-number - only display MAC address table information for entries learned on the specified vlan-number
- dynamic - only display MAC address table information on dynamically learnt entries
- static - only display MAC address table information on static entries
- multicast - only display MAC address table information on multicast entries
- count - display MAC address table statistics including number of multicast, unicast, static and dynamic entries
- aging-time - display the global and per VLAN MAC address table aging times
- protocol protocol-name - only display MAC address table information for entries using the specified protocol-name
Usage Examples
show mac-address-table interface fa0/1 - display only those MAC address table entries learned on interface Fa0/1
show mac-address-table vlan 111 - display only those MAC address table entries learned on interfaces in VLAN 111
show mac-address-table address 00.0B.E4.36.60.E2 - display the MAC address table entry for the specified address, including the interface it was learnt on
Usage Notes
This command is obviously very useful in discovering which switch interface a particular host is connected to, if you have it's MAC address. If you only have a host's IP address, you may be able to find it's MAC address using the show arp command. If the interface a MAC address is associated with is connected to another switch, you will have to repeat this step on that switch (and possibly others.)
Frames with a destination MAC addresses not in this table are flooded to all interfaces.
Typical Output
show mac-address-table:
Unicast Entries vlan mac address type protocols port -------+---------------+--------+---------------------+-------------------- 210 0011.2003.a87f static ip,ipx,assigned,other Switch 210 0040.ca79.8821 dynamic ip GigabitEthernet1/1 210 00d0.b7bc.3d2c dynamic ip GigabitEthernet3/34 210 0800.8e05.1bbc dynamic ip GigabitEthernet3/33 210 0800.8e05.39b7 dynamic ip GigabitEthernet3/35
Multicast Entries vlan mac address type ports -------+---------------+-------+------------------------------------------- 210 ffff.ffff.ffff system Switch,Gi2/2,Gi2/6,Gi3/33,Gi3/34,Gi3/35,Gi1/1
show mac-address-table count:
MAC Entries for all vlans: Dynamic Unicast Address Count: 253 Static Unicast Address (User-defined) Count: 0 Static Unicast Address (System-defined) Count: 14 Total Unicast MAC Addresses In Use: 267 Total Unicast MAC Addresses Available: 32768 Multicast MAC Address Count: 17 Total Multicast MAC Addresses Available: 16384
Related Commands
Use the configuration mode mac-address-table command command to specify the mac address table aging time; how long a MAC address to interface mapping stays in the mac address table. This command can also be used to configure static MAC address to interface mappings.
The Cisco show arp command can be used to display IP address to MAC address mappings.
Command Equivalents
The Extreme switch command equivalent is the show fdb command
Related Articles
You may find our OSI Model General Diagram useful in understanding where layer 2 MAC addressing fits into the OSI model.
Information on other Cisco commands
Information on Linux commands
Information on F5 BigIP commands
Information on Vyatta commands
Information on Extreme commands
Information on Zebra commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands







