Table of contents
Understanding IPv6 address shortening and expanding is important to making addresses easy to read. It's also a key skill to simplify planning, troubleshooting and more. There are only three easy rules.
Let's begin by shortening this address:
It's not easy to look at. Let's shorten it.
Consecutive hextets of zeros can be removed and replaced with :: (a double colon). This may only be done one time.
We can use the double colon either way. We followed the rule.
Remove leading zeroes within a hextet:
It’s looking a little better already.
When a hextet has all zeros, write one zero. Remember, double colons may only be used once. The address with the red flag is incorrect:
There are situations where it may be necessary to expand a shortened IPv6 address. One example is taking an address from the output of a show command (routers automatically shorten addresses, if need be) and then creating more subnets from it.
If you thought shortening was easy, then your in luck. Expanding uses the same rules...in reverse.
Let's use this address that we already shortened above:
Rule #3 in Reverse
If there is one 0 in a hextet, write four zeroes.
Rule #2 in Reverse
If there are less than four nibbles in a hextet, add leading 0s. (A nibble is one character.)
Rule #1 in Reverse
A double colon is replaced with hextets of 0s until there are 8 hextets.
Done. The address is now completely expanded...written with 8 hextets with 4 nibbles each.
Once you have a solid understanding of the last lesson (IPv6 Address Format) and know the shortening and expanding rules from this lesson, you’ll be well on your way to mastering IPv6!