Network Operations and Control Wiki
Advertisement

Background: Know: SNMPv1 trap, sysUpTime, OID , ifIndex, ::=, Recognize:

Up

Previous 

Next 

Down


SNMPv2-Trap[]

There are some new trap methods change in SNMPv2, compared with SNMPv1.

In SNMPv2, the trap format consists simply of a list of n variable bindings:

§ The first variable binding contains the sysUpTime.

§ The second variable binding identifies the trap, using an OID instead of integer.

§ The third through "n" variable bindings, if any, contain the payload.

§ The fourth variable: linkDown defines using NOTIFICATION-TYPE macro instead of TRAP-TYPE.

When SnmpRecvMsg returns an SNMP_PDU_TRAP message, the application examines the variable bindings of that message to determine trap information.

When translating an SNMPv1 trap to the SNMPv2 format, one additional variable binding may be present, at the end of the list, which corresponds to the enterprise field. According to the SNMPv2 coexistence document, this variable binding need only be present if the trap was enterprise-specific. However, to simplify the programming of management applications, this variable binding is added by the WinSNMP API when it translates an SNMPv1 trap to the SNMPv2 format,

There is an example of SNMPv2-Trap:

linkDown NOTIFICATION-TYPE   
OBJECTS { ifIndex }   
STATUS current   
DESCRIPTION "A linkDown trap signifies that the SNMPv2 entity, acting in an agent role, recognizes a failure in one of the communication links represented in its configuration."   
::= { snmpTrap 3}

See also[]

Reference[]

Advertisement