Assign static MAC address

Although Cisco switches dynamically build the MAC address table by using the MAC source address of the received frames, you can also specify a static address to add to the MAC address table. The static MAC entries are retained even if the switch is restarted.

To configure a static MAC address, the following command is used:

mac-address-table static MAC_ADDRESS vlan ID interface INTERFACE

For example, the following set of commands will assign the MAC address of 1111.1111.1111 permanently to the interface Fa0/2, VLAN 1:

mac address table static command

To verify the configuration, we can use the show mac address table command:

show mac address table static

 

To delete the static entry from the MAC address table, re-enter the command with the keyword no in front of the command.
Geek University 2022