Assigning Static MAC Addresses

Assigning Static MAC Addresses
If you use static mac-address assignments on every switch port, I hope you like to type a lot.
If you do, Table 5.6 shows you how to do it:
TABLE 5 . 6
Command and Meaning
Command Meaning
static
Sets a static MAC address on a switch interface
You can set a static MAC address in the MAC address table, but like setting static
MAC port security, it’s a ton of work. But in case you want to do it, here’s how it’s done:
S1#config t
S1(config)#mac-address-table static aaaa.bbbb.cccc vlan 1 int fa0/5
S1(config)#do show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
All 0100.0ccc.cccc STATIC CPU
[output cut]
1 0002.1762.b235 DYNAMIC Po1
1 0009.b79f.c080 DYNAMIC Po1
1 000d.29bd.4b87 DYNAMIC Po1
1 000d.29bd.4b88 DYNAMIC Po1
1 0016.4662.52b4 DYNAMIC Fa0/4
1 0016.4677.5eab DYNAMIC Po1
1 001a.2f52.49d8 DYNAMIC Po1
1 001a.2fe7.4170 DYNAMIC Fa0/8
1 001a.e2ce.ff40 DYNAMIC Po1
1 0050.0f02.642a DYNAMIC Fa0/3
1 aaaa.bbbb.cccc STATIC Fa0/5
Total Mac Addresses for this criterion: 31
S1(config)#
Here you can see that a static MAC address is now assigned permanently to interface fa0/5
and that it’s also assigned to VLAN 1 only.