Summarizing IPv6 prefixes is similar to IPv4 summarization, the big difference is that IPv6 uses 128 bit addresses compared to 32 bits for IPv4 and IPv6 uses hexadecimal addresses.
In this lesson, I’ll explain how to create IPv6 summaries and we’ll walk through some examples together.
Let’s start with a simple example:
Let’s say we have to create a summary that includes the two prefixes above. Each hextet represents 16 bits. The first three hextets are the same (2001:DB8:1234) so we have 16 + 16 + 16 = 48 bits that are the same so far. To find the other bits that are the same we only have to focus on the last hextet:
We’ll have to convert these from hexadecimal to binary to see how many bits are the same:
I highlighted the bits in red that are the same, the first 9 bits. The remaining blue bits are different. To get our summary address, we have to zero out the blue bits:
When we calculate this from binary back to hexadecimal we get AB80. The first three hextets are the same and in the 4th octet we have 9 bits that are the same. 48 + 9 = 57 bits. Our summary address will be:
That’s how you can create a summary address for IPv6.
This time we have the following 3 prefixes:
And our goal is to create the most optimal summary address. The first three hextets are the same so that’s 16 + 16 + 16 = 48 bits that these prefixes have in common. For the remaining bits, we’ll have to look at the 4th hextet in binary:
Keep in mind that each hextet represents 16 bits. The first 14 bits are the same, to get the summary address we have to zero out the blue bits:
When we calculate this from binary back to hexadecimal we get 0000. The first three hextets are the same and in the 4th octet we have 14 bits that are the same. 48 + 14 = 62 bits. Our summary address will be:
Looks like the third example have mistakes. The summary address should be 2001:DB8::/60. can you confirm??
Got it. I have done the same mistake which have mentioned. I have calculated wrongly before reading details.
“Be careful that you don’t accidently convert number 12 from decimal to binary.”
It should be /59. In the 4th hextet, we have 11 similar bits.
16 + 16 + 16 + 11 = 59
Good that you have found it It’s easy to see 12 (twelve) instead of 12 (one two).