________________________________
From: Magnus Fromreide <ma...@lysator.liu.se>
To: sujata patra <sujata_patra2...@yahoo.com>
Cc: net-snmp-coders <net-snmp-coders@lists.sourceforge.net>
Sent: Fri, March 4, 2011 12:26:44 AM
Subject: Re: when the agent has been from multiple hosts,

On Thu, Mar 03, 2011 at 08:17:49AM -0800, sujata patra wrote:
> Let's say myagent implements the oid 1.3.6.1.4.1.11456.3.3.
> 
> Host1 is running snmpd and configured to allow agentx connection.    
> 
> host2, host3, host4 is running  the myagent and wants to connect to host1 
> simultaneouly. will it be possible ?

No, only one of them will successfully connect, the other two will get an
error response stating that the variable already is registered.

That's right.
> Can you please tell me what will to 3 sets of data ? How can I differentiate 
> them ?

You can either change your mib so that it includes instance information (let
yourVariable.0 become a table indexed by instance information -
yourVariable.[instance]) or you could register them in different contexts.

I hope to modify myagent code to register with different contextName. Right now 
it is using default context. 


       netsnmp_handler_registration *reg;
       reg = netsnmp_create_handler_registration(.....);
reg->contextName = strdup("my_context");
       netsnmp_register_handler(reg);

I will be preferring this to put in config file. Is it possible to do so ?
If so, how can I ?

> I will be interested to know even proxy communication also in this . If I run 
> the myagent to run as master agent and snmp request/response is forwarded to 
> snmpd(host1), will it work out ? How the multiplexing will happen ?

I do not understand what you are asking here, could you please rephrase
the question?
Let's say myagent is running as master agent. myagent and snmpd will be 
configured using proxy. SNMP requests will be forwarded from snmpd to myagent 
and my agent will forward the response to snmpd. Now if there is 3 myagents 
running on 3 different hosts. Which myagent will respond to the requests ?
is the context solution for here too ?


/MF



      
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to