Skip to content

IPv6 - Subnetting

In IPv4, subnetting involved borrowing bits from the host portion of an address to create subnet bits, often reducing the number of available host addresses per subnet. This was done within classful or, more commonly, classless (CIDR) addressing schemes.

IPv6 subnetting is conceptually similar but simpler due to the vast address space and a standard /64 boundary for interface addressing. An IPv6 address is 128 bits long. Typically, the first 64 bits are the network prefix (which includes the site prefix and subnet ID), and the last 64 bits are the Interface ID (host portion).

A common scenario: An ISP assigns an organization a /48 prefix (e.g., 2001:db8:abcd::/48). This gives the organization 16 bits for subnetting (from bit 49 to bit 64) while maintaining /64s for individual subnets. This allows for 216 = 65,536 subnets, each with 264 possible interface IDs.

Visually, for a /48 allocation:

[Global Routing Prefix (48 bits)] [Subnet ID (16 bits)] [Interface ID (64 bits)] Example: |-------2001:db8:abcd-------|----0000 to FFFF----|----Interface Specific----|

The 16 bits designated for the Subnet ID allow an organization to create numerous internal networks. For example:

  • Subnet 1: 2001:db8:abcd:0001::/64
  • Subnet 2: 2001:db8:abcd:0002::/64
  • …up to…
  • Subnet 65536: 2001:db8:abcd:ffff::/64

It is strongly recommended to use /64 prefixes for all end-user subnets (links where hosts, servers, or other end devices reside). This is because Stateless Address Autoconfiguration (SLAAC) requires a /64 to function correctly, as it uses the 64-bit Interface ID. While it’s technically possible to use longer prefixes (e.g., /120) for subnets, this breaks SLAAC and complicates addressing.

For point-to-point links (links connecting just two routers), a /64 is also commonly used for simplicity and consistency, though RFC 6164 suggests /127 for security and efficiency on such links to prevent neighbor cache exhaustion attacks. However, /64 remains a very common practice even for these links.

In essence, IPv6 subnetting typically involves dividing a larger prefix (like a /48 or /56 received from an ISP) into multiple /64 subnets by utilizing the bits designated for the Subnet ID. The vastness of the 264 host addresses per /64 means there’s no practical shortage of host addresses within a subnet.