Configure Static MAC Address

Although Cisco switches dynamically build the MAC address table by using the source MAC address of the received frames, you can also manually add a MAC address to the switch’s MAC address table. The static MAC entries will be retained even after the switch is restarted.

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

(config)#mac-address-table static MAC_ADDRESS vlan ID interface INTERFACE

The following command will permanently assign the MAC address of 1111.1111.1111 to the interface Fa0/2, VLAN 1:

SW1(config)#mac-address-table static 1111.1111.1111 vlan 1 interface fa0/2

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

SW1(config)#do show mac-address-table
Mac Address Table
-------------------------------------------

Vlan Mac Address Type Ports
---- ----------- -------- -----

1 1111.1111.1111 STATIC Fa0/2
NOTE
To delete the static entry from the MAC address table, re-enter the command with the no keyword in front.

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: