IPv6 CIDR Calculator | Expand & Analyze IPv6 Addresses

🔷

IPv6 CIDR Calculator

Free IPv6 CIDR Calculator & Address Analyzer. Expand 128-bit IPs, calculate network prefixes, find usable ranges, and identify allocation types instantly.

⚙️ Network Input

📍
🎭
⚡ Quick examples:

📖 Common IPv6 Prefix Lengths

Highlighted row indicates the currently calculated prefix. Use this table as a quick reference for IPv6 allocation conventions.

Prefix Common Use Addresses
/128 Single host (loopback, interface ID) 1
/127 Point-to-point links (RFC 6164) 2
/126 Point-to-point links (older style) 4
/64 Standard LAN / single subnet 2⁶⁴
/56 Residential ISP allocation (small) 2⁷²
/48 Enterprise / site allocation 2⁸⁰
/32 ISP allocation (documentation) 2⁹⁶
/23 RIR to large ISP 2¹⁰⁵
/12 IANA to RIR block 2¹¹⁶
/0 Default route (all IPv6) 2¹²⁸

The Comprehensive Guide to IPv6 CIDR Subnetting & Address Analysis

IPv6 CIDR — Classless Inter-Domain Routing — is the universal addressing and routing methodology that replaced the antiquated Class A, B, and C system that IPv4 inherited from the 1980s. Under classical IPv4 addressing, the boundary between the network portion and the host portion of an address was fixed by the first octet of the address itself, creating rigid allocation tiers that wasted enormous quantities of address space and accelerated the exhaustion crisis that made IPv6 necessary.

CIDR abolished these fixed classes entirely and replaced them with an explicit prefix length — the number after the forward slash in a notation such as 2001:db8:abcd::/48 — that precisely defines how many of the address's bits are reserved for the network and how many remain available for host assignment. In IPv6, this prefix length can be any integer from /0 (the default route, covering the entire 2128-address space) to /128 (a single-host route identifying one specific interface), giving network architects extraordinary granularity over address allocation at every tier of the routing hierarchy from IANA down to individual device interfaces.

The practical significance of this flexibility cannot be overstated. A regional internet registry receiving a /12 block from IANA can subdivide it into thousands of /23 allocations for national ISPs, each of which can carve out tens of thousands of /32 customer allocations, each of which can be divided into millions of /48 site prefixes, each of which supports 65,536 individual /64 subnets, each of which contains 264 host addresses.

This five-level hierarchy from global backbone to individual device is expressible entirely through CIDR prefix notation, with no need for subnet mask octet boundaries, wildcard calculations, or the awkward Class B and Class C aggregation hacks that dominated IPv4 network design for decades. Every piece of routing infrastructure — from core internet backbone routers to the access-layer switch in a corporate LAN closet — uses the same CIDR prefix-matching algorithm to make forwarding decisions, making IPv6 architecturally cleaner, more scalable, and fundamentally more efficient than its predecessor.

Anatomy of a Global Unicast IPv6 Address

The Global Unicast address type — defined by RFC 4291 and identified by the 2000::/3 prefix range — is the IPv6 equivalent of a public routable IPv4 address. It is the address type assigned to the vast majority of internet-facing hosts and network interfaces, and its internal structure is deliberately standardized to support a clean three-level routing hierarchy that separates global routing decisions from local subnet management. RFC 4291 partitions the 128 bits of a Global Unicast address into three logically distinct hierarchical components, each serving a different organizational purpose at a different level of network management.

Component 1 — Global Routing Prefix (bits 0–47, hextets [0][1][2]). The first 48 bits of a Global Unicast address form the Global Routing Prefix, which identifies the organization's site at the global internet routing level. This prefix is assigned to an organization by its upstream ISP or directly by a Regional Internet Registry (RIR) such as ARIN, RIPE NCC, APNIC, LACNIC, or AFRINIC. The typical allocation size is a /48 prefix — giving each site a 48-bit globally unique network identifier — though residential ISPs frequently allocate /56 prefixes to home subscribers.

Core internet routers carry only these shorter prefixes in their routing tables, making global BGP routing tables dramatically smaller and more manageable than they would be if individual subnets were advertised. The Global Routing Prefix is the component that ensures traffic originating anywhere on the internet can be forwarded toward the correct organizational network without knowing anything about that organization's internal subnet structure.

Component 2 — Subnet ID (bits 48–63, hextet [3]). The single hextet at bit positions 48 through 63 is designated the Subnet ID and is managed entirely by the organization's internal network administrators, completely independently of any external routing authority.

A standard /48 site allocation leaves all 16 bits of this hextet under the organization's control, yielding exactly 216 = 65,536 distinct internal subnets — a number sufficient to give every floor of every building of the largest enterprises its own dedicated subnet, with thousands of spares for future growth, DMZ segments, VoIP VLANs, IoT device networks, and management interfaces, all without any need to ever request additional address space from an ISP.

Organizations that received a /56 allocation rather than a /48 have 8 Subnet ID bits available, yielding 28 = 256 subnets — typically more than adequate for residential or small-business deployments.

Component 3 — Interface ID (bits 64–127, hextets [4][5][6][7]). The final 64 bits of a Global Unicast address form the Interface ID, which uniquely identifies a single network interface within its subnet. The Interface ID is significant for two critical reasons. First, by standardizing it at exactly 64 bits, IPv6 enables Stateless Address Autoconfiguration (SLAAC) — the mechanism defined in RFC 4862 by which a host can automatically generate its own globally valid IPv6 address without any DHCP server by combining the /64 prefix advertised by its default router with a locally generated 64-bit interface identifier.

Second, the most common method of generating this 64-bit identifier is EUI-64 — a process that derives the Interface ID from the hardware's 48-bit MAC address by inserting the fixed bytes ff:fe in the middle and flipping the universal/local bit, producing a statistically unique identifier that is directly traceable to the physical network adapter. Modern operating systems may use privacy extensions (RFC 8981) to generate randomized Interface IDs instead, but the 64-bit boundary remains a fundamental architectural constant that the entire SLAAC ecosystem depends upon.

Component Bit Range Hextets Size Managed By Purpose
Global Routing Prefix 0 – 47 [0] [1] [2] 48 bits ISP / RIR Identifies the site globally; carried in internet BGP routing tables
Subnet ID 48 – 63 [3] 16 bits Network Admin Identifies an internal subnet; up to 65,536 subnets per /48 site
Interface ID 64 – 127 [4] [5] [6] [7] 64 bits Host / SLAAC Uniquely identifies one interface within the subnet; enables SLAAC and EUI-64

Understanding Network Bits vs. Host Bits in IPv6 CIDR

The mathematical relationship between a CIDR prefix length and the address space it describes is straightforward and universal: the prefix length tells you how many bits are locked in as the network identifier, and the remainder — always calculated as 128 minus the prefix length — are the host bits that are free to vary across the addresses within that block. This single formula applies identically to every IPv6 prefix from /0 to /128, making IPv6 subnet arithmetic far simpler than IPv4's awkward interaction between dotted-decimal subnet masks, VLSM, and classful address boundaries.

For the most common and architecturally important case — a standard /64 LAN subnet — the calculation produces results that illustrate just how vast IPv6 address space truly is at the level of a single subnet. With a prefix length of 64, the network bits = 64, meaning 64 bits are fixed as the subnet's identity (comprising the Global Routing Prefix and Subnet ID combined). The host bits = 128 − 64 = 64, meaning 64 bits are available for interface identification within the subnet. The number of distinct addresses in the subnet is therefore 264 = 18,446,744,073,709,551,616 — over 18.4 quintillion addresses per individual subnet.

To put this in perspective, the entire IPv4 internet contains only 232 = 4.29 billion addresses in total, and a single standard IPv6 LAN subnet contains more than four billion times that quantity. No conceivable deployment scenario — including assigning unique addresses to every sensor, actuator, camera, and microcontroller in the most ambitious Internet of Things deployment imaginable — can exhaust a /64 subnet.

Prefix Network Bits Host Bits Total Addresses Typical Use Case
/128 128 0 1 Single host route, loopback interface
/127 127 1 2 Point-to-point links between routers (RFC 6164)
/64 64 64 264 ≈ 18.4 quintillion Standard LAN subnet — required for SLAAC
/56 56 72 272 Residential ISP customer allocation
/48 48 80 280 Enterprise or site allocation from ISP
/32 32 96 296 ISP allocation; documentation prefix 2001:db8::/32
/0 0 128 2128 Default route — entire IPv6 address space

Advanced Features: Allocation Types & Reverse DNS

Not all IPv6 addresses are Global Unicast addresses destined for public internet routing. The IANA IPv6 Special-Purpose Address Registry defines a curated set of address ranges reserved for specific operational purposes, and correctly identifying which category a given address falls into is essential for diagnosing connectivity issues, writing accurate firewall rules, and interpreting routing table entries. The most operationally significant special-purpose ranges that every network engineer must recognize are described below.

  • Link-Local Unicast — fe80::/10: Automatically configured on every IPv6-enabled interface without any manual configuration or router involvement. Link-Local addresses are valid only on their directly attached network segment — they are never forwarded by routers — making them the foundation of IPv6 neighbor discovery, router solicitation, and default gateway detection. Any time a Cisco router displays a neighbor relationship or an ICMPv6 exchange, the source and destination addresses in those packets are typically Link-Local addresses from the fe80::/10 range.
  • Multicast — ff00::/8: IPv6 completely eliminates the broadcast mechanism that IPv4 uses for protocols like ARP, DHCP discovery, and routing updates. Every function that required broadcast in IPv4 is replaced in IPv6 by precisely scoped multicast groups, dramatically reducing unnecessary traffic on segments with large numbers of hosts. Critical well-known multicast groups include ff02::1 (all nodes on the link), ff02::2 (all routers on the link), ff02::5 and ff02::6 (OSPFv3 designated and all-routers), and ff02::a (EIGRP for IPv6).
  • Documentation — 2001:db8::/32: Reserved by RFC 3849 exclusively for use in technical documentation, textbooks, training materials, and network diagrams. Addresses in this range must never appear in real routing tables or be assigned to production devices. The tool above uses 2001:db8:: as its default example precisely because it is universally recognized as a documentation-only prefix that cannot accidentally match a real host.
  • Unique Local — fc00::/7: The IPv6 equivalent of IPv4's RFC 1918 private address space (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). Unique Local Addresses (ULAs) are routable within an organization's internal network but are not expected to appear on the global internet. Unlike RFC 1918 addresses, ULAs are designed to be globally unique through random prefix selection, reducing the risk of address collisions when two organizations merge their networks.
  • IPv4-Mapped — ::ffff:0:0/96: A special address format used by dual-stack operating system kernels to represent IPv4 addresses within the IPv6 address space. When a BSD-socket application bound to an IPv6 socket receives a connection from an IPv4 client, the kernel represents the client's IPv4 source address in the form ::ffff:192.0.2.1, allowing the application to handle both protocol versions through a single unified socket interface without requiring separate AF_INET and AF_INET6 socket bindings.

The IPv6 Reverse DNS PTR record system — the mechanism by which an IP address is resolved backward to a hostname — is significantly more complex for IPv6 than for IPv4, because a 128-bit address must be expressed as a domain name in the ip6.arpa. zone. The procedure for constructing the reverse DNS domain name for any IPv6 address follows a precise four-step algorithm. First, take the fully expanded 32-hexadecimal-character address and strip all 7 colon separators to produce a flat 32-character hex string. Second, split the string into its 32 individual nibble characters. Third, reverse the order of all 32 nibbles so the least-significant nibble (rightmost) becomes the first label.

Fourth, join every nibble with dot separators and append the .ip6.arpa. suffix. For example, the address 2001:0db8:0000:0000:0000:0000:0000:0001 becomes the PTR record domain 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. — a 32-label domain name where each label is a single hexadecimal digit. DNS administrators configure PTR records in this domain to enable reverse lookups for IPv6 addresses, which is particularly important for mail server authentication, intrusion detection system logging, and network troubleshooting workflows that rely on resolving IP addresses to hostnames.

Frequently Asked Questions: IPv6 CIDR Subnetting & Address Analysis

Why is /64 considered the standard subnet size for IPv6 LANs?

The /64 prefix length is not merely a convention or a popular choice — it is a hard architectural requirement enforced by two fundamental IPv6 technologies that depend on the Interface ID occupying exactly 64 bits. The first is Stateless Address Autoconfiguration (SLAAC), defined in RFC 4862, which allows a host to automatically generate a valid globally routable IPv6 address by combining the /64 network prefix advertised in the router's Router Advertisement message with a locally generated 64-bit Interface ID.

SLAAC assumes the prefix is exactly 64 bits — if a router advertises a prefix longer than /64, compliant SLAAC implementations will refuse to use it for autoconfiguration because there are fewer than 64 bits available for the Interface ID. The second is the EUI-64 process defined in RFC 4291, which generates a 64-bit Interface ID directly from the interface's 48-bit MAC address by inserting the 0xff 0xfe bytes between the OUI and device identifier portions and toggling the universal/local bit. This hardware derivation requires exactly 64 bits of Interface ID space.

Beyond these technical requirements, standardizing on /64 for all host-facing segments also eliminates IPv6 address exhaustion concerns entirely at the subnet level — with 264 addresses per subnet, there is no operational reason to ever subdivide a LAN subnet further, simplifying planning and operations substantially compared to IPv4 subnetting practice.

Can I subnet an IPv6 network using a prefix length longer than /64?

Technically yes, and there is one well-established scenario where doing so is not only acceptable but specifically recommended: point-to-point links between routers. RFC 6164, published in April 2011, explicitly defines the use of /127 prefixes for IPv6 point-to-point links, providing exactly two addresses — one for each end of the link — while eliminating the subnet-router anycast address ambiguity and certain Neighbor Discovery denial-of-service attack vectors that affected earlier practice of using /126 prefixes on such links. Many network engineers also use /128 addresses on loopback interfaces.

However, using prefix lengths longer than /64 on host-facing LAN segments is strongly discouraged and operationally problematic for precisely the reasons described above: it breaks SLAAC entirely, prevents EUI-64 Interface ID generation, and causes unpredictable behavior on any host relying on RFC 4862 autoconfiguration.

DHCPv6 can assign addresses on subnets with longer-than-/64 prefixes because it bypasses SLAAC entirely, but doing so on production host segments sacrifices the stateless autoconfiguration capability that is one of IPv6's most significant operational advantages over IPv4, and it is architecturally inconsistent with the standard Global Unicast address structure defined by RFC 4291. For any segment that will carry end-user devices, servers, or infrastructure with SLAAC or EUI-64 requirements, /64 remains the only prefix length that guarantees full compatibility across all compliant IPv6 implementations.

How do I calculate the total number of subnets available in an IPv6 allocation block?

The formula for calculating the number of subnets obtained by dividing a base prefix into smaller target prefixes is a direct application of binary combinatorics: Total Subnets = 2(Target Prefix − Base Prefix). The exponent represents the number of bits that have been borrowed from the host portion of the base allocation and repurposed as subnet-distinguishing bits in the target subnets. For example, if an organization receives a /48 base allocation from its ISP and wishes to subdivide it into standard /64 LAN subnets, the calculation is 2(64 − 48) = 216 = 65,536 individual /64 subnets.

Each of those 65,536 subnets contains 264 host addresses, meaning the total address space of the /48 allocation is 65,536 × 264 = 280 addresses. As another practical example, an ISP that receives a /32 allocation and wishes to delegate /48 prefixes to enterprise customers can serve 2(48 − 32) = 216 = 65,536 enterprise customers from that single /32 block.

The same formula works at every tier of the hierarchy: a /56 residential allocation subdivided into /64 subnets yields 2(64 − 56) = 28 = 256 home subnets — enough for a distinct subnet on each port of a residential router serving home automation, guest Wi-Fi, gaming, surveillance cameras, and other IoT device categories simultaneously.

Does IPv6 use broadcast addresses like IPv4?

No — IPv6 completely and deliberately eliminates broadcast as an addressing mechanism. In IPv4, protocols such as ARP (Address Resolution Protocol), DHCP discovery, and many routing update mechanisms depend on sending packets to the limited broadcast address (255.255.255.255) or the directed subnet broadcast, which forces every interface on the subnet to interrupt its current processing and examine the packet regardless of whether the content is relevant.

On large flat networks — such as a /16 IPv4 subnet with thousands of hosts — broadcast traffic creates significant CPU overhead, consumes link bandwidth during storms, and provides a convenient amplification vector for denial-of-service attacks. IPv6 replaces every broadcast function with precisely scoped Multicast groups that only the relevant subset of interfaces subscribes to, meaning packets are only processed by the interfaces that actually need them.

The Neighbor Discovery Protocol (NDP), which replaces ARP in IPv6, uses the Solicited-Node Multicast address (ff02::1:ff00:0/104) rather than link-layer broadcast — an address computed from the last 24 bits of the target's Interface ID, meaning only the specific interface being queried (or the small number of interfaces sharing those last 24 bits) processes the Neighbor Solicitation message. Router discovery uses ff02::2 (all-routers multicast) rather than broadcast.

The all-nodes link-local multicast group ff02::1 is the closest IPv6 equivalent to IPv4 broadcast — it reaches every IPv6-enabled interface on the local link — but it is used sparingly and only for genuinely link-wide communications such as Router Advertisement messages, never for the routine address resolution traffic that dominated IPv4 broadcast budgets on large enterprise networks.

Subscribe
Notify of
guest

1 Correction or Clarification