Re: How net-snmp identifies the coresponding subagent?
Benix Vincent <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the reply Dave. But I dont see any arguemnt like agent Id, etc while registering a MIB, then how the master agent know who is the subagent? Benix. ________________________________ From: Dave Shield <[email protected]> To: Benix Vincent <[email protected]> Cc: [email protected] Sent: Tue, January 18, 2011 11:57:43 AM Subject: Re: How net-snmp identifies the coresponding subagent? On 18 January 2011 16:05, Benix Vincent <[email protected]> wrote: > I have one master agent and two subagents. Now I register a lot of mibs from > two of the sub agents using register_mib (). when a request comes from > outside world, how net-snmpd identifies the corresponding subagent to > forward? When the subagent registers a MIB module, it specifies the root of the OID subtree that it wishes to handle. This root OID is passed to the master agent as part of the registration request. When the master receives an incoming request, it looks for the registered OID that most closely matches the OID(s) in this request. So if subagent A registers .1.3.6.1.2 and subagent B registers .1.3.6.1.2.1 then a request for .1.3.6.1.2.1.1.0 will be passed to subagent B, while a request for .1.3.6.1.2.2.1.0 will be passed to subagent A If both subagents try to register the same root OID, then the first one to register will be assigned responsibility for that subtree, and the second one will be told "Sorry, that's already taken". Requests for that subtree will be passed to the one that got there first. [ In fact, this is a slight simplification, as there's also a "priority" associated with each registration. So two subagents could register the same root OID with different priorities, and the higher priority will be used. But unless you specify this explicitly in the MIB module init routine, the default priority will be used for both. ] > or How subagent idenfies that the request if for it? As far as the subagent is concerned - if it receives a request, then that request is for it to deal with. It simply won't see anything that isn't relevant Dave ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ 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