Forum Discussion

karthic_n_12765's avatar
karthic_n_12765
Icon for Nimbostratus rankNimbostratus
Mar 16, 2004

Mapping SNMP interface index to interface name

My iControl application is given the SNMP interface index which is a numeric value identifying a specific BIG-IP port/interface. iControl, of course, identifies interfaces by a string ("1.1", "2.1"..etc). So, I need to map this numeric value to the string. How do I do it?? I don't see any api in v4.5 of iControl to retreive the numeric index value of an interface. Are there any plans for introducing such an api in v4.6??

 

Thanks,

 

Karthic.
  • Loc_Pham_101863's avatar
    Loc_Pham_101863
    Historic F5 Account
    Karthic,

     

     

    In BIG-IP, not just iControl but also the GUI, CLI... all interfaces are referenced by names. I'm assuming the SNMP interface numeric index you have is retrieved by walking the generic mib-2. If you also look at the F5's SNMP mib at f5/f5system/loadbal/interface, you'll also find that there's a matching interface number corresponding to the numeric index you get from the generic mib. You will also see that there's an interface name for this interface number. This is the interface name you'll need to use in making iControl calls.

     

     

    Regards,

     

    Loc
  • I understand that the interface name may be available thru SNMP. However, my application does NOT have access to all information available thru SNMP. It is only given the interface number and I need to map it to the interface name. I was hoping to use iControl to retreive ALL interface names and then, for each interface name, retreive the corresponding SNMP interface number and see if it matches my input value. Is F5 planning on a iControl api that would give off this SNMP interface number information??

     

     

    Joe, I would really appreciate your response on this matter.

     

     

    Thanks,

     

    Karthic.
  • Karthic,

     

     

    I could have sworn I replied to this last night but I guess it didn't go through. Good thing I double checked today...

     

     

    Currently there is no plan to introduce a mapping in iControl from the interface name to the SNMP index id associated with that interface name.

     

     

    Honestly your request is the first one for interaction between iControl and SNMP period. Users are almost solely one or the other. I don't have knowledge of how the indexes are defined in our MIB. It could be that they are indexed in the order that they system query returns them. If this is the case then it MAY be a 1-1 mapping to the interace names returned in the Interfaces::get_list() method. Odds are it's not that simple but I thought I'd mention the possibility. I'm going to have to check with the SNMP group when I get back to town tomorrow to verify.

     

     

    Regardless, there is no plan to introduce this functionality. As Loc mentioned in a previous message, we aim to provide consistency between the GUI, CLI, and iControl. All of these interfaces do not have a one-to-one mapping with SNMP indexes. What is possible is to add the code in your SNMP query to pull down the interace name (string) from SNMP and use that.

     

     

    If you wish to escalate this to an enhancement request, I'd recommend you contact our Technical Support group and get a SubCase opened for the enhancement.

     

     

    F5 Technical Support

     

    Email: support@f5.com

     

    Phone: 206-272-6888

     

    Web: http://www.f5.com/support/

     

    AskF5: http://tech.f5.com/

     

     

    -Joe
  • Joe,

     

    The BIG-IP that I have has the following mapping:

     

     

    SNMP index Interface name

     

    16 10/100 ports 1 - 16 "1.1" - "1.16"

     

    2 Gigabit ports 17 - 18 "2.1" - "2.2"

     

    1 Mgmt port 19 "3.1"

     

     

    Is there a some pattern to naming & numbering of these interfaces that I can take advantage of??

     

    For example, in the above mapping, couldn't we tell 17 had to map to "2.1" as there is no "1.17"??

     

    Thanks,

     

    Karthic.
  • Karthic,

     

     

    I just talked to a member of our SNMP development team and the outlook is not good for your request. There is a method in the default naming of the interfaces with the "1.x", "2.x" and "3.x" formats depending on the type of interfaces. The problem arises that the number of interfaces is dependent not only on the physical characteristics of your system, but the software configuration as well.

     

     

    Physical System:

     

    Your system looks to have 16 10/100 ports, 2 Gig ports, and 1 admin port. We have other systems with more & less 10/100 and gig ports. For instance, our appliance product has 2 10/100 plus an admin port. I believe in this case the interface index 3 would map to 3.1 but in your system it would map to 1.3.

     

     

    Software Configuration:

     

    Each configured VLAN will create a new interface and from what I remember we support in the 1000's of VLANs on our devices. Plus a VLAN can be on 10/100 or Gig which would yield different interface name prefixes.

     

     

    The SNMP index numbers are used solely to help with MIB table lookups. Within the index for the interface you are interested in, our MIB has the interface name as an attribute right next to the index number. The best solution we can recommend right now is to query the interface name in your SNMP application and use that when forwarding iControl requests.

     

     

    -Joe