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.
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.
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