IPv6 simplicity and complexity of various prefix values

IPv6 addresses use what is known as a prefix length to specify the number of bits that we use for the prefix of the address.

Network devices view, calculate, and manipulate IPv6 addresses using the binary format. The hexadecimal format is for the benefit of us humans so that we can understand and write out the addresses more easily.

This means that when you see a /53 prefix in this format:

2001:1234:abcd:5678:9877:3322:5541:aabb/53

the network device simply sees it like this:

00100000000000010001001000110100101010111100110101010110011110001001100001110111001100110010001001010101010000011010101010111011

The first 53 bits are bold to indicate that they are the 53-bit prefix. If we used a 52-bit prefix, it would look like this:

00100000000000010001001000110100101010111100110101010110011110001001100001110111001100110010001001010101010000011010101010111011

From the point of view of a network device, there are no "4-bit blocks" or 16-bit hextets, so it's really no problem for a network device to deal with a prefix of any length.

Now having said that, it is difficult for us humans to visualize a /53 simply because of the methodology of representation used. A /53 will cause the prefix to split the IPv6 address within a single hex digit as shown in the lesson.

However, a /52 would be easier to visualize because it actually splits at a particular hex digit. Specifically:

2001:1234:abcd:5678:9877:3322:5541:aabb/52

In the above representation, the bold hex digits belong to the prefix. Remember that each hex digit represents four bits. So that's 13 hex digits times 4 bits each: 13*4 = 52.

In general, we tend to choose prefixes that are divisible by 16, such as /48 or /64 because they split along one of the ":" indicators in the address. Or, we can choose prefixes that are divisible by 4, so that the split occurs at one of the hex digits, so values of 52, 56, and 60 would also be easily representable in the hex format. But anything not divisible by 4 is typically not used simply because it adds complexity to the hex representation of the addresses.

Links:

https://networklessons.com/ipv6/how-to-find-ipv6-prefix