What Is IPv6 and How Does It Differ from IPv4
Discover the key differences between IPv4 and IPv6 and why the internet is shifting toward the newer protocol.
Answer snapshot
IPv4 uses 32-bit addresses (~4.3 billion total) and is exhausted in most regions; IPv6 uses 128-bit addresses (3.4 × 10^38 total) and is the long-term successor. In DNS, IPv4 lives in A records and IPv6 in AAAA records. Run dual-stack (publish both A and AAAA) so users on either network can reach you — most modern mobile networks and many residential ISPs are IPv6-first.
What you'll learn
- Understand the technical differences between IPv4 and IPv6 address formats
- Learn how IPv6 adoption affects DNS configuration with A and AAAA records
- Understand dual-stack networking and transition mechanisms
- Configure DNS records correctly for both IPv4 and IPv6 connectivity
The Internet Protocol (IP) defines how devices communicate across networks. The two primary versions in use today are IPv4 and IPv6. Understanding both protocols and their differences is essential for anyone managing DNS records, because the IP version determines which record type you use and how your services are reached.
IPv4 Overview
IPv4, introduced in 1983, uses a 32-bit format and looks like this: 192.168.0.1. It supports about 4.3 billion unique addresses, which once seemed like enough, but the explosion of internet-connected devices quickly changed that.
An IPv4 address is written as four decimal numbers (0-255) separated by dots, known as dotted-decimal notation:
192.0.2.1
10.0.0.1
203.0.113.50IPv4 address space is divided into classes and managed by Regional Internet Registries (RIRs). The available pool of unallocated IPv4 addresses has been exhausted in most regions, which is the primary driver behind IPv6 adoption.
In DNS, IPv4 addresses are stored in A records:
dig A example.com +short
192.0.2.1IPv6 Overview
IPv6 was developed to replace IPv4 and uses a 128-bit format, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334. This system allows for approximately 340 undecillion (3.4 x 10^38) unique addresses, solving the exhaustion issue permanently.
IPv6 addresses are written as eight groups of four hexadecimal digits separated by colons:
2001:0db8:85a3:0000:0000:8a2e:0370:7334Several shorthand rules make IPv6 addresses more readable:
- Leading zeros can be omitted:
2001:db8:85a3:0:0:8a2e:370:7334 - Consecutive groups of zeros can be replaced with
::(once per address):2001:db8:85a3::8a2e:370:7334 - Loopback address:
::1(equivalent to IPv4's127.0.0.1) - All zeros:
::(the unspecified address)
In DNS, IPv6 addresses are stored in AAAA records:
dig AAAA example.com +short
2001:db8:85a3::8a2e:370:7334Address Format Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Address format | Dotted decimal (192.0.2.1) | Hexadecimal with colons (2001:db8::1) |
| Total addresses | ~4.3 billion | ~340 undecillion |
| DNS record type | A record | AAAA record |
| Reverse DNS zone | in-addr.arpa | ip6.arpa |
| Header size | 20-60 bytes | 40 bytes (fixed) |
| Broadcast | Supported | Replaced by multicast |
| IPsec | Optional | Built-in support |
| Configuration | Manual or DHCP | SLAAC or DHCPv6 |
IPv6 Improvements Over IPv4
IPv6 is not just a larger address space. It brings several technical improvements:
- Simplified header — the IPv6 header is a fixed 40 bytes, eliminating the variable-length header processing of IPv4 and improving router efficiency
- Built-in security — IPsec support is mandatory in the IPv6 specification, providing native encryption and authentication capabilities
- No NAT required — the vast address space means every device can have a globally unique address, eliminating the complexity of Network Address Translation
- Auto-configuration — Stateless Address Autoconfiguration (SLAAC) allows devices to configure their own IPv6 address without a DHCP server
- Better multicast — IPv6 replaces broadcast with more efficient multicast and anycast addressing
- Improved routing — the hierarchical address structure allows for more efficient route aggregation, reducing the size of routing tables
DNS Implications: A vs. AAAA Records
The protocol version directly affects how you configure DNS. For every hostname that needs to be reachable, you should consider whether to create an A record, an AAAA record, or both.
A Record (IPv4)
An A record maps a hostname to an IPv4 address:
example.com. 3600 IN A 192.0.2.1
www.example.com. 3600 IN A 192.0.2.1AAAA Record (IPv6)
An AAAA record maps a hostname to an IPv6 address:
example.com. 3600 IN AAAA 2001:db8::1
www.example.com. 3600 IN AAAA 2001:db8::1Querying Both
# Query only IPv4
dig A example.com
# Query only IPv6
dig AAAA example.com
# Query any address record
dig example.com
# Force dig to use IPv6 transport
dig -6 example.com @2001:4860:4860::8888
# Force dig to use IPv4 transport
dig -4 example.com @8.8.8.8Tip: Always create both A and AAAA records for any hostname that serves web traffic. This ensures your site is reachable regardless of whether the visitor is on an IPv4 or IPv6 network.
Dual-Stack Networking
Dual-stack is the most common approach to supporting both protocols simultaneously. A dual-stack host has both an IPv4 and an IPv6 address, and applications choose which to use based on what is available.
In DNS terms, dual-stack means publishing both an A record and an AAAA record for the same hostname:
example.com. 3600 IN A 192.0.2.1
example.com. 3600 IN AAAA 2001:db8::1When a client queries this hostname, it receives both records. Modern operating systems and browsers implement Happy Eyeballs (RFC 8305), which tries to connect using IPv6 first with a quick fallback to IPv4 if the IPv6 connection is slow or fails. This ensures the fastest possible connection without sacrificing compatibility.
Transition Mechanisms
Since the internet cannot switch from IPv4 to IPv6 overnight, several transition mechanisms exist:
- Dual-stack — run both protocols simultaneously (recommended)
- 6to4 tunneling — encapsulate IPv6 packets inside IPv4 for transit across IPv4-only networks
- Teredo — tunnel IPv6 through IPv4 NAT devices
- NAT64/DNS64 — translate between IPv6 and IPv4 at the network level, allowing IPv6-only clients to reach IPv4-only servers
- 464XLAT — combines stateful NAT64 in the network with stateless NAT46 on the client
For DNS administrators, the most important aspect is ensuring your zones contain both A and AAAA records so that clients on any network type can reach your services.
IPv6 Adoption
IPv6 adoption varies significantly by country and network. As of recent measurements:
- Google reports approximately 45% of users reach their services over IPv6
- Major mobile networks in many countries are IPv6-first
- Cloud providers (AWS, Google Cloud, Azure) fully support IPv6
- Some enterprise and legacy networks remain IPv4-only
The trend is clear: IPv6 traffic continues to grow year over year. Services that lack AAAA records may face performance disadvantages on IPv6-native networks, where reaching an IPv4-only host requires NAT64 translation, adding latency.
Reverse DNS for IPv6
Reverse DNS works differently for IPv6. While IPv4 uses the in-addr.arpa domain with octets reversed, IPv6 uses ip6.arpa with each nibble (half-byte) reversed. A PTR record for 2001:db8::1 looks like:
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. IN PTR example.com.This expanded format can be cumbersome, but it is handled automatically by DNS management tools.
IPv6 and DNS Security
IPv6 introduces some security considerations for DNS:
- Larger attack surface — the vast address space makes network scanning impractical, which is a security benefit, but also means you cannot rely on obscurity
- DNSSEC — DNSSEC signing works identically for A and AAAA records, protecting both from spoofing
- Email security — SPF records should include both IPv4 and IPv6 addresses of your mail servers
- TLS certificates — certificates are bound to hostnames, not IP addresses, so they work equally well over IPv4 and IPv6
IPv6 in DNScale
DNScale fully supports IPv6 across its infrastructure:
- Create AAAA records for any zone alongside your A records
- DNScale's anycast network is reachable over both IPv4 and IPv6, ensuring all users can reach your authoritative nameservers
- The DNScale nameservers publish both A and AAAA glue records, so the delegation chain works over either protocol
- All record types are supported regardless of the IP version of the underlying infrastructure
Tip: When setting up a new domain in DNScale, add both A and AAAA records for your main hostname and
wwwsubdomain. Use CNAME records for other subdomains that point to your main hostname, so they automatically inherit both addresses.
Conclusion
Both IPv4 and IPv6 coexist today, but the future clearly belongs to IPv6. Its vastly larger address space, simplified architecture, and built-in security features make it the foundation for the next generation of internet services. For DNS administrators, supporting both protocols by publishing A and AAAA records ensures your domains remain compatible and optimised as the internet evolves. DNScale makes this straightforward with full support for both protocols across its globally distributed network.
Frequently asked questions
- Do I still need an A record if I have an AAAA record?
- Yes, unless your audience is exclusively IPv6. Most ISPs still provide IPv4, so dropping the A record would make your service unreachable for those users. The right pattern is dual-stack: publish both A and AAAA. Modern clients prefer IPv6 (RFC 6724 / Happy Eyeballs) but fall back gracefully to IPv4 when needed.
- Why is IPv6 adoption still incomplete after 25 years?
- Network operators delayed migration because NAT and CGNAT extended the useful life of IPv4 addresses. The transition requires investment with no immediate revenue benefit. Today, mobile carriers (T-Mobile, Reliance Jio) are largely IPv6-only behind NAT64; Google reports >45% of traffic over IPv6 globally. Adoption is now a question of 'when' not 'if'.
- Are IPv6 addresses harder to memorise than IPv4?
- Yes, which is why DNS matters even more in an IPv6 world. Nobody types 2001:0db8:85a3:0000:0000:8a2e:0370:7334 by hand; they use DNS. Compressed notation (2001:db8:85a3::8a2e:370:7334) helps in zone files, but operators still rely on hostnames for everything except low-level networking.
- Does IPv6 affect DNSSEC, MX, or other DNS features?
- DNSSEC, MX, NS, and most DNS features are address-family agnostic — they work the same way over IPv4 or IPv6 transport. The one place IPv6 shows up directly in DNS is the AAAA record (and the matching reverse-lookup PTR records under ip6.arpa). Glue records can be A, AAAA, or both — most TLDs accept either.
- Should I use IPv6 for my internal/private network?
- Yes for greenfield deployments. IPv6 has unique-local addresses (ULA, fc00::/7) that play the same role as RFC 1918 private IPv4 ranges, plus link-local addresses and SLAAC for autoconfiguration. For brownfield networks, dual-stack inside the firewall and gradual migration is the safer path.
Related guides
Fundamentals
FQDN Explained - Fully Qualified Domain Names in DNS
What an FQDN is, how it differs from a hostname or relative DNS name, why the trailing dot matters, and how FQDNs behave in zone files, terminals, and Kubernetes.
Fundamentals
127.0.0.1 and Localhost Explained
What 127.0.0.1 and localhost mean, how loopback networking works, why localhost is not public DNS, and how to debug local resolver issues.
Fundamentals
ARP Explained - How IP Addresses Reach Local Devices
What ARP does, how IPv4 devices map IP addresses to MAC addresses on a local network, and how ARP differs from DNS.
Fundamentals
Managed DNS vs Self-Hosted DNS — Pros, Cons, and When to Choose Each
Compare managed DNS services with self-hosted DNS servers. Understand the trade-offs in cost, complexity, security, and reliability to decide which approach fits your infrastructure.
Ready to manage your DNS with confidence?
DNScale provides anycast DNS hosting with a global network, real-time analytics, and an easy-to-use API.
Start free