Updated
Enter an IPv6 address with a prefix length. You get the prefix, the first and last address, the compressed and expanded forms, how many /64 subnets it holds, the address type, the reverse DNS name, and how it splits into smaller prefixes. It runs in your browser.
Network bits Interface bits
| # | Subnet | First address | Last address |
|---|
Count the subnets you need, with room to grow. You get the prefix to ask for.
Planning IPv4 too? The IPv4 subnet calculator does the same for IPv4, and the VLSM subnet planner sizes and places a set of IPv4 subnets in one block.
SLAAC can build the last 64 bits of an address from the interface's MAC: it puts ff:fe in the middle and flips the universal/local bit (the second-lowest bit of the first byte). Modern Windows, macOS, iOS and Android, and most Linux desktops, use random or stable-private interface IDs instead (RFC 4941, RFC 7217), so you mostly see EUI-64 on routers, switches, printers and embedded devices.
In NetworkSketch, every VLAN area holds its subnet and gateway, and each device keeps its addresses, so the diagram is the address plan. For IPv4, use the subnet calculator or plan every subnet in a block with the VLSM planner.
The prefix lengths you meet in practice. Every LAN is a /64, so the useful question about a bigger prefix is how many /64s it holds.
| Prefix | Typical use | /64 subnets | Addresses |
|---|---|---|---|
| /32 | An ISP's allocation from a regional registry | 4,294,967,296 | 2^96 = 79,228,162,514,264,337,593,543,950,336 |
| /48 | One site of an organization; the longest prefix most networks accept in BGP | 65,536 | 2^80 = 1,208,925,819,614,629,174,706,176 |
| /56 | A small site, or a home from many ISPs | 256 | 2^72 = 4,722,366,482,869,645,213,696 |
| /60 | A home from some ISPs | 16 | 2^68 = 295,147,905,179,352,825,856 |
| /64 | One LAN or VLAN; SLAAC needs exactly this | 1 | 2^64 = 18,446,744,073,709,551,616 |
| /112 | Sometimes used for links or container networks: the last group | part of one /64 | 2^16 = 65,536 |
| /126 | Point-to-point links, the older habit (like an IPv4 /30) | part of one /64 | 4 |
| /127 | Point-to-point links between routers (RFC 6164) | part of one /64 | 2 |
| /128 | One address: a loopback or a host route | part of one /64 | 1 |
Even where a link uses a /127, many networks reserve a whole /64 for it in the plan so it can be renumbered without reshuffling.
An IPv6 address is 128 bits written as eight groups of four hex digits. RFC 5952 sets one canonical short form, so the same address is always written the same way:
0db8 becomes db8 and 0000 becomes 0.::. Only once per address, because two would make the count ambiguous. If two runs are the same length, shorten the first.:: for a single zero group. 2001:db8:0:1:1:1:1:1 stays as it is.::ffff:192.0.2.1.| Full form | Canonical form |
|---|---|
| 2001:0db8:0000:0000:0000:0000:0000:0001 | 2001:db8::1 |
| 2001:0db8:0000:0000:0001:0000:0000:0001 | 2001:db8::1:0:0:1 |
| 2001:0db8:0000:0001:0001:0001:0001:0001 | 2001:db8:0:1:1:1:1:1 |
| fe80:0000:0000:0000:0000:0000:0000:0001 | fe80::1 |
| 0000:0000:0000:0000:0000:0000:0000:0001 | ::1 |
| 0000:0000:0000:0000:0000:ffff:c000:0201 | ::ffff:192.0.2.1 |
Software accepts any valid spelling, but logs, configs and tickets are much easier to search when everyone writes the canonical form.
IPv6 interface IDs are 64 bits (RFC 4291), and SLAAC, the way most hosts give themselves an address, only works on a /64 (RFC 4862). A longer prefix on a LAN breaks SLAAC and the privacy addresses that depend on it. Point-to-point links between routers are the common exception: they often use a /127 (RFC 6164).
A /48 holds 65,536 /64s, a /56 holds 256 and a /60 holds 16. Each step of 4 bits multiplies the count by 16, and each single bit doubles it.
No. IPv6 uses multicast instead, such as ff02::1 for all nodes on a link. The last address in a subnet is an ordinary address. The first one, with an all-zero interface ID, is the subnet-router anycast address (RFC 4291), so don't give it to a host.
Count the LANs and VLANs you need, with room to grow, and round up to a nibble boundary (a multiple of 4 bits). A business site usually gets a /48 and a home a /56 or /60. RIPE-690 recommends a /48 for business customers and a /48 or /56 for homes.
No. The calculator runs on this page in your browser, and the page has no analytics or tracking. The address you enter is kept in the part of the link after the # so you can share it, and browsers never send that part to the server.