IPv6 Prefix & Interface ID Calculator
Calculate the network prefix and interface portion of an IPv6 address for any prefix length from /0 to /128. View the expanded address, compressed address, network address, prefix mask, host-bit count and subnet boundaries.
—
What Is an IPv6 Prefix & Interface ID Calculator?
An IPv6 Prefix & Interface ID Calculator separates a 128-bit IPv6 address according to its prefix length. The prefix identifies the network portion selected by the CIDR prefix, while the remaining bits form the portion available after that prefix.
For a conventional /64 IPv6 subnet, the first 64 bits are the subnet prefix and the remaining 64 bits occupy the Interface Identifier portion of the address. The calculator also supports arbitrary prefix lengths such as /48, /56, /60, /96 and /128.
How an IPv6 Address Is Split
IPv6 contains exactly 128 address bits. The basic calculation is:
Prefix bits = prefix length
Remaining bits = 128 - prefix length
Example /64:
128 - 64 = 64 remaining bitsThe network address is calculated by preserving the prefix bits and clearing every bit after the prefix to zero.
IPv6 /64 Prefix Example
Address:
2001:db8:1234:5678:abcd:ef01:2345:6789
Prefix:
/64
Network prefix:
2001:db8:1234:5678::/64
Remaining 64-bit value:
abcd:ef01:2345:6789Because /64 falls exactly on a four-hextet boundary, the split is especially easy to see.
IPv6 Prefix Length Table
| Prefix | Network Bits | Remaining Bits | Typical Interpretation |
|---|---|---|---|
| /32 | 32 | 96 | Large routed prefix allocation boundary in some deployment contexts |
| /48 | 48 | 80 | Common site-prefix size |
| /56 | 56 | 72 | Common delegated-prefix size |
| /64 | 64 | 64 | Standard IPv6 subnet boundary for many networks |
| /96 | 96 | 32 | 32 address bits remain after the prefix |
| /128 | 128 | 0 | One exact IPv6 address |
What Is an IPv6 Interface Identifier?
In the familiar /64 IPv6 addressing model, the Interface Identifier occupies the low-order 64 bits of the IPv6 address. It may be created using several address-generation mechanisms rather than necessarily being derived from a hardware MAC address.
For this reason, seeing a 64-bit Interface Identifier does not automatically mean the address contains an EUI-64 encoded MAC address.
IPv6 Prefix Mask Calculation
A prefix mask contains one bits for the selected network prefix followed by zero bits for the remaining portion.
/64 mask:
ffff:ffff:ffff:ffff:0000:0000:0000:0000
Compressed:
ffff:ffff:ffff:ffff::Example of a Prefix That Does Not End on a Hextet
IPv6 CIDR prefixes do not have to end on a 16-bit hextet boundary. For example, a /60 prefix ends four bits into the fourth 16-bit hextet.
Prefix length = /60
Network bits = 60
Remaining bits = 68
The calculator performs the split at the bit level,
not merely between colon-separated hextets.IPv6 First and Last Address
For the mathematical CIDR range represented by an IPv6 prefix, the first address has all bits after the prefix cleared to zero. The last address has all remaining bits set to one.
Compressed vs Expanded IPv6 Address
An expanded IPv6 address always contains eight groups of four hexadecimal
digits. Compressed notation can remove leading zeros and replace one contiguous
run of zero hextets with ::.
Expanded:
2001:0db8:0000:0000:0000:0000:0000:0001
Compressed:
2001:db8::1IPv6 Prefix Calculator FAQs
How many bits are in an IPv6 address?
What does /64 mean in IPv6?
What is the Interface ID in an IPv6 /64?
Does every IPv6 Interface ID come from a MAC address?
Can IPv6 use prefix lengths other than /64?
What does /128 mean?
Does IPv6 have a broadcast address?
Can the calculator handle compressed IPv6 addresses?
What is an IPv6 prefix mask?
Can a prefix split occur inside a hextet?
Calculate IPv6 Prefixes and Interface Bits
Enter an IPv6 address and CIDR prefix length to inspect its normalized address, network prefix, remaining interface or host bits, prefix mask and complete mathematical address range.