I have found that when I pull the WAN Ethernet cable from the device I'm 
running snmptrap on my inform retries will stop immediately.  If I pull the 
cable before I run snmptrap it exits immediately when I launch it.  If I wait 
until it has retried a few times and pull the cable it exits before completing 
my (large) number of retries.  In both cases I see the error message 
"snmpinform: Failure in sendto" and "Network is unreachable".

I found this older thread where Wes Hardaker discusses this somewhat.  I didn't 
know how to reply to that thread.

http://sourceforge.net/p/net-snmp/mailman/message/30538655/

*****************
First, what is supposed to happen when snmpd is unable to send a TRAP due to 
the network interface being down?  

There is nothing it can do; it doesn't queue traps until they can be sent 
(because though it might be able to tell about it's own interface, it certainly 
can't tell about interfaces on the nearest neighbor, etc, that might also 
affect delivery). 

How does this differ with an INFORM?  

INFORMs will at least retry.  IE, it'll try to send the INFORM, fail to get a 
response and will retry to send it up until the retry limit has been reached.  
But, it's probably trying those pretty quickly and it's likely that the 
interface will be down longer than the retryLimit*timeout seconds that it'll be 
using to attempt to send the INFORMs.
*****************

What Wes described is how I expected snmptrap to act with sending informs in 
these scenarios.  Before I started digging through the code I was hoping for 
some insight.  I tested on version 5.5.1 on Linux.  I wanted to see if it 
happened in the current version.  I tested a little differently on another 
machine with version 5.7.2.1.  I did a 'sudo ifdown eth0' and then ran snmptrap 
and the same problem happened.  It exited immediately without retrying.


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to