Computer Networking Basics

Which correctly shortens the IPv6 address 2001:0db8:0000:0000:0000:0000:0000:0001 according to the abbreviation rules?

  1. A2001:db8:1
  2. B2001:db8::1
  3. C2001:db8::0::1
Show answer and explanation

Answer: B. 2001:db8::1

An IPv6 address is 128 bits long (IPv4 is 32 bits), divided into eight 16-bit groups, each written as four hexadecimal digits. There are two abbreviation rules: leading zeros in each group can be dropped (0db8→db8, 0001→1), and one run of consecutive all-zero groups can be replaced with "::" once. Here the five zero groups from the third to the seventh collapse to give 2001:db8::1. Using "::" twice is not allowed because it would be ambiguous how many zero groups each one stands for. "2001:db8:1" has only three groups and lacks the "::" that marks omitted zero groups, so it is not a valid form of this address.

  • A. Omitted zero groups must be marked with "::"; this has only three groups and is invalid.
  • B. Correct. Drop leading zeros and collapse the run of zero groups into one "::".
  • C. "::" may be used only once.
Practice this topic Back to topic

Related calculators

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Computer Networking Basics questions

  1. A host has IP address 192.168.1.10 and subnet mask 255.255.255.0. What is the network address of the network it belongs to?
  2. In the network 192.168.5.0/26, how many IP addresses can be assigned to hosts (end devices or router interfaces)?
  3. A host has IP address 192.168.10.77/27. What is the broadcast address of its subnet?
  4. You want to fit 500 hosts in one subnet. Of the subnets that can do this, which is the smallest (has the longest prefix)?
  5. Which subnet mask is equivalent to /20 in CIDR notation?