Dual-stack means IPv4 and IPv6 on the same L2 network, not one combined CIDR. Use this dual-stack CIDR calculator to plan a mask and a prefix side by side. This page is part of the networking tools on TechOpt.io. Dedicated pages: IPv4 CIDR calculator and IPv6 CIDR calculator.
What a dual-stack CIDR calculator is for
Hosts on one VLAN get an IPv4 address (often from DHCP on a /24) and an IPv6 address (often SLAAC on a /64), which is the dual-stack model in RFC 4213. Firewall rules, reverse DNS, and documentation need both. The calculators on this page keep independent shareable URLs (ip4/p4 and ip6/p6) so you can send one link with both sides filled in.
Planning a homelab VLAN
A common pattern is 192.168.10.0/24 plus a /64 from your ULA or ISP prefix, for example fd12:3456:789a:a::/64 or 2001:db8:1:a::/64. Keep the IPv4 third octet and the IPv6 subnet ID related if it helps you remember them — that is a human convention, not a protocol rule.
IPv4-mapped addresses
::ffff:192.0.2.1 is an IPv4 address written inside IPv6 for socket APIs. Paste it into the IPv6 calculator to see the IPv4-mapped flag. It does not give the LAN real IPv6 connectivity.
FAQ
When should I use a dual-stack calculator?
When the LAN has both IPv4 and IPv6, which is most home labs and many VPS networks. Plan the IPv4 /24 (or whatever you actually use) next to the IPv6 /64 so DHCP, SLAAC, and firewall rules line up.
Can I mix IPv4 and IPv6 in the same subnet?
They share the same L2 segment, not the same numbering plan. An IPv4 /24 and an IPv6 /64 on one VLAN is dual-stack. Hosts get both; they are not one CIDR. Do not try to “convert” 192.168.1.0/24 into a /64 bit-for-bit.
What IPv4 prefix is like an IPv6 /64?
Nothing really. A /64 has 2^64 addresses, far beyond any IPv4 LAN. Operationally a /64 is “one LAN,” the way a /24 often is in IPv4 — similar role, wildly different size. Provider allocations are commonly /32, /48, or /56.
What is IPv4-mapped IPv6?
::ffff:0:0/96 embeds an IPv4 address in IPv6, for example ::ffff:192.0.2.1. Sockets APIs use it on IPv6-only stacks talking to IPv4 peers. It is not a substitute for running real IPv6 on the LAN.
Does this dual-stack calculator upload my addresses?
No. It runs entirely in your browser. IPv4 and IPv6 values never leave your machine.
Looking for more networking how-tos? Browse the servers and networking guides or the rest of the tools.