Re: Question Concerning Lexicographical Search

ANDREASSON <> Fri, 23 May 1997 08:48 UTC

Received: from cnri by id aa02459; 23 May 97 4:48 EDT
Received: from by CNRI.Reston.VA.US id aa03287; 23 May 97 4:48 EDT
Received: (from majordom@localhost) by (8.8.2/8.8.2) id EAA22684 for snmpv2-outgoing; Fri, 23 May 1997 04:31:23 -0400 (EDT)
MR-Received: by mta VALMTS; Relayed; Fri, 23 May 1997 08:30:27 +0000
MR-Received: by mta VBEMDF; Relayed; Fri, 23 May 1997 08:37:20 +0000
Alternate-recipient: prohibited
Disclose-recipients: prohibited
Date: Fri, 23 May 1997 07:56:46 +0000 (GMT)
Subject: Re: Question Concerning Lexicographical Search
Message-id: <G0000ED4123MAY199709564729*@MHS>
MIME-version: 1.0
Content-transfer-encoding: 7BIT
UA-content-id: Re: Question Concerning Lexicographical Search
X400-MTS-identifier: [;G0000ED4123MAY199709564729]
Hop-count: 2
Precedence: bulk

Kai Mao wrote:
>>        I have a question concerning the OID table used by SNMP's
>>lexicographical search for GetNext requests.  How is the GetNext OID
>>calculated without using a table?  It seems silly to maintain an ordered
>>OID table of all the objects and instances for the GetNext requests.
>>Since most SNMP agents utilize method routines for data retrieval, why
>>should the SNMP agent have to maintain the OID table with information on
>>instances?  Shouldn't the agent be isolated from information concerning
>>instances?  But I just don't see how the GetNext can be performed
>>without maintaining the OID table.

I think you might have misunderstood the role of an SNMP agent:

The agent is THE entity responsible for keeping and maintaining instances
of managed objects. To identify these objects, a 'full' OID is used. It
is basically made up of two parts, 1) the 'base OID' which is defined in the
MIB(s) and corresponds to one node in the global OID tree, and 2) the instance
identifier, which may be a single 0, or made up of one or several (index)
variable values, in the case of a conceptual row.

Naturally, the agent must know which objects it manages, and thus must keep
knowledge of all OIDs it's responsible for, and in particular which instances
exist at a certain point in time. For example, the variable instance keeping
the number of interfaces would be 'ifIndex.0', and would typically be allocated
a 16 or 32-bit integer in the agent's memory. If you insert a new, say,
Ethernet card in the box, it is the agent's responsibility to update this
variable to reflect reality. Additionally, some new MIB table rows must be
created by the agent (i.e. row instance creation) to take into account the
presence of the new hardware controller.

To implement Getnext, the agent's algoritm simply compare the requested OID with
the instances it knows about, in order to retrieve the lexicographical

Sigge Andreasson