Displaying port security settings

Syntax:


show port-security

show port-security <port-number>

show port-security [<port-number>-<port-number>]...[,<port-number>]

The CLI uses the same command to provide two types of port security listings:

  • All ports on the switch with their Learn Mode and (alarm) Action

  • Only the specified ports with their Learn Mode, Address Limit, (alarm) Action, and Authorized Addresses

Without port parameters, show port-security displays Operating Control settings for all ports on a switch.

Port security listing (ports 7 and 8 show the default setting)

switch(config)# show port-security
 
 Port Security

  Port Learn Mode  | Action                   Eavesdrop Prevention
  ---- ----------- + ------------------------ --------------------
  1    Continuous  | Send Alarm, Disable Port Enabled
  2    Continuous  | Send Alarm, Disable Port Enabled
  3    Static      | Send Alarm               Enabled
  4    Continuous  | Send Alarm, Disable Port Enabled
  5    Continuous  | Send Alarm, Disable Port Enabled
  6    Continuous  | Send Alarm, Disable Port Enabled
  7    Continuous  | None                     Enabled
  8    Continuous  | None                     Enabled

With port numbers included in the command, show port-security displays Learn Mode, Address Limit, (alarm) Action, and Authorized Addresses for the specified ports on a switch. The following example lists the full port security configuration for a single port:

The port security configuration display for a single port

switch(config)# show port-security 3

 Port Security

  Port : 3
  Learn Mode [Continuous] : Static   Address Limit [1] : 1
  Action [None] : None
  Eavesdrop Prevention [Enabled] : Enabled
  
  Authorized Addresses
  --------------------
  00906d-fdcc00

The next example shows the option for entering a range of ports, including a series of non-contiguous ports. Note that no spaces are allowed in the port number portion of the command string:

Entering a range of ports

switch(config)# show port-security 1-3,6,8