Discussion:
How to get ipv6 address
Nguyen Quoc Dinh
2012-08-18 15:20:09 UTC
Permalink
Hi all,

I am quite new to network administration and snmp, hence sorry if I put
a dump question here!

I want to use netsnmp to monitor ipv6 addresses. I try from my local
host (Ubuntu 12.04):
snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.55
iso.3.6.1.2.1.55.1.1.0 = INTEGER: 1
iso.3.6.1.2.1.55.1.2.0 = INTEGER: 64
iso.3.6.1.2.1.55.1.3.0 = Gauge32: 2
iso.3.6.1.2.1.55.1.5.1.2.1 = STRING: "lo"
iso.3.6.1.2.1.55.1.5.1.2.3 = STRING: "wlan0"
iso.3.6.1.2.1.55.1.5.1.3.1 = OID: ccitt.0
iso.3.6.1.2.1.55.1.5.1.3.3 = OID: ccitt.0
iso.3.6.1.2.1.55.1.5.1.4.1 = Gauge32: 16436
iso.3.6.1.2.1.55.1.5.1.4.3 = Gauge32: 1500
iso.3.6.1.2.1.55.1.5.1.8.1 = ""
iso.3.6.1.2.1.55.1.5.1.8.3 = Hex-STRING: EC 55 F9 A9 3B 7D
iso.3.6.1.2.1.55.1.5.1.9.1 = INTEGER: 1
iso.3.6.1.2.1.55.1.5.1.9.3 = INTEGER: 1
iso.3.6.1.2.1.55.1.5.1.10.1 = INTEGER: 1
iso.3.6.1.2.1.55.1.5.1.10.3 = INTEGER: 1

There is no IPv6 address display, although I added manually an v6
address to wlan0:
eth0 Link encap:Ethernet HWaddr 20:6a:8a:3d:6f:1a
UP BROADCAST MULTICAST MTU:1500 Metric:1
...
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
...
wlan0 Link encap:Ethernet HWaddr ec:55:f9:a9:3b:7d
inet addr:192.168.1.199 Bcast:192.168.1.255 Mask:255.255.255.0
*inet6 addr: fe80::ee55:f9ff:fea9:3b7d/64 Scope:Link
inet6 addr: 2001:470:a:d29f::2/64 Scope:Global*
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
...

Any shotting to help me explain why snmp just walk to
iso.3.6.1.2.1.55.1.5.1.10 (i.e. without information of ipv6 address)
would be very appreciated.

Many thanks,

Nguyen Quoc Dinh

PS: I started with 1.3.6.1.2.1.55 when looking at IPV6-MIB (i add
IPV6-MIB, IPV6-ICMP-MIB, IPV6-UDP-MIB, IPV6-TCP-MIB to
/usr/share/mibs/netsnmp folder).
Dave Shield
2012-08-18 19:29:05 UTC
Permalink
Post by Nguyen Quoc Dinh
snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.55
What do you see if you walk .1.3.6.1.2.1.55.8 ?
Post by Nguyen Quoc Dinh
PS: I started with 1.3.6.1.2.1.55 when looking at IPV6-MIB (i add IPV6-MIB,
IPV6-ICMP-MIB, IPV6-UDP-MIB, IPV6-TCP-MIB to /usr/share/mibs/netsnmp
folder).
It might be worth adding "-m +IPV6-MIB" (or "-m all") to the command line,
in order to make use of this new MIB

Dave
Nguyen Quoc Dinh
2012-08-19 08:05:05 UTC
Permalink
Thanks for your quick reply Mr. Dave,
Post by Dave Shield
Post by Nguyen Quoc Dinh
snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.55
What do you see if you walk .1.3.6.1.2.1.55.8 ?
No, with your both suggestion, I have this result:

snmpwalk -v 2c -c public -m all localhost .1.3.6.1.2.1.55.8
IPV6-MIB::ipv6MIB.8 = No Such Object available on this agent at this OID

I have no clue why this object is not available on my computer. Could
you please suggest further movement?

Many thanks,

NQDinh
Dave Shield
2012-08-19 16:07:50 UTC
Permalink
Post by Nguyen Quoc Dinh
Post by Dave Shield
Post by Nguyen Quoc Dinh
snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.55
What do you see if you walk .1.3.6.1.2.1.55.8 ?
snmpwalk -v 2c -c public -m all localhost .1.3.6.1.2.1.55.8
IPV6-MIB::ipv6MIB.8 = No Such Object available on this agent at this OID
I have no clue why this object is not available on my computer.
OK - I've looked a bit more closely.
The IPv6-MIB (which is specific to IPv6) was obsoleted in 2006 by
the IP-MIB (which covers both IPv4 & IPv6). I'm not sure about
the TCP/UDP MIBs, but the situation is probably similar there.

Given that the Net-SNMP IPv6 support is relatively recent,
I strongly suspect that we skipped the IPv6-specific MIBs,
and went straight to the version-neutral MIBs instead.

What happens if you walk the ipAddressTable ?
(1.3.6.1.2.1.4.34) That ought to have information
about both ipv4 & ipv6 addresses/interfaces assignments
See IP-MIB::ipAddressIfIndex

Dave

Continue reading on narkive:
Loading...