IPv6 subnet calculator
Enter an IPv6 address and prefix length to get the network, first and last address, how many addresses and /64 networks it holds, and the full form.
Subnet
2001:db8:abcd:12::/64Example: type your own address above.
- Address
- 2001:db8:abcd:12::1
- Network
- 2001:db8:abcd:12::/64
- Prefix length
- /64
- /64 networks
- 1
- Prefix mask
- ffff:ffff:ffff:ffff::
- Network (full form)
- 2001:0db8:abcd:0012:0000:0000:0000:0000
- Last (full form)
- 2001:0db8:abcd:0012:ffff:ffff:ffff:ffff
- Address (full form)
- 2001:0db8:abcd:0012:0000:0000:0000:0001
- Nibble boundary
- Yes: /64 ends on a hex digit
- Type
- Documentation (RFC 3849), not routed
2001:db8:abcd:12::1 is a host inside the network 2001:db8:abcd:12::/64.
How it works
An IP address has two parts. The first bits name the network, and the rest name one device (a host) on it. The prefix length says where the split is: in 2001:db8:abcd:12::1/48, the first 48 bits are the network 2001:db8:abcd::, and the other 80 bits are free.
On an IPv4 network, the first address names the network and the last is the broadcast address (it reaches every host at once). Hosts get the addresses in between, so a /24 has 256 addresses and 254 usable hosts. Two exceptions come from RFC 3021: a /31 has no broadcast, so both its addresses work on a link between two routers, and a /32 is a single host.
IPv6 has no broadcast, so every address in a prefix is usable. A LAN is almost always a /64, because SLAAC (how devices give themselves an address) needs 64 host bits. A prefix that's a multiple of 4, like /48 or /56, ends on a hex digit, which keeps it readable and makes reverse DNS zones simple.
To cut a block into equal pieces, use the subnet splitter. For pieces of different sizes, use the VLSM calculator. The subnet cheat sheet lists every prefix with its netmask and size.