Question

Difficulty: MediumIPv6 Addressing Concepts and Header Structure

A network administrator is documenting a public web server's full 128-bit IPv6 address, which is written as 2001:0db8:0000:0042:0000:0000:0000:0001. To ensure consistent configuration across system records, the administrator needs to condense this address using standard zero-compression rules. Which of the following represents the correctly compressed IPv6 address according to RFC 5952 standards?

  1. A
    2001:db8::42::1
  2. 2001:db8:0:42::1Answer
  3. C
    2001:db8::42:0:0:0:1
  4. D
    2001:db8:0000:0042::1

Answer

2001:db8:0:42::1 is the correctly compressed IPv6 address according to RFC 5952 guidelines.
According to RFC 5952 IPv6 representation standards: 1) Leading zeros in any hexadecimal field must be removed (e.g., 0db8 becomes db8, 0042 becomes 42, 0001 becomes 1). 2) The double-colon (::) symbol must be used to compress the longest contiguous sequence of zero fields (positions 5–7). 3) Single zero fields outside the double-colon sequence must be represented as a single '0'. Therefore, 2001:db8:0:42::1 is the only valid, standard-compliant compressed form.

Step-by-Step Solution

1
Remove leading zeros from each 16-bit hexadecimal field.
2001:0db8 becomes 2001:db8, 0000 becomes 0, 0042 becomes 42, and 0001 becomes 1.
RFC 5952 requires leading zeros in any four-digit hexadecimal group to be omitted.
2
Identify all contiguous runs of zero fields and locate the longest sequence.
The address contains two zero sequences: one single zero field at position 3 (0), and a contiguous run of three zero fields at positions 5, 6, and 7 (0000:0000:0000).
The double-colon (::) must be used to replace the longest contiguous run of 16-bit zero fields.
3
Replace the longest run of zero fields with a single double-colon (::) and keep single zero fields as '0'.
The sequence 0000:0000:0000 becomes ::, resulting in 2001:db8:0:42::1.
Using :: more than once creates ambiguity regarding how many zero fields were compressed.

Key Concept

IPv6 Address Compression and Canonical Representation (RFC 5952)
Estimated Time:1m 0s
Rate this question