Note that IPv6 addresses are 128 bits, 16 bytes, 4 times longer than IPv4 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 IPs with java.net.InetAddress and java.net.Inet6Address.
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/jgloss/ipv6.html | J:\mindprod\jgloss\ipv6.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.109] | |
| Feedback | You are visitor number 10,559. | |