Learning how to write and read IPv6 addresses, and understanding their format, is foundational skill necessary for diving into an IPv6 course. This is what we will discuss in thsi section.

Table of Contents

Obviously, the configuration for different device types is different.

Let’s commit the configuration changes.

Undrestanding IPv6 Address Format

IPv6 Address Size Compare to IPv4

As you know, IPv4 addresses are 32-bit and offer a limited number of addresses. To resolve this limitation, IPv6 was introduced with a 128-bit format, vastly expanding the number of available addresses.

In IPv4, addresses are presented as four decimal numbers ranging from 0 to 255, separated by point (e.g., 192.168.1.1).

In contrast, IPv6 addresses use eight groups of hexadecimal numbers, ranging from 0000 to ffff, separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

IPv4 Example: 192.168.1.1
IPv6 Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

IPv6 Address components compare to IPv4

Each IPv4 address is divided into two parts: the network portion and the host portion. The network portion identifies the specific network or subnet, which is shared by all devices within that subnet. The host portion identifies individual devices within that network, providing a unique address for each device in the subnet.

The subnet mask is used to differentiate these parts. It specifies how many bits of the IP address are allocated for the network and which are allocated for the host.

IPv6 address format compare to IPv4 format
IPv6 address format compare to IPv4 format

For example, consider the IP address 192.168.1.10 with a subnet mask of 255.255.255.0 (/24). The subnet mask indicates that the first 24 bits (represented by 255.255.255 or /24) are used for the network portion, while the remaining 8 bits are used for the host portion.

The same concept applies to IPv6, but with different terminology. In IPv6:

  • Network Portion is referred to as the Prefix.

  • Host Portion is known as the Interface Identifier.

  • Subnet Mask is replaced by Prefix Length.

IPv6 Abbreviation Rules

As you can see it is a little difficult to write IPv6 addresses. Writing IPv6 Address can be simplified by applying two rules: removing leading zeros and using zero compression. Here’s how these rules work:

Rule 1: Remove Leading Zeros

You can omit any leading zeros in each segment of the IPv6 address to shorten it.

Example:

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

  • Shortened: 2001:db8:85a3:0:0:8a2e:370:7334

Rule 2: Zero Compression

Consecutive sections of zeros can be replaced with a double colon (::). This can be done only once in an address to avoid confusion.

Example:

  • Original: 2001:db8:0:0:0:0:2:1

  • Compressed: 2001:db8::2:1

IPv6 Address Abbreviation Examples:

Here there are some other examples:

Example 1

  • Original: 2001:0db8:0000:0000:0000:0000:1428:57ab

  • Step 1 (Remove leading zeros): 2001:db8:0:0:0:0:1428:57ab

  • Step 2 (Zero compression): 2001:db8::1428:57ab

Example 2

  • Original: 2001:0db8:0000:0042:0000:8a2e:0370:7334

  • Step 1 (Remove leading zeros): 2001:db8:0:42:0:8a2e:370:7334

  • Step 2 (Zero compression): 2001:db8:0:42::8a2e:370:7334

Example 3

  • Original: fe80:0000:0000:0000:0202:b3ff:fe1e:8329

  • Step 1 (Remove leading zeros): fe80:0:0:0:202:b3ff:fe1e:8329

  • Step 2 (Zero compression): fe80::202:b3ff:fe1e:8329

Important Note

The :: notation should only be used once in an IPv6 address to avoid ambiguity. When there are multiple possible places to use ::, apply it to the longest run of zero segments to achieve the shortest possible address.

By following these two rules, you can significantly simplify the representation of IPv6 addresses, making them easier to write, read, and manage

Back to: IPv6 (in progress) > IPv6 header and address format

Leave a Reply

Your email address will not be published. Required fields are marked *


Post comment