Fibre Channel (SAN)

Reply
New Contributor
Posts: 4
Registered: ‎08-11-2014

SNMP - Retreive connected port WWPN

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 (1.3.6.1.4.1.1588.2.1.1.1.7.2.1.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

0                  0000000000000001

1                  Not Connected

2                  Not Connected

3                  Not Connected

4                  0000000000000005

 

I'd expect querying OID 1.3.6.1.4.1.1588.2.1.1.1.7.2.1.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 1.3.6.1.4.1.1588.2.1.1.1.7.2.1.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?

 

Cheers,

Neil

 

Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.