Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

snmptrap ignoring destination in defTarget

10 views
Skip to first unread message

eric.v...@gmail.com

unread,
May 11, 2018, 10:09:08 AM5/11/18
to
Hi there,

I'm trying to send traps manually with snmptrap. I'd like to set default values such as SNMP version, community and destination in snmp.conf.

My basic snmp.conf:

---
defTarget snmptrap udp 192.168.100.64:162
defCommunity public
defVersion 1
---

Now if I run:

# snmptrap 192.168.100.64 '1.3.6.1.4.1.99999.11' '' 6 99 ''
#

it works and I'm receiving an SNMPv1 trap on 192.168.100.64

but when I remove the destination from the command line it fails:

# snmptrap '1.3.6.1.4.1.99999.11' '' 6 99 ''
snmptrap:


I know that snmptrap reads my conf file because if I make a typo then the command fails and if I add --defTarget="snmptrap udp 192.168.100.64:162" to the command line it complains the default target is already registered...

I cannot find any explanation on the net. All what I see are defTarget examples like mine. Everything tells it should work...

I'm using lastest net-snmp 5.7.3 that I freshly compiled (with default options)

Any idea?...


Thanks in advance, Eric

0 new messages