Getting Ready for IPv6
Networked computers are becoming the norm instead of the exception today. This is a dramatic shift from the so-called "stand-alone" desktop. But, as the demand for services, features, and information grows, the majority of computer owners opt to pay for connectivity to the Internet. If you're reading this article, you probably got it from the Internet.
Connectivity requires certain policies and interfaces. Of course, the computer on your desk must have the capability of connecting to the network either through a network interface card (NIC) or a modem. The computer also needs a unique method of identification. Most NICs have a built-in six-byte ID called the Media Access Control (MAC). Modems don't have this feature, since they were designed to be a point-to-point connection, not for networking. Still, because the network can't depend on the MAC, it's unsuitable for networking addressing.
The Internet Protocol (IP version 4 or IPv4) defines a four-byte ID that can include routing information. The address is divided into separate domains, with each domain responsible for routing, decoding subnets, and mapping to the destinations' MACs.
IPv4's four-byte allocation has enough addresses for 4 billion hosts. You've probably worked with the dot notation, as in 22.214.171.124. These addresses are allocated in ranges or blocks to companies and groups. The address blocks usually exceed the group's needs—so much so that ICANN (Internet Corporation for Assigned Names and Numbers) estimates that less than 2–3% of the allocated addresses are actually used. Also, the accepted IP definition sets apart several addressing subranges for special purposes; for example, 127.xxx.xxx.xxx is "this computer"—over 16 million addresses. These factors, along with the explosive growth of the Internet, have led experts to predict that IPv4 will run out of addresses within a few years.
The growth of the Internet has also forced another unexpected need—unified networks. The Internet is really a collection of different networks (Internet, IPX, Banyan, etc.), some more compatible than others. Some are different enough that the networks require address mapping from the foreign address to the IP address.
To encompass different networks while breathing life on IPv4's fading embers, the addressing itself needed expanding and redefining.
Widening the Network with IPv6
A worldwide network has to be flexible enough to support disparate addressing, subranges for local networks, and enough breathing room for billions more computers. The Next Generation of IP, IPng or IPv6, defines an address that's four times the size of IPv4—16 bytes instead of 4 bytes. It also sets aside several ranges for multicasting and foreign network addressing.
IPv6's 16-byte address can handle about 3.4x1038, which when compared to IPv4's address space, appears to give you as the programmer and/or administrator unlimited flexibility. The allocation of IPv6's addresses will continue the same approach as now done, allocating address blocks to groups. This means that we can expect many years of longevity.
Naturally, several things had to change to support the new protocol—not the least of which is the IP packet. The IP packet, the most fundamental block of data that a program can work with, must carry at least the destination address, the source address, and the length in bytes. The new protocol simplifies the packet and reduces the overhead load.
Actually, the IPv6 header is twice the size of the IPv4 header (40 bytes versus 20 bytes). However, the IPv6 format packet no longer counts the header as part of the packet size. IPv4 never could give a full 65535 bytes, because the header used 20–60 bytes of that space. The IPv6 header is "fixed" at 40 bytes, and the data can be as large as 65536 bytes—or even larger.
IPv6 takes advantage of the newer, super-high-bandwidth networks (greater than 1 gigabyte), by supporting jumbograms. The current IPv4 packet can't handle any packet bigger than 65535 bytes. On newer, faster networks, that limitation is very constricting and is prone to fragment the network (especially Ethernet). IPv6 offers a jumbo payload that allows packet sizes up to 4 gigabytes!
The representation had to change as well. To distinguish the familiar IPv4 dot notation (and perhaps to increase readability a little), the new protocol uses eight 16-bit hexadecimal numbers separated by colons. For example, you may get an address like this:
The two colons are shorthand for all zeros in the second example. You can even represent an IPv4 address using this:
where XXXX:XXXX is the IPv4 address expressed as hexadecimal. As you can see, the new protocol really does encompass the old.
The benefits of moving to IPv6 include better addressing, better multicasting (covered in my earlier articles), larger-capacity messaging, and multi-networks. But before you can actually use it, you need support for it.