Skip to tool
ecech.
🌐 Network & IP

In IPv6 the Mistake Is Trying to Save Addresses

A /48 gives 65,536 subnets and every one of them should be a /64. Subnetting smaller breaks the autoconfiguration that hosts rely on.

Subnets

Bits borrowed

Addresses each

SLAAC works?

The subnets

The prefix lengths that matter

Advertisement

How the calculation works

128 bits, and where they go routing, /0–/48 your subnets interface, 64 bits bit 0 48 64 128 A /48 leaves 16 bits for subnets — 65,536 of them, all /64. Each /64 holds 1.845 × 10¹⁹ addresses, 4.29 billion IPv4 internets. Subnet past bit 64 and SLAAC stops working. Space was never the problem.

How to Use This Tool

Enter an allocation and choose how finely to split it. In almost every case the answer you want is /64, and the tool will say so.

The arithmetic is trivial

Each additional bit of prefix doubles the number of subnets, so going from /48 to /64 borrows 16 bits and produces 216 = 65,536 subnets. From /56 to /64 is 8 bits, so 256. There is no equivalent of the network and broadcast addresses to subtract, and no usable-host arithmetic, because you never run out of hosts.

A /64 contains 264 addresses — roughly 1.845 × 1019. That is 4.29 billion times the entire IPv4 address space, in one subnet, and it is the standard size for a single link whether it holds three devices or three thousand.

Do not subnet past /64

This is the one rule that catches people arriving from IPv4, where conserving addresses is a virtue.

Stateless address autoconfiguration — the mechanism by which a host generates its own address from the router advertisement — assumes exactly 64 interface identifier bits. Use a /112 or a /120 on a link and hosts cannot autoconfigure. The failure is not obvious: some devices fall back to DHCPv6, some do not, and the symptom looks like a server problem rather than a prefix-length problem.

The recognised exception is a point-to-point link between two routers you administer, where a /127 is explicitly recommended to avoid a particular neighbour-discovery attack. That is deliberate, documented, and nothing to do with saving space.

How many /64 subnets an allocation gives /32 — an ISP 4,294,967,296 /48 — a typical site 65,536 /56 — a home, often 256 /64 — one link 1 enough for most organisations enough for any house If you feel short of subnets, ask for a shorter prefix rather than a longer one.
Requesting a /48 instead of a /56 costs the provider nothing worth counting.

How to lay out the bits you have

With 16 subnet bits from a /48 there is no pressure to pack anything, so use the space to make the addresses readable:

  • Give a nibble to each level. One hexadecimal digit is four bits and sixteen values. Assigning one digit to the site, one to the building and two to the VLAN makes a prefix self-documenting at a glance.
  • Align to a nibble boundary — /52, /56, /60, /64. A /61 is legal and turns every prefix into a bit-counting exercise for whoever reads the routing table next.
  • Match the VLAN number where you can. VLAN 30 in 2001:db8:abcd:30::/64 removes an entire class of documentation error.
  • Leave gaps. Sparse allocation costs nothing and lets a site grow without renumbering.

What the notation is doing

Both forms shown here mean the same thing. Compressed notation drops leading zeros in each group and replaces one run of all-zero groups with ::, which may appear only once in an address — otherwise the expansion would be ambiguous.

Comparing addresses as text is therefore unreliable, because 2001:db8:0:0:0:0:0:1 and 2001:db8::1 are the same address written two ways. Normalise before comparing, and prefer the compressed form in documentation since it is what everything displays.

Advertisement

Frequently Asked Questions

How many subnets are in a /48?
65,536 /64 subnets. Each extra bit of prefix doubles the count, and /48 to /64 borrows 16 bits, so 2^16. From a /56 you get 256.
Why should every IPv6 subnet be a /64?
Because stateless address autoconfiguration assumes exactly 64 interface bits. A longer prefix stops hosts configuring themselves, and the failure is confusing — some devices fall back to DHCPv6 and some do not, so it looks like a server fault.
Can I use a /112 to save addresses?
You can, and there is nothing to save. A single /64 already holds 1.845 × 10^19 addresses, and using anything longer breaks autoconfiguration. The one accepted exception is a /127 on a router-to-router point-to-point link, which is recommended for a specific security reason rather than for space.
How many addresses are in a /64?
2^64, about 1.845 × 10^19 — roughly 4.29 billion times the whole IPv4 address space, in a single subnet. That is why host counts never enter IPv6 subnet planning.
Should I ask my ISP for a /48 or a /56?
A /48 if you can get one: it gives 65,536 subnets against 256, and costs the provider nothing meaningful. A /56 is plenty for a home. If you ever feel short of subnets, the answer is a shorter prefix, never a longer one on the links.
Why align subnets to a nibble boundary?
Because one hexadecimal digit is four bits, so /52, /56, /60 and /64 land on digit boundaries and can be read at a glance. A /61 is perfectly legal and forces anyone reading the routing table to count bits.

Related tools in Network & IP

Browse all Network & IP tools
The person who builds ecech., at the desk where the tools are written.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.