Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Net-snmp。我想在我的子网中发送陷阱。我的 m/c 的 IP 为 10.0.2.15。我想在 10.0.2.0/24 子网中发送它。我尝试了如下命令 snmptrap -v 2c -c public 10.0.2.0/24 "" OID-value pairs
它被挂起并导致以下错误
getaddrinfo:10.0.2.0/24 名称解析暂时失败 snmptrap:
你能告诉我如何在子网中发送陷阱吗?
我认为在子网中发送陷阱是不可能的。允许将陷阱发送到具有 IP 的特定目的地。
您需要更新您的脚本(即 snmpd.conf 文件)并添加一行
trap2sink "你要连接的IP地址":"端口"
在 /usr/local/share/snmp