Using SNMPv2c with SNMPv3-supported asnmp++/agent++


Based on earlier questions and feedback about building snmp++/agent++ with SNMPv3 support, I’ve rebuilt them to include SNMPv3 support (removed the --disable-snmpv3 flag). I still wish to instantiate my agent as an SNMPv2c agent, therefore configuring community strings. Currently, I get a build failure because the related functions setting the read/write stings are #ifdef’d out when SNMPv3 support is included.

Is it expected that building the libraries with SNMPv3 enabled that therefore you can ONLY create an an SNMPv3 agent?


No, the is a misunderstanding. If you “normally” build SNMP++/AGENT++, you can a multilingual SNMP agent that supports v1,v2c, and v3 simultaneously.
However, the methods to configure SNMPv1/v2c with the --disable-snmpv3 flag enabled, are not available. Instead, use the SNMP-COMMUNITY-MIB and the methods of RFC3584 to define you communities for v1/v2c.

Ah ok thank you for correcting my misunderstanding. I’ve used the example ‘multiagent’ as a basis. I am currently not getting any response when making a v2c GET using the correct community string. The log is below - would really appreciate any help! (P.S. I am running AgentX if that makes a difference)

20230317.11:52:10: 139661548852992: (2)EVENT  : RequestList: request received (id)(siz)(fro)(ver)(com)(type): (646338671), (1), (, (SNMPv2c), (public), (160)
20230317.11:52:10: 139661548852992: (2)INFO   : snmpCommunityEntry: found v3 info for (community)(security_name)(tag): (public), (v1v2cPermittedManagers)
20230317.11:52:10: 139661548852992: (3)EVENT  : RequestList: received v1/v2c request (FOUND)(community)(cid)(cname)(filter_tag): : (TRUE), (public), (  80 00 13 70 05 70 72 6F 74 65 75 73 00 A1          ...p.proteus..
), (), (v1v2cPermittedManagers)
20230317.11:52:10: 139661548852992: (7)DEBUG  : Vacm: getViewName for: (model) (name) (level) (type) (context): (2), (public), (1), (1), ()
20230317.11:52:10: 139661548852992: (7)DEBUG  : Vacm: getGroupName: (model) (name): (2), (public), (

Typically, I found the cause soon after posting - a mismatch between VACM security name and the snmpCommunityEntry.