secure-mac-address

Configures secure MAC addresses on tagged and untagged interfaces.
Syntax
secure-mac-address mac-address [ vlan-id ]
no secure-mac-address mac-address [ vlan-id ]
Command Default

Secure MAC addresses are not configured.

Parameters
mac-address
Specifies the MAC address.
vlan-id
Specifies the VLAN ID.
Modes

Port security interface configuration mode

Usage Guidelines

When specifying a secure MAC address on a tagged interface, you must also specify the VLAN ID.

Note: If MAC port security is enabled on a port and you change the VLAN membership of the port, make sure that you also change the VLAN ID specified in the secure-mac-address configuration statement for the port.

When a secure MAC address is applied to a tagged port, the VLAN ID is generated for both tagged and untagged ports. When you display the configuration, you see an entry for the secure MAC addresses.

The no form of the command removes the configured secure MAC address.

Examples

The following example shows how to specify a secure MAC address on an untagged interface.

device(config)# interface ethernet 1/7/11
device(config-if-e1000-1/7/11)# port security
device(config-port-security-e1000-1/7/11)# secure-mac-address 0000.0018.747C

The following example shows how to specify a secure MAC address on a tagged interface.

device(config)# interface ethernet 1/7/11
device(config-if-e1000-1/7/11)# port security
device(config-port-security-e1000-1/7/11)# secure-mac-address 0000.0018.747C 2