FW: [SNMP4J] FW: Help on SNMP4J v3 agent

Frank Fock fock at agentpp.com
Tue May 13 08:55:47 CEST 2008


Hi Rachel,

With

<myCustomMib>.registerMOs(server, new OctetString("public"));

you are registering your MIB under the context "public"
(which is not necessarily related to a community).

With

<myCustomMib>.registerMOs(server, null);

you register it under all contexts. For more details
on contexts, see the SNMPv3 RFCs.

Best regards,
Frank Fock

Larson, Michelle R wrote:
>  
> 
> -----Original Message-----
> From: Cayward, Timothy B 
> Sent: Monday, May 12, 2008 3:59 PM
> To: Larson, Michelle R
> Subject: RE: [SNMP4J] FW: Help on SNMP4J v3 agent
> 
> Hello Frank,
> Thanks for your quick reply!
> Yes, I've made a careful comparison of the TestAgent.java in checking my
> work.
> The usm and vacm modules are rather straightforward.  Since I am
> noAuthnoPriv, I have no authentication or encryption, just the username.
> I also have a user set up for authNoPriv.  That user doesn't work
> either.
> 
> Finally got it working...I had to change the way the MIBs were getting
> registered:
> Protected void registerManagedObjects() {
>     try {
>          <myCustomMib>.registerMOs(server, new OctetString("public"));
>         ===> changed to
>          <myCustomMib>.registerMOs(server, null);
> 
> After I did this, I'm able to "get" and "set" elements on my MIB using
> v3, as well as v2. Yay!
> 
> Do you know why this works now?  Does "public" limit the MIB to v2
> community only?
> Does "null" open it up to v2 and v3?  
> 
> 
> Also, I'm not sure what the method "addCommunities(SnmpComuunictyMIB
> communityMIB)" does.
> Is this related to v3 in some way?
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Frank Fock [mailto:fock at agentpp.com]
> Sent: Monday, May 12, 2008 1:30 PM
> To: Larson, Michelle R
> Cc: SNMP4J at agentpp.org; Cayward, Timothy B
> Subject: Re: [SNMP4J] FW: Help on SNMP4J v3 agent
> 
> Hi Rachel,
> 
> Have you checked/compared your implementation with against/with the
> TestAgent example?
> If a noSuchObject exception is returned, most likely the VACM is not
> setup correctly.
> 
> Best regards,
> Frank
> 
> Larson, Michelle R wrote:
>>> Basic problem: my SNMP4J agent will respond to snmp v2 "gets" and 
>>> "sets", but will not respond correctly to v3 requests.
>>>
>>> Details:  Built a SNMP4J-based Java SNMP agent, extending Frank 
>>> Fock's implementation of BaseAgent.java.  Using SNMP4J-Agent version
> 1.1.4.
>>> Built MIBs using AgenPro version 2.6.2.  Configured SNMP agent with 
>>> user security model (USM), and appropriate view access control module
> 
>>> (VACM).  Using noAuthnoPriv.
>>>
>>> SNMP v2 works fine, I can get and set MIB elements at will.  
>>> SNMP v3 requests return "SNMPv2-SMI::enterprises.9xxx.xx.x.x.x.x.x = 
>>> No Such Object available on this agent at this OID."
>>>
>>> After several days of pulling out pieces and checking results, it 
>>> looks like the usm and vacm are okay, but the agent doesn't seem know
> 
>>> anything about the MIBs where v3 is concerned.  Is there something 
>>> else I'm supposed to set?
>>>
>>> Anyone run into this problem?  
>>> Thanks in advance,
>>> Tim/Rachel
>> _______________________________________________
>> 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