IPv6 Drill 1
This post gives you an exercise with five different problems. Each begins with an expanded IPv6 Global Unicast Addresses (GUA). For each problem, start by abbreviating the address. Then find the IPv6 subnet ID (aka the prefix ID), both in expanded and abbreviated form. This post has both the questions and the answers – just click the items in the post to reveal.
Background: IPv6 Address Drills
IPv6 addresses take up a lot of space – as many as 32 hex digits. Devices help us humans by listing the abbreviated form of IPv6 addresses. However, it helps to think about IPv6 addresses in their unabbreviated (expanded) form – so you need to be skilled at mentally converting from expanded to abbreviated form.
Beyond basic address abbreviation and expansion, you need to be ready to perform other operations on IPv6 addresses, like these:
- Find the subnet (prefix) ID based on an address (both in abbreviated and expanded form.)
- Calculate the complete IPv6 address when using the EUI-64 process to build the address’s interface ID (IID) portion.
- Build Link-Local Addresses (LLAs) based on the MAC address of an interface.
Instructions and Problems
Each problem listed in the following table shows an expanded IPv6 Global Unicast Address (GUA). For each problem, find these values:
- The abbreviated version of the GUA
- The expanded prefix ID, assuming a /64 prefix length
- The abbreviated prefix ID
Question Set:
Problem # | Expanded GUAs |
1 | 2001:0db8:1234:009F:0200:defe:0002:1000 |
2 | 2001:0db8:bade:0200:1001:00a0:00b0:0000 |
3 | 3000:00ba:0000:0000:1001:00a0:00b0:0000 |
4 | 3000:00ba:0000:000a:1001:0000:0000:0000 |
5 | 2001:0db8:bade:0000:1001:0000:0000:0dad |
Lab Answers Below: Spoiler Alert
Click the tabs below to see the answer to each problem.
Answers
Answer: Problem 1
Value | |
Expanded GUA | 2001:0db8:1234:009F:0200:defe:0002:1000 |
Abbreviated GUA | 2001:db8:1234:9F:200:defe:2:1000 |
Expanded Prefix | 2001:0db8:1234:009F:0000:0000:0000:0000/64 |
Abbreviated Prefix | 2001:db8:1234:9F::/64 |
Answer: Problem 2
Value | |
Expanded GUA | 2001:0db8:bade:0200:1001:00a0:00b0:0000 |
Abbreviated GUA | 2001:db8:bade:200:1001:a0:b0:0 |
Expanded Prefix | 2001:0db8:bade:0200::/64 |
Abbreviated Prefix | 2001:db8:bade:200::/64 |
Answer: Problem 3
Value | |
Expanded GUA | 3000:00ba:0000:0000:1001:00a0:00b0:0000 |
Abbreviated GUA | 3000:ba::1001:a0:b0:0 |
Expanded Prefix | 3000:00ba:0000:0000:0000:0000:0000:0000/64 |
Abbreviated Prefix | 3000:ba::/64 |
Answer: Problem 4
Value | |
Expanded GUA | 3000:00ba:0000:000a:1001:0000:0000:0000 |
Abbreviated GUA | 3000:ba:0:a:1001:: |
Expanded Prefix | 3000:00ba:0000:000a:0000:0000:0000:0000/64 |
Abbreviated Prefix | 3000:ba:0:a::/64 |
Answer: Problem 5
Value | |
Expanded GUA | 2001:0db8:bade:0000:1001:0000:0000:0dad |
Abbreviated GUA | 2001:db8:bade:0:1001::dad |
Expanded Prefix | 2001:0db8:bade:0000:0000:0000:0000:0000 |
Abbreviated Prefix | 2001:db8:bade::/64 |
wouldnt problem 2’s abbreviated GUA be 2001:db8:bade:200:1001:a0:b0:: instead of
2001:db8:bade:200:1001:a0:b0:0
rfc 4291 2.2.2 says:
‘The “::” can also be used to compress leading or trailing zeros in an address.’
The short answer is no, it’s only for 2 or more consecutive all 0s quartets that are correctly abbreviated to ::. See RFC 5952 section 4.2. So all the examples you asked about are correct as is.
thank you so much for the pointer to the RFC with clarifications…
i very much appreciate it.
You’re quite welcome, Jack.