IPv6 : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

IPv6
IPv6 (Internet Protocol Version 6). The successor protocol to IP (Internet Protocol). Using IPv6 in Java is easy; it is transparent and automatic. Unlike in many other languages, no porting is necessary. In fact, there is no need to even recompile the source files. The new protocol has addresses four times bigger 128 bits (16 bytes) verses the 32 bits (4 bytes) in the current IP version 4.

Note that IPv6 addresses are 128 bits, 16 bytes, 4 times longer than IPv4 (Internet Protocol Version 4) addresses. You’d think 64 bits, allowing 18,744,073,709,551,616 addresses, or 30,77,457 addresses per person would have sufficed. However, to avoid another transition for a very long time, they went for 128 bits. This will allow simpler routing, since bands can be assigned for various regions that won’t soon fill up and require juggling to shift slots from other regions.

The Java class for dealing with these is called  java.net.Inet6Address, though  java.net.InetAddress will work too. The new headers, surprisingly, have fewer fields than before and are fixed length 40 bytes to streamline processing. New features include:

IPv6 Packet Header
Field Size in bits Purpose
version 4 6 for IP version 64. This allows IPv4 and IPv6 packets to be mixed.
payload length 16 total size of data payload measured in 8-bit chunks (aka bytes or octets). The means the maximum size of a packet including data is 64K. This means the payload of data is at most 65,496 bytes.
hop limit 8 how many more hops this packet has to live before being discarded as lost or hopelessly late. On each leg of this packet’s journey, this field gets decremented by 1.
source address 128 Who sent the packet. When it finally arrives at its destination the receiver will know who it was from.
destination address 128 Where the packet is going. On each leg of its journey the routing computer uses this to get the packet a little closer to its final destination.
other stuff 36 Miscellaneous fields.

Everything is in big endian byte order.

Java 1.4.1+ handles the new IP with java.net.InetAddress and java.net.Inet6Address.

Learning More

Oracle’s Javadoc on InetAddress class : available:
Oracle’s Javadoc on Inet4Address class : available:
Oracle’s Javadoc on Inet6Address class : available:

Gotchas

IAP (Internet Access Provider) Shaw does not support ipV6. You can use it on your local lan, but not out on the web. The symptom is your router will complain it cannot figure out which kind of ipV6 support there is.


This page is posted
on the web at:

http://mindprod.com/jgloss/ipv6.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\ipv6.html
Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[3.135.195.220]
You are visitor number