Chapter 4: Commands for CLI configuration
72
NS4750-24S-4T-4X-V2 Managed Switch Command Guide
Switch# configure terminal
Switch (config)#
interface GigabitEthernet X/X
Switch (config-if) #
port-security
port-security maximum
Command:
port-security maximum <Number of addresses : 1-1024>
port-security
Enable/disable port security per interface.
maximum
Maximum number of MAC addresses that can be learned on this set
of interfaces.
<Number of addresses : 1-1024>
Number of addresses
Default:
None
Usage Guide:
To configure number of
Port-security
addresses for specific interface
Example:
To configure 100
Port-security
addresses
for
GigabitEthernet X/X
Switch# configure terminal
Switch (config)#
interface GigabitEthernet X/X
Switch (config-if) #
port-security maximum 100
port-security violation
Command:
port-security violation [protect | shutdown | trap | trap-
shutdown]
port-security
Enable/disable port security per interface.
violation
The action involved with exceeding the limit.
protect
Don't do anything
shutdown
Shutdown the port
trap
Send an SNMP trap
trap-shutdown
Send an SNMP trap and shut down the port
Default:
None (Protected)
Usage Guide:
To configure protected mode of
Port-security
for specific interface
Example:
To configure protected mode
(trap-shutdown)
of
Port-security
for
GigabitEthernet X/X
Switch# configure terminal
Switch (config)#
interface GigabitEthernet X/X
Switch (config-if) #
port-security violation trap-shutdown
pvlan
Command: