How to send traps in local subnet

291 views Asked by At

I am using Net-snmp. I want to send traps in my subnet. I am having IP of my m/c as 10.0.2.15. I want to send it in 10.0.2.0/24 subnet. I have tried command as follows snmptrap -v 2c -c public 10.0.2.0/24 "" OID-value pairs

It was getting hanged and resulting into following error

getaddrinfo: 10.0.2.0/24 Temporary failure in name resolution snmptrap:

Can you please tell me how to send traps in subnet?

2

There are 2 answers

1
Chaitanya Gulhane On BEST ANSWER

I think sending traps in subnet is not possible. Sending trap to particular destination having IP is allowed.

1
Abhay Singh Chauhan On

you need to update your script(i.e snmpd.conf file) and add a line

trap2sink "IP address you want to connect to":"port"

at /usr/local/share/snmp