On 8 July 2011 20:10, Zack Little <[email protected]> wrote:
> When I do an snmpwalk (via IPv4) against snmpd some of the items I get back
> are IPv6 items, which is great. ...
>     I just assumed that because IPv6 worked with snmpwalk
> that all other areas I'm using would support IPv6 as well.

Don't just "assume" - have a closer look at what is actually happening.

You don't specify which MIB objects you are querying to retrieve your
IPv6 addresses.  My guess is that you are looking at the ipAddressTable
to get results such as

    IP-MIB::ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1
    
IP-MIB::ipAddressIfIndex.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01"
= INTEGER: 1

If you look at the MIB definition of this table, you'll see that the
index objects are
        ipAddressAddrType     InetAddressType,
        ipAddressAddr         InetAddress
(which are defined in the INET-ADDRESS-MIB)

In particular, InetAddress is based on Octet String, and uses the corresponding
InetAddressType to determine how to interpret the value.


>                       According to the man page for snmpd.conf
> the pass-through scripts accept a type of “integer, gauge, counter,
> timeticks, ipaddress, objectid, or string”. I crossed my fingers and hoped
> that ipaddress would also support IPv6 addresses

No.
IpAddress is part of the original SNMP data definitions from SNMPv2-SMI,
and predates the concerted effort for IPv6 support.   It is *purely* for IPv4
addresses.
   Anything else (including IPv6 or "address-agnostic" values) should use
the newer (InetAddressType,InetAddress) pairs.


> I'm having a similar problem with snmptrap. I'd like to send an IPv6 address
> as an argument in a trap.

Exactly the same holds here.

>                               The man page says that it accepts a type of “a” 
> to
> signify an “IPADDRESS”. When I try to using an IPv6 address with the “a” arg
> it also doesn't work.

No - it won't.   You can't put a v6 peg into a v4 hole.



> Can anyone offer suggestions?

Use InetAddress objects (which are simply binary strings)

Dave

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to