how can I read the STP port status of each interface (in my software/program)? There is a MIB called BRIDGE-MIB with OID "dot1dStpPortState=1.3.6.1.2.1.17.2.15.1.3" that returns the FORWARDING OR BLOCKING state. BUT my problem is that i can not associate the returned value with the port/interface. It seems the index of the OID is the "nbr" that is shown in the output of the "show spanning-tree" command, yet again I dont know how this relates to the interface number (it seems there is a fix offset added to the interface number, but how is that calculated?) the output for a typical show spanning-tree cmd is shown:
Switch2#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0006.d6ab.a040
Cost 19
Port 11 (FastEthernet0/11)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0006.d6ac.46c0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15
Interface Role Sts Cost Prio.**Nbr** Type
---------------- ---- --- --------- -------- -------------------------------
Fa0/2 Desg FWD 19 128.4 P2p
Fa0/11 Root FWD 19 128.13 P2p
Fa0/12 Altn BLK 19 128.14 P2p
the last three rows show that status of each interface/port and the relating priority.Nbr (Does anyone know how nbr for each interface is calculated?)
Is there any OID that would simply show the STP status of each port?
Thanks for the help in advance.