如何在 Linux 上使用带有 IPv6 的 net-snmp 5.5?

发布于 2024-09-13 11:21:29 字数 115 浏览 4 评论 0原文

Linux SNMP 代理支持 IPv6 吗?我正在使用 net-snmp 5.5。它在 IPv4 地址设置和获取操作中工作正常,但在使用 IPv6 地址时会导致未知主机。

有什么问题,我该如何解决?

Does the Linux SNMP agent support IPv6? I'm working with net-snmp 5.5. It's working fine with IPv4 address set and get operations, but with an IPv6 address it leads to unknown host.

What's the problem, and how do I resolve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

属性 2024-09-20 11:21:29

在搜索其他内容时碰巧遇到这个问题,我想我可以加 2 美分。

net-snmp 命令中的 IPv6 地址与 IPv4 地址略有不同。您需要使用 udp6: 前缀并指定端口号。

"udp6:[<ipv6 address here>]:161"

完整的命令应如下所示:

snmpset -v 1 -c private "udp6:[<ipv6 address here>]:161" 1.3.6.1.4.1.318.1.1.26.4.4.1.4.1 i 7

编辑:这适用于 Windows 环境,但对于 Linux 可能是相同的

Happened to come across this question while searching for something else and figured I could add my 2 cents.

The IPv6 address in a net-snmp command is a little different from an IPv4 address. You need to use the udp6: prefix and specify the port number.

"udp6:[<ipv6 address here>]:161"

The full command should look something like this:

snmpset -v 1 -c private "udp6:[<ipv6 address here>]:161" 1.3.6.1.4.1.318.1.1.26.4.4.1.4.1 i 7

edit: this works for a Windows environment, but may be the same for Linux

表情可笑 2024-09-20 11:21:29

除了侦听 udp6 数据包之外,您似乎还必须为 ipv6 请求指定一个额外的、单独的社区。如果不对 snmpd.conf 进行这两项更改,则通过 ipv6 进行的 snmp 查询将被忽略。

agentAddress udp:161,udp6:161
rocommunity6 public default

In addition to listening for udp6 packets, it also seems you must specify an additional, separate community for ipv6 requests. Without both changes to snmpd.conf snmp queries via ipv6 are ignored.

agentAddress udp:161,udp6:161
rocommunity6 public default
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文