IPv6 Address Types

Hello Muhammad

IPv4 is designed to have a specific structure. This means that an IPv4 address has a network portion and a host portion. The size of each portion of the address depends on the subnet mask.

IPv6 works similarly in the fact that we have a prefix which separates the address into two sections as well: The Prefix and the Interface ID. Their names are different than IPv4 but they’re essentially the same thing.

Now for the purposes of organization, the Prefix is often separated into two sections: The Global Routing Prefix (sometimes called the Site Prefix) and the Subnet ID. This structure is useful because a single global prefix can be given to an ISP, and the ISP can use the subnet IDs to allocate whole blocks of IPv6 addresses. For example, I can have 2001:D88:ACAD as the Global Routing Prefix assigned to an ISP. This ISP can then use the next 16 bits to identify each of their customers. So the IPv6 allocation can be done like so:

  • 2001:D88:ACAD:0001::/64 goes to customer A
  • 2001:D88:ACAD:0002::/64 goes to customer A
  • 2001:D88:ACAD:0003::/64 goes to customer A
  • 2001:D88:ACAD:0004::/64 goes to customer A
  • 2001:D88:ACAD:0005::/64 goes to customer A
  • etc…

The bold numbers are the 16 bit subnet ID

Now the way these various portions of the IPv6 address are defined depends on who you ask. Because all unicast addresses start with 001 in the first three bits, some people separate the Prefix into three sections: 3 bits for this bit sequence, 45 bits for the Global prefix and 16 bits for the subnet ID. But then again, you can always redefine the number of bits the global prefix and the subnet ID can have. So you can have 3 for the first bit sequence, 53 for the global prefix and 8 for the subnet ID. This allocation can occur however it is needed. You can even redefine the Interface ID range as well and make that /48 allowing for more subnet IDs and global prefixes.

I think the best representation of how this works is the following:
image

I hope this has been helpful!

Laz