How to send/receive a v1 trap

Billy Davis billy.davis____onfiber.com
Wed May 1 21:30:52 CEST 2002


Hi,

    I have gotten myself confused on how to identify version 1 traps. I read
the following in an SNMP++ book:

    To specify an SNMP version 1-specific value, the trapid Oid should be
constructed as follows. The last subid of the trapid represents the specific
value to use. The second to the last subid should be zero. So, to specify a
trap-specific value, two extra subids must be appended, a zero and a value
or "0.X." This convention is consistent with RFC 1908, which specified SNMP
version 1 to SNMP version 2 trap mappings.

    I have tried two experiments with this ( both with trap sender and
receiver made using SNMP++ ). In both scenerios I set an enterprise oid in
the pdu.

    In the first scenerio I built the trapid Oid as "enterpriseOid + 0 +
specific trap". When I called get_printable on this oid from the sender i
get something like "1.3.6.1.4.1.6161.0.1". But when I call get_printable on
the receiver I get "1.3.6.1.4.1.6161.1".

    In the second scenerio I built the trapid Oid as "0 + specific trap".
When I called get_printable on this oid from the sender i get something like
".0.1". But when I call get_printable on the receiver I get ".0.0.1".

    I notice that all the devices that send SNMP v1 traps that we monitor
seem to follow the <enterprise oid>.<specific trap> pattern. So, should I
only look for this pattern, or should I be prepared to search for the
<enterprise oid>.0.<specefic trap> pattern as well.

Thanks,
Billy Davis
bdavis at onfiber.com


    The book I reference in this email is:

    SNMP++: An Object-Oriented Approach to Developing Network Management
Applications 
    Peter E. Mellquist, Roseville, California
    Hewlett-Packard Professional Books 
    Copyright 1998, 256 pp.
    ISBN 0-13-264607-2



More information about the AGENTPP mailing list