The following steps are the common operations that you will need to perform for configuring port MAC security.
device# configure terminal
device(config)# interface Ethernet 3/2
device(conf-if-eth-3/2)# switchport
device(conf-if-eth-3/2)# switchport port-security
device(conf-if-eth-3/2)# switchport port-security max 10
device(conf-if-eth-3/2)# switchport port-security shutdown-time 4
device(conf-if-eth-3/2)# switchport port-security mac-address 0000.00eb.2d14 vlan 2
device(conf-if-eth-3/2)# switchport port-security sticky
device(conf-if-eth-3/2)# switchport port-security sticky mac-address 0000.0018.747C vlan 5
The following example shows the steps to configure port MAC security.
device# configure terminal device(config)# interface Ethernet 3/2 device(conf-if-eth-3/2)# switchport device(conf-if-eth-3/2)# switchport port-security device(conf-if-eth-3/2)# switchport port-security max 8192 device(conf-if-eth-3/2)# switchport port-security shutdown-time 4 device(conf-if-eth-3/2)# switchport port-security mac-address 0000.00eb.2d14 vlan 2 device(conf-if-eth-3/2)# switchport port-security sticky mac-address 0000.0018.747C vlan 5 device(conf-if-eth-3/2)# switchport port-security violation shutdown