[AGENT++] How to bind an v1/v2c community with an manager IP?

cheng wan wancheng82 at gmail.com
Wed Jan 27 07:11:38 CET 2010


Frank,
Thank you for your help.
It worked.
I just limit to IP, if anyone wants to limit to Network, please use
snmpTargetAddrExtEntry.
Plsese see rfc2576.
I will write this to help others.

3)
Mib::instance->get_request_list()->set_address_validation(TRUE);
4)
row = snmpTargetAddrEntry::instance->
add_row(Oidx::from_string("access", FALSE));
snmpTargetAddrEntry::instance->
set_row(row, "1.3.6.1.6.1.1",
OctetStr::from_hex_string("0A 0A 32 70 00 A1"),//Limit to 10.10.50.112
1500, 3,
"access",
 "",
3, 1);

Robin

2010/1/27 Frank Fock <fock at agentpp.com>
>
> You also need to activate source address filtering
> and provision the snmpTargetAddrTable and its extension
> snmpTargetAddrExtTable. For how this works, see the
> corresponding RFCs.
>
> Regards,
> Frank
>
>
> On 26.01.2010 11:05, cheng wan wrote:
> > For many switch&  routers(Cisco or Juniper), we can set community with a
> > manager IP.
> > That means just this community binding with this IP can access the SNMP
> > agent.
> > I did not how to do this with agent++(I just use v2c part).
> > I searched the mail list, but did not find the answer.
> > Any help will be appreciate.
> >
> > *1)*
> > *mib.add(new snmp_community_mib());*
> > 2)
> > *vacm->addNewGroup(SecurityModel_v2, "public", "v1v2group",
> > storageType_volatile);*
> > *vacm->addNewGroup(SecurityModel_v1, "public", "v1v2group",
> > storageType_volatile);
> > // add SNMPv1/v2c community to v3 security name mapping
> > OctetStr co("public");
> > MibTableRow* row =
> > snmpCommunityEntry::instance->add_row(Oidx::from_string(co, FALSE));
> > snmpCommunityEntry::instance->set_row(row, co, co,
> >           reqList->get_v3mp()->get_local_engine_id(),
> >           "", "access", storageType_nonVolatile, rowActive);*
> > *3)*
> > *What should I do?*
> > **
> > **
> > *Thank you.*
> > **
> > _______________________________________________
> > AGENTPP mailing list
> > AGENTPP at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/agentpp
>
> --
> AGENT++
> http://www.agentpp.com
> http://www.snmp4j.com
> http://www.mibexplorer.com
> http://www.mibdesigner.com
>
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp



More information about the AGENTPP mailing list