Make net-snmp listen to IPv6 address

The Zenoss installation added its own server into the devices list as a default.  However, it is having trouble reading snmp values from itself.  Performing snmpwalk via the Zenoss web interface results in a timeout error.

The snmpwalk command used by Zenoss uses the IPv6 loopback address ::1.  I switched this to the IPv4 equivalent 127.0.0.1 and the snmpwalk worked fine.

It turns out, the snmp agent, net-snmp, only listens to IPv4 addresses by default.  Some changes need to be done to the net-snmp config file.

The following lines need to be added to /etc/snmp/snmpd.conf:

agentaddress udp:161
agentaddress udp6:161

#         sec.name       source          community
com2sec   notConfigUser  default         public
com2sec6  notConfigUser  default         public

Restart snmpd and it should now listen to IPv6 as well.

# service snmpd restart

1 thought on “Make net-snmp listen to IPv6 address

  1. Hi,

    There are cases when it will not work your above how to.
    Should be like this:
    agentAddress udp:127.0.0.1:161
    agentAddress udp6:::1:161
    #agentAddress udp:10.10.10.101:161
    #agentAddress udp:172.16.16.2:161

    com2sec local localhost test
    com2sec local 10.10.10.101 test
    com2sec local 172.16.16.2 test
    com2sec6 readonly localhost test
    com2sec6 local localhost test
    com2sec6 local 2001:470:6e:30::2 test

Leave a Reply

Your email address will not be published. Required fields are marked *