Entries in a MAC Address Table
The MAC address learning mechanism enables an Ethernet switch to acquire the MAC
addresses of the network devices on the segment connected to the ports of the switch. The
switch directly forwards the packets destined for these MAC addresses. A MAC address table
too big in size may decrease the forwarding performance of the switch.
By setting the maximum number of MAC addresses that can be learnt from individual ports,
you can control the number of the MAC address entries the MAC address table can
dynamically maintains. When the number of the MAC address entries learnt from a port
reaches the set value, the port stops learning MAC addresses.
Perform following commands in interface configuration mode.
Table 29-4 Set the maximum number of MAC addresses a port can learn
Enable MAC
addresses table
learning
mac-address-table learning
This command can be used in
both global configuration mode
and interface configuration
mode.
By default, this function is
enabled.
Set the maximum
number of MAC
addresses the port
can learn
mac-address-table max-mac-count
max-mac-count
By default, the number of the
MAC addresses a port can
learn is not limited.
29.1.1.2 Displaying and Maintaining MAC Address Table Configuration
To verify your configuration, you can display information about the MAC address table by
executing the display command in any mode.
Table 29-5 Display and maintain MAC address table configuration
Display information
about the MAC
address table
show mac-address-table
show mac-address-table { interface-num [ vlan vlan-id ] | cpu }
show mac-address-table mac [ vlan vlan-id ]
show mac-address-table { static | dynamic | permanent | blackhole }
[ vlan vlan-id ]
show mac-address-table { static |dynamic | permanent | blackhole }
interface interface-num [ vlan vlan-id ]
show mac-address-table vlan vlan-id
Display the aging time
of the dynamic MAC
address entries in the
MAC address table
show mac-address-table age-time
Display MAC
addresses table
learning status
show mac-address-table learning