IPv6 notation and exact 128-bit arithmetic
In one line: Eight groups, :: compression and RFC 5952, why /64 is the standard subnet, and the Subnet-Router anycast that replaces broadcast.
An IPv6 address is 128 bits, written as eight colon-separated groups of 16 bits. The full form of a host address looks like 2001:0db8:0000:0000:0000:0000:0000:0001. Two compressions make it readable.
RFC 5952 compression
- Drop leading zeros in every group:
0db8becomesdb8. - Replace one run of consecutive zero groups with
::. Choose the longest run; if two runs tie, choose the leftmost. ::may appear only once. Twice makes the original address impossible to rebuild.- Use lowercase hex digits.
full: 2001:0db8:0000:0000:0000:0000:0000:0001 compressed: 2001:db8::1 full: 2001:0db8:0000:0001:0000:0000:0000:0001 compressed: 2001:db8:0:1::1 ← only the longest zero run is compressed invalid: 2001:db8::1::2 ← :: cannot appear twice
Why /64 is the standard
IPv6 subnets are normally /64: 64 host bits remain so SLAAC (Stateless Address Autoconfiguration) can build an interface identifier on its own. Clouds follow the same rule. Azure requires IPv6 subnets to be exactly /64, and AWS accepts /44 to /60 for a VPC and /44 to /64 for subnets in 4-bit steps.
| Prefix | Addresses | Equal subnets | Typical use |
|---|---|---|---|
| /32 | 2⁹⁶ | 65,536 /48s | ISP or organisation |
| /48 | 2⁸⁰ | 65,536 /64s | a site |
| /56 | 2⁷² | 256 /64s | home or small office |
| /64 | 2⁶⁴ | 1 | one subnet |
The numbers are too large to picture, but the arithmetic is easy: every 8 bits of prefix multiplies the subnet count by 256.
No broadcast, but an anycast address
IPv6 uses multicast instead of broadcast, so the last address of a subnet is not reserved. Instead the all-zero address of every subnet is the Subnet-Router anycast address (RFC 4291). That is why CidrPlan shows usable as total − 1 for IPv6; every other address can belong to a host.
Doing 128 bits exactly
JavaScript's bitwise operators (&, |, >>) work on signed 32-bit integers. Using them on an IPv6 address silently truncates the upper bits. CidrPlan converts every address to BigInt before applying masks and only converts back for display in RFC 5952 form.
2001:db8::/48 network 2001:db8:0:0:0:0:0:0
mask ffff:ffff:ffff:0:0:0:0:0
last 2001:db8:0:ffff:ffff:ffff:ffff:ffff
subnets 65,536 /64 blocks
Run the same calculation with 32-bit operators and ffff:ffff:... reads as a negative number, quietly turning the broadcast into zero. The larger the numbers, the more the internal representation matters.
Everything is calculated in your browser. The ranges you type are not stored on a server.
Back to the CIDR calculatorFrequently asked questions
What subnet size is standard in IPv6?
/64. It leaves 64 host bits for SLAAC, and most clouds require it.
Can :: appear more than once?
No. Only once per address; with two occurrences the number of zero groups in each is ambiguous.
Does IPv6 have a broadcast address?
No. It uses multicast, and the all-zero address of each subnet is reserved as the Subnet-Router anycast.
Sources
- RFC 4291 — IP Version 6 Addressing Architecture
- RFC 5952 — A Recommendation for IPv6 Address Text Representation
- RFC 3849 — IPv6 Address Prefix Reserved for Documentation
Read next
- CIDR notation and subnet masks from the ground upWhat 192.0.2.0/24 actually means: network and broadcast addresses, usable host counts, subnet masks and wildcard masks in one place.
- Designing AWS VPC subnets around five reserved IPsVPC CIDR is /16 to /28, five addresses are reserved in every subnet, and a /28 leaves only 11. Sizing rules, an availability-zone layout and Terraform.
- VLSM: splitting a range by real host requirementsWhy equal-size FLSM wastes space, and how VLSM places the largest requirement first, aligns every block and reports the leftover space.