Command:

show port-security


Mode:

Switch#


Syntax:

show port-security [interface interface-id] [address] [ | {begin | exclude | include} expression]

 

Syntax Description:

interface interface-id

(Optional) Display the port security settings for the specified interface.

address

(Optional) Display all the secure addresses on all ports.

| begin

(Optional) Display begins with the line that matches the specified expression.

| exclude

(Optional) Display excludes lines that match the specified expression.

| include

(Optional) Display includes lines that match the specified expression.

expression

Expression in the output to use as a reference point.

 

Command Description:

 

Use the show port-security privileged EXEC command to display the port security settings defined for an interface or for the switch.

If you enter this command without keywords, the output includes the administrative and the operational status of all secure ports on the switch.

If you enter an interface-id, the show port-security command displays port security settings for the interface.

If you enter the address keyword, the show port-security address command displays the secure MAC addresses for all interfaces and the aging information for each secure address.

If you enter an interface-id and the address keyword, the show port-security interface interface-id address command displays all the MAC addresses for the interface with aging information for each secure address. You can also use this command to display all the MAC addresses for an interface even if you have not enabled port security on it.

Expressions are case sensitive. For example, if you enter | exclude output, the lines that contain output do not appear, but the lines that contain Output appear.


Example:

This is an example of output from the show port-security command: 

Switch#show port-security

Secure Port MaxSecureAddr CurrentAddr SecurityViolation Security

Action

(Count) (Count) (Count)

----------------------------------------------------------------------------

---

Fa0/1 11 11 0 Shutdown

Fa0/5 15 5 0 Restrict

Fa0/11 5 4 0 Protect

----------------------------------------------------------------------------

---

Total Addresses in System :21

Max Addresses limit in System :1024

This is an example of output from the show port-security interface fastethernet0/2 command:

Switch#show port-security interface fastethernet0/2

Port Security :Enabled

Port status :SecureUp

Violation mode :Shutdown

Maximum MAC Addresses :11

Total MAC Addresses :11

Configured MAC Addresses :3

Aging time :20 mins

Aging type :Inactivity

SecureStatic address aging :Enabled

Security Violation count :0

This is an example of output from the show port-security address command:

Switch#show port-security address

Secure Mac Address Table

-------------------------------------------------------------------

Vlan Mac Address Type Ports Remaining Age

(mins)

---- ----------- ---- ----- -------------

1 0001.0001.0001 SecureDynamic Fa0/1 15 (I)

1 0001.0001.0002 SecureDynamic Fa0/1 15 (I)

1 0001.0001.1111 SecureConfigured Fa0/1 16 (I)

1 0001.0001.1112 SecureConfigured Fa0/1 -

1 0001.0001.1113 SecureConfigured Fa0/1 -

1 0005.0005.0001 SecureConfigured Fa0/5 23

1 0005.0005.0002 SecureConfigured Fa0/5 23

1 0005.0005.0003 SecureConfigured Fa0/5 23

1 0011.0011.0001 SecureConfigured Fa0/11 25 (I)

1 0011.0011.0002 SecureConfigured Fa0/11 25 (I)

-------------------------------------------------------------------

Total Addresses in System :10

Max Addresses limit in System :1024

 

This is an example of output from the show port-security interface fastethernet0/5 address command:

 

Switch#show port-security interface fastethernet0/5 address

Secure Mac Address Table

-------------------------------------------------------------------

Vlan Mac Address Type Ports Remaining Age

(mins)

---- ----------- ---- ----- -------------

1 0005.0005.0001 SecureConfigured Fa0/5 19 (I)

1 0005.0005.0002 SecureConfigured Fa0/5 19 (I)

1 0005.0005.0003 SecureConfigured Fa0/5 19 (I)

-------------------------------------------------------------------

Total Addresses:3


Misconceptions:

           None.


Related Commands:

            switchport port-security 


� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)