Basics: Static MAC Address Configuration on Cisco Switches

Basics: Static MAC Address Configuration on Cisco Switches

The switch keeps an address table to efficiently exchange frames between LAN ports. When the switch receives a frame, it links the sender network device's media access control (MAC) address with the LAN port on which it was received.

The address database is built dynamically by the switch using the MAC source address of the packets received. When the switch gets a frame with a MAC destination address that is not in its address database, it floods the frame to all LAN ports in the same VLAN except the one that got the message. When the destination station responds, the switch updates the address table with its MAC source address and port ID. Following frames are then sent to a single LAN port without flooding all LAN ports.

Although Cisco switches generate the MAC address database dynamically based on the source MAC address of the received frames, you may also manually add a MAC address to the switch's MAC address table. Even if the switch is restarted, the static MAC entries will be kept.

⚡⚡ How to configure the Static MAC ๐Ÿ“œ

NDNA_S1(config)#mac-address-table static <mac_add> vlan id <vlan_id> interface <interface>

⚡⚡ Deleting the Static MAC ๐Ÿ“œ

NDNA_S1(config-if)# no mac-address-table static <mac_add> vlan <vlan_id>

⚡⚡ Aging time for Static MAC ๐Ÿ“œ

NDNA_S1(config)# mac-address-table aging-time <seconds> vlan <vlan_id> 

⚡⚡ Verify Mac commands ๐Ÿ“œ

NDNA_S1# show mac-address-table
NDNA_S1# show mac-address-table aging-time

Continue Reading...