The 802.1X authentication function conflicts with the mac-limit command (configuring the maximum number of MAC addresses that can be learned through an interface) and the mac-address learning disable command (disabling MAC address learning on an interface). Therefore, after 802.1X authentication is enabled on an interface, you cannot run the mac-limit and mac-address learning disable commands to limit the number of MAC addresses that can be learned through the interface. The following describes some alternative methods.
(Applicable to all versions) Limit the number of concurrent access users for 802.1X authentication on an interface to limit the number of MAC addresses that can be learned through the interface.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] dot1x max-user 3
(Applicable to V200R012 and later versions) Configure port security on an interface and limit the number of MAC addresses that can be learned through the interface.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] port-security enable [HUAWEI-GigabitEthernet0/0/1] port-security max-mac-num 3