Hi,

  I am trying to configure snmptrapd to get snmp trap information from one
of the routers.

/usr/sbin/snmptrapd -f -Lf /tmp/162-snmptrap.log udp:0.0.0.0:162


Following is seen in the snmptrap.log


SNMP Trap message in the log
________________________

2020-10-21 10:13:07 *<UNKNOWN>* [UDP: [10.27.107.18]:161->[*0.0.0.0*]:0]:

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (7101965) 19:43:39.65
SNMPv2-MIB::snmpTrapOID.0
= OID: IF-MIB::linkDown IF-MIB::ifIndex.0 = INTEGER: 11 IF-MIB::ifAdminStatus.0
= INTEGER: down(2) IF-MIB::ifOperStatus.0 = INTEGER: down(2)
SNMPv2-MIB::sysLocation.0
= STRING: isiss1


How to get rid of UNKNOWN and get proper hostname and also 0.0.0.0.


As per below TCPDUMP, proper src ip is seen. When it is displayed on client
side, it is displayed as 0.0.0.0


Can somebody help if i am missing something in config?


<tcpdump>

16:19:58.611330 IP 10.27.107.18.snmp > 10.15.10.198.snmptrap:  C="test"
V2Trap(127)  system.sysUpTime.0=663126 S:1.1.4.1.0=S:1.1.5.4
interfaces.ifTable.ifEntry.ifIndex.0=6
interfaces.ifTable.ifEntry.ifAdminStatus.0=1
interfaces.ifTable.ifEntry.ifOperStatus.0=1 system.sysLocation.0="isiss1"

0x0000:  0200 0000 4500 00aa 3b37 4000 3f11 1b0a  ....E...;7@.?...

0x0010:  0a1b cf12 0a0f 01c6 00a1 00a2 0096 fa15  ................

0x0020:  3081 8b02 0101 0404 7465 7374 a781 7f02  0.......test....

0x0030:  0465 8a4a fc02 0100 0201 0030 7130 0f06  .e.J.......0q0..

0x0040:  082b 0601 0201 0103 0043 030a 1e56 3017  .+.......C...V0.

0x0050:  060a 2b06 0106 0301 0104 0100 0609 2b06  ..+...........+.

0x0060:  0106 0301 0105 0430 0f06 0a2b 0601 0201  .......0...+....

0x0070:  0202 0101 0002 0106 300f 060a 2b06 0102  ........0...+...

0x0080:  0102 0201 0700 0201 0130 0f06 0a2b 0601  .........0...+..

0x0090:  0201 0202 0108 0002 0101 3012 0608 2b06  ..........0...+.

0x00a0:  0102 0101 0600 0406 6973 6973 7331       ........isiss1

</tcpdump>

-- 
Kotesh babu.Chundu
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to