Re: Why does net-snmp generate an extra request internally?

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2009/4/16 Fulko Hew <[email protected]>:
> While testing my 'network simulator' agent, I'm finding that Net-SNMP
> appears to be generating an extra (ie. unexpected) getnext request
> internally that gets handed down to agents.

Are you talking about communication between the master Net-SNMP
agent and subagents that you provide?   Or between the client
application (snmpgetnext) talking directly to your "simulator agent"?
   It's not clear from your description, but I presume the former.


> In my environment, I have a MIB variable instance at
> 1.2.840.10006.300.43.1.3.0
> (IEEE8023-LAG-MIB::dot3adTablesLastChanged) and the 'next' variable in the
> list is SNMPv2-MIB::sysDescr.0 (at 1.3.6.1.2.1.1.0)

Are these both implemented by your subagent?
What MIBs are handled by the main agent?



> Internally, my agent received that request and answered it,
> but then in the same request list, there is another request 'GetNext (1.3)'

> I currently have the following sub-trees in my MIB collection:
>
> 1.0...
> 1.2...
> 1.3...

Yes - that makes sense.
Particularly if you think of these as *ranges*

   .1.0 up to (but not including) .1.1
   .1.2 up to (but not including) .1.3
   .1.3 up to (but not including) .1.4

rather than subtrees.


> Can someone shed some light on whats going on and why?

When the master agent receives the request
     GETNEXT 1.2.840.10006.300.43.1.3.0
it passes this request off to the subagent registered for the .1.2 range.
That subagent processes the request according to the information
that it knows about, and returns the next valid instance
(.1.3.6.1.2.1.1.0) back to the master agent.

Now the master agent looks at the OID, and compares it to the
range that this registration was valid for [.1.2 - .1.3 )
This result is *not* in the valid range, so it can't be used.

The master agent therefore discards the result, and moves
on to the next registration (.1.3) and sends a GETNEXT
request to that subagent (which happens to be the same one!)
asking for the first entry that it knows about.
  When this result comes back, it *is* in the valid range for
that registration, so can be used.

That's my guess, anyway.

Dave

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.