switchport port-security mac-address

Configures the MAC address option for port security on an interface port.

Syntax

switchport port-security mac-address address vlan vlan_id

Command Default

MAC address is not configured for port security.

Parameters

mac-address address
Specifies the MAC address-based VLAN classifier rule used to map to a specific VLAN.
vlan vlan_id
Specifies a VLAN.

Modes

Interface configuration mode

Usage Guidelines

Static MAC addresses cannot be configured on a secure port. They must be configured as secure MAC addresses on the secure port.

When static MAC address is configured on an access secure port, the MACs qualify for access VLANs, but on trunk port, VLAN must be specified.

The no switchport port-security mac-adress command removes the specified MAC address.

Examples

The following example configures static MAC address for port security on an interface:

device(config)# interface Ethernet 3/2
device(conf-if-eth-3/2)# switchport
device(conf-if-eth-3/2)# switchport port-security mac-address 0000.00eb.2d14 vlan 2