Testing SNMP packets are being sent out an interface on Netbackup Appliances

Testing SNMP packets are being sent out an interface on Netbackup Appliances

Article: 100009877
Last Published: 2015-06-29
Ratings: 0 6
Product(s): Appliances

Problem

You need a way to test sending SNMP packets to an SNMP server.

Error Message

No trap is received at the SNMP server.

Cause

A network port may not be open. Test port 161 and 162.

Solution

Use telnet to test if the ports are open.

Use tcpdump to collect packets while running the following commands.

On the 50xx series, there is a PHP script to do this, but PHP is not installed on the 52xx.  Use this SNMP trap syntax to send a test SNMP trap from 52xx.

5220

Run tcpdump to see which packets are leaving to the server:
tcpdump -S -i <interface> host <snmp_server> > /admin/tcpdump_snmp

Send the trap:
snmptrap -Ci -v 2c -c public -t 2 192.168.2.26 '' 1.3.6.1.4.1.393.3.9.1.16 1.3.6.1.4.1.393.3.9.1.16 i 1

Output:
12:39:03.541516 IP nb5220-01.lab.symc.32779 > nbclient1.lab.symc.snmptrap:  Inform(77)  system.sysUpTime.0=58899140 [|snmp]
12:39:03.541866 IP nbclient1.lab.symc > nb5220-01.lab.symc: ICMP nbclient1.lab.symc udp port snmptrap unreachable, length 128

-------------------------------

5020

Run the script:
pd5020-01:~ # /opt/pdconfigure/scripts/support/send_SNMPtrap 192.168.1.1 public 'testing' 512
-----------------
Calculating description size based on desired trap size (512 bytes) ...
  - Description size = 411 bytes
  - Actual Trap size = 512 bytes (101 bytes overhead)
-----------------
Building SNMP trap...
  - Uptime = 138408
  - Warning level = 4
  - Description = testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=512) testing (trapsize=51
-----------------
Sending SNMP trap (size = 512 bytes) ...
  - RequestId = 146641039
  - Community = public
  - SNMP server = 192.168.1.1
Done.
-----------------
You have new mail in /var/mail/root


Output:
19:00:31.909980 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 540) linux-fcj6.site.32790 > linux-fcj6.site.snmptrap:  { SNMPv2c { V2Trap(493) R=146641039  system.sysUpTime=138408 [|snmp] } }
19:00:31.910000 IP (tos 0xc0, ttl  64, id 6544, offset 0, flags [none], proto: ICMP (1), length: 568) linux-fcj6.site > linux-fcj6.site: ICMP linux-fcj6.site udp port snmptrap unreachable, length 548 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], proto: UDP (17), length: 540) linux-fcj6.site.32790 > linux-fcj6.site.snmptrap:  { SNMPv2c { V2Trap(493) [|snmp] } } [|icmp]
 

*Note: In the test for the 5220, there was no actual SNMP server software set up in the test environment.  Therefore, you see 'unreachable' in the output.

 

Applies To

 

Netbackup Appliances: 5000, 5020, 5030, 5200, 5220, 5230 (and possibly others)

Was this content helpful?