Send in your Unix questions today!
See additional Unix tips and tricks
IPv6 is coming. It's coming slowly, due to technologies like NAT and the advent of private address spaces like 10.0.0.0/8 and 192.168.0.0/16 that have provided breathing room for IPv4 in spite of the rapidly depleting IPv4 address space. Still, it is coming. And it's different enough from IPv4 that preparing for its arrival is a very good idea. In this week's column, we'll take a look at some of the fundamental differences between the two protocols and see what IPv6 addresses look like.
It's Not Just a Lot of Bits!
The most well known aspect of IPv6 is that its address space, compared to that of IPv4 is huge. With only 4 billion or so addresses, IPv4 is clearly inadequate for today's Internet. So, where IPv4 stores addresses in 32 bits, IPv6 uses 128 bits. Four times the bits, but hardly four times the address space. In fact, the number of unique addresses that can be expressed in 2 ** 128 (two to the one hundred and twenty-eighth power) is so large that few, if any, of us have words to express it. That's starting with the four billion plus number that represents the size of the IPv4 address space and doubling it 96 times. That's a very big number! That's 340,282,366,920,938,463,463,374,607,431,768,211,456.
Considering that most humans have trouble remembering more than about seven digits, IPv6 addresses are obviously unwieldy. Were we to use the dotted decimal notation that we use to express IPv4 addresses, we would have to use 16 octets. Imagine having an IP address like this: 8.16.124.11.101.45.87.200.91.6.123.68.88.20.66.101.
Fortunately, a shorthand has been developed to make IPv6 addresses manageable. This shorthand allows addresses to be expressed in a relatively small number of characters. It works like this: First, IPv6 addresses are expressed in hexadecimal with colons between each set of four hex characters (referred to as "quads"). Second, leading zeroes are dropped. With these two modifications, an address that starts out like this:
2001:0000:0000:0000:002D:D0FF:FE48:4672
becomes:
2001:0:0:0:2D:D0FF:FE48:4672
Next, we are allowed to reduce a single (just one!) set of contiguous quads of zeroes (i.e., any length of the address string that consists of zeroes and colons) to two colons. Notice that we may drop colons as well as zeroes in this part of the address simplification. Even so, using the transformations in reverse, we can see how easily the original address can be derived from this shortened address.
2001::2D:D0FF:FE48:4672
Want to know what an IPv6 broadcast would look like? No problem. They don't look like anything at all. In IPv6, there is no more broadcasting. What implication does this have for protocols like arp and rarp that use broadcasting to determine hosts' network interface (MAC) addresses? It means that new protocols have are beginning to replace the broadcast-dependent protocols of IPv4.
If that surprises you, consider this: IPv6 is incompatible with IPv4. Programs running on IPv4 systems cannot communicate directly with programs running on IPv6 systems. This means that every networked device on your network will have to be replaced or updated for you to convert to IPv6. Fortunately, there are transition mechanisms that will support you when you are ready to begin your conversion. Solaris, for example, can support IPv4 and IPv6 on the same network interface. It also provides support for IPv6-over-IPv4 tunnels.
IPv6 provides improved scalability and routing, security, simplified configuration and higher performance than IPv4. In time, it will take over the Internet and push IPv4 into oblivion. But the effort involved is not trivial.
Recommended reading for anyone who wants to wrap their arms around this critical technology is "IPv6 Essentials", by Silvia Hagen, published by O'Reilly. This book is a great resource for understanding all the implications of IPv6 and for planning your transition strategy.