Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to find out what is meant by SNMP indices. I read the following statement on wiki:

Index assignments for an SNMP device instance may change from poll to poll mostly as a result of changes initiated by the system admin

My understanding is that the system admin is using to poll SNMP devices and his program displays the SNMP devices with some serial numbers (that we call as indices). So each time he polls the SNMP devices the program shows those devices with different indices.

Is my understanding correct? What exactly do we mean by SNMP indices and what does it mean in this context?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

I found the following information here.

The module snmp_index implements an Abstract Data Type (ADT) for an SNMP index structure for SNMP tables. It is implemented as an ets table of the ordered_set data-type, which means that all operations are O(log n). In the table, the key is an ASN.1 OBJECT IDENTIFIER.

This index is used to separate the implementation of the SNMP ordering from the actual implementation of the table. The SNMP ordering, that is implementation of GET NEXT, is implemented in this module.

For example, suppose there is an SNMP table, which is best implemented in Erlang as one process per SNMP table row. Suppose further that the INDEX in the SNMP table is an OCTET STRING. The index structure would be created as follows:

  snmp_index:new(string)

For each new process we create, we insert an item in an snmp_index structure:

  new_process(Name, SnmpIndex) ->
    Pid = start_process(),
    NewSnmpIndex = 
      snmp_index:insert(SnmpIndex, Name, Pid),
    <...>

With this structure, we can now map an OBJECT IDENTIFIER in e.g. a GET NEXT request, to the correct process:

  get_next_pid(Oid, SnmpIndex) ->
    {ok, {_, Pid}} = snmp_index:get_next(SnmpIndex, Oid),
    Pid.

In Conclusion with the information I know and information provided in the previous quote, I believe that the SNMP indices should not be changed due to that fact that it would defeat the purpose of an index (correct me if I am wrong).

UPDATE: The way I see it, an SNMP index is similar to a database index, but it indexes network devices for reference. The only time this index should change is when hardware is removed or added. You wouldn't want you database indexes changing on an existing record because it could cause duplicates or other issues. Maybe someone could shine some light on this question with another answer or comment. I know a lot about networking, but I have never heard of SNMP indeces changing. I Googled this for about an hour and didn't come up with anything very helpful other than the web page already mentioned and the Wiki page.

share|improve this answer
    
Could you please explain what a simple SNMP index is exactly? I'm unable to comprehend any discussion on whether they should change or not until I can get this cleared up first. –  Mugen Jan 19 '11 at 11:39
    
Thanks for your efforts in searching this. –  Mugen Jan 21 '11 at 7:09
add comment
So each time he polls the SNMP devices the program shows those devices with different indices.

That's not really the case, indices are used to get information on new devices as they are inserted (think hotplugging RAID/RAM/CPU/Virtual Interfaces...), that way you can track a device as soon as the next polling after it was inserted. They SHOULD NOT (as in RFCs) change but i don't know it that's really standardized.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.