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

Using WMI calls to monitor Cisco Switches give varying results

Using the SNMP_RFC1213_MIB_ifTable to find Ports for the following switches:

Cisco 2950 Series port 1 = FastEthernet0/1

Cisco 3500 Series port 1 = VLAN

I would like to always get Port 1 as the FastEthernet0/1.

Is there a standard that Cisco follows per mib's?

What mib should I use to guarantee that port 1 = FastEthernet0/1?

3 REPLIES
Cisco Employee

Re: Using WMI calls to monitor Cisco Switches give varying resul

Are you trying to make sure that ifIndex.1 is always fa 0/1 on the 2950 or VLAN on the 3500? I don't think you can force a port or interface to take a certain ifIndex value, but you can use the ifIndex persist command so that the values stay consistent after reload

New Member

Re: Using WMI calls to monitor Cisco Switches give varying resul

Thank you for the timely feedback.

You are absolutely correct in that you cannot force a port to take a certain ifIndex value and that is where the problem appears.

If I were to extend the interface to include all Cisco Catalyst Series how would I map the ifIndex?

For instance, I run a for loop 1 to 24 for a 24 port switch, mapping all the fastethernet ports.

I don't care about the VLAN, and would like to begin monitoring at the fastethernet0/1 to fastethernet0/24.

How do I determine which port I should start my for loop at?

Does Cisco document how each Series maps to the SNMP ifIndex?

Cisco Employee

Re: Using WMI calls to monitor Cisco Switches give varying resul

Each type of interface does not map to a particular ifIndex value as they are randomly assigned on load. It's usually a registration of ports or cards on the device with the IF-MIB and then assigns index values.

For example, if you have a fast ethernet module which is assigned values 1-24 on load, and then add a gig module and reload, there's no guarantee the fa ports will still be 1-24, that is, unless you use ifIndex persist.

There is no specific mapping and it varies from device to device, you just need to make sure you use ifIndex persist so that you can use your script.

570
Views
5
Helpful
3
Replies
CreatePlease to create content