|
AdventNet SNMP API 4 supports transport of SNMP packets over UDP/IPv6 and TCP/IPv6. It makes use of the IPv6 socket APIs provided by JDK1.4. The transport provider framework of SNMP API hides the details of the IPv6 communication from the user. The users have to just specify the IPv6 address of the IPv6 node with which they wish to communicate in SnmpPDU or as a Target Host parameter in the classes (such as SnmpTarget, SnmpPoller, etc.). The communication with the agent is handled by the default UDP (or TCP) transport provider implementations using the IPv6 socket API provided by JDK1.4 and above.
Following is a brief introduction about IPv6 and the address formats. It also describes about the IPv6 support in the Sun's J2SDK/JRE1.4. This provides an understanding of IPv6 addressing formats and how it can be specified through the SNMP APIs.
Introduction to IPv6
IP version 6 (IPv6) is a new version of the Internet Protocol, designed as the successor to IP version 4 (IPv4) [RFC-791]. The changes from IPv4 to IPv6 fall primarily into the following categories.
Expanded Addressing Capabilities: IPv6 increases the IP address size from 32 bits to 128 bits, to support more levels of addressing hierarchy, a much greater number of addressable nodes, and simpler auto-configuration of addresses.
Improved Support for Extensions and Options: Changes in the way IP header options are encoded allows for more efficient forwarding, less stringent limits on the length of options, and greater flexibility for introducing new options in the future.
Flow Labeling Capability: A new capability is added to enable the labeling of packets belonging to particular traffic "flows" for which the sender requests special handling, such as non-default quality of service or "real-time" service.
Authentication and Privacy Capabilities: Extensions to support authentication, data integrity, and (optional) data confidentiality are specified for IPv6.
Representation of IPv6 Addresses
There are three conventional forms for representing IPv6 addresses as text strings.
The preferred form
is x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal values of the eight
16-bit pieces of the address.
Examples:
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
1080:0:0:0:8:800:200C:417A
Due to some methods
of allocating certain styles of IPv6 addresses, it will be common for
addresses to contain long strings of zero bits. In order to make writing
addresses containing zero bits easier a special syntax is available to
compress the zeros. The use of "::" indicates multiple groups
of 16-bits of zeros. The "::" can only appear once in an address.
The "::" can also be used to compress the leading and/or trailing
zeros in an address.
Examples:
1080:0:0:0:8:800:200C:417A a unicast address
FF01:0:0:0:0:0:0:101 a multicast address
0:0:0:0:0:0:0:1 the loopback address
0:0:0:0:0:0:0:0 the unspecified addresses
may be represented as:
1080::8:800:200C:417A a unicast address
FF01::101 a multicast address
::1 the loopback address
:: the unspecified addresses
An alternative form
that is sometimes more convenient when dealing with a mixed environment
of IPv4 and IPv6 nodes is x:x:x:x:x:x:d.d.d.d, where the 'x's are the
hexadecimal values of the six high-order 16-bit pieces of the address,
and the 'd's are the decimal values of the four low-order 8-bit pieces
of the address (standard IPv4 representation).
Examples:
0:0:0:0:0:0:13.1.68.3
0:0:0:0:0:FFFF:129.144.52.38
or in compressed form
::13.1.68.3
::FFFF:129.144.52.38
IPv6 in J2SDK/JRE 1.4
With the J2SDK/JRE 1.4 release, IPv6 support has been added to Java Networking. This makes J2SE compliant with the following standards (RFCs).
RFC2373: IPv6 Addressing Architecture;
RFC 2553: BasicSocket Interface Extensions for IPv6;
RFC 2732: Format for Literal IPv6 Addresses in URLs.
Supported Operating Systems
The following operating systems are supported in this release.
Solaris 8 and above
Linux kernel 2.1.2 and above (RedHat 6.1 and above)
Windows XP with JDK 1.5
Special IPv6 Address Types and their Use in the AdventNet SNMP API
Unspecified Address
When you want to listen on the wildcard address use "::". For example, to listen for traps on all the interfaces on a IPv6 system, you can open the SnmpSession with this address.
Loopback Address
The address "::1" can be used to listen on the IPv6 loopback. This address can be used to receive/send SNMP PDUs over the IPv6 loopback interface.
Compatibility address
To send SNMP packets in IPv6 packets tunneled over IPv4, use addresses of the form "::w.x.y.z" with "w.x.y.z " being the IPv4 address.
Dual-Stack Node
A general property of a dual-stack node is that an IPv6 socket can communicate both with an IPv4 and IPv6 peer at the transport layer (TCP or UDP) . At the native level, the IPv6 socket communicates with an IPv4 peer through an IPv4-mapped IPv6 address. The impact on the Java application are the following.
There should be no change in Java application code if everything has been done appropriately. I.e., there are no direct references to IPv4 literal addresses; instead, hostnames are used.
All the address or socket type information is encapsulated in the Java networking API.
Through setting system properties, address type and/or socket type preferences can be set.
For new applications Ipv6-specific new classes and APIs can be used.
Communication scenarios
|
Nodes |
V4 Only |
V4/V6 |
V6 Only |
|---|---|---|---|
|
V4 Only |
Possible |
Possible |
Not Possible |
|
V4/V6 |
Possible |
Possible |
Possible |
|
V6 Only |
Not Possible |
Possible |
Possible |
Top row and left column represent various node types attempting to communicate.
InetAddress Class Changes
This class represents the IP address. It provides address storage, name-address translation methods, address conversion methods, as well as address testing methods. In J2SE 1.4, this class is extended to support both IPv4 and IPv6 addresses. Utility methods are added to check address types and scopes. The two types of addresses, IPv4 and IPv6, can be distinguished by the Java type Inet4Address and Inet6Address. When IPv6 is used, all the methods in AdventNet SNMP API that return the InetAddress under IPv4, will return the Inet6Address.
|