[SNMP4J] Net-snmp master agent and snmp4j agentx sub agent is sue

Frank Fock fock at agentpp.com
Sat Sep 30 00:48:43 CEST 2006


Hello Vincent,

The range flag should (and is ignored) by the sub-agent,
so this cannot make the difference. Isn't the response
of the subagent the same in both cases?

I have found an issue in the AgentXGetPDU that might
have caused a problem. Could you please check if
changing the setOIDs method to

   public void setOids(OID[] oids) {
     this.ranges = new DefaultMOScope[oids.length];
     for (int i=0; i<oids.length; i++) {
       ranges[i] = new DefaultMOScope(oids[i], true, oids[i], true);
     }
   }

fixes the incompatibility?

Thanks,
Frank

Vincent-v.LOPEZ at thalesgroup.com wrote:
> Hello,
> 
> First of all, thank you for your previous answer.
> 
> Here is what the NET-SNMP master agent sends to the subagent for a GET request:
> 
> 	Received SNMP packet(s) from UDP: [127.0.0.1]:3597
> 	  GET message
> 	    -- SNMPv2-SMI::enterprises.10969.61230595.1.1.1.0
> 
> 	Sending 56 bytes to TCP: [127.0.0.1]:3591
> 	0000: 01 05 00 00  08 00 00 00  01 00 00 00  02 00 00 00
> 	0016: 24 00 00 00  07 04 00 00  01 00 00 00  D9 2A 00 00
> 	0032: 03 4E A6 03  01 00 00 00  01 00 00 00  01 00 00 00
> 	0048: 00 00 00 00  00 00 00 
> 
> And here is what the SNMP4J master agent sends to the sub agent for a get request on the same OID:
> 
> 	0000:  01 05 00 00  02 00 00 00  01 00 00 00  01 00 00 00 
> 	0016:  24 00 00 00  07 04 01 00  01 00 00 00  d9 2a 00 00 
> 	0032:  03 4e a6 03  01 00 00 00  01 00 00 00  01 00 00 00 
> 	0048:  00 00 00 00  00 00 00 00
> 
> As you can see, the value indicating if the lower bound should be taken into account differs. If I am not mistaken, it seems to be my problem's origin.
> 
> Is there a way to get around this?  (note: I tried to alter the priority when registering the regions, but without any success.)
> 
> Any help would be appreciated.
> Thanks in advance.
> 
> Vincent Lopez
> 
> 
>> Hello Vincent,
>>
>> I know that the NET-SNMP master agent does not always handle
>> search ranges correctly, but I am not sure if this is case
>> here. To analyze this further, I would need a dump of the
>> AgentX packet sent by the NET-SNMP master agent and the
>> registrations made by the SNMP4J-Agent sub-agent.
>>
>> A possible workaround could be to change the registration
>> scheme, for example by manually register a whole subtree
>> with a higher priority (lower value) than the automatically
>> by SNMP4J-Agent registered sub-trees.
> 
>> Best regards,
>> Frank
> 
>> Vincent Lopez wrote:
>>> Hello,
>>>
>>> We have developed, using snmp4j-agentx, a sub agent to access read only values from a specific mib. 
>>> When using this sub agent together with a snmp4J master agent (actually the TestMasterAgent class), everything works fine.
>>>
>>> However, we encounter an issue using net-snmp as the master agent. Each time a get request is performed for a given OID, the returned result is for the following OID
>>> I mean: 
>>> requested OID .1.3.6.1.4.1.10969.61230595.1.1.1.0
>>> returned OID .1.3.6.1.4.1.10969.61230595.1.1.2.0
>>>
>>>
>>> As the net-snmp master agent is required by our client, we are in a dead end. Do you have any idea for a workaround?
>>>
>>> Thanks in advance,
>>>
>>> Vincent Lopez
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list