zone transfer

term

networking

Kept in this browser · My desk

A zone transfer copies a Domain Name System (DNS) zone from the server where it is maintained to the other authoritative servers that publish it, either whole (AXFR) or as the changes since a given serial (IXFR).

Every DNS zone must be served by at least two authoritative servers, and they must agree. Zone transfers are how the secondaries get their copies: a NOTIFY from the primary or a timer makes a secondary compare SOA (start of authority) serials, and a newer serial starts an AXFR or IXFR over TCP. Transfers are restricted to known peers, signed with TSIG and, across untrusted networks, encrypted with XoT, because an open transfer hands the whole zone to anyone who asks.

What it is. RFC (Request for Comments) 9499, the DNS (Domain Name System) terminology of 2024, defines a zone transfer as "The act of a client requesting a copy of a zone and an authoritative server sending the needed information", and names the two standard mechanisms: AXFR, "Authoritative Transfer", which copies the full zone (RFC 5936), and IXFR, "Incremental Transfer", which copies only the parts that changed (RFC 1995). It adds that "Many systems use non-standard methods for zone transfers outside the DNS protocol", such as database replication or file synchronization. The need dates from the start: RFC 1034 (1987) requires "every zone to be available on at least two servers", one of them the primary where data enters the DNS and the others secondaries that "periodically check for changes".

Where it came from. The mechanism predates the standards still in force. RFC 883 (P. Mockapetris, November 1983) already had a secondary ask for the zone's SOA (start of authority) record, compare the SERIAL fields and, if they differed, send an AXFR query; the primary sent "each node from the zone to the requestor in a separate message", beginning and ending with the node holding the SOA, and could refuse "for policy reasons". If the first and last serials differed, the zone had changed mid-copy and the request was repeated, while the old copy kept answering. RFC 1034 and 1035 (November 1987), which obsolete RFC 883 and remain Internet Standards, kept the model: distribution "can be accomplished using FTP or some other ad hoc procedure" (FTP, the File Transfer Protocol), but "the preferred method is the zone transfer part of the DNS protocol".

How the cycle runs. A secondary learns that the zone may have changed in one of two ways: its REFRESH timer, taken from the zone's SOA (start of authority) record, expires, or the primary sends a NOTIFY (RFC 1996, opcode 4). Either way it asks for the SOA and compares serial numbers with RFC 1982 arithmetic; a newer serial starts a transfer. AXFR runs over TCP (Transmission Control Protocol) only, as a stream of messages that begins and ends with the zone's SOA, and the client loads the copy atomically, keeping the old one if anything fails (RFC 5936, sections 2.2 and 6). IXFR sends the client's SOA in its query and gets back deletion and addition sequences, or a full zone if the server has no history (RFC 1995).

The timers and the serial, on a real zone. RFC 1034, section 4.3.5: a secondary "waits REFRESH seconds before checking with the primary for a new serial", retries every RETRY seconds while the check fails, and after EXPIRE without a check "it must assume that its copy of the zone is obsolete". Serials use the 32-bit arithmetic of RFC 1982 (August 1996, R. Elz and R. Bush): one increment adds at most 2,147,483,647, and a serial edited downwards looks older, not newer, to the secondaries. Read with dig from a.dns.br on 23 November 2026, .br answered "br. 172800 IN SOA a.dns.br. hostmaster.registro.br. 2026328056 1800 900 604800 900": REFRESH 30 minutes, RETRY 15, EXPIRE seven days, MINIMUM 900 seconds. The IANA (Internet Assigned Numbers Authority) root zone database lists six servers for .br, a.dns.br to f.dns.br, that must agree on that serial.

Securing it. A transfer reveals every name in a zone. RFC 5936 asks implementations not to make "open to all" the default, and the alert TA15-103A of US-CERT (the United States Computer Emergency Readiness Team) of 13 April 2015 warned that misconfigured servers still answered anyone, "revealing internal network structure and potentially sensitive information"; its fix is to answer only known addresses. TSIG (Secret Key Transaction Authentication for DNS, RFC 8945) authenticates requests and responses with a shared key, and the 2017 BIND flaws CVE-2017-3142 and CVE-2017-3143 (Common Vulnerabilities and Exposures) taught operators to require the key and the address together. TSIG gives no confidentiality: RFC 9103 (2021) observes that "DNS zone transfers are transmitted in cleartext" and defines XoT, transfer over TLS (Transport Layer Security) 1.3 on port 853, with mutual TLS as a standalone solution. It also notes that BIND and NSD (NLnet Labs' authoritative server) now do IXFR over TCP by default and that one connection should carry both kinds of transfer.

In the servers. Current defaults lean shut. The BIND 9 manual (9.21) says that without allow-transfer "the default is none; outgoing zone transfers are disabled", and that transfers run only over TCP and TLS, as in "allow-transfer port 853 transport tls". NSD lists the secondaries allowed to pull in provide-xfr, each with a key name, NOKEY or BLOCKED, and its request-xfr can add tls-auth for transfer over TLS 1.3. Windows Server sets the policy per zone (SecureSecondaries: NoTransfer, TransferAnyServer, TransferToZoneNameServer or TransferToSecureServers) and shows the non-standard methods RFC 9499 mentions: an Active Directory-integrated zone is replicated inside the directory, with a ReplicationScope of Forest, Domain or a custom partition, not by AXFR.

Beyond copying records. RFC 9432 (July 2023), DNS Catalog Zones, uses transfers for provisioning itself: "storing and transferring the catalog of zones to be provisioned as one or more regular DNS zones", so that adding a zone to a catalogue adds it to every secondary. ZONEMD (RFC 8976), described in RFC 9103, puts a digest of the whole zone inside it so that a consumer can verify a copy however it arrived. RFC 8976 itself (February 2021, D. Wessels, P. Barber, M. Weinberg, W. Kumari and W. Hardaker) gives it record type 63: with DNSSEC (the DNS Security Extensions) it proves integrity and origin, without DNSSEC it "functions as a checksum".

In Brazil. Resolution CGI.br/RES/2008/008 of 28 November 2008, issued by CGI.br (Comitê Gestor da Internet no Brasil, the Brazilian Internet Steering Committee), requires every .br registrant to provide, within 14 days, at least two DNS servers "configured and answering for the domain", which in practice means a primary and a secondary kept in step by transfers. The training material of NIC.br (Núcleo de Informação e Coordenação do Ponto BR) for its Semana de Capacitação builds exactly that with NSD: a TSIG key shared by both servers, notify and provide-xfr on the primary, allow-notify and request-xfr on the secondary.

How it differs from its neighbours. Zone transfer names the whole replication job: trigger, serial check, copy and atomic load. AXFR and IXFR are the two query types that move the data; NOTIFY is only the trigger and carries nothing a secondary may trust; dynamic update is how data enters the primary and never reaches a secondary as such.

Where to read more. The concepts, the SOA timers and the configuration are in the Learn article on zone transfers and NOTIFY; the messages, octet by octet, including a TSIG MAC (message authentication code) computed by hand, are in zone transfer messages by hand.

Also known as: dns zone transfer, xfr, zone replication

Sources

← Back to Z Back to the glossary