[AGENT++] SNMP V3

Jochen Katz katz at agentpp.com
Mon Mar 14 22:49:10 CET 2005


Hi,

> ./snmpWalkThread host/port -v3 -sl1 (SecurityLevel = No Authentication
> NoPrivacy) 
> And I got the following error:
> (0): SNMP=+ snmpWalk Error, SNMP: Cannot perform operation, Authorization error

the command above will never work, as SNMPv3 doesn't define a default
user (like SNMPv1 does with community public). You have to add
"-snUserName" switch and for auth/priv the desired md5/des/sha/ua/up
switches. For example:
./snmpNext localhost -v3 -sl3 -snMyUser -sha -des -uaPassOne -upPassTwo

> Of course it doesn't work with 2 or 3: Unsupported SecurityLevel which is make
> sense since we haven't done anything special regarding security.

Additional hint: you have to differ between errors from the
client/manager (that occur while trying to encode the request) and the
errors of of the agent (you get a report pdu or a response with error
code set).

> We didn't make anything special regarding our agent.cpp main file.
> We noted a lot of extra code for SNMPv3 (a snmpv3_boot_counter file is
> created), plus a few groups, accessEntry , view are added.
> So the question is: what do we have to do in order to contact our agent using
> SNMPv3, first without "security" and with security (in the future)?

In short: all (if not all, then at least most of it) of the code in the
examples is needed for SNMPv3. A bit longer: The agent has to increment
the boot counter with each start, you have to create a user, define a
context, a user-to-group mapping, then define views and access entries
and do some additional initializations for SNMPv3.

Regards,
   Jochen






More information about the AGENTPP mailing list