port-security mac-address vlan-id

Syntax

port-security <port> mac-address <mac-address> vlan-id <vlan-id>

Description

Configures static MAC address on a given VLAN.

Command context

config

Parameters

port

Specifies a port.

mac-address

Specifies the Mac address.

vlan-id

Specifies the VLAN.

Examples

switch(config)# port-security A3
 action                Define the action in case of an intrusion detection.
 address-limit         Define number of authorized addresses on the ports.
 clear-intrusion-flag  Clear the intrusion indicator for the ports.
 disable-timer         Configure number of seconds after which disabled ports
                       are automatically re-enabled.
 eavesdrop-prevention  Enable Eavesdrop Prevention.
 learn-mode            Define the mode for acquiring authorized MAC addresses.
 mac-address           Configure the addresses authorized on the ports.
switch(config)# port-security A3 mac-address
 MAC-ADDR              An authorized MAC address.
switch(config)# port-security A3 mac-address 000002-000003
 vlan-id               VLAN ID for the authorized addresses on the ports.
 MAC-ADDR              An authorized MAC address.
 action                Define the action in case of an intrusion detection.
 address-limit         Define number of authorized addresses on the ports.
 clear-intrusion-flag  Clear the intrusion indicator for the ports.
 disable-timer         Configure number of seconds after which disabled ports
                       are automatically re-enabled.
 eavesdrop-prevention  Enable Eavesdrop Prevention.
 learn-mode            Define the mode for acquiring authorized MAC addresses.
 <cr>
switch(config)# port-security A3 mac-address 000002-000003 vlan-id
 VLAN-ID               VLAN ID for the authorized addresses on the ports.
switch(config)# port-security A3 mac-address 000002-000003 vlan-id 10