Kahibaro
Discord Login Register

12.4.2 AAAA

Understanding AAAA Records

AAAA records are a specific type of DNS record used to map a domain name to an IPv6 address. They play the same role for IPv6 that A records play for IPv4, but they store a longer address.

When a client wants to reach a domain over IPv6, it typically asks DNS for the AAAA record. If the response contains an IPv6 address, the client can connect using that address.

AAAA vs A Records

An A record stores an IPv4 address, which is 32 bits long and usually written in dotted decimal, for example 203.0.113.10. An AAAA record stores an IPv6 address, which is 128 bits long and written in hexadecimal groups, for example 2001:db8:abcd:12::1.

The name “AAAA” comes from the idea of “quad A.” An IPv4 A record holds a 32 bit address, and an IPv6 address is four times as long, 128 bits, so the record name was chosen to suggest four times A.

A simple comparison looks like this:

Record typeProtocolLengthExample address
AIPv432 bits203.0.113.10
AAAAIPv6128 bits2001:db8:abcd:12::1

Both A and AAAA records can exist for the same hostname. In that case, the client and operating system decide whether to prefer IPv4 or IPv6, typically following rules such as "IPv6 preferred when available."

Structure of an AAAA Record

In a DNS zone file or DNS management interface, an AAAA record uses the same general fields as other simple DNS records. For example:

text
www    3600    IN    AAAA    2001:db8:abcd:12::1

This has four key parts:

  1. Name: the host part of the domain, here www. Combined with the zone name, this becomes www.example.com.
  2. TTL: the time to live in seconds, here 3600. It tells resolvers how long they may cache this record.
  3. Class: almost always IN for Internet.
  4. Type: AAAA, which declares this as an IPv6 address mapping.
  5. Data: the IPv6 address, here 2001:db8:abcd:12::1.

An AAAA record must contain a valid IPv6 address as its data field. If the address is not correctly formatted as IPv6, the record is invalid.

When you configure AAAA records in a DNS control panel, you usually only specify the hostname, the IPv6 address, and sometimes the TTL. The system sets the class to IN and the type to AAAA automatically.

How AAAA Records Are Used in Resolution

When a client resolves a domain, it can request different record types. For IPv6, the important step is the query for the AAAA record. The process is:

  1. The client (or its resolver) sends a DNS query asking for type AAAA for a domain, for example www.example.com.
  2. DNS servers respond with the IPv6 address stored in the AAAA record, if one exists.
  3. The client then uses this IPv6 address to open a connection to the server.

If the domain has both A and AAAA records, the resolver might request both types. The operating system usually decides whether to use IPv6 or IPv4 based on its configuration and reachability tests.

Someone inspecting DNS traffic with a packet analysis tool would see a query like:

text
Query:  www.example.com    IN    AAAA
Answer: www.example.com    3600  IN    AAAA    2001:db8:abcd:12::1

Multiple AAAA Records and Availability

A single hostname can have more than one AAAA record. This is often used for simple load distribution or resilience. For example:

text
www    300    IN    AAAA    2001:db8:abcd:12::1
www    300    IN    AAAA    2001:db8:abcd:13::1

In this case, a DNS reply may include both addresses. The client can choose which one to try first, and if one address is unreachable, it may fall back to the other.

This is often called DNS round robin when used to distribute traffic across multiple servers that all serve the same content.

AAAA Records and Dual Stack Hosts

A dual stack host is reachable over both IPv4 and IPv6. In DNS, this usually means:

text
www    300    IN    A       203.0.113.10
www    300    IN    AAAA    2001:db8:abcd:12::1

Clients that support IPv6 and have IPv6 connectivity can use the AAAA record. Clients that only support IPv4 use the A record.

From a DNS perspective, there is no special linkage between the A and AAAA records. They are simply two independent records with the same name and different types.

TTL and Caching for AAAA Records

AAAA records follow the same caching rules as other DNS records. The TTL determines how long resolvers can store the IPv6 address before they must ask again.

A low TTL causes more frequent lookups, which can help changes propagate faster when you move a service to a new IPv6 address. A higher TTL reduces DNS traffic and speeds up repeated lookups for clients, at the cost of slower change propagation.

When changing the IPv6 address of a service, clients may continue using the old address until the AAAA record’s TTL expires. Plan address changes with the TTL value in mind.

Common Use Cases for AAAA Records

AAAA records are essential for any service that you want to make available over IPv6. Some typical cases are:

Websites: www.example.com gets an AAAA record so browsers can reach it over IPv6.

APIs and services: hostnames like api.example.com or mail.example.com may have AAAA records if the servers listen on IPv6.

Load balancers and proxies: front end devices that terminate IPv6 connections usually have AAAA records, even if back end servers only use IPv4 internally.

Public services: any public facing service that aims to be reachable across modern networks, including mobile networks that heavily support IPv6, commonly uses AAAA records.

Configuration Considerations

When you add AAAA records, the IPv6 addresses must match the configuration of your servers or devices. If a device is not configured with the IPv6 address in the record, connections will fail.

It is also important that routing and firewalls are set up to allow traffic to the IPv6 address. DNS will happily return the AAAA record, but connectivity depends on the rest of the network configuration.

You can test an AAAA record with tools that allow you to specify the record type. For example, using a generic query tool you can ask specifically for the AAAA record and verify the returned IPv6 address and TTL.

Finally, when enabling IPv6 and adding AAAA records for existing domains, it is useful to start with a small TTL. This gives you flexibility while you test and adjust the configuration, before you increase the TTL for normal operation.

Views: 37

Comments

Please login to add a comment.

Don't have an account? Register now!