I have done exactly this. It works fine.
Using Scotty 2.1.10 on Sun Solaris 2.5.1, it is necessary to make some
changes to the Scotty source code. The changes force the agent
socket to bind to a specific IP address instead of the wild-card
address INADDR_ANY.
The command to create the logical interface on sun Solaris is:
/usr/sbin/ifconfig le0:121 126.54.83.121 up
^^^ ^^^^^^^^^^^^^
This command requires root priveleges to run. The sections marked
with "^^^" must be modified depending on your local IP numbers.
The changes are in file tnm/snmp/tnmSnmpNet.c
Here is a context diff. of the most important change -
bind an agent socket to a specific local IP address instead of
INADDR_ANY:
*** tnmSnmpNet.c.orig Mon Nov 2 12:29:20 1998
--- tnmSnmpNet.c Thu Feb 25 17:13:46 1999
***************
*** 598,604 ****
--- 626,640 ----
name = session->maddr;
name.sin_family = AF_INET;
+ /* use the -address option to select the agent IP address
+ ** This will allow multiple agents on the same host to use the same port
+ ** but different (local) IP addresses.
+ ** Still use INADDR_ANY if no address was specified
+ */
+ if (name.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) {
name.sin_addr.s_addr = INADDR_ANY;
+ }
+ /* end of change */
/*
* Check if we can reuse a socket already opened by another
-------------------
Note: there are additional changes required if you want the return
address on SNMP trap messages to reflect the IP address of
the agent and not that of the host the agent is running on.
-- Judah Greenblatt judah@bbt.com 919-405-4716 BroadBand Technologies, Durham, NC-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.