cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1628
Views
4
Helpful
4
Replies

Bridge OID's indexed by different ifIndex values?

sisal
Level 1
Level 1

Hello,

To check the status of spanning-tree on the ports of my switches (on vlan1), I do an snmpwalk on object dot1dStpPortState (1.3.6.1.2.1.17.2.15.1.3) of BRIDGE-MIB

snmpwalk -v 2c -c public myhost 1.3.6.1.2.1.17.2.15.1.3

SNMPv2-SMI::mib-2.17.2.15.1.3.40 = INTEGER: 5

SNMPv2-SMI::mib-2.17.2.15.1.3.48 = INTEGER: 5

I get what I want (even if I have to specify the OID numerically and not symbolically: why?).

Both ports are forwarding (status = 5). Good! But what are the two ports 40 and 48 of spanning-tree?

simple:

c3524p41>show spanning-tree

Spanning tree 1 is executing the IEEE compatible Spanning Tree protocol

------ cut -----

Interface Gi0/1 (port 40) in Spanning tree 1 is FORWARDING

------ cut -----

Interface Gi0/2 (port 48) in Spanning tree 1 is FORWARDING

------ cut -----

I thought that 40 and 48 were the ifIndex value of the interfaces. But if I do a check of ifDescr via snmp, I get the following values that say that my GigabitEthernets are interfaces number 26 and 27:

snmpwalk -v 2c -c public myhost ifDescr

IF-MIB::ifDescr.1 = STRING: VLAN1

IF-MIB::ifDescr.2 = STRING: FastEthernet0/1

------ cut -----

IF-MIB::ifDescr.25 = STRING: FastEthernet0/24

IF-MIB::ifDescr.26 = STRING: GigabitEthernet0/1

IF-MIB::ifDescr.27 = STRING: GigabitEthernet0/2

IF-MIB::ifDescr.28 = STRING: Null0

IF-MIB::ifDescr.29 = STRING: VLAN1

IF-MIB::ifDescr.30 = STRING: VLAN1

Can someone explain me what are 40 and 48 numbers? And above all, how can I relate 40 and 48 with ifDescr (26 and 27) and find which are the ports in forwarding (or blocking)?

Thanks in advance.

piero

1 Accepted Solution

Accepted Solutions

bilousand
Level 1
Level 1

Sometimes it's puzzling what index do they use. Wild guess - dot1dStpPort will match with dot1dBasePort from the table dot1dBasePortTable and this table contains dot1dBasePortIfIndex which will match ifIndex from IF-MIB.

View solution in original post

4 Replies 4

cpubob
Level 1
Level 1

Easy question, "I have to specify the OID numerically and not symbolically: why?" - The mib that references that OID is not loaded.

See the attached screen capture for my example, I am using netsnmp.

As to why your ifindex doesn't match, I cannot say. On my 2950, both numbers match. It could be any number of things, so I would suggest opening a tac case to get an official answer or to get a fix.

bilousand
Level 1
Level 1

Sometimes it's puzzling what index do they use. Wild guess - dot1dStpPort will match with dot1dBasePort from the table dot1dBasePortTable and this table contains dot1dBasePortIfIndex which will match ifIndex from IF-MIB.

You are correct. Getting dot1dBasePortIfIndex for the PORT-ID (in my previous example 40 and 48), I retrieve the ifIndex and as a consequence ifDescr.

Thank you.

yjdabear
VIP Alumni
VIP Alumni

The numbers in parentheses from "show spanning-tree detail" are Port IDs, not SNMP ifIndex numbers.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: