I'm looking for a way to change source IP in traps sent by snmpd
(CentOS 6.6).
My requirement is to set in trap configurable virtual IP (VIP) instead of real station IP in case of system defined in High-Availability mode.
Attempts to define another IP via snmpd.conf
like:
trapsess -v 2c -c public -Ci 5.5.5.5:162 0.0.0.0:162
do not succeed.
<>Lenniey,
The procedure was to create additional virtual interface and routing with virtual IP address:
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-eth0:1
vi ifcfg-eth0:1 (define virtual IP, remove gateway)
service network restart
ip route add VIRTUAL_IP/32 dev eth0:1
But traps sent from my application via AgentX to snmpd and forwarded to target address have the same local IP address as was before these changes. BR Alex