- An IPv6 address is 128 bits written as 8 groups of 4 hex digits.
- LANs are /64 so SLAAC can build 64-bit interface IDs.
- A /48 holds 65,536 /64 subnets; a /56 holds 256.
- Plan on nibble boundaries: /48, /52, /56, /60, /64.
Prefix ranges, /64 counts, splits and a ULA prefix generator
Count subnets, not hosts
An IPv4 plan starts from host counts because addresses are scarce. In IPv6 every LAN gets a /64, which holds 264 addresses, more than any LAN will ever use. So the question is never how many hosts fit, but how many subnets you need and how to arrange them.
The /64 is not arbitrary. Stateless address autoconfiguration (SLAAC, RFC 4862) builds a 64-bit interface identifier, and RFC 7421 explains the many things that break when a LAN uses a longer prefix.
Nibble boundaries
IPv6 is written in hex, and one hex digit is four bits, a nibble. If every level of your plan moves the prefix by a multiple of 4, each level is exactly one or more hex digits and people can read the plan straight from the address.
| Prefix | /64s inside | Hex digits you control | Typical level |
|---|---|---|---|
| /48 | 65,536 | 4 | Site |
| /52 | 4,096 | 3 | Building or zone |
| /56 | 256 | 2 | Floor or function |
| /60 | 16 | 1 | Small group |
| /64 | 1 | 0 | One LAN or VLAN |
Nibble alignment also keeps reverse DNS simple, because ip6.arpa zones are delegated one hex digit at a time.
A worked site plan
Say a provider gives you 2001:db8:acad::/48 for one campus. The fourth group, acad:xxxx, is yours to number. A readable plan:
| Digit | Meaning | Example |
|---|---|---|
| First | Building (0 to f) | 2001:db8:acad:1000::/52 is building 1 |
| Second | Function: 0 users, 1 voice, 2 servers, f infrastructure | 2001:db8:acad:1200::/56 is servers in building 1 |
| Last two | VLAN number | 2001:db8:acad:120a::/64 is server VLAN 10 |
Anyone reading 2001:db8:acad:120a::25 can tell it is a server in building 1 on VLAN 10. Try splitting the /48 into /52s in the IPv6 calculator, or build the tree in the subnet planner.
Point-to-point links
Router-to-router links do not need a /64. RFC 6164 recommends /127, the IPv6 version of an IPv4 /31. Many networks reserve one /64 per link anyway and configure the /127 inside it, which keeps the plan regular and avoids renumbering if the link later becomes a LAN.
How much to give each site
RFC 6177 dropped the old advice that every site should get a /48, but a /48 per organisation site and a /56 or /60 per home are still common provider practice. If you are building your own plan, a /48 per site keeps the maths simple and leaves room for growth.
Unique local addresses
For internal-only networks, use a unique local prefix from fd00::/8 (RFC 4193). Pick a random 40-bit global ID to get your own /48, which makes clashes with partners very unlikely when networks are later connected. The IPv6 calculator includes a generator that uses your browser's cryptographic random source.
Writing addresses correctly
Write addresses in the RFC 5952 canonical form: lowercase, no leading zeros in a group, and the longest run of zero groups replaced by ::. 2001:0DB8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. The IPv6 cheat sheet has the full rules and the reserved ranges.
Sources
- RFC 4291: IP Version 6 Addressing Architecture
- RFC 7421: Analysis of the 64-bit Boundary in IPv6 Addressing
- RFC 6164: Using 127-Bit IPv6 Prefixes on Inter-Router Links
- RFC 6177: IPv6 Address Assignment to End Sites
- RFC 4193: Unique Local IPv6 Unicast Addresses
- RFC 5952: A Recommendation for IPv6 Address Text Representation