01-07-2016 07:07 AM - edited 03-08-2019 03:20 AM
We need to check with snmp if an interface has Security Violation Count other than 0. Is there any way to do this? Our switches are 2960S.
Solved! Go to Solution.
01-07-2016 07:33 AM
Hi Peter,
you can try CISCO-PORT-SECURITY-MIB cpsIfViolationCount:
snmpbulkwalk -v2c -c public -OQs 192.168.173.11 enterprises.9.9.315.1.2.1.1.9
enterprises.9.9.315.1.2.1.1.9.10101 = 0
enterprises.9.9.315.1.2.1.1.9.10102 = 0
enterprises.9.9.315.1.2.1.1.9.10103 = 0
(...)
HTH
Rolf
01-07-2016 07:33 AM
Hi Peter,
you can try CISCO-PORT-SECURITY-MIB cpsIfViolationCount:
snmpbulkwalk -v2c -c public -OQs 192.168.173.11 enterprises.9.9.315.1.2.1.1.9
enterprises.9.9.315.1.2.1.1.9.10101 = 0
enterprises.9.9.315.1.2.1.1.9.10102 = 0
enterprises.9.9.315.1.2.1.1.9.10103 = 0
(...)
HTH
Rolf
01-07-2016 08:00 AM
Hey Rolf, thx, but there is no such oid when I query the switch. Do I have to enable something else besides the snmp-server on the switch?
01-07-2016 09:14 AM
Could you share the snmp-server config of your switch (remove the community strings, if existing) and the output of 'show port-security'?
01-07-2016 09:18 AM
Sure, it's just this one:
snmp-server community public RO
01-07-2016 09:37 AM
Hm, and you have port-security enabled on at least one interface?
What IOS version are you running?
01-07-2016 09:45 AM
Yes, I have it configured on an interface. The IOS version is 15.0(1) SE2.
01-07-2016 10:02 AM
Unfortunately I won't have access to our switches until tomorrow morning and I can't recall what version we're using on this platform.
What happends when you query 1.3.6.1.4.1.9.9.315 (ciscoPortSecurityMIB)?
Does the switch respond when you query other objects, for instance the System MIB?
01-07-2016 10:58 AM
Rolf, thanks for your time. I did a test using snmp v2 and it was OK.
Thanks again.
01-07-2016 11:10 AM
Glad to hear that it works. Thanks for using the rating system :)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide