The SNMP trap always uses the first IP address as displayed in the network adapter binding order on the computer. For example, assume that the computer has the following binding order:
- LAN connection (
172.30.136.231
) - VLAN connection (
192.59.196.178
)
In this situation, the SNMP trap uses the 172.30.136.231
agent IP address.
Or, assume that the computer has the following binding order:
- VLAN connection (
192.59.196.178
) - LAN connection (
172.30.136.231
)
In this situation, the SNMP trap uses the 192.59.196.178
agent IP address
Inorder for the SNMP trap to contain the IP address actually connected to the machine as the agent IP address, the workaround is to change the network adapter bind order.
So my questions are :
- How to change the network adapter bind order in Linux?
- Is there some Linux command to do that?
- Is it possible to do it through a Linux application program ?
The snmptrapd always binds to all ipv4 interfaces on your system. There is also the -x parameter, see man page http://linux.die.net/man/8/snmptrapd