Bug 1227640

Summary: snmpwalk lack IPv6 support for talking to snmpd
Product: Red Hat Enterprise Linux 6 Reporter: Petter Reinholdtsen <pere>
Component: net-snmpAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact: Dalibor Pospíšil <dapospis>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.8CC: dapospis
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Net-SNMP client utilities (snmpget, snmpwalk etc.) automatically expected that an address specified on command line without any prefix is IPv4. This confused users, as the client utilities should automatically recognize IPv6 address. IPv6 was fully working, only the users needed to specify prefix in IPv6 addresses like 'udp6:my.machine.net:161' or 'udp6:[::1]:161'. Fix: The client utilities try to interpret specified address both as IPv4 and IPv6. Result: Happy users, which do not need to specify prefix in IPv6 addresses and can use addresses like '::1:161' directly.
Story Points: ---
Clone Of:
: 1326850 (view as bug list) Environment:
Last Closed: 2016-05-11 01:02:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petter Reinholdtsen 2015-06-03 08:22:45 UTC
Description of problem:

When running snmpd on a machine with IPv6 UDP listening enabled (used udp6:161 as
argument), the snmpwalk program is unable to connect to the server from another
machine on the same network.

I'm using net-snmp version 50.el6_6.1.  This is the result when I try with the
IPv6 address of the machine in question:

[root@server-prod01 ~]# snmpwalk -Os -c public -v 1 2001:700:110:1::80 system 
No log handling enabled - turning on stderr logging
snmpwalk: Unknown host (2001:700:110:1::80) (No such file or directory)
[root@server-prod01 ~]#

strace show that the program do not try to connect to the other end at all.

Because the machines in question only have IPv6 connectivity between them, we need
to use IPv6.

Comment 2 Jan Safranek 2015-10-22 11:34:24 UTC
net-snmp-5.5-54 in RHEL6 does support IPv6, just the address specification is not that obvious. The format is: udp6:ipaddr:port or udp6:[ipaddr]:port (so ':' in IPv6 address does not clash with ':' before port).

I tested today that all these works:
snmpget ... udp6:::1:161
snmpget ... udp6:[::1]:161

Indeed, these do not work (and they work in recent net-snmp-5.7.3-7.fc23) :
snmpget ...  ::1:161
snmpget ...  [::1]:161 

We need to backport https://sourceforge.net/p/net-snmp/code/ci/df863a5348aabf71bbca7bfefcf8beb8bb9e7762 into RHEL 6. Please use 'udp6:' prefix in the meantime.

Comment 9 errata-xmlrpc 2016-05-11 01:02:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0947.html