Hello all,
We have developed an subagent using net-snmp that runs on RHEL release 3 Update 2. We have configured a number of logical IP Addresses using the standard configuration done in linux - (create files under the /etc/sysconfig/network-scripts etc).
We are running snmpd and snmptrapd with the -f -Le <configured IP address> option. We also start up the subagents for each instance of snmpd and snmptrapd. This way we simulate multiple agents running on the same box with different IP addresses. All the SNMP gets and sets work fine using this arrangement.
Now the question comes : When a trap is generated by the subagent, I need to specify the configured IP Address as the source IP address instead of the standard machine IP Address. I am using the send_v2trap to send the trap. Now how do i specify the source IP addresses to this function so that the trap is generated with the IP Address I provide instead of the variable ip addresses so that any SNMP manager recieving this trap shall see the trap originating from the configured IP address as opposed to the machine IP address.
Note : I am pass the configured IP address as a trap variable but this is not what i require.
Thanks in advance
Anand