I would like to scan all my switches for interfaces in status "err-disabled" via SNMP.
When doing a SNMPWALK with my MIB-browser I get the correct informations (see attached file snmpwalk.jpg) including the object_id.
When doing a SNMPGET with exactly the same object_id, I get the response "request failed: there is no such variable name in this MIB.Errindex:1
According to the MIB-translator in CCO the object_ID is: 220.127.116.11.18.104.22.168.522.214.171.124.1 (cErrDisableIfStatusEntry). For my specific "err-disabled" reason (bpduguard) the object_ID is 126.96.36.199.188.8.131.52.5184.108.40.206.1.2, which is absolutely correct.
I'm also facing exactly the same situation when scanning the switches for client MAC-adresses, connected to switchports.
Any hints ond tips are very much appreciated
Can you try the below OID:
you can query cpsIfPortSecurityStatus (220.127.116.11.18.104.22.168.322.214.171.124.1.2), which would indicate if the port is in err-disabled status.
Also, portAdditionalOperStatus (126.96.36.199.188.8.131.52.184.108.40.206.23) should provide information about this.
There are limitation with the STACK-MIB support on few IOS. Try the above OID's and see if they work on your devices..
I tried both OIDs according to your suggestion but still I'm not able to get a response to the SNMPGET. I checked the IOD within my MIB browser and found that the leaf pointing to that OID is crossed by a red mark, which I think means, that i tis not available (see attached file cpsIfPortSecuritySatus.jpg).
Still If I'm doing a SNMPWALK, I get the port-status (err-disable) as it is down on the switch.
again many thanks for your reply.
I'm running IOS 12.2(55)SE3 (Image: c3560e-universalk9-mz.122-55.SE3) on a Catalyst 3560X-48P and I'm facing exactly the same problem, also with the 2 OIDs you mentioned but when doing an SNMPWALK down the tree within CISCO-STACK-MIB the MIB browser stops after OID portSpannTreeFastStart.
If I do a SNMPGET at OID 220.127.116.11.18.104.22.168.22.214.171.124.9 (portAdminSpeed) which is located above "portSpannTreeFastStart", I get the correct values but doing an SNMPGET below "portSpannTreeFastStart", I get an error "No data available in this subtree". I guess there is something wrong with this MIB.
If I do an SNMPGET with the value:
I get the correct infos but ig I do an SNMPGET using the value: 126.96.36.199.188.8.131.52.5184.108.40.206.1.2 (the same as above), I get an error saying "There is no such variable name in this MIB"
What is the difference between the 2 ways ?
Many thans for your new reply
I'm coming back to this disussion with some further infos:
According to Cisco's MIB CISCO-STACK-MIB, we should get via
portAdditionalOperStatus (220.127.116.11.18.104.22.168.22.214.171.124.23) infos about the port-status, but unfortunately we don't.
I found, some bugs (CSCds85870, CSCdv75076) reported regading problems with that MIB. We investigated many hours to find whats going on here and we found that the MIB browser stops at portSpantree doing an SNMPWALK at
portSpantreeFastStart (126.96.36.199.188.8.131.52.184.108.40.206.12) and does not get any further, so I assume there is an error somewhere in that MIB.
We are running the following IOS-images:
Many thanks for your new reply