Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

counter reset for show port-security

Is there a way to clear the counters of Port-Security Security Violation?

13 REPLIES

Re: counter reset for show port-security

Hi,

Here is the command

clear port-security {all | configured | dynamic | sticky} [address mac-address] | [interface interface-id]

http://www.cisco.com/univercd/cc/td/doc/product/lan/cat2950/12122ea2/2950cr/cli1.htm#wp3040836

HTH,

regards,

-amit singh

Re: counter reset for show port-security

Sorry I interpreted the question wrong. To clear the port security counters, there is no command as such. The only way it will get clear is with the reboot of the switch.

regards,

-amit singh

Bronze

Re: counter reset for show port-security

To clear dynamically learned port security MAC in the CAM table, use the clear port-security dynamic command.

To configure port security aging on the particular port use the

switchport port-security aging {static | time time | type {absolute | inactivity}}

HTH

Please rate posts that help

Regards

Arvind

New Member

Re: counter reset for show port-security

I only want to clear the Counters of Security-Violations without rebooting the Switch. I don't like counters growing the hole uptime.

Bronze

Re: counter reset for show port-security

Like amit said, I dont think there is any command to do that. You might wanna have a look at

http://www.cisco.com/univercd and see if you can find something in there

HTH

Arvind

New Member

Re: counter reset for show port-security

univercd wasn't very helpfull so I hoped sombody nows an trick or so...

But Thanks for your fast repleys!

New Member

Re: counter reset for show port-security

there is a way actually:

conf t
int fa0/5
no switchport port-security
end
clear port-security all int fa0/5

reenable port security on interface:
conf t
int fa0/5
switchport port-security
end

sorry for the late reply

New Member

counter reset for show port-security

Pieter,

doing a "clear port-security all" will clear MAC addresses learned on the interface. In my case, I had only to do "no switchport port-security" then a "switchport port-security", and that cleared port-security counters.

New Member

Re: counter reset for show port-security

Thanks to the examples above, I tried this too.

To Clear multiple port-security counters at a time, this worked for me.

conf t

int ra f1/0/6 , f1/0/17 , f1/0/21

no switchport port-security

switchport port-security

int ra f1/0/27 , f1/0/31 , f1/0/38

no switchport port-security

switchport port-security

int ra f1/0/47

no switchport port-security

switchport port-security

end

New Member

counter reset for show port-security

I guess I'll stick with "no switchport port-sec" then "switchport port-sec"

thanks

New Member

Shutno Shutyou can also

Shut

no Shut

you can also select int range.

no need to negate any configs.

 

New Member

Hoi Cisco Companions!

Hoi Cisco Companions!

Normally a simple "no switchport port-sec" and "switchport port-sec" works fine for me to reset the PS-Violation Counter, but today on a WS-C3650-48PD it didnt work...

Maybe because the port is not connected all the times? 

Any clue or hint for me?

Greetings Reinhard

New Member

I have found that in order to

I have found that in order to clear the Security Violation Count or Rejection Count, you will need to

make sure no secure MAC address is assigned to the port first. Make sure the Port Status is

Secure-up, then connect a device. The new MAC address should now be assigned. Security Violation

Count or Rejection Count is reset back to 0. I use Cisco Network Assistant to make things easier.

Catalyst 3750G Switch

Current Port Security config:

Security Status: Enabled

Sticky Behavior: Enabled

Violation Action: Shutdown

16643
Views
17
Helpful
13
Replies
CreatePlease to create content