There may be times when you need to configure a static MAC Address in the table for a server or another specific device in the network. The static option allows some restriction of traffic to certain designated ports. On Cisco IOS-based switches use the mac-address-table static command followed by the address you which to make static. An example might be:
switch(config)#mac-address-table static 2222.2222.2222 fa0/2 fa0/3 fa0/4 vlan 1
The example above will restrict traffic from MAC Address 2222.2222.2222 on port Fa0/2 to devices attached to ports Fa0/3 and Fa0/4 in Vlan 1.
To remove the static address merely use the no mac-address-table static command, and all static addresses can be removed from the table with the clear mac-address-table static command.
Remember, static MAC Addresses never age out of the table.
Another type of MAC Address is the Secure address, which is used to permanently associate a device with a specific port and will never age out. To enable a secure MAC Address on a Cisco switch issue the mac-address-table secure command followed by the address and Vlan to be associated. An example might be:
switch(config)#mac-address-table secure 3333.3333.3333 Fa0/5 vlan 1
This would associate MAC Address 3333.3333.3333 with port Fa0/5 on Vlan 1, and devices attached to other ports on the switch can forward traffic via this port to the designated MAC Address. Note: There can only be one secure MAC Address per Vlan.