Understand IPv6 Addresses - Page 2

A lack of familiarity with IPv6's address conventions stops a lot of admins dead in their tracks. Here's how IPv6 addressing works, and how to see through all those colons.

 By Carla Schroder
Page 2 of 3   |  Back to Page 1
Print Article

Address Dissection

Let's take another look at our example IPv6 address:

global prefix subnet  Interface ID

The prefix identifies it as a global unicast address. It has three parts: the network identifier, the subnet, and the interface identifier.

The global routing prefix comes from a pool assigned to you, either by direct assignment from a Regional Internet Registry like APNIC, ARIN, or RIPE NCC, or more likely from your Internet service provider. The subnet and interface IDs are controlled by you, the hardworking local network administrator.

You'll probably be running mixed IPv6/IPv4 networks for some time. IPv6 addresses must total 128 bits. IPv4 addresses are represented like this:


Eight blocks of 16 bits each are required in an IPv6 address. The IPv4 address occupies 32 bits, so that is why there are only seven colon-delimited blocks.

The localhost address is 0000:0000:0000:0000:0000:0000:0000:0001.

Naturally we want shortcuts, because these are long and all those zeroes are just dumb-looking. Leading zeroes can be omitted, and contiguous blocks of zeroes can be omitted entirely, so we end up with these:


I usually end up counting on my fingers, which is probably not the best method. ipv6calc is invaluable for checking your work. Suppose you're not sure if your compressed notation is correct. ipv6calcdisplays the uncompressed notation:

$ ipv6calc --in ipv6addr --out ipv6addr --printuncompressed ::1
$ ipv6calc --in ipv6addr --out ipv6addr --printfulluncompressed 2001:0db8:3c4d:0015::abcd:ef12

Next week we'll get to the fun part: setting up a local IPv6 network, connecting to a public IPv6 network and learning how to calculate and assign IPv6 addresses.


This article was originally published on Sep 20, 2006
Get the Latest Scoop with Networking Update Newsletter