CertaDNS
Skip to lesson

Zone Transfer · lesson 1 of 2

How a secondary stays current

After this lesson you can

Describe the transfer mechanism a secondary uses and how it is authenticated.

Assumes you have read Running two.

A secondary nameserver holds a copy of the zone and needs to know when it changes. Three mechanisms do that, and they are worth understanding because the most common DNS information leak is one of them left open.

The three

MechanismDoes
NOTIFYThe primary tells secondaries the zone changed. A hint, not the data.
AXFRFull zone transfer. The secondary asks for everything.
IXFRIncremental transfer. Only the changes since a given serial.
1. Zone edited on the primary. SOA serial increments.
2. Primary sends NOTIFY to each secondary.
3. Secondary queries the primary's SOA.
4. Serial higher than its own? request IXFR (or AXFR).
5. Secondary applies the change and serves it.

The SOA serial is the whole coordination mechanism. A change made without incrementing it is a change the secondaries never learn about, which is the cause of most “one nameserver has the old record” reports.

TSIG

A transfer request is an ordinary DNS query, so a server that accepts them from anyone hands the zone to anyone. TSIG authenticates the request with a shared secret held by both ends.

  • A key name and a shared secret, configured on primary and secondary.
  • Each transfer request carries a signature over the message and a timestamp.
  • Clock skew beyond the permitted window causes rejection, which is a real operational gotcha.
  • It also authenticates NOTIFY, so a secondary cannot be induced to transfer by a forged one.

The SOA timers

FieldGoverns
RefreshHow often a secondary checks the serial if no NOTIFY arrived.
RetryHow soon to try again after a failed check.
ExpireHow long a secondary keeps serving when it cannot reach the primary. Then it stops answering entirely.
MinimumNegative-caching TTL — how long a resolver remembers that a name does not exist.

Expire is the one to look at

It is the length of a primary outage your secondaries can ride out. Set short, the domain disappears while the primary is down — which is the opposite of what the secondary is for. A week is a common and sensible value; anything under a day deserves a reason.

Last reviewed