[SNMP4J] Help with TestAgent!!

Muralidharan Narayanan murali at TriveniDigital.com
Thu Sep 27 21:15:44 CEST 2007


Frank,

Thanks for response. Here are my comments/responses

> > - Upon running the example as is, I see the following ouput. But the
INFORM
> > (trap) for COLDSTART is not coming to the SNMP manager running on the
same
> > PC that this "TestAgent" is running.
>
> Have you used a sniffer to investigate this?
> Is the manager listening on the loopback interface (127.0.0.1)?
> Does your machine has such an interface?
> Is the SNMPv3 configuration correct on manager side (i.e.
> for MIB Explorer the user SHADES must be configured and
> the "Principal" check box must be checked)?

- I used WireShark to sniff network. however, I am able to see SNMP get and
SNMP get-response only. Even those UDP packets are not showing up
consistently on wireshark. But I can't see any informs (traps) in network.
Wondering if traps ever were sent from TestAgent. However, debug messages
says COLDSTART trap was sent. Also, i setup to end COLDSTART trap in a
constant while loop (for every 5 secs) and still couldn't see in WireShark
any of the COLDSTART traps

- I set manager to v3. setup user SHADES (with secName=SHADES, authPro=SHA,
authPass=SHADESAuthPassword, privProt=DES, privPass=SHADESPrivPassword). I
checked the "Principal" check box. Had the engineID discovered. context=""
(no entry), contextEngID="" (no entry). I tried the target address setting
with both loopback interface (127.0.0.1:161) and actual network address of
manager. In both the cases, I am unable to receive any COLDSTART at
MIBExplorer



> > - However, I am able to SEND & RECEIVE "GET/GET-RESPONSE" messages from
the
> > SNMP manager on the same PC. I sent GET requests for MIB obj
> > snmpv2MIB.SysUpTime (1.3.6.1.2.1.1.3) and was able to get response. This
> > worked only with manager on v2c only, not woring for manager on v3
though.
> >
> Seems to be a configuration problem...

I too believe so. Here when I change the SNMP version to SNMPv2c from SNMPv3
in the drop down and setup read community string as "public", at this time,
I am able to SEND & RECEIVE "GET/GET-RESPONSE" messages from the SNMP
TestAgent running on the same PC as the SNMP manager (MIBExplorer). Even
when I on v2c version for MIBExplorer, I still can't get traps though.

> > - If I strip down all SNMPv3 references from TestAgent and run it with
SNMP
> > manager on v2c, I receive the COLDSTART trap but I am unable to SEND &
> > RECEIVE "GET/GET-RESPONSE" messages
> >
> Not really. What means "strip down" exactly?
> Most likely something important is now missing...
>

Frank, I am actually setting up SNMPv3 for our product. I had previously
setup SNMPv2c (during our prev communications in 2005 and purchase of SNMP
tools and support etc also in 2005). When trying to implement SNMPv3, I
first started by playing with TestAgent where I am having problems. By
"stripping down all SNMPv3 references" what I mean is:
* I setup following addTargetParams in TestAgent and commented the
addTargetparams for SHADES
    targetMIB.addTargetParams(new OctetString("v2c"),
                              MessageProcessingModel.MPv2c,
                              SecurityModel.SECURITY_MODEL_SNMPv2c,
                              new OctetString("public"),
                              SecurityLevel.NOAUTH_NOPRIV,
                              StorageType.permanent);
* changed secName arg to addGroup method from "cpublic" to "public" for
v1v2group
* changed contextPrefix arg to addAccess method to "" from "public" for
v1v2group
Never mind about other changes. It seems other changes are not required for
manager on SNMPv2c to receive traps from TestAgent. However, now the manager
on SNMPv2c is not able to SEND & RECEIVE "GET/GET-RESPONSE" messages from
the SNMP TestAgent with these changes.

Any suggestion at this time will be helpful

Thanks
Murali





More information about the SNMP4J mailing list