<UNKNOWN> value for host in snmptraps

2.2k views Asked by At

while executing

"snmptrap -v 1 -c public localhost TRAP-TEST-MIB::demotraps localhost 4 0 '' IF-MIB::ifIndex i 1"

on my system,I am getting host ,ip & OID values as

host = localhost.localdomain :ip = UDP: [127.0.0.1]:49109->[127.0.0.1] :OID =DISMAN-EVENT-MIB::sysUpTimeInstance 0:3:12:38.28

But when traps are coming from outside its showing

host = :ip = UDP: [192.168.1.73]:52346->[192.168.1.23]:OID =DISMAN-EVENT-MIB::sysUpTimeInstance 7:1:05:54.27 .

Now its clearly shown above that host value didn't show up ...I want to know why & how it get to be resolve. Thanks in advance

2

There are 2 answers

0
Gaurav On BEST ANSWER

Simply keep ip & its corresponding host-name in /etc/hosts file..That's All My /etc/hosts file is-

127.0.0.1     localhost.localdomain localhost
::1       localhost6.localdomain6   localhost6
192.168.1.150    ZYXEL
192.168.1.73   CISCO
192.168.1.135 DIGISOL
5
jatin bodarya On

the one reason is if you are using VMware/virtual OS and you have not configured different IP than your host machine IP.