On Thu, 2005-07-07 at 16:07 +0200, Le Gall Jean-Patrick (Skysoft ATM)
wrote:
> Hi all,
>
> I'm looking on the web since hours and nothing is clear right now
> concerning V2 traps,
>
> Many question :
> - Do I need Generic trap ID?
> - Do I need Specific Trap Id?
No - these are only relevant to SNMPv1 traps.
SNMPv2 traps use a different mechanism altogether.
> - What's a trapoid?
> - what's the mean of 1.3.6.1.6.3.1.1.4.1.0?
That's the way that SNMPv2 (and SNMPv3) represent traps.
SNMPv1 used a special format PDU - completely different to
everything else - with three header fields to identify which
trap was being sent:
- generic trap ID
- specific trap ID
- enterprise OID
SNMPv2 did away with this special format PDU, and used the
same PDU structure as all the other requests - using an
entry in the VarBindList to identify which trap was being sent.
So the second entry in a trap varbind list should be a varbind
snmpTrapOID.0 = {someOID}
where {someOID} is equivalent to the (generic,specific,enterprise)
triple of SNMPv1. There are clearly defined rules as to how to
map between SNMPv1 traps and SNMPv2/3 traps, and how to handle
the two different styles of SMI definition.
But basically, it's two alternative ways of representing the same
information, and avoids the need to have special-case code for
parsing traps. (Although it's too late, since we need that code
for SNMPv1 traps anyway :-( )
> How can I use it? Do i need to use it?
Yes, you need to use this in order to send SNMPv2 traps and informs.
But the agent will take care of all this automatically. You can
specify a trap in either SNMPv1 or SNMPv2 format, and the agent will
convert between them as appropriate. See the FAQ entry:
How can I get the agent to send an SNMPv1 (or SNMPv2c) trap?
(and following).
> - I want to supervise a various Integer status in a private/enterprise
> MIB. For example the path to found a integer value in my private mib
> is 1.3.6.1.4.1.123456.1.2.1.2.3.0 This value is still at 0. When the
> value changes to 1, I would like to send a trap to the nms, what can I
> do? What trapoid should I use?
Have you looked at the DISMAN-EVENT-MIB support?
This does exactly what you're describing here.
See the section by that name in the 'snmpd.conf(5)' man page.
Dave
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders