[SNMP4J] Multiple SNMP agents on a single system using SNMP4J-agent

Tony Offer tony.offer at gmail.com
Sun Sep 23 06:56:35 CEST 2007


I am building a simulator that will instantiate and run thousands of
virtual SNMP agents, all of which may possibly run on a single system,
each with its own unique IP address.  Each of these agents will have
identical sets of MIB objects, but the values for some of the managed
objects may differ.  I am trying to determine the best way to use the
SNMP4J-agent libraries to associate the appropriate managed object
data with the appropriate local IP address.  So far I have come up
with the following two possible solutions, but I am having trouble
deciding which option would be most recommended for use with
SNMP4J-agent or if there are other possible solutions that might be
better.  I would greatly appreciate any input on these options as well
as the greater design problem in general

1. Instantiate multiple objects that extend the BaseAgent class --
This would essentially create an entirely separate SNMP agent
application for each local IP address.  Each agent would have its own
distinct copy of the MIB objects.  This might be the simpler solution,
but I am concerned that the memory and processor requirements might be
too high.

2. Instantiate multiple TransportMapping objects that route messages
appropriately within a single BaseAgent implementation -- In this
option, only one copy of the MIB objects would exist.  Incoming SNMP
messages would be routed to the appropriate ManagedObject, which would
then respond with the appropriate data based on the IP address of the
originating TransportMapping.  Some managed objects would therefore
not contain actual values but would instead respond dynamically with
data predicated on the local IP address from which the message was
received.  This solution might cut down on the memory requirements,
but perhaps it is using the APIs in a manner that was never intended
or supported.

Do either of these approaches seem reasonable?  Is there some other
more elegant solution that I may be missing?

Thanks very much for any help that can be provided.

Best regards,

-Tony Offer



More information about the SNMP4J mailing list