mac

Commands for MAC Address Table Configuration
215
16.2.11 switchport port-security lock
Command: switchport port-security lock
no switchport port-security lock
Function: Lock the port. After the port is locked, the MAC-address learning function will
be shut down; the no operation of this command will reset the MAC-address learning
function.
Command Mode: Port Configuration Mode.
Default: Ports are unlocked.
Usage Guide: Ports can only be locked after the MAC-address binding function is
enabled. When a port becomes locked, its MAC learning function will be disabled.
Examples: Lock port 1.
Switch(config)#interface Ethernet 1/1
Switch(Config-If-Ethernet1/1)#switchport port-security lock
16.2.12 switchport port-security mac-address
Command: switchport port-security mac-address <mac-address>
no switchport port-security mac-address <mac-address>
Function: Add a static secure MAC address; the no command deletes a static secure
MAC address.
Command mode: Port Mode.
Parameters: <mac-address> stands for the MAC address to be added or deleted.
Usage Guide: The MAC address binding function must be enabled before static secure
MAC address can be added.
Example: Adding MAC 00-03-0F-FE-2E-D3 to port1.
Switch(config)#interface Ethernet 1/1
Switch(Config-If-Ethernet1/1)#switchport port-security mac-address 00-03-0F-FE-2E-D3
16.2.13 switchport port-security maximum
Command: switchport port-security maximum <value>
no switchport port-security maximum
Function: Sets the maximum number of secure MAC addresses for a port; the no
command restores the maximum secure address number of 1.
Command mode: Port Mode.
Parameter: < value> is the up limit for static secure MAC address, the valid range is 1 to
128.
Default: The default maximum port secure MAC address number is 1.