Re: clarification request: V2->V1 Trap conversion

Mike Daniele <[email protected]>
Newsgroups gmane.ietf.snmpv3
Message-ID <[email protected]>
Juergen Schoenwaelder wrote:
...
> Well, RFC 1215 says in section 2.1.2:
> 
>    The VARIABLES clause, which need not be present, defines the ordered
>    sequence of MIB objects which are contained within every instance of
>    the trap type.  Each variable is placed, in order, inside the
>    variable-bindings field of the SNMP Trap-PDU.  Note that at the
>    option of the agent, additional variables may follow in the
>    variable-bindings field.
> 
> The text says that optional varbind can be appended - not that they
> can be prepended. I would not be surprised if there are deployed trap
> receivers that do expect that for example ifIndex is in the first
> varbind in a linkDown or linkUp trap. So to be safe, I would recommend
> (whether that is written down or not) to remove the snmpTrapOID and
> snmpTrapEnterprise varbinds when sending SNMPv1 PDUs. In fact, this is
> what I implemented in the scotty package does a notification must be
> shipped via SNMPv1.

This must be a bug in RFC 2576.

RFC 2089 said

    2.  The 3 special varBinds in the varBindList of an SNMPv2 trap
        (sysUpTime.0 (TimeTicks), snmpTrapOID.0 (OBJECT IDENTIFIER) and
        optionally snmpTrapEnterprise.0 (OBJECT IDENTIFIER)) are
        removed from the varBindList to be sent with the SNMPv1 trap.
        These 2 (or 3) varBinds are used to decide how to set other
        fields in the SNMPv1 trap PDU as follows:

(You need to remove sysUpTime.0 as well.)

Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.