snmpset/get 返回超时:ipv6 无响应
我正在使用 snmp 在 IPv6 模式下查询和设置一些 OID。我使用下面的 snmp 命令。我已经检查并配置它来监听 udp6:161。
snmpget -cpublic -v2c udp6:[2001:db8:3c4d::41a9:8e4e:a094:3840] .1.3.6.1.4.1.1429.5.1.1.2.5.6.0
它给出的结果是
Timeout: No Response from udp6:[2001:db8:3c4d::41a9:8e4e:a094:3840]
使用 ping 检查时给定的 ip 地址也处于活动状态。更改了 conf 文件以包含 rwcommunity6 和 rocommunity6。我做错了什么?
I am using snmp to query and set some OIDs in IPv6 mode. I use the below snmp command. I have checked and configured it to listen to udp6:161.
snmpget -cpublic -v2c udp6:[2001:db8:3c4d::41a9:8e4e:a094:3840] .1.3.6.1.4.1.1429.5.1.1.2.5.6.0
It gives the result as
Timeout: No Response from udp6:[2001:db8:3c4d::41a9:8e4e:a094:3840]
The given ip address is also alive when checked using ping. Changed conf file to include rwcommunity6 and rocommunity6. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Cougar 在评论中所说,您必须告诉
snmpd
监听 ipv6 地址。默认情况下,snmpd 仅监听 udp4:。要让它侦听多个传输,您应该指定每个传输:例如。此外,由于如果传入数据包被拒绝授权,代理将不会响应,因此您始终可以使用转储标志 (-d) 运行 snmpd 以显示它正在接收的流量。如果没有收到,那么您就发现了一个问题。但如果它没有响应,那么您已经找到了另一个。确保在前台运行它 (-f) 并记录到 stderr (-Le):
As Cougar said in the comment, you must tell
snmpd
to listen to the ipv6 address. By default, snmpd only listens to udp4:. To get it to listen to multiple transports, you should specify each:for example. Also, because the agent won't respond if the incoming packet is denied authorization, you can always run snmpd with the dump flag (-d) to show what traffic it is receiving. If it's not receiving it, you've found one problem. But if it is but not responding, you've found another. Make sure you run it in the foreground (-f) and with logging to stderr (-Le):
它适用于此命令吗?
它应该给出系统描述。如果是,则设置正确。否则,您需要使用命令
snmpconf -g basic_setup
进行设置Is it working for this command?
It should give system description. If yes then it has been set correctly. Otherwise you need to set it using the command
snmpconf -g basic_setup