SNMPv1 traps in SMIv2 MIB (TRAP-TYPE to NOTIFICATION-TYPE)



Hi there,

I know this one has already been discussed here, I've found web pages
about it, I've read RFC2578 and RFC2576, yet it doesn't seem to work
for me...

I'm trying to make an SMIv2 MIB for an SNMPv1 agent, therefore I must
translate the TRAP-TYPE to NOTIFICATION-TYPE.
I used the rule in RFC2576: take the SNMPv1 trap's ENTERPRISE OID,
append a .0 and then the enterprise specific trap number.

In my case, the SNMPv1 agent's ENTREPRISE parameter is not simply the
enterprise OID but it has a .2 appended (afaik, it's allowed). A
simplified SMIv1 MIB would look something like:


====
my OBJECT IDENTIFIER ::= { enterprises 1234 }
myTraps OBJECT IDENTIFIER ::= { my 2 }

myTrap8 TRAP-TYPE
ENTERPRISE myTraps
DESCRIPTION "Test trap 8"
::= 8
====

My minimal SMIv2 test MIB follows. It only contains two traps. I made
them belonging to a NOTIFICATION-GROUP as required by RFC2576.

====
MY-TESTv1-MIB DEFINITIONS ::= BEGIN

IMPORTS
MODULE-IDENTITY,
NOTIFICATION-TYPE,
enterprises
FROM SNMPv2-SMI
NOTIFICATION-GROUP
FROM SNMPv2-CONF;


-- 1.3.6.1.4.1.1234
my MODULE-IDENTITY
LAST-UPDATED "200802181431Z"
ORGANIZATION
"My Systems"
CONTACT-INFO
"John Doe"
DESCRIPTION
"Test MIB with SNMPv1 traps converted to SMIv2"
::= { enterprises 1234 }


myTraps OBJECT IDENTIFIER ::= { my 2 }
myTrapPrefix OBJECT IDENTIFIER ::= { myTraps 0 }


-- 1.3.6.1.4.1.1234.2.0.8
myTrap8 NOTIFICATION-TYPE
STATUS current
DESCRIPTION
"Test trap, specific number 8"
::= { myTrapPrefix 8 }

-- 1.3.6.1.4.1.1234.2.0.9
myTrap9 NOTIFICATION-TYPE
STATUS current
DESCRIPTION
"Test trap, specific number 9"
::= { myTrapPrefix 9 }


-- 1.3.6.1.4.1.1234.5
myTrapGroup NOTIFICATION-GROUP
NOTIFICATIONS { myTrap8, myTrap9 }
STATUS current
DESCRIPTION
"Group of traps"
::= { my 5 }

END -- MY-TESTv1-MIB DEFINITIONS

====

I've loaded this MIB onto two different SNMP Managers (Network
Instruments' Observer and MG Soft's MIB Browser) and then I sent fake
SBMPv1 traps identical to the real agent's ones. While both managers
indeed received the traps, they have been unable to translate them. I
don't know if it's due to an error in my MIB or if the managers are
simply not capable of doing the translation...

The fake traps I send with UCD's Net-SNMP look like:

snmptrap -d -v1 -c public 192.168.125.16 1.3.6.1.4.1.1234.2 "" 6 8 10000

Sending 43 bytes to UDP: [192.168.125.16]:162
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A4 1C 06
0).....publicñ..
0016: 08 2B 06 01 04 01 89 52 02 40 04 C0 A8 7D 11 02 .+....ëR.@.
+¿}..
0032: 01 06 02 01 08 43 02 27 10 30 00 .....C.'.
0.


snmptrap -d -v1 -c public 192.168.125.16 1.3.6.1.4.1.1234.2 "" 6 9 10000

Sending 43 bytes to UDP: [192.168.125.16]:162
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A4 1C 06
0).....publicñ..
0016: 08 2B 06 01 04 01 89 52 02 40 04 C0 A8 7D 11 02 .+....ëR.@.
+¿}..
0032: 01 06 02 01 09 43 02 27 10 30 00 .....C.'.
0.


I don't see why it doesn't work. Is there a hidden error in my MIB or
in the way I send my traps? Or is it due to the "extended" enterprise
OID in the traps? Any idea is welcome...

Thanks in advance, Eric
.



Relevant Pages

  • Enterprise SpecificTrap Varbind??
    ... The MIB has some Groups each having ThreadName, ... I Easily build and send Generic traps, ... But I seem to be stuck, on structure of varbind, in case of specific ... and lets say this is the oid for which i want to generate trap. ...
    (comp.protocols.snmp)
  • Re: Remotely creating/modifying SNMP traps?
    ... modify traps in an SNMP agent's MIB? ... The necessary additional sentence for such mis-called "advanced" agent ... If agent code can understand a threshold value for some condition (a ... MIB object rather than a constant in the agent code. ...
    (comp.protocols.snmp)
  • Re: Platform SDK MIB builder?
    ... the OIDs (from your MIB) for your traps. ... What is the relationship between the MIB and the Platform SDK ... when using calls like SnmpSendMsg() or SnmpSetPduData. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Platform SDK MIB builder?
    ... I want to use the Platform SDK to generate traps -- nothing else. ... What is the relationship between the MIB and the Platform SDK ... >> Is there an SNMP MIB building tool with the Win SDK for NT/XP? ...
    (microsoft.public.win32.programmer.networks)
  • EzMgt MIB Browser 1.0.3 beta released
    ... We have released a new version of EzMgt MIB Browser. ... You can install the latest updates from the ... -- New Traps Receiver. ...
    (comp.protocols.snmp)