Overview

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.

Shortening

Let's begin by shortening this address:

2001:0ABC:0000:0000:CAFE:0000:0000:0123

It's not easy to look at. Let's shorten it.

Rule #1

Consecutive hextets of zeros can be removed and replaced with :: (a double colon). This may only be done one time.

IPv6 Address Shortening 2

We can use the double colon either way. We followed the rule.

Rule #2

Remove leading zeroes within a hextet:

IPv6 Address Shortening 1

It’s looking a little better already.

Rule #3

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:

IPv6 Address Shortening 3

Expanding

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:

2001:ABC::CAFE:0:0:123

Rule #3 in Reverse

If there is one 0 in a hextet, write four zeroes.

2001:ABC::CAFE:0:0:123
2001:ABC::CAFE:0000:0000:123

Rule #2 in Reverse

If there are less than four nibbles in a hextet, add leading 0s. (A nibble is one character.)

2001:ABC::CAFE:0000:0000:123
2001:0ABC::CAFE:0000:0000:0123

Rule #1 in Reverse

A double colon is replaced with hextets of 0s until there are 8 hextets.

2001:0ABC::CAFE:0000:0000:0123
2001:0ABC:0000:0000:CAFE:0000:0000:0123

Done. The address is now completely expanded...written with 8 hextets with 4 nibbles each.

Summary

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!

Cisco Press: IPv6 Address Representation and Address Types

To continue reading, please login or become a member for full access...