A network engineer is documenting the IPv6 address allocation for an enterprise router interface. The fully expanded, uncompressed address assigned to the interface is 2001:0db8:0000:0042:0000:0000:0000:0007. According to RFC 5952 rules, what is the correctly compressed and canonicalized representation of this IPv6 address?
Answer: 2001:db8:0:42::7
Answer
2001:db8:0:42::7
According to RFC 5952 standards for IPv6 address canonicalization: 1) Leading zeros within each 16-bit field must be removed (0db8 -> db8, 0042 -> 42, 0007 -> 7). 2) A single all-zero field is written as 0. 3) The double-colon (::) must be used to compress the longest contiguous sequence of all-zero fields. In this address, the sequence of three zeros (0000:0000:0000) is longer than the single zero field, making 2001:db8:0:42::7 the only correct canonical compressed address.
Step-by-Step Solution
Key Concept
RFC 5952 IPv6 Address Compression and Canonical Representation