[SNMP4J] RE: change community problem
Frank Fock
fock at agentpp.com
Sun Dec 21 11:04:23 CET 2008
Hi Alex,
Are you aware that you are manipulating the
context "other"? Community names do not make
sense in a SNMPv3 context other than ""
(the default context).
You can map a v1/v2c community to a v3
security name and context, but that is
something different.
Best regards,
Frank
Alexander Fooks wrote:
> Hi,
>
> I have problem to define community other than "public" SNMP4J Agent for
> SNMP version 2 and call off "public".
>
> All my manipulations have no effect:
>
> getServer().addContext(new OctetString("other"));
>
> protected void addViews(VacmMIB vacm) {
>
> vacm.addGroup(SecurityModel.SECURITY_MODEL_SNMPv2c,
> new OctetString("other"),
> new OctetString("other2other"),
> StorageType.nonVolatile);
>
> vacm.addAccess(new OctetString("other2other"),
> new OctetString("other"),
> SecurityModel.SECURITY_MODEL_SNMPv2c,
> SecurityLevel.NOAUTH_NOPRIV,
> MutableVACM.VACM_MATCH_EXACT,
> new OctetString("fullReadView"),
> new OctetString("fullWriteView"),
> new OctetString("fullNotifyView"),
> StorageType.nonVolatile);
> ......
>
> }
>
> protected void addCommunities(SnmpCommunityMIB communityMIB) {
>
> Variable[] com2sec = new Variable[] {
> new OctetString("other"), // community
> name
> new OctetString("other"), // security
> name
> getAgent().getContextEngineID(), // local
> engine ID
> new OctetString("other"), // default
> context name
> new OctetString(), // transport
> tag
> new Integer32(StorageType.nonVolatile), // storage
> type
> new Integer32(RowStatus.active) // row
> status
> };
> MOTableRow row =
> communityMIB.getSnmpCommunityEntry().createRow(
> new OctetString("other2other").toSubIndex(true),
> com2sec);
> communityMIB.getSnmpCommunityEntry().addRow(row);
>
> ......
> }
>
>
> Could you advise how to do this.
>
> Thank you in advance
>
>
> BR
> Alex Fooks
> _______________________________________________
> 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