Question

Difficulty: MediumIPv6 Addressing Concepts and Header Structure

A network administrator is manually configuring a static IPv6 default route on a router and needs to enter the compressed representation of the full 128-bit address 2001:0db8:0000:0000:0000:0ab0:0000:0012. Which of the following is the correct shorthand representation following standard RFC 5952 IPv6 address compression rules?

  1. 2001:db8::ab0:0:12Answer
  2. B
    2001:db8::ab0::12
  3. C
    2001:db8:0000:0000:0000:ab0::12
  4. D
    2001:0db8::ab0:0000:12

Answer

2001:db8::ab0:0:12
The format 2001:db8::ab0:0:12 complies with standard RFC 5952 IPv6 compression rules by stripping leading zeros from each field (0db8 to db8, 0ab0 to ab0, 0012 to 12) and compressing the longest contiguous sequence of 16-bit zero fields (three blocks) using a single double colon (::).

Step-by-Step Solution

1
Suppress leading zeros in each 16-bit hexadecimal field.
2001:0db8 becomes 2001:db8, 0ab0 becomes ab0, 0000 becomes 0, and 0012 becomes 12.
RFC 5952 requires leading zeros within a 16-bit field to be omitted.
2
Locate contiguous runs of zero fields and identify the longest run.
The three contiguous zero fields (0000:0000:0000) between 0db8 and 0ab0 form the longest run.
The double colon (::) must be used to replace the longest run of consecutive 16-bit zero fields.
3
Replace the longest run of zero fields with a single double colon (::).
2001:db8::ab0:0:12
The double colon can only be used once per IPv6 address to prevent parsing ambiguity.

Key Concept

IPv6 Address Compression Rules (RFC 5952)
Rate this question