The undo mac-address security command deletes secure MAC address entries. Secure MAC address entries include dynamic and static secure MAC address entries and sticky MAC address entries.
undo mac-address { sec-config | security | sticky } [ interface-type interface-number | vlan vlan-id ] *
Parameter |
Description |
Value |
---|---|---|
interface-type interface-number |
Specifies the outbound interface in a secure MAC address entry to be deleted. |
- |
vlan vlan-id |
Specifies the VLAN ID in a secure MAC address entry to be deleted. |
The value is an integer that ranges from 1 to 4094. |
sec-config |
Deletes static secure MAC address entries. |
- |
security |
Deletes dynamic secure MAC address entries, that is, MAC address entries learned by an interface enabled with port security. |
- |
sticky |
Deletes sticky MAC address entries, that is, MAC address entries learned by an interface enabled with the sticky MAC function. |
- |
After port security is enabled on an interface, dynamic MAC address entries learned by the interface turn into secure MAC address entries. Secure MAC address entries are not aged out. After the number of MAC address entries learned by an interface reaches the limit, the interface cannot learn new MAC address entries. Packets matching no MAC address entry are broadcast, wasting bandwidth resources. This command can delete useless secure MAC address entries to release the MAC address table space.
# Delete all static secure MAC address entries.
<HUAWEI> system-view [HUAWEI] undo mac-address sec-config
# Delete all dynamic secure MAC address entries on gigabitethernet0/0/1.
<HUAWEI> system-view [HUAWEI] undo mac-address security gigabitethernet 0/0/1
# Delete all sticky MAC address entries.
<HUAWEI> system-view [HUAWEI] undo mac-address sticky