Bitzu

100-150 CCST ยท IP addressing and subnetting

IPv6 address format

128-bit hexadecimal notation, shortening rules for leading zeros and the double colon, and prefix length.

Key points

  • An IPv6 address is 128 bits written as eight groups of up to four hex digits separated by colons.
  • Shorten it by dropping leading zeros in each group (0db8 -> db8) and by replacing one run of all-zero groups with :: (only once per address).
  • Trailing zeros inside a group stay: 2000 is not 2.
  • A prefix is written address/length, for example 2001:db8:acad:1::/64.

Source: https://www.rfc-editor.org/rfc/rfc5952

Practice questions

Single choice

What is the shortest valid form of 2001:0db8:0000:0000:0000:ff00:0042:8329?

  1. 2001:db8::ff00:42:8329
  2. 2001:db8:0:0:0:ff:42:8329
  3. 2001:db8::ff::42:8329
  4. 2001:8::ff00:42:8329
Show answer

Answer: A. 2001:db8::ff00:42:8329

Drop leading zeros in every group, then replace the run of three zero groups with ::. That gives 2001:db8::ff00:42:8329.

Select all that apply

Which of these are valid IPv6 address notations?

  1. 2001:db8::1
  2. fe80::1
  3. ::1
  4. 2001::db8::1
  5. 2001:db8:g::1
Show answer

Answer: A. 2001:db8::1, B. fe80::1, C. ::1

2001:db8::1, fe80::1 and ::1 are valid. 2001::db8::1 uses :: twice and 2001:db8:g::1 contains g, which is not a hex digit.

True or false

True or false: because zeros can be dropped, the group 2000 may be shortened to 2.

Show answer

Answer: False

False. Only leading zeros in a group can be removed. In 2000 the zeros are trailing, so dropping them would change the value.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More 100-150 CCST topics in this module