The port-security mac-address sticky command enables the sticky MAC address function in a network enhanced profile.
The undo port-security mac-address sticky command disables the sticky MAC address function in a network enhanced profile.
By default, the sticky MAC address function is disabled in a network enhanced profile.
This command can only be executed on a parent switch.
Application scenario
After creating a network enhanced profile, you can enable the sticky MAC address function in the profile. After the profile is bound to an AS port, the configuration is automatically delivered to the AS port. The following configuration is generated on the AS:
# interface GigabitEthernet0/0/1 port-security enable port-security mac-address sticky #
In the preceding configuration, GigabitEthernet0/0/1 is used for reference only. The actual configuration depends on the profile.
Prerequisites
Before enabling the sticky MAC address function in a network enhanced profile, ensure that port security has been enabled in the profile.
# Configure the system to set an interface to the Error-Down state when detecting MAC address flapping on the interface.
<HUAWEI> system-view [HUAWEI] uni-mng [HUAWEI-um] network-enhanced-profile name profile_1 [HUAWEI-um-net-enhanced-profile_1] port-security enable [HUAWEI-um-net-enhanced-profile_1] port-security mac-address sticky