askvity

What is the Format of an IPv6 Address?

Published in IPv6 Addressing 2 mins read

An IPv6 address is represented as eight groups of four hexadecimal digits, separated by colons.

IPv6 addresses are 128-bit addresses. The preferred format is: x:x:x:x:x:x:x:x where each 'x' represents a 16-bit hexadecimal value. This results in addresses that range from 0000:0000:0000:0000:0000:0000:0000:0000 to ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff.

Here's a breakdown:

  • 128-bit Address Space: IPv6 uses a 128-bit address, significantly expanding the available address space compared to IPv4 (32-bit).
  • Hexadecimal Representation: Each 16-bit section is written in hexadecimal (base-16). This allows for a more compact representation than binary.
  • Colon-Hexadecimal Notation: The eight groups of hexadecimal numbers are separated by colons (:).

Example of a valid IPv6 address:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Rules for Shortening IPv6 Addresses:

To make IPv6 addresses more manageable, two rules are commonly applied:

  1. Leading Zero Suppression: Leading zeros within each 16-bit group can be omitted. For example, 0042 can be shortened to 42.
  2. Double Colon (::) for Zero Compression: A single double colon (::) can be used to represent one or more consecutive groups of all-zero (0000) segments. This can only be used once in an address to avoid ambiguity.

Example of a shortened IPv6 address (based on the previous example):

2001:db8:85a3::8a2e:370:7334 (compressing the four zero groups into "::")

These shortening rules help simplify the representation and readability of IPv6 addresses.

Related Articles