We have multiple SNMP agents bound to different ports on a single IP address
and we want to monitor these as separate nodes in OpenNMS.
The SNMP configuration is currently bound to the IP address and location, so we cannot reliably use different ports on the same IP address.
Configure the nodes in OpenNMS using different IP addresses and route the traffic from these
IP address to the actualy SNMP agents.
On the OpenNMS system, create a new tap interface, and add the IP addresses that we will associate with the nodes:
ip tuntap add dev tap0 mode tap ip addr add 10.255.1.1 dev tap0
socat to bind to port 161 on that address, and forward the SNMP traffic to the real agent:
socat udp-listen:161,fork,bind=10.255.1.1 udp:demo.snmplabs.com:161
snmpwalk -On -c public -v 2c 10.255.1.1 .184.108.40.206.2.1.1
Configure the SNMP settings in OpenNMS for
10.255.1.1 and provision a node with this IP as it’s primary SNMP address.