Skip to main content

IPv6 Subnet Calculator and Prefix Planner (/48, /56, /64)

Expand and compress IPv6 addresses per RFC 5952, calculate network prefix boundaries, /64 SLAAC subnet counts, and child prefix blocks.

Input Parameters

Try Example:

Calculation Results

inputAddress
2001:db8:abcd:12::1
prefix
48
compressed
2001:db8:abcd:12::1
expanded
2001:0db8:abcd:0012:0000:0000:0000:0001
networkCidr
2001:db8:abcd::/48
networkCompressed
2001:db8:abcd::
networkExpanded
2001:0db8:abcd:0000:0000:0000:0000:0000
firstAddress
2001:db8:abcd::
lastAddress
2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
lastExpanded
2001:0db8:abcd:ffff:ffff:ffff:ffff:ffff
prefixMaskCompressed
ffff:ffff:ffff::
prefixMaskExpanded
ffff:ffff:ffff:0000:0000:0000:0000:0000
hostBits
80
totalAddressesFormatted
1.208.925.819.614.629.174.706.176
totalAddressesPower
2^80
subnets64Count
65.536
subnets64Power
2^16
addressType
Documentation (2001:db8::/32)
reverseDnsArpa
d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
childPrefix
64
childSubnetCountFormatted
65.536
childSubnetCountPower
2^16
#Child PrefixFirst AddressLast Address/64 Subnets
12001:db8:abcd::/642001:db8:abcd::2001:db8:abcd:0:ffff:ffff:ffff:ffff1
22001:db8:abcd:1::/642001:db8:abcd:1::2001:db8:abcd:1:ffff:ffff:ffff:ffff1
32001:db8:abcd:2::/642001:db8:abcd:2::2001:db8:abcd:2:ffff:ffff:ffff:ffff1
42001:db8:abcd:3::/642001:db8:abcd:3::2001:db8:abcd:3:ffff:ffff:ffff:ffff1
52001:db8:abcd:4::/642001:db8:abcd:4::2001:db8:abcd:4:ffff:ffff:ffff:ffff1
62001:db8:abcd:5::/642001:db8:abcd:5::2001:db8:abcd:5:ffff:ffff:ffff:ffff1
72001:db8:abcd:6::/642001:db8:abcd:6::2001:db8:abcd:6:ffff:ffff:ffff:ffff1
82001:db8:abcd:7::/642001:db8:abcd:7::2001:db8:abcd:7:ffff:ffff:ffff:ffff1

How to Use This Tool

  1. Enter an IPv6 address (for example 2001:db8:abcd:12::1) or a full CIDR notation (for example 2001:db8:abcd::/48) into the address input.
  2. Select the parent prefix length (such as /32 for ISP allocations, /48 for enterprise sites, /56 for branch offices, or /64 for a single LAN).
  3. Choose a target child prefix length (such as /64 or /56) to compute the number of child subnets and inspect the first 8 boundary-aligned blocks.

Worked Example: Enterprise Site /48 → /64 (2001:db8:abcd::/48)

Computed example: Site allocation 2001:db8:abcd::/48 (expanded: 2001:0db8:abcd:0000:0000:0000:0000:0000) spans 2001:db8:abcd:: through 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff (2^80 = 1.208.925.819.614.629.174.706.176 addresses) and yields 65.536 standard /64 SLAAC subnets (Documentation (2001:db8::/32)).

Example Input
{
  "address": "2001:db8:abcd::1",
  "prefix": 48,
  "childPrefix": "64"
}
Calculated Output
inputAddress:
2001:db8:abcd::1
prefix:
48
compressed:
2001:db8:abcd::1
expanded:
2001:0db8:abcd:0000:0000:0000:0000:0001
networkCidr:
2001:db8:abcd::/48
networkCompressed:
2001:db8:abcd::
networkExpanded:
2001:0db8:abcd:0000:0000:0000:0000:0000
firstAddress:
2001:db8:abcd::
lastAddress:
2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
lastExpanded:
2001:0db8:abcd:ffff:ffff:ffff:ffff:ffff
prefixMaskCompressed:
ffff:ffff:ffff::
prefixMaskExpanded:
ffff:ffff:ffff:0000:0000:0000:0000:0000
hostBits:
80
totalAddressesFormatted:
1.208.925.819.614.629.174.706.176
totalAddressesPower:
2^80
subnets64Count:
65.536
subnets64Power:
2^16
addressType:
Documentation (2001:db8::/32)
reverseDnsArpa:
d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
childPrefix:
64
childSubnetCountFormatted:
65.536
childSubnetCountPower:
2^16

Core Concept & Engineering Notes

IPv6 addressing uses 128-bit identifiers written as eight 16-bit hexadecimal groups (hextets) separated by colons, as defined in RFC 4291. Because writing all 32 hexadecimal digits is error-prone during daily operations, RFC 5952 specifies a canonical compressed text representation: leading zeros within each hextet are removed, and the single longest consecutive run of all-zero hextets is collapsed into a double colon (::). Unlike IPv4, where engineers slice blocks down to tight host counts (/27, /28, /29) to conserve scarce addresses, IPv6 subnetting is designed around nibble boundaries (multiples of 4 bits) and a universal /64 LAN subnet size. Under RFC 4291 and RFC 4862, every end-user VLAN or wireless segment should be assigned a /64 prefix so Stateless Address Autoconfiguration (SLAAC) can operate reliably using a 64-bit Interface Identifier (IID). Regional Internet Registries (RIRs) and ISPs typically assign a /32 to service providers, a /48 to each enterprise site or data center, and a /56 to smaller branch or residential sites. A single /48 site prefix contains 2^(64 - 48) = 65,536 individual /64 subnets, while a /56 prefix provides 256 /64 subnets. This hierarchy allows network architects to allocate subnets cleanly along four-bit hex boundaries per building, floor, or security zone. For point-to-point router interconnects, RFC 6164 recommends configuring a /127 prefix (the IPv6 equivalent of RFC 3021 /31 in IPv4) to prevent Neighbor Discovery cache exhaustion and ping-pong routing loops, while reserving the underlying /64 block in the address plan. Beyond routable Global Unicast Addresses (GUA, 2000::/3), IPv6 defines Unique Local Addresses (ULA, fc00::/7 and fd00::/8 per RFC 4193) for private internal routing, Link-Local addresses (fe80::/10) required on every active interface for Neighbor Discovery Protocol (NDP) and routing protocols, Multicast (ff00::/8) which replaces IPv4 broadcast, and the reserved documentation prefix 2001:db8::/32 per RFC 3849.

How It Was Calculated (Formulas & Steps)

Frequently Asked Questions (FAQ)

Why should every end-user IPv6 LAN use a /64 prefix?

IETF standards (RFC 4291 and RFC 4862) split a 128-bit IPv6 address into a 64-bit network prefix and a 64-bit Interface Identifier (IID). Stateless Address Autoconfiguration (SLAAC) requires a 64-bit IID; prefixes longer than /64 break SLAAC on operating systems that do not support DHCPv6.

How many /64 subnets are inside a /48 or /56 prefix?

A /48 prefix provides 2^(64-48) = 2^16 = 65,536 individual /64 subnets. A /56 prefix provides 2^(64-56) = 2^8 = 256 individual /64 subnets.

What is the difference between GUA, ULA, and Link-Local IPv6 addresses?

Global Unicast Addresses (GUA, 2000::/3) are publicly routable on the global internet. Unique Local Addresses (ULA, fc00::/7, typically fd00::/8) are private addresses for internal networks similar to RFC 1918 in IPv4. Link-Local addresses (fe80::/10) are valid only on a single L2 link and are mandatory for Neighbor Discovery.

What prefix length should be used for router-to-router point-to-point links?

RFC 6164 recommends using a /127 prefix on point-to-point router links to prevent Neighbor Discovery exhaustion attacks, while reserving a full /64 out of your address plan so no other interface shares that /64 boundary.

References & Notes

Last updated: Content Status: Draft (Pending Editorial Review)

Note: Results above are mathematical estimates based on standard formulas. Always verify against official vendor documentation and site conditions before production deployment.