mac

Commands for PORT SECURITY
162
the number of the current secure MAC whether exceed the maximum MAC limit allowed
by the interface. If exceeding the maximum MAC limit, it will result in violation operation.
Example: Configure the secure MAC address on the interface.
Switch(config-if-ethernet1/1)#switchport port-security mac-address sticky
00-00-00-00-00-01
11.7 switchport port-security maximum
Command: switchport port-security maximum <value> [vlan <vlan-list>]
no switchport port-security maximum <value> [vlan <vlan-list>]
Function: Configure the maximum number of the secure MAC allowed by the interface,
if specifying VLAN parameter, it means the maximum number in the configured VLANs.
The no command cancels the maximum number of the secure MAC configured by the
interface.
Parameter: valueConfigure the maximum number of the secure MAC allowed by the
interface, its range between 1 and 128. It is determined by the maximum MAC number of
the device.
vlan-id: Configure the maximum value for the specified VLAN, it only takes
effect on trunk and hybrid interfaces.
Default: After enabling port-security, if there is no other configuration, the maximum
number of the secure MAC is 1 on the interface. The interface number in VLAN is no limit
by default
Command Mode: Port mode
Usage Guide: Pay attention to the coupling relation about the number between the
interface and VLAN, set the maximum number configured by the interface as the
standard firstly.
Example: Configure the maximum number of the secure MAC on the interface.
Switch(config-if- ethernet1/1)# switchport port-security maximum 100
11.8 switchport port-security violation
Command: switchport port-security violation {protect | restrict | shutdown}
no switchport port-security violation
Function: When exceeding the maximum number of the configured MAC addresses,
MAC address accessing the interface does not belongs to this interface in MAC address
table or a MAC address is configured to several interfaces in same VLAN, both of them
will violate the security of the MAC address.