[tkined] Re: Q: Bug sending/receiving traps?

Juergen Schoenwaelder (schoenw@ibr.cs.tu-bs.de)
Tue, 25 Aug 1998 07:38:27 +0200

>>>>> Stefan Finzel writes:

Stefan> it seems to me I've found a bug in scottys (2.1.9) trap
Stefan> sending or receiving.

Stefan> The second and third trap of the following test program are
Stefan> send as snmpTrapOID.0 and sysDescr.0. The trapreceivers
Stefan> output shows that the last but one number of the snmpTrapOID.0
Stefan> has changed to 0.

Stefan> snmpTrapOID.0 = "1.3.6.1.4.1.2952.1.1.0.1" X
Stefan> sysDescr.0 = "Test 1.3.6.1.4.1.2952.1.1.1.1" X

The is the "reversible notification registration" problem with SNMP
and not a special bug in scotty. Here is what happens: The trap is
according to SMIv2 identified by an OID value. The SNMP session is a
SNMPv1 session and thus the OID has to be split into values for the
SNMPv1 Trap-PDU (RFC 1157), namely enterprise, generic-trap and
specific-trap. The recommended algorithm is to take the last
sub-identifier of the OID value as the value for specific-trap and to
set generic-trap to enterpriseSpecific(6). The value of the enterprise
field is set to the OID value minus the last two sub-identifier. A
similar procedure is used on the receiving side. (See section 3.1.2 in
RFC 1908 for the description.) Now, if you follow this procedure and
your OID value does not have a 0 in the next to last sub-identifier,
you will see the behaviour described in your email.

Bottom line: Make sure that notifications are always registered with a
0 to the next but last sub-identifier. Otherwise, the conversion of
SMIv2 notification OIDs to and from SNMPv1 PDUs will give you strange
results. You can find a bit more on this subject in March issue of the
SimpleTimes.

Stefan> As snmpTrapEnterprise.0 I was expecting "enterprises.2952" not
Stefan> "enterprises.2952.1.1", maybe I am wrong.

snmpTrapEnterprise.0 does not have to point to a node directly below
"enterprises" (1.3.6.1.4.1). And the conversion described above only
works by using the value "enterprises.2952.1.1".
Juergen

Juergen Schoenwaelder schoenw@ibr.cs.tu-bs.de http://www.cs.tu-bs.de/~schoenw
Technical University Braunschweig, Dept. Operating Systems & Computer Networks
Bueltenweg 74/75, 38106 Braunschweig, Germany. (Tel. +49 531 / 391 3289)

--
!! This message is brought to you via the `tkined & scotty' mailing list.
!! Please do not reply to this message to unsubscribe. To subscribe or
!! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>.
!! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.