2

So I am trying to do an snmpget via ipv6. Here are a few commands I've tried:

snmpget -v 1 -c public 'fdab:3bce:6c78:1:215:5dff:fe00:3914' sysUpTime.0
snmpget -v 1 -c public 'udp6:fdab:3bce:6c78:1:215:5dff:fe00:3914' sysUpTime.0
snmpget -v 1 -c public 'udp6:[fdab:3bce:6c78:1:215:5dff:fe00:3914]' sysUpTime.0
snmpget -v 1 -c public 'udp6:[fdab:3bce:6c78:1:215:5dff:fe00:3914]:161' sysUpTime.0
snmpget -v 1 -c public 'udp6:[fdab:3bce:6c78:1:215:5dff:fe00:3914%eth0]:161' sysUpTime.0

These responses result in Timeout: No Response from udp6:[fdab:3bce:6c78:1:215:5dff:fe00:3914]. or some variation of that sort.

I know snmp is working:

snmpget -v 1 -c public '127.0.0.1' sysUpTime.0

Results in: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (51895) 0:08:38.95

Within my /etc/snmp/snmpd.conf I've tried without an agentaddress (default for Ubuntu) or by setting it's value to 161 / 161,udp6 / upd6 / updv6 or many other variations.

My concern is perhaps Ubuntu's snmp isn't compiled with ipv6 support? How would I find that out?

Further information:

Distributor ID: Ubuntu
Description:    Ubuntu 10.04.3 LTS
Release:        10.04
Codename:       lucid

I am up to date and I am using the snmp snmpd packages. I also have a working ipv6 network and I can actually snmpget a windows machine via it's ipv6 address. Any help would be greatly appreciated.

2 Answers 2

4

Basic diagnosis steps should see this one solved:

  • Is snmpd listening on IPv6? (netstat -lun |grep :161)
  • Is the firewall configured to allow the traffic in? (ip6tables -L -n)
  • Does snmpd see the traffic, and does it appear to do something useful with it? (strace -p <snmpd PID>; check logs).
7
  • 1. both udp and udp6 are listening on :161. 2. no firewall is enabled 3. snmpd does see traffic but not 100% sure what I am looking for.
    – user92017
    Aug 26, 2011 at 23:16
  • I'm leaning towards not compiled with IPv6 support. Looks like I might have to build it by source.
    – user92017
    Aug 26, 2011 at 23:34
  • If it's not compiled with IPv6 support, how's it listening on udp6?
    – womble
    Aug 26, 2011 at 23:40
  • Good point, I can certainly ask another system via ipv6 but asking myself in ipv6 seems to be something it isn't up for. I'm scouring the conf files searching for the key here.
    – user92017
    Aug 26, 2011 at 23:44
  • 1
    Thanks to you and sendai.wide.ad.jp/IPv6/net-snmp/index_e.html I found the key! In /etc/snmp/snmpd.conf you need com2sec6 readonly default public. Notice the com2sec6 instead of com2sec. Thanks for your help! Couldn't of done it without ya.
    – user92017
    Aug 27, 2011 at 0:27
0

This works for me:

snmpd.conf config:

/etc/snmp/snmp.conf:

agentaddress  udp:127.0.0.1:161,udp:192.168.1.2:161,udp6:[::1]:161,udp6:[2001:370:2d4e:8::9]:161

Form of snmpget command:

snmpget -v2c -c public "udp6:[2001:370:2d4e:8::9]:161" SNMPv2-MIB::sysUpTime.0

Returns:

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1498) 0:00:14.98

Version:

dpkg -l | grep snmpd

ii  snmpd   5.9.1+dfsg-1ubuntu2.2   arm64   SNMP (Simple Network Management Protocol) agents

You must log in to answer this question.