How to use the ipv6 subnet planner
- Type an IPv6 prefix with its length, such as 2001:db8:abcd::/48. Full, shortened and upper case spellings are all accepted.
- Enter the length of the subnets you want to cut it into. It must be as long as the prefix length or longer, and at most 128.
- Choose how many subnets to list (1 to 256) and which number to start at, counting from 0.
- Read the count of subnets, the number of addresses in each one and the table of first and last addresses.
Formula
subnets = 2^(new length - prefix length)
addresses in each subnet = 2^(128 - new length)
subnet n starts at prefix + n x 2^(128 - new length)
The address is treated as a 128-bit number, so every step is exact even when there are far more subnets than a computer could list.
A /48 cut into /64 subnets
A site with 2001:db8:abcd::/48 has 2^(64 - 48) = 65,536 subnets of length /64. Each holds 2^64 = 18,446,744,073,709,551,616 addresses.
Subnet 0 is 2001:db8:abcd::/64, which runs to 2001:db8:abcd:0:ffff:ffff:ffff:ffff, and subnet 1 is 2001:db8:abcd:1::/64. The last address of subnet 0 is written with a lone 0 group because a single zero group is never shortened.
Writing IPv6 addresses the standard way
The compressed form follows RFC 5952: letters in lower case, no leading zeros in a group, and the longest run of two or more zero groups replaced by a double colon (the first run if two tie). A single zero group is left as 0. The page also shows the expanded form with all eight groups of four digits.
An address typed with host bits set, such as 2001:db8::ff/32, is accepted and the extra bits are cleared, with a note so you can see what was done.
Planning with /64 subnets
Most IPv6 networks use /64 for each segment, because several features expect that size. A home or small site often gets a /56 or /48, giving 256 or 65,536 segments. For IPv4 planning use the Subnet Calculator and the VLSM Subnet Planner, and to merge ranges use the CIDR Aggregator.
Assumptions and limits
- The prefix is a standard IPv6 address followed by a slash and a length from 0 to 128.
- All subnets have the same length. Mixed sizes need a separate plan for each size.
- Zone identifiers such as %eth0 are not accepted, and a dotted IPv4 ending is read as the last 32 bits.
- At most 256 subnets are written out at a time; the starting number can be as large as 9,007,199,254,740,991.
- Reserved ranges, such as the documentation prefix 2001:db8::/32 used in the example, are treated like any other.
Frequently asked questions
Why does the page say the prefix was changed?
Bits after the prefix length belong to hosts, not to the network. The page clears them so the prefix is the true start of the block, and tells you when it did.
How many addresses is a /64?
2^64, which is 18,446,744,073,709,551,616. That is 4 billion times the whole IPv4 address space.
Can I split into subnets smaller than /64?
Yes, up to /128. The page does the arithmetic for any length, but many networks need /64 for automatic addressing to work.
Why are some last addresses written with a single 0?
The standard says a double colon must replace at least two groups, so a lone zero group stays as 0.