Snmp Trap Variable Bindings

Management applications can receive trap messages sent by the agent. Following are the trap parameters that are to be set while developing applications.

Enterprise OID

To determine the variable bindings sent in a trap, you can reference the MIB definition for the SNMP agent that sends the trap. You can view.

This is the OID of the management enterprise that defines the trap message. The value is represented as an OBJECT IDENTIFIER and has a variable length. The following table displays the method that can be used for setting the enterprise OID.

API NameClass/Component NameAPI Methods

Low Level

SnmpPDU

Agent Address

This specifies the source IP address from which the trap was sent. The following table displays the method that can be used for setting the agent address.

API NameClass/Component NameAPI Methods

Low Level

SnmpPDU

Generic and Specific Type

The SNMP standard defines seven traps that can be generated by SNMPv1 agents. Six of these traps are 'generic' traps and the seventh trap is enterprise specific. The enterprise-specific trap is used by the private organizations to define their device-specific traps. The six generic trap types defined for SNMPv1 agents are as follows.

  • coldStart trap (0)

  • warmStart trap (1)

  • linkDown trap(2)

  • linkUp trap(3)

  • authenticationFailure trap(4)

  • egpNeighborLoss trap(5)

The generic traps are fixed and cannot be defined. On the other hand, it is possible to define multiple enterprise-specific traps.

The trap message identity is determined based on the values contained in the Enterprises, Standard Trap Type, and Specific Trap Type fields of the Trap PDU. If the Trap Type value is zero through five, the trap is one of the generic traps and the value of the Specific Trap Type field will be zero. If the Trap type value is six, the trap is enterprise specific and is defined in a private MIB. It can take any integer value between 0 and 2147483647.

The following table lists the methods that can be used for setting the trap type. The following table lists the methods that can be used for setting the generic and specific traps.

API NameClass/Component NameAPI MethodsRemarks

Low Level

SnmpPDU

The setTrapType(int) method sets the generic type of the trap and the setSpecificType(String) sets the specific type of the trap.

Time Stamp

This is the value stored in the MIB-II sysUpTime variable converted into hours, minutes, and seconds. It is a 32-bit unsigned value indicating the number of centiseconds that have elapsed since the start of the SNMP agent and the sending of the trap. The following table displays the method that can be used for setting the time stamp.

API NameClass/Component NameAPI Methods

Low Level

SnmpPDU

The traps are normally received in the UDP port no 162. However, this port number can be different and the applications should be able to handle this. In most operating systems, especially in Unix, port numbers 0 to 1023 are reserved. Only root users have permissions to use these ports. Therefore, if the SNMP port 162 is not available, it is preferable to choose the port numbers greater than 1023.

The following table lists the methods that can be used for setting the trap port.

API NameClass/Component NameAPI Methods

High Level

SnmpTrapReceiver

Low Level

UDPProtocolOptions

RMI

SnmpTrapReceiver

CORBA

Theme Song 'Return Of The Condor Heroes' (Versi II) (Yuni Shara). Theme Song 'Tokyo Love Story' (Ari Malibu). Theme Song 'Just The Way You Are' (Lucas). Bilakah Kembali (Yuni Shara). Free download mp3 yuni shara ost return of the condor heroes. Theme Song 'Bukan Pinang Dibelah Dua' (Tom Sleepe).

SnmpTrapReceiver

An SNMPv2 trap may need to be translated to an SNMPv1 trap. The following table shows the notification parameters that make up an SNMPv1 trap and SNMPv2 traps. Cmedia 9761a drivers windows 7.

SNMPv1 TrapSNMPv2 Trap

enterprise value

sysUpTime (first variable -binding)

agent address

snmpTrapOID value (next variable bindings)

generic-trap value

snmpTrapEnterprise value (optional)

specific-trap value

additional variable bindings

timestamp

variable-bindings


Snmp Trap Variable Bindings Copyright © 2012, ZOHO Corp. All Rights Reserved.