If you’ve been working with IPv4 for some time now, you may already be familiar with subnet masks and how they work to segment the IPv4 address space into subnets. In the IPv6 world, subnetting works somewhat differently, relying on a dedicated field within an IPv6 address. While the next section will look at the breakdown of the IPv6 address space in more detail, for now it’s enough to say that an IPv6 unicast address includes a 16-bit field known as the Subnet ID or Site-Level Aggregator. Because this field is 16 bits in length, it gives companies the option of configuring up to 65535 individual subnets. The structure of an IPv6 global address is outlined below.
Tip: Remember that in IPv6, the Subnet ID (also know as the Site Level Aggregator field) is used to define individual subnets.
As part of developing the IPv6 address space, a number of the “problems” associated with IPv4 were taken into account. For example, IPv6 provides a much more organized hierarchical addressing scheme, addressing some of the limitations and problems associated with routing in the IPv4 world. The figure below outlines the major elements of a global IPv6 unicast address. To gain a better understanding of IPv6, it is worth knowing a little more about how these addresses are allocated in the real world.
First and foremost, the first three bits of the global IPv6 address space are set to use the prefix 2000::/3 (remember, this is not the decimal number 2000, but a series of four hexadecimal digits). Like the CIDR notation you are already familiar with, the /3 represents a mask that defines a portion of the address space. In this case, all IPv6 addresses that start with the binary values 001 (2000::/3) through 111 (E000::/3) are global addresses (with the exception of FF00::/8, which are addresses reserved for multicasts). Ultimately, these global addresses need to have a 64-bit interface identifier, as displayed in the previous figure. The 64-bit interface identifier is usually created by taking an interface’s MAC address (which is 48 bits in length) and wedging another 16-bit hexadecimal string (FFFE) between the OUI (first 24 bits) and unique serial number (last 24 bits) of the MAC address. This format is known as extended universal identifier (EUI) 64 format, or EUI-64 for short. When all is said and done, the last 64 bits of an IPv6 global address represent an interface.
So what are the other parts of the address space used for? Well, so far we know that the last 64 bits of an IPv6 address represent a unique interface, while the 16 bits that precede that represent the Subnet ID. As such, the first 48 bits define what is known as the Global Routing Prefix, and since the global address space starts at 2000::/3, that leaves 45 bits to break up the Global Routing Prefix itself.
Without getting into too much detail here, the IPv6 address space is allocated by the Internet Assigned Numbers Authority (IANA). The IANA assigns addresses to the various registries, such as the American Registry for Internet Numbers (ARIN) in the Americas. A registry is given a /16 portion of the address space, such as the 2001:0400::/16 address space allocated to ARIN. From this allocated space, a registry such as ARIN would begin granting address space to ISPs with a /32 prefix. Then, individual ISPs would allocate this address space to organizations using a /48 prefix.
Once a company has been granted their address in the /48 space, they can begin to allocate this address space internally, segmenting the space into smaller subnets or networks by using the 16-bit Subnet ID field. From there, hosts are addressed using the remaining 64 bits of the address space as outlined earlier.
As if it we not enough that IPv6 introduces a whole new addressing scheme, this version of IP also introduces a new concept in terms of how hosts are individually addressed. For example, in the world of IPv4, a host usually had a single IP address assigned to it. In the world of IPv6, however, a host is assigned multiple types of addresses on a per-interface basis. These addresses include different types of unicast, multicast, and anycast addresses. One that you may find conspicuously absent is the famous broadcast – in fact, you might be happy to know that IPv6 doesn’t support broadcasts at all.