Mohit Tools

Networking · 128-Bit BigInt Visualizer

IPv6 Subnet Calculator & Address Compressor

Calculate IPv6 network prefixes, usable /64 subnets, RFC 5952 canonical compression, and Modified EUI-64 link-local addresses with live 128-bit hextet visualization—100% client-side.

Accepts compressed, expanded, or IPv4-embedded IPv6 with optional /prefix.

Quick Presets:

128-Bit Hextet Architecture Map

Prefix Bits: 48 | Subnet ID Bits: 16 | Interface ID Bits: 64

Global Routing Prefix (0–47) Subnet ID (48–63) Interface ID / Host Bits

Calculated Subnet Breakdown

Scope & Type: Documentation (2001:db8::/32 · RFC 3849)
Canonical Compressed Address (RFC 5952)
2001:db8:acad:1::42
Full Expanded Address (32 Hex Digits)
2001:0db8:acad:0001:0000:0000:0000:0042
Network Prefix / Start Address
2001:0db8:acad:0001:0000:0000:0000:0000
2001:db8:acad:1::/64
Last Address in Range
2001:0db8:acad:0001:ffff:ffff:ffff:ffff
2001:db8:acad:1:ffff:ffff:ffff:ffff
Available /64 Subnets
1
2^(64 - 64) standard LAN subnets
Total Addresses in Block
~1.84 × 10^19 (2^64)
18,446,744,073,709,551,616
Reverse DNS (ip6.arpa) Nibble Pointer
2.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.d.a.c.a.8.b.d.0.1.0.0.2.ip6.arpa.
Zone (/64): 1.0.0.0.d.a.c.a.8.b.d.0.1.0.0.2.ip6.arpa.

How to Use the IPv6 Subnet Calculator & Worked Enterprise Example

Unlike IPv4 subnetting—which forces engineers to squeeze host counts into tight power-of-two boundaries and rely on Network Address Translation (NAT)—IPv6 subnetting centers on clean hierarchical delegation across a 128-bit address space. Every calculation in this utility executes natively with JavaScript 128-bit BigInt bitwise operations, preventing the 53-bit floating-point precision loss that breaks legacy calculators.

Step-by-Step Workflow

  1. Enter an IPv6 Address or Block: Paste any compressed, uncompressed, or IPv4-embedded IPv6 address into Module A, optionally including a slash prefix such as /48 or /64.
  2. Adjust the CIDR Prefix Length: Drag the prefix slider or choose a standard boundary from the dropdown (/32 to /128). Watch the 8-hextet map dynamically recolor bits into Global Routing Prefix (Indigo), Subnet ID (Emerald), and Interface ID (Slate).
  3. Inspect Subnet Capacity & Reverse DNS: Review the canonical RFC 5952 prefix, first and last range boundaries, available /64 LAN subnets, and the reversed 32-nibble .ip6.arpa. pointer for BIND or Unbound PTR records.
  4. Validate Normalization or MAC Derivation: Switch to Module B to audit RFC 5952 compliance or Module C to convert any 48-bit MAC into a Modified EUI-64 Interface ID and Solicited-Node Multicast group.

Worked Enterprise Example: 2001:db8:acad::/48

Suppose your organization receives a standard enterprise site allocation from the RFC 3849 documentation prefix: 2001:db8:acad::/48. The first 48 bits (2001:0db8:acad, Hextets 1–3) form your immutable Global Routing Prefix. Because every standard IPv6 LAN requires a /64 prefix for SLAAC, the remaining 16 bits between bit 48 and bit 64 (Hextet 4) become your dedicated Subnet ID.

  • Total Subnet ID Bits: 64 - 48 = 16 bits (4 full hex nibbles).
  • Usable /64 VLANs: 2¹⁶ = 65,536 independent /64 networks.
  • First /64 Subnet: 2001:db8:acad:0000::/64 (simplified to 2001:db8:acad::/64).
  • Last /64 Subnet: 2001:db8:acad:ffff::/64.
  • Per-VLAN Capacity: Each of the 65,536 VLANs holds 2⁶⁴ addresses—more than 18 quintillion hosts per subnet.

IPv6 Address Scope & Reserved Prefix Reference Table

Every IPv6 packet's forwarding behavior depends on its IANA-assigned prefix block. Unlike IPv4 classful boundaries, IPv6 embeds scope and routing rules directly in the most significant bits of the 128-bit address.

Prefix Address Scope / Type Reference RFC Engineering Purpose & Routing Behavior
::/128 Unspecified Address RFC 4291 Indicates absence of an address; used as source during Duplicate Address Detection (DAD) before SLAAC completes. Never routed.
::1/128 Loopback Address RFC 4291 Host-internal loopback interface equivalent to IPv4 127.0.0.1. Must never leave the local host stack.
::ffff:0:0/96 IPv4-Mapped IPv6 Address RFC 4291 Represents an IPv4 node inside dual-stack socket APIs (e.g., ::ffff:192.0.2.128). Not transmitted on the wire as native IPv6.
64:ff9b::/96 NAT64 Well-Known Prefix RFC 6052 Synthesizes IPv6 addresses from IPv4 destinations for IPv6-only clients reaching legacy IPv4 servers through DNS64/NAT64 gateways.
2000::/3 Global Unicast Address (GUA) RFC 4291 / 3587 Publicly routable Internet unicast space (2000:: through 3fff:ffff:...) delegated by IANA and RIRs.
2001:db8::/32 Documentation & Examples RFC 3849 Reserved strictly for tutorials, lab topologies, books, and documentation. Filtered on public BGP peering tables.
fc00::/7 & fd00::/8 Unique Local Address (ULA) RFC 4193 Private internal routing across sites/VPNs. fd00::/8 uses a 40-bit pseudo-random Global ID to avoid merge collisions.
fe80::/10 Link-Local Unicast RFC 4291 Auto-configured on every active IPv6 interface. Scoped strictly to a single Layer-2 broadcast domain; routers never forward it.
ff00::/8 Multicast RFC 4291 / 7346 Replaces IPv4 broadcast. Key groups: ff02::1 (All Nodes), ff02::2 (All Routers), ff02::1:ff00:0/104 (Solicited-Node).

Common IPv6 CIDR Prefix & Nibble Boundary Cheat Sheet

Each hexadecimal character in an IPv6 address represents exactly 4 bits (one nibble). Aligning subnet delegations to 4-bit nibble boundaries (/32, /36, /40, /44, /48, /52, /56, /60, /64) keeps routing policies, ACL masks, and reverse DNS (ip6.arpa) zone delegations clean and human-readable.

Prefix Nibble Alignment Available /64 Subnets Standard Deployment Role
/32 8 nibbles (Hextets 1–2) 4,294,967,296 (2³²) Minimum Regional Internet Registry (RIR) allocation to an ISP or LIR.
/48 12 nibbles (Hextets 1–3) 65,536 (2¹⁶) Standard enterprise campus, data center, or multi-building site allocation.
/56 14 nibbles (3.5 Hextets) 256 (2⁸) Recommended residential broadband and small business DHCPv6-PD delegation (BCOP-690).
/60 15 nibbles (3.75 Hextets) 16 (2⁴) Minimal consumer ISP prefix delegation allowing up to 16 LAN/guest VLANs.
/64 16 nibbles (Hextets 1–4) 1 (2⁰) Standard end-user LAN/VLAN subnet size required for SLAAC and privacy extensions.
/127 127 bits (1 host bit) N/A (2 addresses) Point-to-point router interconnect links (RFC 6164); prevents NDP cache exhaustion.
/128 32 nibbles (All 128 bits) N/A (1 address) Single host route, BGP/OSPF router loopback interface, or firewall /32-style pin.

RFC 5952 Canonical IPv6 Compression Rules & Common Pitfalls

Because a single 128-bit IPv6 address can be written in dozens of syntactically valid but visually different ways, naive string matching fails in firewall logs, TLS certificate SAN checks, and database lookups. RFC 5952 establishes one deterministic canonical text representation:

  • Suppress Leading Zeros (Section 4.1): Remove all leading zeros within every 16-bit hextet, leaving at least one digit (0db8 becomes db8; 0000 becomes 0).
  • Compress Only Maximum Zero Runs & Never a Single Zero (Section 4.2.1 & 4.2.2): Replace the longest consecutive sequence of two or more all-zero hextets with ::. A single isolated 0000 hextet MUST remain 0 and MUST NOT be shortened to ::.
  • Leftmost Tie-Breaker (Section 4.2.3): When an address contains two equal-length runs of consecutive zeros, always compress the leftmost run and write the remaining zero hextets explicitly.
  • Strict Lowercase Hexadecimal (Section 4.3): Output digits a through f strictly in lowercase (2001:db8::1, never 2001:DB8::1).
Non-Canonical Input RFC 5952 Canonical Form Rule Applied
2001:0DB8:0000:0000:0001:0000:0000:0001 2001:db8::1:0:0:1 Leftmost tie-breaker + lowercase + leading zeros stripped
2001:db8::1:1:1:1:1 2001:db8:0:1:1:1:1:1 Single isolated zero hextet must not use ::
2001:db8:0:0:1::1 2001:db8::1:0:0:1 Shorter run compressed; equal-length run shifted left
FE80:0000:0000:0000:0202:B3FF:FE1E:8329 fe80::202:b3ff:fe1e:8329 Lowercase hex + 3-hextet zero compression

Step-by-Step Modified EUI-64 & Solicited-Node Multicast Guide

When an IPv6 router or host derives a deterministic 64-bit Interface Identifier from an Ethernet NIC's 48-bit MAC address using the Modified EUI-64 algorithm (RFC 4291 Appendix A), three mechanical bit-level transformations occur:

Why Insert FF:FE and Flip the 7th Bit?

A 48-bit MAC splits cleanly into a 24-bit Organizationally Unique Identifier (OUI) and a 24-bit NIC-specific serial. Inserting the reserved 16-bit constant 0xFFFE in the middle stretches the value to 64 bits. Next, IPv6 performs an exclusive-OR (^ 0x02) on the first byte to invert the Universal/Local (U/L) bit—the 7th bit from the left.

Why invert it? In IEEE 802 MACs, 0 indicates a globally unique vendor-burned address. Inverting 0 to 1 ensures manually typed simple addresses (such as ::1 or ::10, where the U/L bit is 0) stay safely in the local namespace without colliding with hardware-generated EUI-64 addresses.

How Solicited-Node Multicast Replaces ARP

IPv6 eliminates Layer-2 broadcasts entirely. Instead of flooding every host on a switch with IPv4 ARP broadcasts, Neighbor Discovery Protocol (NDP, RFC 4861) maps every unicast or anycast IPv6 address onto a Solicited-Node Multicast address formed by combining ff02::1:ff00:0/104 with the lowest 24 bits of the target IPv6 address.

For example, an interface with fe80::21a:2bff:fe3c:4d5e automatically joins ff02::1:ff3c:4d5e. Ethernet NICs and MLD-snooping switches filter multicast frames at hardware speed, waking only the target node (and rare 24-bit collisions) during Neighbor Solicitation and Duplicate Address Detection.

5 IPv6 Subnetting Best Practices for Network Engineers & CCNA Candidates

1. Keep Client LAN Subnets Strictly at /64

Never carve LAN VLANs into /80 or /96 prefixes. SLAAC (RFC 4862) and OS privacy extensions depend on a 64-bit Interface Identifier.

2. Allocate on 4-Bit Nibble Boundaries

Plan regions, sites, and VRFs on /48, /52, /56, /60, and /64 boundaries so hex digits map cleanly to topology tiers.

3. Use /127 on Point-to-Point Links

Follow RFC 6164 on router-to-router transit links to mitigate Neighbor Discovery cache exhaustion attacks and eliminate ping-pong routing loops.

4. Use Random 40-Bit IDs for ULA Labs

For private internal networks under fd00::/8, always generate a pseudo-random 40-bit Global ID (RFC 4193) instead of sequential numbers like fd00:1::/48.

5. Summarize Aggressively at Core Borders

Reserve contiguous /56 or /52 blocks per building or availability zone so OSPF/BGP tables propagate single aggregate summaries.

Frequently Asked Questions

1. Why are standard IPv6 LAN subnets always /64?

RFC 4291 and RFC 5375 standardize /64 for end-user LAN segments because Stateless Address Autoconfiguration (SLAAC, RFC 4862) requires a full 64-bit Interface Identifier. Longer prefixes like /80 or /96 break SLAAC, OS privacy extensions (RFC 8981), and standard Neighbor Discovery workflows.

2. What are the exact rules for compressing an IPv6 address under RFC 5952?

RFC 5952 mandates four rules: strip leading zeros in every 16-bit hextet, compress only the longest consecutive run of two or more zero hextets to ::, never use :: for a single isolated zero hextet, break equal-length ties by compressing the leftmost run, and write all hex digits in lowercase.

3. Why does Modified EUI-64 flip the 7th bit of the MAC address?

In IEEE 802 MAC addresses, the 7th bit of the first byte (the U/L bit, mask 0x02) is 0 for factory-burned universal addresses. IPv6 Modified EUI-64 inverts this bit so 1 means globally unique and 0 means locally administered, preventing manually configured host IDs like ::1 from colliding with hardware-derived IDs.

4. What is the difference between Global Unicast (2000::/3), Unique Local (fd00::/8), and Link-Local (fe80::/10)?

Global Unicast Addresses (2000::/3) are publicly routable on the Internet. Unique Local Addresses (fc00::/7, specifically fd00::/8) route privately inside organizations and site-to-site VPNs without global reachability. Link-Local Addresses (fe80::/10) are mandatory on every interface and remain strictly on the local Layer-2 link.

5. Why use /127 instead of /64 on point-to-point router links (RFC 6164)?

Assigning a /64 on a two-router transit link exposes 2⁶⁴ unused neighbor slots to Neighbor Discovery cache exhaustion scans. Using /127 (RFC 6164) restricts the link to exactly two IPv6 addresses, protecting router NDP tables and avoiding ping-pong forwarding loops.

6. Are my IPv6 prefixes or MAC addresses sent to any server?

No. All 128-bit BigInt arithmetic, RFC 5952 compression, ip6.arpa nibble reversal, and Modified EUI-64 transformations execute 100% locally inside your browser with zero server uploads or external API requests.