Question

Difficulty: HardIPv6 Addressing Concepts and Header Structure

A network engineer is reviewing an automated provisioning script designed to format IPv6 addresses according to standard canonical representation rules (RFC 5952). The script receives the full 128-bit IPv6 address `2001:0db8:0000:0000:0042:0000:0000:0015`. Which of the following represents the correctly compressed canonical IPv6 address?

  1. 2001:db8::42:0:0:15Answer
  2. B
    2001:db8::42::15
  3. C
    2001:db8:0:0:42::15
  4. D
    2001:0db8::0042:0:0:0015

Answer

The correctly compressed canonical IPv6 address is 2001:db8::42:0:0:15.
The address '2001:db8::42:0:0:15' strictly adheres to RFC 5952 guidelines by suppressing leading zeros in all hextets and using the double colon ('::') on the first of two equal-length runs of zeros.

Step-by-Step Solution

1
Suppress leading zeros in each 16-bit hextet.
The hextets '0db8', '0000', '0042', '0000', '0000', and '0015' become 'db8', '0', '42', '0', '0', and '15', yielding '2001:db8:0:0:42:0:0:15'.
RFC 5952 requires eliminating leading zeros in individual hextets to maintain canonical formatting.
2
Identify runs of consecutive all-zero hextets.
There are two distinct zero sequences of equal length: the first sequence at hextets 3–4 ('0:0') and the second sequence at hextets 6–7 ('0:0').
Double-colon ('::') compression is only applicable to consecutive all-zero hextets.
3
Apply the tie-breaking rule for equal-length zero sequences.
Compress the first '0:0' sequence into '::', leaving the second sequence written as explicit zeros: '2001:db8::42:0:0:15'.
When multiple zero sequences share the maximum length, RFC 5952 mandates that only the first sequence is replaced by '::'.

Key Concept

RFC 5952 IPv6 Address Canonical Representation and Compression Rules
Estimated Time:1m 30s
Rate this question