IPv6 Scratchpad
Subscribe

From OpenNMS

Jump to: navigation, search

Contents

Purpose

This is not a reference document

This article is for sharing of general knowledge among those working on IPv6 support in OpenNMS. It was created at the outset of Dev-Jam 2010 and should not be used as a reference outside the context of that event.

IPv6 Test Environment

For some notes on creating a virtual test environment for IPv6 see IPv6 test Environment

Jeff's notes on IPv6-related SNMP MIBs

ipAddrTable is deprecated

The IPv4-only ipAddrTable has been deprecated for some time in favor of ipAddressTable (see the section on it further down). The current interface scanning code in Capsd and Provisiond uses the ipAdEntIfIndex column of this table in conjunction with the still-current ifTable and ifXTable to determine mappings between layer-2 interfaces and layer-3 IPv4 addresses. A sample walk of a simple ipAddrTable:

ipAdEntAddr.127.0.0.1 = IpAddress: 127.0.0.1
ipAdEntAddr.216.216.217.254 = IpAddress: 216.216.217.254
ipAdEntIfIndex.127.0.0.1 = INTEGER: 1
ipAdEntIfIndex.216.216.217.254 = INTEGER: 2
ipAdEntNetMask.127.0.0.1 = IpAddress: 255.0.0.0
ipAdEntNetMask.216.216.217.254 = IpAddress: 255.255.255.0
ipAdEntBcastAddr.127.0.0.1 = INTEGER: 0
ipAdEntBcastAddr.216.216.217.254 = INTEGER: 1

The index of this table is an IPv4 address. It's possible to have multiple IPv4 addresses on a single layer-2 interface, of course. If we put a secondary IPv4 address 1.2.3.4/24 on the interface with ifIndex 2 above, this table would have an additional entry:

ipAdEntAddr.1.2.3.4 = IpAddress: 1.2.3.4
ipAdEntIfIndex.1.2.3.4 = INTEGER: 2
ipAdEntNetMask.1.2.3.4 = IpAddress: 255.255.255.0
ipAdEntBcastAddr.1.2.3.4 =  INTEGER: 1

ipv6IpForwarding scalar in IP-MIB

The value of this scalar tells us whether IPv6 forwarding is enabled or disabled stack-wide. It amounts to the IPv6 equivalent of ipForwarding.

ipv4InterfaceTable: interface-wide IPv4 settings

The ipv4InterfaceTable is indexed on ipv4InterfaceIfIndex, which amounts to an alias for ifIndex. This table contains three columns, the most interesting and useful of which (for our purposes) is:

ipv4InterfaceEnableStatus 
whether a given layer-3 interface is attached to an IPv4 stack.
ipv4InterfaceReasmMaxSize.1 = INTEGER: 65535
ipv4InterfaceReasmMaxSize.2 = INTEGER: 65535
ipv4InterfaceEnableStatus.1 = INTEGER: up(1)
ipv4InterfaceEnableStatus.2 = INTEGER: up(1)
ipv4InterfaceRetransmitTime.1 = Gauge32: 1000 milliseconds
ipv4InterfaceRetransmitTime.2 = Gauge32: 1000 milliseconds

ipv6InterfaceTable: interface-wide IPv6 settings

The ipv6InterfaceTable is indexed on ipv6InterfaceIfIndex, which amounts to an alias for ifIndex. This table contains seven columns, the most interesting and useful of which (for our purposes) are:

ipv6InterfaceEnableStatus 
whether a given layer-3 interface is attached to an IPv6 stack.
ipv6InterfaceIdentifier 
From IF-MIB: The Interface Identifier for this interface. The Interface Identifier is combined with an address prefix to form an interface address. By default, the Interface Identifier is auto-configured according to the rules of the link type to which this interface is attached. A zero length identifier may be used where appropriate. One possible example is a loopback interface.
ipv6InterfaceReasmMaxSize.1 = Gauge32: 65535 octets
ipv6InterfaceReasmMaxSize.2 = Gauge32: 65535 octets
ipv6InterfaceIdentifier.1 = STRING:
ipv6InterfaceIdentifier.2 = STRING: 20d:56ff:fe6f:fea8
ipv6InterfaceEnableStatus.1 = INTEGER: up(1)
ipv6InterfaceEnableStatus.2 = INTEGER: up(1)
ipv6InterfaceReachableTime.1 = Gauge32: 30000 milliseconds
ipv6InterfaceReachableTime.2 = Gauge32: 30000 milliseconds
ipv6InterfaceRetransmitTime.1 = Gauge32: 1000 milliseconds
ipv6InterfaceRetransmitTime.2 = Gauge32: 1000 milliseconds
ipv6InterfaceForwarding.1 = INTEGER: 0
ipv6InterfaceForwarding.2 = INTEGER: 0

ipAddressTable: the new, dual-stack-aware ipAddrTable

The ipAddressTable replaces the deprecated ipAddrTable in the role of mapping layer-3 IPv4 and IPv6 addresses to layer-2 interfaces. It has a compound index on ipAddressAddrType (enum indicating whether this is an IPv4 or IPv6 address) and ipAddressAddr (contains the actual address octets). Columns of particular interest include:

ipAddressIfIndex 
Maps to an entry in ifTable
ipAddressType 
Whether this address is unicast(1), anycast(2), or broadcast(3). Broadcast is not valid for IPv6 addresses (RFC 3513)
ipAddressPrefix 
From IP-MIB: A pointer to the row in the prefix table to which this address belongs. May be {0 0 }if there is no such row.
ipAddressOrigin 
Means by which this address was assigned: other(1), manual(2), dhcp(4), linklayer(5), random(6)
ipAddressStatus 
From IP-MIB: The status of the address, describing if the address can be used for communication. In the absence of other information, an IPv4 address is always preferred(1). Values: preferred(1), deprecated(2), invalid(3), inaccessible(4), unknown(5), tentative(6), duplicate(7), optimistic(8)

Example walk of ipAddressTable from a system with a real IPv4 address but only loopback and link-local IPv6 addresses:

ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1
ipAddressIfIndex.ipv4."216.216.217.254" = INTEGER: 2
ipAddressIfIndex.ipv4."216.216.217.255" = INTEGER: 2
ipAddressIfIndex.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: 1
ipAddressIfIndex.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: 2
ipAddressType.ipv4."127.0.0.1" = INTEGER: unicast(1)
ipAddressType.ipv4."216.216.217.254" = INTEGER: unicast(1)
ipAddressType.ipv4."216.216.217.255" = INTEGER: broadcast(3) ipAddressType.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: unicast(1)
ipAddressType.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: unicast(1) ipAddressPrefix.ipv4."127.0.0.1" = OID: 
IP-MIB::ipAddressPrefixOrigin.1.ipv4."127.0.0.0".8
ipAddressPrefix.ipv4."216.216.217.254" = OID: IP-MIB::ipAddressPrefixOrigin.2.ipv4."216.216.217.0".24
ipAddressPrefix.ipv4."216.216.217.255" = OID: IP-MIB::ipAddressPrefixOrigin.2.ipv4."216.216.217.0".24
ipAddressPrefix.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = OID: IP-MIB::ipAddressPrefixOrigin.1.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01".128
ipAddressPrefix.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = OID: IP-MIB::ipAddressPrefixOrigin.2.ipv6."fe:80:00:00:00:00:00:00:00:00:00:00:00:00:00:00".64
ipAddressOrigin.ipv4."127.0.0.1" = INTEGER: manual(2)
ipAddressOrigin.ipv4."216.216.217.254" = INTEGER: manual(2)
ipAddressOrigin.ipv4."216.216.217.255" = INTEGER: manual(2)
ipAddressOrigin.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: manual(2)
ipAddressOrigin.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: linklayer(5)
ipAddressStatus.ipv4."127.0.0.1" = INTEGER: preferred(1)
ipAddressStatus.ipv4."216.216.217.254" = INTEGER: preferred(1)
ipAddressStatus.ipv4."216.216.217.255" = INTEGER: preferred(1)
ipAddressStatus.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: preferred(1)
ipAddressStatus.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: preferred(1)
ipAddressCreated.ipv4."127.0.0.1" = Timeticks: (0) 0:00:00.00
ipAddressCreated.ipv4."216.216.217.254" = Timeticks: (0) 0:00:00.00
ipAddressCreated.ipv4."216.216.217.255" = Timeticks: (0) 0:00:00.00
ipAddressCreated.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = Timeticks: (0) 0:00:00.00
ipAddressCreated.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = Timeticks: (0) 0:00:00.00
ipAddressLastChanged.ipv4."127.0.0.1" = Timeticks: (0) 0:00:00.00
ipAddressLastChanged.ipv4."216.216.217.254" = Timeticks: (0) 0:00:00.00
ipAddressLastChanged.ipv4."216.216.217.255" = Timeticks: (0) 0:00:00.00
ipAddressLastChanged.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = Timeticks: (0) 0:00:00.00
ipAddressLastChanged.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = Timeticks: (0) 0:00:00.00
ipAddressRowStatus.ipv4."127.0.0.1" = INTEGER: active(1)
ipAddressRowStatus.ipv4."216.216.217.254" = INTEGER: active(1)
ipAddressRowStatus.ipv4."216.216.217.255" = INTEGER: active(1)
ipAddressRowStatus.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: active(1)
ipAddressRowStatus.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: active(1)
ipAddressStorageType.ipv4."127.0.0.1" = INTEGER: volatile(2)
ipAddressStorageType.ipv4."216.216.217.254" = INTEGER: volatile(2)
ipAddressStorageType.ipv4."216.216.217.255" = INTEGER: volatile(2)
ipAddressStorageType.ipv6."00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:01" = INTEGER: volatile(2)
ipAddressStorageType.ipv6."fe:80:00:00:00:00:00:00:02:0d:56:ff:fe:6f:fe:a8" = INTEGER: permanent(4)

ipAddressPrefixTable

Not sure yet whether we'll need to touch this table, but here's its description from the IP-MIB:

This table allows the user to determine the source of an IP
address or set of IP addresses, and allows other tables to
share the information via pointer rather than by copying.
For example, when the node configures both a unicast and
anycast address for a prefix, the ipAddressPrefix objects
for those addresses will point to a single row in this
table.
This table primarily provides support for IPv6 prefixes, and
several of the objects are less meaningful for IPv4.  The
table continues to allow IPv4 addresses to allow future
flexibility.  In order to promote a common configuration,
this document includes suggestions for default values for
IPv4 prefixes.  Each of these values may be overridden if an
object is meaningful to the node.
All prefixes used by this entity should be included in this
table independent of how the entity learned the prefix.
(This table isn't limited to prefixes learned from router
advertisements.)