opensolutions / OSS_SNMP

A PHP SNMP library for people who hate SNMP, MIBs and OIDs!
https://github.com/opensolutions/OSS_SNMP/wiki
Other
108 stars 58 forks source link

Inconsistent results for Extreme switches when in stack #43

Closed worc4317 closed 6 years ago

worc4317 commented 7 years ago

I'm trying to use this script to extract port to vlan information on some Extreme switches I have.

I have a stack of 4 x X440 extreme switches which have the following ports tagged in a vlan: 1:45 1:48 3:48 The Interface vlan id is: 1000034.

When running the following code: print_r($snmpHost->useExtreme_Vlan()->getTaggedPortsForVlan(1000034));

We get an array returned with 96 entries indexed from 1001 - 1048 and 2001 - 2048 all of them set to false. The first issues is there should be 192 ports, but I think the ordering is also incorrect as the first 92 ports should have some tagged vlans.

If I manually walk the OID I can see data which looks more correct, e.g.


$ snmpwalk -v 2c -c <communityString> <IP> .1.3.6.1.4.1.1916.1.2.6.1.1.1.1000034
SNMPv2-SMI::enterprises.1916.1.2.6.1.1.1.1000034.1 = Hex-STRING: 00 00 00 00 00 09 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.1916.1.2.6.1.1.1.1000034.2 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.1916.1.2.6.1.1.1.1000034.3 = Hex-STRING: 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.1916.1.2.6.1.1.1.1000034.4 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I therefore suspect that function opaqueTaggedPorts() which in turn calls subOidWalk() isn't returning all the data. I've tried

Any help or advice much appreciated.

Jona

barryo commented 6 years ago

Closing as this is stale. If it's an issue you want me to look at, please reopen but I may need snmp read access to a suitable device for testing.