1-7 
Setting the Maximum Number of MAC Addresses a Port Can Learn 
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. By searching the MAC 
address table, the switch directly forwards the packets destined for these MAC addresses through the 
hardware, improving the forwarding efficiency. A MAC address table too big in size may prolong the time 
for searching MAC address entries, thus decreasing the forwarding performance of the switch. 
By setting the maximum number of MAC addresses that can be learned from individual ports, the 
administrator can control the number of the MAC address entries the MAC address table can 
dynamically maintain. When the number of the MAC address entries learnt from a port reaches the set 
value, the port stops learning MAC addresses. 
Follow these steps to set the maximum number of MAC addresses a port can learn: 
To do…  Use the command…  Remarks 
Enter system view 
system-view 
— 
Enter Ethernet port view 
interface interface-type 
interface-number 
— 
Set the maximum number of 
MAC addresses the port can 
learn 
mac-address max-mac-count 
count 
Required 
By default, the number of the 
MAC addresses a port can 
learn is not limited. 
 
 
If you have configured the maximum number of MAC addresses that a port can learn, you cannot 
enable the MAC address authentication or port security functions on the port, and vice versa.  
 
With the port MAC address configuration, the switch uses the MAC address of a port as the source 
MAC address when sending the following Layer 2 PDUs out of the port: 
z  LACP 
z  STP 
z  NDP/NTDP 
z  GVRP 
z  DLDP 
Port MAC address configuration does not affect service packet forwarding. 
Displaying MAC Address Table Information 
To do…  Use the command…  Remarks 
Display information about the 
MAC address table 
display mac-address [ display-option ]  
Display the aging time of the 
dynamic MAC address entries 
in the MAC address table 
display mac-address aging-time 
Available in any view