Simulation of multiple Agents

Frank Fock Frank.Fock____t-online.de
Thu Nov 1 11:35:40 CET 2001


janzen wrote:

> Vijay K wrote:
>
> > Assuming that the SNMP Manager sends set/get requests to say 10 devices
> > (that in turn implies 10 different IP Addresses), my question is this: Can I
> > have a "dummy" SNMP agent running on one machine that can answer to any of
> > these requests? My problem is that since the SNMP Agent runs on a single
> > device, Agent++ would bind only one IP Address (or as you pointed out - all
> > IP addresses of the local host). So how can I make the SNMP Agent respond to
> > the SNMP Manager application?
>
> Could you test your manager application by pointing it to several
> instances of your agent, running on the same machine and having the same
> IP address, but listening on different _ports_ rather than on the
> default 161?
>

You can also run different agents on the same host on the same port
but on different IP addresses. From the atm_mib example:

 // bind localhost only -> agent will not be reachable from
 // outside
 UdpAddress inaddr("127.0.0.1");
 inaddr.set_port(port);
 Snmpx snmp(status, inaddr);

Instead of 127.0.0.1 you can use all IP addresses available on a host.
The agent will then respond to that address only.

Best regards,
Frank





More information about the AGENTPP mailing list