1.9 KiB
1.9 KiB
Secondary (slave)
zones:
- name: example.net
type: secondary
primaries: ["192.168.1.10:53", "192.168.1.11:53"] # tried in order
allow_notify: ["192.168.1.10/32"] # default: the primaries' addresses
transfer: { prefer: ixfr, fallback_axfr: true, timeout: 120s, max_records: 2000000 }
# optional TSIG: add `tsig_key: xfr-key` to `transfer:` (see zone-transfer-variants.md)
file: null # snapshot path, default <data_dir>/zones/secondary/<zone>.zone
Life cycle:
- Startup: the last persisted snapshot is loaded. It is served only if the last
successful refresh (from
.meta.json) is within SOA EXPIRE. - Refresh: SOA query (TSIG) to the primaries; if the primary serial is RFC 1982-newer, IXFR (or AXFR when no local copy); IXFR failure falls back to AXFR when enabled.
- Validation: the stream must be framed by identical SOAs; IXFR differences must start at the local serial and end at the announced serial; the resulting zone is fully validated. Only then is it swapped in atomically and persisted (tmp+fsync+rename). An incomplete or invalid transfer never replaces the valid copy.
- Timers: success → next refresh after REFRESH; failure → after RETRY; no success within EXPIRE → the zone is expired: queries get SERVFAIL (never stale authoritative data) until a refresh succeeds.
- NOTIFY from allowed sources (or signed with the zone's TSIG key) triggers an
immediate refresh.
easydns zones sync <zone>/POST /api/v1/zones/{zone}/synctoo.
Status (serial, source, last/next refresh, expiry, last error):
easydns zones show <zone>, GET /api/v1/zones/{zone}, metrics dns_zone_serial,
dns_zone_expired, dns_zone_last_sync_timestamp_seconds.
A secondary answers authoritatively (AA) from its own copy; it never proxies queries to
the primary. A secondary can itself NOTIFY further secondaries (notify:).