clear mac address-table dynamic

This topic explains the command that deletes dynamically learned MAC addresses, optionally for one interface or VLAN.

Syntax

clear mac address-table dynamic [interfaces id | vlan vlan-id]

Parameter

interfaces id: As an option, specify the interface, LAG, a range of interfaces, or a range of LAGs from which all dynamically learned addresses must be deleted. The id parameter represents the interface or LAG number or a range of interface numbers or LAG numbers. Use a hyphen to indicate a range. Use a comma to separate individual interfaces, ranges, or a combination of both.

vlan vlan-id: As an option, specify the VLAN ID from which all dynamically learned addresses must be deleted. The vlan-id parameter represents the VLAN ID.

Default

No default value.

Mode

Privileged EXEC

Usage

Use this command to delete the dynamically learned MAC entries from the MAC address table. As an option, you can specify an interface, LAG, or VLAN from which the dynamically learned address entries must be cleared. If you do not specify an interface or a VLAN, all dynamically learned address entries on the switch are deleted.

Example

This example shows how to delete the dynamically learned MAC addresses on interface 1/0/1:

CODE
Switch# clear mac address-table dynamic interfaces 1/0/1