Quick Note on IPv6 Addresses:

UK2 - started followed you
2 min readMay 14, 2024

In IPv6, addresses are expressed using hexadecimal notation to make them more compact. IPv6 addresses are 128 bits long, compared to the 32-bit length of IPv4 addresses. These 128 bits are divided into eight groups of 16 bits each. Each 16-bit block is then converted into a 4-digit hexadecimal number, separated by colons.

Understanding IPv6 Subnetting

Just like with IPv4, subnetting in IPv6 involves dividing the network into smaller parts. However, because IPv6 uses 128 bits, the notation and methodology can handle a much larger address space.

Example of IPv6 Address and Subnet Mask

An example IPv6 address might look like this:

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

The subnet mask in IPv6 is often referred to as a prefix length and follows the address after a slash. For instance, 2001:0db8:85a3::/64 indicates that the first 64 bits of the address are the network part, which leaves the remaining 64 bits for host addresses.

How to Calculate

In IPv6, each hexadecimal digit represents 4 bits. A full group of four hexadecimal digits represents 16 bits (since 4 hex digits × 4 bits each = 16 bits). Therefore, if you have a prefix like /64, it means the first 64 bits are used for network identification, which corresponds to the first four hexadecimal groups in the IPv6 address.

Here’s how you’d break down a typical IPv6 subnet:

  • Network Prefix: The first part of the address up to the specified prefix length (e.g., /64).
  • Subnet ID and Interface ID: The bits following the prefix can be used for subnetting and identifying individual interfaces.

Applying This in Practical Terms

When dealing with IPv6:

  1. Identify the Prefix Length: Determine how many of the leading bits are used for the network prefix. This is directly indicated in the address notation (e.g., /64).
  2. Convert Hexadecimal to Binary (if necessary): To deeply understand the division between the network and host parts, you may convert the hexadecimal sections to binary. Each hex digit corresponds to 4 binary bits.
  3. Determine Subnetting: Decide how you want to allocate bits for subnets within the network portion if needed.

IPv6’s use of hexadecimal and larger address space makes it well-suited for extensive networks, reducing the need for techniques like NAT (Network Address Translation) used in IPv4, and simplifying the management of IP addresses.

--

--

UK2 - started followed you

Cybersecurity Enthusiast | NetEng | Not a writer - Currently working on getting certified