Skip to content
Hopfluent

Free tool

IPv6 subnet calculator

Type an IPv6 address and prefix length. You get the network prefix, the range, both written forms, how it splits into smaller subnets, and what kind of address it is.

Format: address/prefix. Any valid spelling works, compressed or in full.

Try

Network and host bits

Each digit is four bits. The first 64 bits (painted) are the prefix; the other 64 identify the interface.

Network prefix 2001:db8:abcd:12::/64. Addresses in this prefix 2^64 (about 1.84 × 10^19).

Network prefix
First address
Last address
Compressed (RFC 5952)
Expanded
Addresses in this prefix
Address type
Solicited-node multicast
Reverse DNS name

Split this /64

/68

16 subnets of /68, each with 2^60 (about 1.15 × 10^18) addresses.

  1. 12001:db8:abcd:12::/68
  2. 22001:db8:abcd:12:1000::/68
  3. 32001:db8:abcd:12:2000::/68
  4. 42001:db8:abcd:12:3000::/68
  5. 52001:db8:abcd:12:4000::/68
  6. 62001:db8:abcd:12:5000::/68
  7. 72001:db8:abcd:12:6000::/68
  8. 82001:db8:abcd:12:7000::/68
  9. last2001:db8:abcd:12:f000::/68

How to read the result

An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits. The prefix length after the slash says how many of those bits identify the network. In the digit view those bits are painted blue; everything to the right identifies one interface on that network.

  • Network prefix: your address with every bit after the prefix set to 0. It names the whole block.
  • First and last address: the two ends of the block. Unlike IPv4, neither is reserved as a network or broadcast address.
  • Compressed and expanded: the same address in its shortest standard spelling and with nothing left out.
  • Solicited-node multicast: the group a neighbor sends to when it needs this address's hardware address. It is built from the last 24 bits of the address (RFC 4291 section 2.7.1).
  • Reverse DNS name: the name a reverse lookup asks for, made of all 32 digits in reverse order under ip6.arpa (RFC 3596).

Subnetting IPv6 by hand

Because each hexadecimal digit is exactly four bits, IPv6 subnetting is easiest when prefixes end on a digit boundary: /48, /52, /56, /60, /64. Take 2001:db8:abcd::/48. The first 48 bits, three groups, are fixed. The fourth group is yours to number subnets with, and a /64 uses all of it: 2001:db8:abcd:0::/64, 2001:db8:abcd:1::/64, and so on up to 2001:db8:abcd:ffff::/64. That is 65,536 subnets, counted in hexadecimal.

To split into /56 blocks instead, only the first two digits of the fourth group belong to the prefix: 2001:db8:abcd:0000::/56, 2001:db8:abcd:0100::/56, 2001:db8:abcd:0200::/56. Each of those holds 256 subnets of /64.

The addresses used on this page come from 2001:db8::/32, the block reserved for examples and documentation (RFC 3849). It is never routed on the Internet.

IPv6 addressing questions

How do I shorten an IPv6 address?+

Two rules. First, drop the leading zeros in every group, so 0db8 becomes db8 and 0000 becomes 0. Second, replace the longest run of two or more all-zero groups with a double colon, once only. If two runs tie, shorten the first. Write the letters in lowercase. That is the canonical form defined in RFC 5952, and it is what this calculator prints.

Why is almost every IPv6 subnet a /64?+

The addressing architecture gives the last 64 bits to the interface identifier, and automatic address configuration (SLAAC) depends on it: a host builds its own address from a 64-bit prefix announced by the router plus a 64-bit identifier it generates itself (RFC 4291 section 2.5.1, RFC 4862). Subnets longer than /64 are used on purpose in a few places, such as a /127 on a link between two routers (RFC 6164).

How many addresses are in a /64?+

2 to the power of 64, which is 18,446,744,073,709,551,616. That is the entire IPv4 Internet, squared. The size is not there to be filled; it is there so that an identifier can be chosen at random with no realistic chance of a clash.

How many /64 subnets are in a /48 or a /56?+

Subtract the prefix lengths and raise 2 to that power. A /48 holds 2 to the power of 16, which is 65,536 subnets of /64. A /56 holds 2 to the power of 8, which is 256. A /48 is a common allocation for a site and a /56 for a home connection.

Is there a broadcast address in IPv6?+

No. IPv6 has no broadcast at all. Where IPv4 would broadcast, IPv6 sends to a multicast group, such as ff02::1 for all nodes on the link, so only the devices that need the message process it. Every address in a prefix, including the first and the last, is an ordinary address; the first one doubles as the subnet-router anycast address (RFC 4291 section 2.6.1).

What is the difference between fe80, fd00 and 2001 addresses?+

An address starting fe80 is link-local: every interface has one, and it only works on the local link. An address in fc00::/7 (in practice, starting fd) is a unique local address, the IPv6 counterpart of private IPv4 space, usable inside a site but not routed on the Internet (RFC 4193). Addresses in 2000::/3, which includes everything starting 2001, are global unicast addresses.