IPv6, the new version of the IP protocol, provides important new capabilities, including a larger address space, more flexible subnetting, simplified address assignment, and improved security.
As IPv6 adoption grows, DNS is becoming more important as a mechanism to help users, using both IPv4 and IPv6 hosts, reach the most appropriate IP address.
If you operate your own DNS server, switching to IPv6 DNS requires configuration on your server, and creating two sets of records to ensure you can continue to support traffic from IPv4 hosts.
- IPv6 basics and what are the differences between IPv4 and IPv6
- IPv6 adoption and the growing importance of DNS
- How IPv6 DNS works
- A quick guide to setting up IPv6 on your DNS server
- Advanced DNS services that leverage IPv6
What is IPv6?
Internet Protocol Version 6 (IPv6) is a new version of the Internet Protocol (IP), the transport mechanism used for most communication on the Internet. Devices use numeric IP addresses to connect to each other within and between networks.
What is IPv6 used for? A primary motivation for IPv6 is to offer more IP addresses. The previous version, IPv4, offered a limited address space which is almost exhausted.
In Internet Protocol Version 4 (IPv4), defined in RFC 791 in 1981, IP addresses are described using quad-dotted notation, like this:
This notation provides an address space of approx. 4.3 billion addresses. IPv6, defined in RFC 8200, uses 128-bit addresses with eight sets of four hexadecimal characters, like this:
The new notation increases the address space to approx. 3.4 * 1038 addresses.
Differences Between IPv4 and IPv6
Beyond the different notation, here are important benefits of IPv6 compared to IPv4:
- Simplifies address assignment (stateless address autoconfiguration)
- Network renumbering
- Router announcements when changing network connectivity providers
- Simplified processing of packets in routers, moving packet fragmentation to endpoints
- Improved network security, per the original specification of IPsec
Another difference between IPv4 and IPv6 is in the definition of subnets. IPv4 addresses use the first 24 bits of the address as an optional subnet mask. In IPv6, addresses are divided into a 48 bit routing prefix, a 16-bit subnet ID (together these two define the subnet), and an Interface ID used for hosts only. Thus, IPv6 enables 65K more subnets than in IPv4.
Routing Prefix Subnet ID Interface ID
48 bits 16 bits 64 bits
IPv4 and IPv6 Interoperability
The two protocols are not interoperable, so IPv4 hosts cannot communicate with IPv6 hosts at the protocol level. However, mechanisms have been developed to integrate older and newer hosts, and allow communication from IPv4 to IPv6 and vice versa. Two commonly used mechanisms are DNS64 and NAT64.
IPv6 Adoption and the Growing Importance of DNS
IPv6 was introduced over a decade ago, and still, adoption is slow. At the time of this writing, only 17.49% of devices on the Internet are currently IPv6 capable, while a larger proportion of DNS resolvers—over a third—are capable of handling IPv6 addresses. Either way, most of the Internet is currently not IPv6 capable and therefore cannot leverage IPv6 DNS.
Part of the reason for the delayed adoption of IPv6 is that over the years, mechanisms have emerged to serve more physical devices with the same limited IPv4 addresses:
- Classful networks—better distribution of IP addresses
- Classless inter-domain routing—flexible subnetting of internal networks
- Network Address Translation (NAT)—abstracts an entire network as a single external-facing IP address
Another reason is infrastructure—for the Internet to fully switch over to IPv6, every router, switch and visible server must support the standard. Currently most network hardware, and even new hardware being sold today, does not support IPv6. Even routers which theoretically support IPv6 do not run it by default.
What is IPv6 DNS?
DNS helps users and network devices discover other devices, by translating human-readable hostnames into IP addresses. A DNS Resolver is a software component, deployed as part of operating systems, routers and network services, which accepts a hostname like “www.example.com” and is responsible for finding the correct IP address for the hostname.
In IPv4, DNS was significant for Internet usability because people found it difficult to remember 12-digit IP addresses. With the transition to IPv6, DNS becomes critical, because no-one can remember a 128-bit hexadecimal address.
As the Internet shifts from IPv4 to IPv6, hostnames stay the same. A user will continue requesting the same website, unaware that behind the scenes that site may or may not have transitioned to a 128-bit IPv6 address.
As the Internet transitions from IPv4 to IPv6, organizations and infrastructure providers will increasingly rely on DNS, as a mediator that can help bridge the gap between IPv4 and IPv6.
Quick Guide: DNS IPv6 Setup
Important note: The instructions below apply if you are setting up an on-premise DNS server. If you opt to use a hosted DNS service, there’s no need to set anything up. Just make sure your DNS provider supports IPv6.
Follow these steps to make your DNS server accessible over IPv6:
- Setup IPv6 on your DNS server—here is a tutorial which shows how to do this in BIND installed on Debian.
- Add IPv6 addresses as a DNS record for your hostname, so it has both A (IPv4 address mapping) and AAAA (IPv6 address mapping) records. Here is an example of an AAAA record:
example-host IN AAAA 2830:0:1edf:j1ok:b25c::5
- Ensure you also correctly setup PTR (reverse DNS) records for your IPv6 addresses. IPv6 PTR records have the IP address written in reverse nibble format, just like in IPv4, only the address is much longer. Note that the trailing domain in-addr.arpa has changed to ip6.arpa.
Reverse DNS v6 is a free tool that can help you create AAAA file entries in BIND, as well as the corresponding A and PTR records.
- Inform the domain registrar about the new address. In order for DNS to delegate correctly, the DNS zone one step higher in the hierarchy needs to have a “glue record” pointing to your name server. For example, if your hostname is example-host.com, the .com zone needs to maintain a glue record for all your name servers. Today almost all Top Level Domains (TLD) support IPv6.
- Ensure you provide identical data for the same hostname over IPv6 records as you do over IPv4. Many clients will not have IPv6 support. In addition, while a client may originally perform a DNS query using IPv6, name servers in the DNS resolution chain might be dual stack and might forward the request over IPv4, or an IPv4 address could be locally cached.
- DNS SRV records indicate how your DNS server prefers that clients connect. If, for example, you would like to prioritize IPv6 because you have a fast IPv6 tunnel, you can set an SRV record such as:
example.com. IN AAAA 2830:0:1edf:j1ok:b25c::5
slow-tunnel.example.com. IN A 192.168.2.100
_sip._tcp.example.com. 86400 IN SRV 10 5 5060 example.com.
_sip._tcp.example.com. 86400 IN SRV 20 5 5060 slow-tunnel.example.com.
This specifies that an IPv4 client should connect first to slow-tunnel.example.com. An IPv6 client will see that the lowest priority server is IPv4, and switch to the second priority, example.com. A dual stack client will do the same and connect to example.com.
You can also use the Happy Eyeballs protocol to dynamically serve either IPv4 or IPv6 depending on which will give the user the optimal experience.
Which DNS Server to Use for IPv6?
According to this comprehensive comparison from Wikipedia, almost all popular DNS servers support IPv6, including the world’s most popular server, BIND (starting from version 4.x). When deploying an on-premise DNS server, ensure you are using a version that supports IPv6.
IPv6 with Advanced DNS Routing
While IPv6 is a big step forward, DNS systems leveraging IPv6 have the same capabilities. As you move to the next generation of IP, consider in tandem using the next generation of DNS technology.
Modern DNS providers like NS1 operate IPv6 DNS servers with vastly improved performance, light-speed propagation and advanced traffic management features. Check if your provider of choice supports IPv6.
NS1’s DNS platform fully supports IPv6 and provides the following advanced features:
- Instant propagation—NS1 operates a global network that can propagate DNS changes in milliseconds.
- Location aware—NS1 learns the geolocation of each DNS resource, determines user location via geo-IP, routes user requests dynamically by proximity.
- Load, capacity and cost aware—NS1 obtains traffic parameters for each resource, such as capacity, load, and concurrent connections, and makes an optimal routing decision.
- Bandwidth and connectivity aware—NS1 performs health checks on resources to check their availability, bandwidth and network latency, and routes users to the best resource currently available.
Get a free trial of NS1’s next generation IPv6 DNS platform.