v2 notifications as v1 traps - SNMP

This is a discussion on v2 notifications as v1 traps - SNMP ; When sending v2 notifications as v1 traps, is it correct to set the enterprise OID to the parent of the trap, the generic type to enterprise, and the specific type to the last digit of the notification's oid? Eg. for ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: v2 notifications as v1 traps

  1. v2 notifications as v1 traps

    When sending v2 notifications as v1 traps, is it correct to set the
    enterprise OID to the parent of the trap, the generic type to
    enterprise, and the specific type to the last digit of the
    notification's oid?

    Eg. for ucdShutdown, would it be enterpriseOID: ucdavis.ucdTraps,
    generic: 6 (enterprise-specific), specific: 2 (ucdShutdown)?

    Cheers,
    -Dan

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  2. Re: v2 notifications as v1 traps

    Nobody knows? Hmm. Would anyone be able to start and stop a snmpd with
    a v1 trap sink registered (probably just with snmptrapd), and let me
    know the values of enterpriseOID, specifictype, and generictype? It'd
    be very useful, and I'd appreciate it very much.

    (I don't have a running net-snmp snmpd or I'd do it myself, obviously.)

    Cheers,
    -Dan

    2008/9/10 dan anderson :
    > When sending v2 notifications as v1 traps, is it correct to set the
    > enterprise OID to the parent of the trap, the generic type to
    > enterprise, and the specific type to the last digit of the
    > notification's oid?
    >
    > Eg. for ucdShutdown, would it be enterpriseOID: ucdavis.ucdTraps,
    > generic: 6 (enterprise-specific), specific: 2 (ucdShutdown)?
    >
    > Cheers,
    > -Dan
    >


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  3. RE: v2 notifications as v1 traps



    > -----Original Message-----
    > From: net-snmp-users-bounces@lists.sourceforge.net
    > [mailto:net-snmp-users-bounces@lists.sourceforge.net] On
    > Behalf Of dan anderson
    > Sent: Wednesday, September 10, 2008 3:53 PM
    > To: net-snmp-users@lists.sourceforge.net
    > Subject: Re: v2 notifications as v1 traps
    >
    > Nobody knows? Hmm. Would anyone be able to start and stop a snmpd with
    > a v1 trap sink registered (probably just with snmptrapd), and let me
    > know the values of enterpriseOID, specifictype, and generictype? It'd
    > be very useful, and I'd appreciate it very much.


    For

    $ snmptrapd -C -c ./snmptrapd.conf -Le -f -F '%N %w %q\n'

    I get:

    NET-SNMP-MIB::netSnmpNotificationPrefix 6 NET-SNMP-AGENT-MIB::nsNotifyShutdown

    ...so you're correctly, IIRC... mostly.

    > > When sending v2 notifications as v1 traps, is it correct to set the
    > > enterprise OID to the parent of the trap,


    If the parent of the *notification* is a "0" value, then use the parent of the parent of the notification, else use the parent of the notification. I suggest you read RFC2576, or its latest update, for details.

    > > the generic type to
    > > enterprise,


    Yes.

    > > and the specific type to the last digit of the
    > > notification's oid?


    Correct.

    > > Eg. for ucdShutdown, would it be enterpriseOID: ucdavis.ucdTraps,
    > > generic: 6 (enterprise-specific), specific: 2 (ucdShutdown)?


    That is correct, I think, but note the difference I note above. Basically, SNMPv1 enterprise traps were generally of the form enterprise.trapsId.trapNum, whereas SNMPv3 (SMIv2) notifications (aka SNMPv2 notifications) are recommended to be, and usually are, of the form enterprise.trapsId.0.trapNum for coexistence reasons.

    Dave will now kindly step in and tell you what I got wrong.


    HTH,

    Mike

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  4. Re: v2 notifications as v1 traps

    Thanks very much. That's all correct, of course; I'd skimmed right
    over paragraph 4 section 3.2 of that rfc somehow, and didn't go back
    to re-check it. Much appreciated!

    Cheers,
    -Dan


    2008/9/10 Mike Ayers :
    >
    >
    >> -----Original Message-----
    >> From: net-snmp-users-bounces@lists.sourceforge.net
    >> [mailto:net-snmp-users-bounces@lists.sourceforge.net] On
    >> Behalf Of dan anderson
    >> Sent: Wednesday, September 10, 2008 3:53 PM
    >> To: net-snmp-users@lists.sourceforge.net
    >> Subject: Re: v2 notifications as v1 traps
    >>
    >> Nobody knows? Hmm. Would anyone be able to start and stop a snmpd with
    >> a v1 trap sink registered (probably just with snmptrapd), and let me
    >> know the values of enterpriseOID, specifictype, and generictype? It'd
    >> be very useful, and I'd appreciate it very much.

    >
    > For
    >
    > $ snmptrapd -C -c ./snmptrapd.conf -Le -f -F '%N %w %q\n'
    >
    > I get:
    >
    > NET-SNMP-MIB::netSnmpNotificationPrefix 6 NET-SNMP-AGENT-MIB::nsNotifyShutdown
    >
    > ...so you're correctly, IIRC... mostly.
    >
    >> > When sending v2 notifications as v1 traps, is it correct to set the
    >> > enterprise OID to the parent of the trap,

    >
    > If the parent of the *notification* is a "0" value, then use the parent of the parent of the notification, else use the parent of the notification. I suggest you read RFC2576, or its latest update, for details.
    >
    >> > the generic type to
    >> > enterprise,

    >
    > Yes.
    >
    >> > and the specific type to the last digit of the
    >> > notification's oid?

    >
    > Correct.
    >
    >> > Eg. for ucdShutdown, would it be enterpriseOID: ucdavis.ucdTraps,
    >> > generic: 6 (enterprise-specific), specific: 2 (ucdShutdown)?

    >
    > That is correct, I think, but note the difference I note above. Basically, SNMPv1 enterprise traps were generally of the form enterprise.trapsId.trapNum, whereas SNMPv3 (SMIv2) notifications (aka SNMPv2 notifications) are recommended to be, and usually are, of the form enterprise.trapsId.0.trapNum for coexistence reasons.
    >
    > Dave will now kindly step in and tell you what I got wrong.
    >
    >
    > HTH,
    >
    > Mike
    >


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


+ Reply to Thread