Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

SNMP ifIndex values

What is the ifIndex object for? In all of my cisco equipment, the value is the same as the last number of the OID. For example:

IF-MIB::ifIndex.1 = INTEGER: 1

IF-MIB::ifIndex.2 = INTEGER: 2

IF-MIB::ifIndex.3 = INTEGER: 3

IF-MIB::ifIndex.4 = INTEGER: 4

IF-MIB::ifIndex.5 = INTEGER: 5

IF-MIB::ifIndex.6 = INTEGER: 6

IF-MIB::ifIndex.7 = INTEGER: 7

IF-MIB::ifIndex.8 = INTEGER: 8

IF-MIB::ifIndex.9 = INTEGER: 9

IF-MIB::ifIndex.10 = INTEGER: 10

This is the case for all interfaces including vlans. So what's the point? Is there something I should pay attention to here in my network management software I'm writing?

3 REPLIES
Cisco Employee

Re: SNMP ifIndex values

Although it looks repetitive there is a point to the values assigned to ifIndex. ifIndex.X will always return an integer value equal to that same X.

Where this comes in to play is when looking at the rest of the values of the IF-MIB and the ifTable. You would use that value to link together the rest of the objects.

For example:

ifIndex.9 = INTEGER: 9

ifDescr.9 = VLAN 1

ifSpeed.9 = 1000000

ifInOctets.9 = 180090

ifOutOctets.9 = 200202

These are just some sample objects found in the ifTable, but you can see how the ifIndex would tie them all together (.9)

The ifIndex itself is just a reference to link things together in the table

Dave

New Member

Re: SNMP ifIndex values

Hi Dave, thanks for your response. I still don't understand though. How does the ifIndex tie anything together? In your example, if the ifIndex didn't exist, it would simply be:

ifDescr.9 = VLAN 1

ifSpeed.9 = 1000000

ifInOctets.9 = 180090

ifOutOctets.9 = 200202

What extra information does the ifIndex give us? In my network management application, why would I ever query it? I know VLAN 1 is the 9th index because of the ifDescr.9.

Cisco Employee

Re: SNMP ifIndex values

Hi

The .9 is the ifIndex value, if it didn't exist you wouldn't see any .9 or any other value number.

You would see ifDescr = VLAN1, ifDescr=VLAN2, but how would you then tie the rest of the values together?

ex) ifDescr.1 = VLAN1, ifDescr.2 = Eth 0/0, ifDescr.3 = Gig 2/0

The ifIndex is the number seen here and although it seems repetitive to see something like ifIndex.1 = 1 at the beginning its needed or you wouldn't know what interface corresponds with what stats.

952
Views
0
Helpful
3
Replies
CreatePlease login to create content