I've been looking into the idea of reissuing traps that are being received by snmptrapd using snmptrap and I'm seeing a couple of issues:
1) the traphandle directive passes arguments as an (OID, value) pair but snmptrap expects an (OID, type, value) triplet. If I want to reissue the trap, how do I get the datatype to pas to snmptrap?
2) Is there a way I can distinguish between version 1 and version 2 traps through the arguments passed to the traphandle program? The manpage for snmptrapd.conf seems to claim that for SNMPv1 traps, the final OID will be SNMPv2-MIB::snmpTrapEnterprise.0. But from my limited testing so far that's not what I'm seeing. I'm seeing the following as the final two OIDs for SNMP v1 traps: SNMP-COMMUNITY-MIB::snmpTrapAddress.0 and SNMP-COMMUNITY-MIB::snmpTrapCommunity.0. I'm not sure if I can rely on those two always being the final OIDs for a version 1 trap though.
Any other ideas on how I can accomplish reissuing of snmp traps with just the agent-addr field changed for version 1 traps would be helpful.
Thanks,
Felix
________________________________
From: Nayman Felix-QA5535 <[email protected]>
To: [email protected]
Sent: Fri, January 8, 2010 11:37:15 AM
Subject: Changing the agent-address for SNMP v1 pdus
We are using Net-SNMP 5.3.0.1 and I have setup a "gateway" to run snmptrapd
and forward all traps it receives from internal entities to an external managing
entity. Everything is working fine except that for SNMP Version 1 traps, the
source/host address is displaying as an internal address (it appears to be using
the agent-addr field from the SNMP v1 pdu) and not the external address of the
"gateway" that initiates the fowarding. For SNMP Version 2 traps/informs, there
is no agent-addr field since the pdu has been modified and the traps are being
displayed correctly using the external address of the gateway presumably being
retrieved from the source field of the IP header.
So I'm wondering how
can I have snmptrapd modify the agent-addr field for SNMP Version 1 traps before
they get forwarded? I noticed that snmptrapd supports the ability to execute a
program when it receives a trap using the traphandle directive. From the best I
can gather, I would have to capture all traps and reissue them with the correct
agent address for SNMP version 1 traps (I haven't tried this yet, but I'm about
to run some tests)? Is there a better way to accomplish the same thing? Is there
a way to just modify the agent-addr field for SNMP version 1
traps?
Thanks,
Felix
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
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.