Syslog message: "L2ALD_MAC_LIMIT_RESET_IF" and "L2ALD_MAC_LIMIT_EXCEEDED_BLOCK"
To secure a port, set the maximum number of MAC addresses that can be learned by an interface.
Set the MAC limit on an interface, and specify an action that the device takes after the specified limit is exceeded.If you want to set the MAC limit on an interface that is part of the default routing instance: [edit switch-options]user@switch# set interface interface-name interface-mac-limit limit packet-action action Reference link:https://www.juniper.net/documentation/us/en/software/junos/security-services/topics/topic-map/configuring-mac-limiting.html The below configuration was set on the device: COMMAND:[edit switch-options]user@switch# set interface xe-0/0/0 mac-limit 2 packet-action shutdown
Because of this configuration ,if a third MAC-address is detected by xe-0/0/0, the process L2ALD will shut down the port and the below log is generated. Jun 2 02:38:58 switch1 l2ald[17856]: L2ALD_MAC_LIMIT_EXCEEDED_BLOCK: Limit on learned MAC addresses exceeded for xe-0/0/0.0; current count is 2 SHUTTING THE INTERFACE
The port goes into error disabled state, we can verify the same with the below command: user@switch> show ethernet-switching interfaces Interface State VLAN members Blocking xe-0/0/0.0 down default MAC limit exceeded
To resolve the issue , we can clear the error disable state or we can increase the MAC limit on the interface.
Clear ethernet-switching recovery-timeout
[edit switch-options]user@switch# set interface xe-0/0/0 mac-limit 3 packet-action shutdown