Receiving SNMP traps

In order to receive SNMP traps you must configure the SnmpNetwork to receive traps. This includes setting the enabling property and specifying the port that listens for traps, as shown in Figure 15. You also need to configure properties that specify whether or not you want to receive traps from unrecognized sources. Refer to the following sections for more details about configuring SNMP components for receiving traps:

Figure 15. Configure SNMP network to receive traps


Configure SNMP network to receive traps

Received trap messages are also routed to the SnmpDevice object and displayed in string form in the object’s Last Trap Received property field.

To configure a network manager (station) to receive SNMP traps

To configure a station for receiving SNMP traps, you must first have an SNMP network established and running in your station (see Adding an SnmpNetwork). You also need to have an SnmpDevice component in your network application for any devices that may potentially send out trap messages (see Designing an Snmp network application).

To configure a network manager to receive SNMP traps, do the following:

  1. Select the property sheet view of the SnmpNetwork component.

  2. Set the SNMP Receive Traps property, to True.

  3. Set the SNMP Receive Traps Port property to the desired port number. (Port 162 is the default value).

  4. On the SnmpNetwork property sheet, click the Save button. SNMP traps that are directed to the SnmpNetwork manager are received and routed to the alarm class specified under the “Traps” device extension Alarm Class property of the client device.

  5. In the property sheet view of any potential trap-generating SNMP device, expand the Traps device extension component and set the following two properties, as desired:

    • Alarm Class

      Set this property to the alarm class that you want to use to route traps that are received from the parent device.

    • Ignore Unrecognized Traps

      Set this property to True if you want to disregard trap messages (no alarm generation) that contain an unrecognized trap type. Set the property to False if you want to route all received traps to the designated alarm class, even if the trap type is not recognized.

  6. On the SnmpDevice property sheet, click the Save button. SNMP trap generation is configured and enabled.