08-13-2014 05:48 AM
I'm having some trouble getting connected device WWPNs from an IBM 2005-B16 (a rebadged Brocade Silkwork 200E) via SNMP. I've found the swNsPortName OID (220.127.116.11.4.1.1518.104.22.168.22.214.171.124.4), which gives me almost what I'm after, except it messes up the port numbers. For example, if switchshow were to show something like the following for a 5 port switch:
Port index WWPN
1 Not Connected
2 Not Connected
3 Not Connected
I'd expect querying OID 126.96.36.199.4.1.15188.8.131.52.184.108.40.206.4.1 to return 0000000000000001, which it does, so all's well so far. However if I query port 2, I'd expect it to return nothing, or "Not Connected" or something, as there's nothing connected to port 2 (actually index 1, because the port numbers start at zero, but the SNMP port indexes start at 1). What I get returned when I query 220.127.116.11.4.1.1518.104.22.168.22.214.171.124.4.2 is 0000000000000005. It seems to only count ports that have a connection active and port index 4 is the 2nd port to have a connection, so it returns that for index 2. Trouble is, if I want to write a script to query the WWPN connected to port index 2, it's impossible for me to know what index to add to the OID without knowing which ports are connected and working it out.
Does anyone know of a better way of doing this?