December 11, 2018

In this blog post, we are going to explain different IPv6 classes when it comes to SEO and SEO Hosting.

To make this post more usable to our all clients, we are going first to list different classes. Then we will explain how you can compare different IPv6 addresses to see if they belong to the same A, B or C class. After that, we look into the IPv6 structure and formatting.

In other words, we start from basics and then get more technical. It is up to the reader to decide if they want to read all the way through this post or if all they want to ignore the technical details and are happy with the first two sections

IPv6 SEO Classes

Similar to IPv4 SEO IPs we define four different classes: A, B, C, and D. Unlike IPv4, the concept of “Class” is not already a part of the protocol. In IPv6 space instead of class here we have prefixes.

There are many different guidelines on IPv6 assignment. One preferred mechanism is to give away /48 prefixes to end sites (Companies, building blocks and so on) and then assign /64 or smaller allocations to end users.

After careful review of IPv6 assignments across the world we came to the following classifications:

  1. For different A-class IPs should have different /32 prefixes.
  2. For different B-class IPs should have different /36 prefixes.
  3. For different C-class IPs should have different /40 prefixes.
  4. For different D-class IPs should have different /48 prefixes.

(At the moment we do not sell different D-Class to our clients, as we are not yet sure if that assignment comes with zero-footprint)

IPv6 address Format explained

IPv6 Address format

An IPv6 (Normal) address has the following format: y : y : y : y : y : y : y : y where y is called a segment and can be any hexadecimal value between 0 and FFFF.

IPv6 address shortening

To make our lives a bit better, IPv6 addresses can be shortened. Let’s take a look at some examples:

Original: 2041:0000:140F:0000:0000:0000:875B:131B

Short: 2041:0000:140F::875B:131B

If there is a string of zeros then you can remove them once. In the example above we removed the entire 0000:0000:0000 part. You can only do this once, and the IPv6 device will fill up the remaining space with zeros until it has a 128 bits address.

There is more, the address can be shortened even more:

Short: 2041:0000:140F::875B:131B

Shorter: 2041:0:140F::875B:131B

If you have a “hextet” with 4 zeros then you can remove those and leave a single zero. Your IPv6 device will add the remaining 3 zeros.

When we talk about IPv4 addresses, we use the term “octet” to define a “block” of 8 bits. In IPv6, there is no official term (yet), and there is an IETF draft that discusses the names to be used. The official term for 4 hexadecimal values is “hexadectet”, this is hard to remember/pronounce so the short form “hextet” will be used. Leading zeros can also be removed, here’s another address to demonstrate this:

Original: 2001:0001:0002:0003:0004:0005:0006:0007

Short: 2001:1:2:3:4:5:6:7

By removing these zeros we get a nice short IPv6 address.

To summarize these rules:

  1. An entire string of zeros can be removed, you can only do this once.
  2. 4 zeros can be removed, leaving only a single zero.
  3. Leading zeros can be removed.

How to compare 2 IPv6 classes

Now that we know how IPv6 is formatted it will be easy to compare the IPs by following these steps:

  1. If the address is in short format expand it to the long format (32 digits with all the zeros).
  2. From the left compare the first 8 digits. If the values are all equal both IPv6 addresses are on the same /32 prefix (They are on the same A-Class) otherwise they are on different A-Class
  3. From the left compare the first 9 digits. If the values are all equal both IPv6 addresses are on the same /36 prefix (They are on the same B-Class) otherwise they are on different B-Class
  4. Now from the left compare the first 10 digits. If the values are all equal both IPv6 addresses are on the same /40 prefix (They are on the same C-Class) otherwise they are on different C-Class
  5. Finally, from the left compare the first 12 digits. If the values are all equal both IPv6 addresses are on the same /48 prefix (They are on the same D-Class) otherwise they are on different D-Class

Let’s try the above formula on two different IPv6 addresses:

  • 2001:1:2:3:4:5:6:7
  • 2001:1:200:3:4:5:6:7

First let’s expand the above IPs:

  • 2001:0001:0002:0003:0004:0005:0006:0007
  • 2001:0001:0200:0003:0004:0005:0006:0007

Now lets check their A, B and C classes:

A-Class (/32 = 8 digits)

  • 2001:0001
  • 2001:0001

As we can see they share the same A class

B-Class (/36 = 9 digits)

  • 2001:0001:0
  • 2001:0001:0

As we can see they share the same B class

C-Class (/40 = 10 digits)

  • 2001:0001:00
  • 2001:0001:02

As we can see the IPs are on different C classes.

IPv6 and DNS servers

Before letting you go, let’s make a friendly reminder that in DNS, IPv6 addresses are defined with “AAAA” records, while the IPv4 records are defined using DNS “A” records.

Final thoughts, for your IPv6 SEO Hosting always go for different A, B or C class or a mix of IPs from as many different A classes a possible.