Yes, communities are changed in the snmpCommunityTable,
but a v2 agent has nothing to do with communites. To be
precise, v2c is the community based SNMP version you
most likeyl referred to.

Best regards,
Frank

Jeff Ramin schrieb:

So, just to be completely explicit about this - the community
name of a V2 agent would be changed by modifying rows in the
snmpCommunityTable?


Frank Fock wrote:
Jeff,

These objects are standard SNMP objects and
are therefore documented in the corresponding
RFCs. For the SNMP-COMMUNITY-MIB
see RFC 3584.

Best regards,
Frank

Jeff Ramin schrieb:

As I've posted before, I'm trying to figure out how to change the
community name of an existing MOServer...

I've been looking at the source code, and came across this method
in the TestAgent:

  protected void addCommunities(SnmpCommunityMIB communityMIB) {
    Variable[] com2sec = new Variable[] {
        new OctetString("public"),              // community name
        new OctetString("cpublic"),              // security name
        getAgent().getContextEngineID(),        // local engine ID
        new OctetString("public"),              // 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("public2public").toSubIndex(true), com2sec);
    communityMIB.getSnmpCommunityEntry().addRow(row);
//    snmpCommunityMIB.setSourceAddressFiltering(true);
  }


Is this how a community name is added/changed in an existing agent?

I was hoping it would be a simple setCommunityName(String) type of call,
but apparently not.

Is there any documentation that explains the various objects above? Things like "security name", "local engine id", "context name", etc. don't mean
anything to me. I'd like to understand the relationship between these
objects/concepts, but looking at the javadoc doesn't suffice.

Thanks!




_______________________________________________
SNMP4J mailing list
SNMP4J@agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to