Start a conversation

Node Unable to Send SNMP Traps

Overview

After configuring an SNMP trap on a node, the node does not send the traps as intended. This article provides the steps on how to resolve the problem by:

  1. Checking the node's configuration

  2. Verifying the node's connectivity

  3. Analyzing a trap's trace

 


Requirements

 

 


Resolution

 

Step 1: Check the Node's Configuration

Check the configuration against the SNMP Trap Reference Guide. The trap configuration has the following format:

<trapreceiver ipaddress="111.222.333.444" udpport="162"/>

Optionally, the same line can be added to a lab system configuration file (common_config.txt), which can be validated for errors.

  1. Log in as a TextPass user.

  2. Move to the configuration directory:

    $ cd /usr/TextPass/etc/
  3. Create a backup of the configuration file:

    $ cp -p common_config.txt common_config.txt_YYYYMMDD
  4. Edit the configuration file:

    $ vi common_config.txt
  5. Add the line below towards the end of the configuration file, before the </tpconfig> tag and save the file:

    <trapreceiver ipaddress="111.222.333.444" udpport="162"/>
  6. Validate the changes you have made. There should be no output, which means there are no errors in the configuration:

    $ tp_config --validatecommonconfig common_config.txt
  7. Connect to the VPN and verify the same configuration from all the nodes identified by the end-user. The sample below is from an LGP node.

    • Log in as a TextPass user and run the following command:

      $ tp_walk -l alarmStationTable

      Sample output:

      alarmStationIndex.1 = Gauge32: 1
      alarmStationIndex.2 = Gauge32: 2
      alarmStationIndex.3 = Gauge32: 3
      alarmStationIpAddress.1 = STRING: "127.0.0.1"
      alarmStationIpAddress.2 = STRING: "127.0.0.1"
      alarmStationIpAddress.3 = STRING: "111.222.333.444"
      alarmStationUdpPort.1 = Gauge32: 11173
      alarmStationUdpPort.2 = Gauge32: 11173
      alarmStationUdpPort.3 = Gauge32: 162

 

back to list


 

Step 2: Checking the Connectivity

After verifying that the node has been configured correctly, check the connectivity (the end-user should also confirm end-to-end connectivity). Log in as a TextPass user and execute the following command:

 $ ping 111.222.333.444

 

back to list


 

Step 3: Analyze a Trap's Trace

After verifying the node's configuration and connectivity, you can now conduct a trace on the port, which will simulate a trap in the node. This step will allow you to see what is happening with the traps.

If the node does not generate actual traffic (like an LGP), restarting tp_fclient will not affect the service.

Note: All processes that need to be restarted require the customer's permission.

Example (for an LGP):

  1. Open three SSH connections to the LGP node:
    1. In the first connection, log in as a root user and only type the tcpdump command below, where <path> refers to a directory with enough space:

      tcpdump -i any -s 0 -w /<path>/<filename>.pcap port 162

      Important: Please DO NOT run the code yet.

    2. In the second connection, log in as a root user and use the tail command on the syslog, which will allow you to monitor the trap that will be generated:

      tail -f /var/log/messages
    3. In the third connection, log in as a TextPass user and note/copy the following command to restart tp_fclient :

      tp_stop --tp_fclient; tp_start --tp_fclient

      Important: Please DO NOT run the code yet.

  2. Run the trace provided in step 1a, and immediately run the tp_fclient restart command in step 1c.

  3. Monitor the connection using the command in step 1b. If a trap appears, stop the trace in the running connection (from step 1a) by pressing Ctrl + C on your keyboard. Stop the trace when the tp_fclient is up and running.

  4. To check the tp_fclient status, run the command below as a TextPass user:

    tp_status --tp_fclient
  5. Collect the trace and analyze if the node is sending the traps to the configured IP address and port. Examine what happens to the trap that was sent.

 

back to top 

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted

Comments