<UNKNOWN> value for host in snmptraps

感情迁移 提交于 2020-01-06 19:24:10

问题


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


回答1:


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




回答2:


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


来源:https://stackoverflow.com/questions/13007601/unknown-value-for-host-in-snmptraps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!