In IPv6 Packet Structure, we started to look at the monumental differences between IPv4 addresses and the new, longer IPv6 ones. Now we need to go into this in more detail to explain how it will work on a real network.

Basic addressing
A globally unique unicast IPv6 address is made up of several parts. It will always start with the prefix 001, so in hex begin 02 or 03. The next 13 bits are termed the TLA—the top level aggregation identifier—and are used to distinguish major routing aggregation functions. The main one we’re interested in is an identifier that shows that the address has been designated as the part of the global unicast address space that IANA may allocate to the Regional Internet Registries (RIRs—RIPE, APNIC or ARIN). These will all begin 0x2001.

In this instance, a further 13 bits designates the RIR allocation block—it’s interesting that out of all the blocks of addresses allocated, RIPE, the European registry, has by far the greatest number, with a large allocation being granted just last month.

The RIR then gives out IPv6 address blocks to providers, just as they do today with v4 addresses. The address will therefore have a provider-specific part—19 bits, known as the NLA—the next level aggregation identifier.

Providers then allocate address ranges to commercial organisations (again, just as today), so the next field in the address is the SLA—site level aggregation identifier, which is 16 bits.

That still leaves a further 64 bits of unallocated address values, and it’s these that are yours to dish out to actual networked equipment. This is known as the Interface ID.

Like IPv4, there is an all-zeros address, and the loopback address too is supported (in IPv6, it’s address 0:0:0:0:0:0:0:1).

Because the addresses are so long, many addresses will contain strings of zeros. There’s a convention, which will be odd to begin with, that lets you depict multiple zeros with a double colon. You can only use this in one place in the address, though, since the IP stack doesn’t actually know how many zeros you’re summarising this way, so will just fill in as many as needed to make up the 128 bits.

So for instance, 2001:2604:0000:0000:0202:b3ff:fe1e:8329 can be written 2001:2604::202:b3ff:fe1e:8329. However if you had 2001:2604:0000:0000:0202:0000:0000:8329, you would have to choose to have the :: either before or after the 0202, and you’d have to write out the other string of zeros.

If you want more detail on address assignments, have a look at http://www.iana.org/ipaddress/ip-addresses.htm

Multicast
A multicast address will always begin with the prefix 1111 1111, or FF. The following byte is used for flags to determine the type of address and scope, and then the rest of the address is used for the group identifier. Like v4, there are well-known addresses for all hosts, all routers etc, and theses can be defined to be node, link or site local, or globally valid.

The anycast address, although it seems to be a sort of multicast address, has the same format as a unicast address. What makes it special is the fact that it can be given to multiple interfaces in the same subnet. At present this is restricted to being used for routers, not end stations. A packet sent by a station to an anycast address will be delivered to the router interface supporting that address that is closest to the host, so allowing for load balancing and resilience without the need for extra address configurations, as long as all routers taking parting the process support the anycast discovery and operation processes.

Address Configuration
You’re going to be given the first half of the address from your ISP, but how do you dish out the interface specific addresses? And what if you want something akin to the RFC1918 private addresses?

There’s an option within IPv6 that will autoconfigure any v6 host address using its MAC address. Basically the interface portion of the IP address will be the 48bits of the MAC address, with FFFE inserted between the third and fourth bytes. This allows a link local IP address to be created automatically. Link local and site local address types (which have prefixes FE80 and FEC0 respectively) are the equivalent of private addresses, with the added option of scoping them either within your organisation or just within a subnet. The autoconfigured link local address is more or less the same as the 169.254.x.x address assigned in Windows if your PC can’t find a DHCP server when it tries to connect to the network. This is designed to make it easy to set up ad-hoc networks quickly—however you don’t have to use the autoconfiguration option, as it’s still possible to statically define addresses or use DHCP to manage your address space. In fact you can have a host with both a link local IP address and a globally routable one.

There’s no doubt IPv6 addresses will take a lot of getting used to. The main problem though is going to be the size, and the fact that they’re expressed in hex notation. With a bit of familiarity, they won’t be so scary, and as we use them more, no doubt more human-friendly ways of listing IP addresses will come to the fore.