Re: More problem with snmpv3 and traps:

Måns Zigher <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAEhQi8=SCPnb1ZWzok-XJBUOtWHmKNn6N+FwEd7Gwgi703rT5Q@mail.gmail.com>
Hi,

Some more information regarding my problems with traps. When running the
following command on the host computor I get som more output

>$./snmpd -Dtrap -Dtrapsess -DsnmpNotifyTable -Dsend_notifications  -f -Le
registered debug token trap, 1
registered debug token trapsess, 1
registered debug token snmpNotifyTable, 1
registered debug token send_notifications, 1
Log handling defined - disabling stderr
snmpNotifyTable: initializing...  snmpNotifyTable: done.
trap: freeing trap sessions
trap: adding callback trap sink (0xd4d630)
trapsess: adding to trap table
snmpNotifyTable: adding data...  snmpNotifyTable: registered an entry
snmpNotifyTable: done.
snmpNotifyTable: storing data...  snmpNotifyTable: done.
trap: send_trap 0 0 SNMPv2-SMI::enterprises.8072.3.2.10
send_notifications: starting: pdu=0xd5ff40, vars=0xd604e0
send_notifications: checking filters...
send_notifications:   no matching profile
trap: sending trap type=167, version=3
send_notifications: sent 1 notifications
NET-SNMP version 5.7.2

When running the same command on the target I get the following output

 $> ./snmpd -Dtrap -Dtrapsess -DsnmpNotifyTable -Dsend_notific
ations  -f -Le
registered debug token trap, 1
registered debug token trapsess, 1
registered debug token snmpNotifyTable, 1
registered debug token send_notifications, 1
Log handling defined - disabling stderr
snmpNotifyTable: initializing...  snmpNotifyTable: done.
trap: freeing trap sessions
snmpNotifyTable: storing data...  snmpNotifyTable: done.
trap: send_trap 0 0 SNMPv2-SMI::enterprises.8072.3.2.10
send_notifications: starting: pdu=0x80788, vars=0xc24b8
send_notifications: sent 0 notifications
NET-SNMP version 5.7.2

clearly on the target the trap is not sent. Any help regarding this are
appreciated. I am using the same config flags when building for the host
and the target and it's the same configuration files.

BR

2013/3/1 Måns Zigher <[email protected]>

> Hi,
>
> I am trying to setup traps for snmpv3. I am cross-compiling for a system
> running arm. I build with the following options
>
> ./configure --prefix=/usr --without-check --host=arm-none-linux-gnueabi
> --with-mib-modules="mibII if-mib disman/event notification"
> --enable-mini-agent --with-perl-modules=no --disable-embedded-perl
> --without-rpm --with-default-snmp-version=3 --disable-snmpv1
> --disable-snmpv2c --with-sys-contact=root@localhost--with-sys-location=unknown --with-logfile=/var/log/snmpd.log
> --with-persistent-directory=/var/net-snmp --disable-manuals
> --disable-scripts
>
> Any comments regarding my configuration options would be very much
> appreciated, my goal is to have a lightweight snmpd but with enough of the
> options set to cover the most basic stuff. Anyway after building net-snmp I
> have installed it on the target and I am currently trying to make the
> coldStart trap to work but without any success.
>
> My snmptrapd.conf
> createUser -e 0x80001f88808c18d3f7b0000 trapuser MD5 administrator DES
> rootpasswd
> snmpTrapdAddr udp:127.0.0.1:162
> authuser log trapuser
>
> and my /etc/snmp/snmpd.conf
> syslocation  "Sitting on the Dock of the Bay"
> syscontact  [email protected]
> agentAddress  udp:161
> trapsess -v 3 -e 0x80001f88808c18d3f7b0000 -u trapuser -a MD5 -A
> administrator -l authPriv -x DES -X rootpasswd udp:127.0.0.1:162
> #authtrapenable 1
>
> iquerySecName   defaultuser
>
> #linkUpDownNotifications  yes
>
> and my /var/net-snmp/snmpd.conf
> createUser defaultuser MD5 "administrator" DES rootpasswd
>
> and my /usr/share/snmpd.conf
> rouser defaultuser
>
> *I am using the same configuration files except from the engineID's on
> the host and there the trap coldStart work.*
> *
> *
> I have built net-snmp on the host with the following options
> ./configure --with-logfile=/home/userA/Workspace/snmp/var/log/snmpd.log
> --with-persistent-directory=/home/userAi/Workspace/snmp/var/net-snmp
> --prefix=/home/userAi/Workspace/snmp/usr --without-check
> --with-mib-modules="mibII if-mib disman/event notification"
> --enable-mini-agent --with-perl-modules=no --disable-embedded-perl
> --without-rpm --with-default-snmp-version=3 --disable-snmpv1
> --disable-snmpv2c --with-sys-contact=root@localhost--with-sys-location=unknown --disable-manuals --disable-scripts
>
> When starting snmpd on the target on the target system I get the following
> output
>
> $> snmpd -Dtrap -f -Le
> registered debug token trap, 1
> Log handling defined - disabling stderr
> trap: freeing trap sessions
> trap: send_trap 0 0 SNMPv2-SMI::enterprises.8072.3.2.10
> NET-SNMP version 5.7.2
> Received TERM or STOP signal...  shutting down...
> trap: send_trap 6 2 SNMPv2-SMI::enterprises.8072.4
> trap: freeing trap sessions
> $>
>
> If I then start the snmpd on the host system with the same options I get
> the following output
> $> sudo snmpd -Dtrap -f -Le -c /home/userA/Workspace/snmp/conf/snmpd.conf
> registered debug token trap, 1
> Log handling defined - disabling stderr
> trap: freeing trap sessions
> trap: adding callback trap sink (0x929570)
> trapsess: adding to trap table
> trap: send_trap 0 0 SNMPv2-SMI::enterprises.8072.3.2.10
> trap: sending trap type=167, version=3
> NET-SNMP version 5.7.2
> ^CReceived TERM or STOP signal...  shutting down...
> trap: send_trap 6 2 SNMPv2-SMI::enterprises.8072.4
> trap: sending trap type=167, version=3
> trap: freeing trap sessions
> $>
>
> I thought I would get the same output since both are built with the same
> options? One thing that I notice is that on the host where the traps work I
> get the output
>
> trap: adding callback trap sink (0x929570)
>
> which I don't get on the target system. Also if I run the command
>
> snmptrap -e 0x80001f88808c18d3f7b0000 -v 3 -u trapuser -a MD5
>  -A administrator -l authNoPriv localhost 42 coldStart.0
>
> it works. Any thoughts on how I can debug this problem would be very much
> appreciated.
>
> BR
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.