shell - snmptrap SNMPv3 with selected client ip address -


i send trap , specify clientaddress

as search there 2 ways:

  1. edit /etc/snmp/snmp.conf , set: clientaddr [ip_of_device]
  2. specify ip parameter: --clientaddr="[ip_of_device]"

when try issue command:

snmptrap -v 3 -l noauthnopriv -u someuser -n "" agent_ip .1.3.6.1.4.1.161.5.2 .1.3.6.1.4.1.161.1.2.3.4 5 

it gives error

getaddrinfo(agent_ip, null, ...): address family hostname not supported 

when not specify clientadress works expected use ip of machine issed command client ip

to rid of have to:

  • define virtual interface ip of device want simulate
  • specify protocol of agent ( default when set clientaddr in /etc/snmp/snmp.conf looks tried use ipv6 agent )

    snmptrap -v 3 -l noauthnopriv -u someuser -n "" udp:agent_ip ...


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -