Removing MAC address entries

You can remove the following types of learned MAC address entries from the system MAC address table:

  • All MAC address entries
  • All MAC address entries for a specified Ethernet port
  • All MAC address entries for a specified VLAN
  • A specified MAC address entry in all VLANs

For example, to remove entries for the MAC address 00-00-00 in all VLANs, enter the following command at the privileged EXEC level of the CLI.

device# clear mac-address 00-00-00

Syntax: clear mac-address [ mac-address | ethernet port-num | vlan number ]

If you enter the clear mac-address command without any parameters, the software removes all MAC entries.

Use the clear mac-address mac-address command to remove a specified MAC address from all VLANs. Specify the MAC address in the following format: HHHH.HHHH.HHHH.

Use the clear mac-address ethernet port-num command to remove all MAC addresses for a specified Ethernet port.

Use the clear mac-address vlan number command to remove all MAC addresses for a specified VLAN.