Practical guide

IPv6 subnetting: prefixes, ranges, and address counts

Learn how IPv6 prefix lengths define network boundaries and address ranges, with /64 and /128 examples and a subnet calculator.

By StackCalcs · Updated

IPv6 uses a 128-bit address. CIDR prefix notation marks how many leading bits identify a network: /64 fixes 64 bits and leaves 64 bits for addresses inside that prefix. This guide explains the arithmetic behind the IPv6 subnet calculator.

IPv6 prefix formulas

Unlike common IPv4 subnet conventions, IPv6 does not use a broadcast address. The range therefore includes every address in the prefix; this arithmetic does not decide which addresses an operating system or provider assigns for a particular purpose.

Worked /64 example

For 2001:db8:1234::1/64, the first 64 bits define the network, so the canonical network prefix is 2001:db8:1234::/64. It contains 2^64, or 18,446,744,073,709,551,616 addresses, from 2001:db8:1234:: through 2001:db8:1234::ffff:ffff:ffff:ffff.

A /128 contains one address. A /0 covers the full IPv6 address space. The IPv6 subnet calculator accepts compressed and full hexadecimal notation and displays the network, mask, range, and count.

Reading compressed IPv6 addresses

IPv6 permits leading zeros in a 16-bit group to be omitted. One contiguous run of zero groups can be written as ::; that marker can appear only once because it stands for one or more groups. For consistent display, this guide and calculator use lowercase hexadecimal, omit leading zeros, and compress the longest zero run, following RFC 5952.

Sources and limits

The 128-bit address architecture is defined in RFC 4291, and canonical text display is described in RFC 5952. Prefix arithmetic gives the size of a block; it does not validate a route, delegation, provider policy, or host assignment.

Official sources

Related calculators

Continue reading