DNSSEC Basics: Signing Zones, DS Records, and Validation

DNSSEC Basics: Signing Zones, DS Records, and Validation

Most teams first meet DNSSEC when they hit cache poisoning or want to publish TLSA for DANE, yet the moving parts feel abstract until you sign a zone end to end.

The core idea is straightforward: publish public keys in DNS, sign record sets, and use parent zones to advertise which child keys are legitimate so resolvers can verify answers along a chain of trust.

The risk is also simple: one mismatched DS, an expired signature, or skewed clocks can flip a working zone into SERVFAIL for validating users, so a cautious rollout and continuous monitoring matter.

This guide breaks down keys, signatures, DS chains, and validator behavior, then gives a safe deployment plan, common failure modes, and practical guardrails to keep lookups healthy.

How DNSSEC Works: Keys, Signatures, and the Chain of Trust

DNSSEC adds origin authentication and integrity to DNS by signing each resource record set (RRset) with a private key and publishing the corresponding public key so resolvers can verify. A validating resolver starts with one or more trust anchors—normally the root—and walks delegations. At each step it checks that the parent vouches for the child via a DS that matches the child’s Key Signing Key (KSK), and that RRSIGs validate against the appropriate DNSKEY. If any link fails, the resolver treats the data as bogus and fails closed.

Core Records: DNSKEY, RRSIG, DS, NSEC, and NSEC3

DNSKEY publishes the zone’s public keys and flags their roles. RRSIG holds signatures over specific RRsets with inception and expiration times that create a validity window. DS lives only at delegation points in the parent, carrying a digest of the child’s KSK plus the algorithm and digest types; this is the glue that connects zones. NSEC and NSEC3 provide authenticated denial of existence, proving that a name or type is absent. NSEC3 adds hashing (and an optional “opt-out” mode) to make zone walking harder in large delegation-heavy zones.

Signing Zones: KSK, ZSK, and Timing Hygiene

Most operators separate keys by duty. The Zone Signing Key (ZSK) signs day-to-day RRsets and rotates more often. The Key Signing Key (KSK) signs only the DNSKEY RRset and anchors the DS at the parent, so it changes rarely. This split limits how often you must touch the parent zone while keeping signatures compact. Align TTLs with signature lifetimes: if the DNSKEY RRset has a long TTL, prepublish new keys early and keep old ones long enough for caches to expire cleanly during rollovers. Keep time accurate on signers and authoritative servers; clock skew can invalidate good signatures.

Algorithm Choices and Response Size

RSA-2048 remains widely supported, but ECDSA P-256 and Ed25519 reduce packet size and CPU while maintaining strong security. Smaller signatures lower fragmentation risk and minimize TCP fallback. When changing algorithms, double-sign for a while so validators can succeed with either set, then phase out the old algorithm once you confirm broad support along your path (authoritative servers, registrar workflow, and the parent zone’s policy).

DS Records: Building the Parent–Child Link

The DS at the parent points to the child’s KSK through a digest. The practical flow is: publish KSK and ZSK (DNSKEYs) in the child, enable signing so RRsets carry RRSIGs, then submit a DS at your registrar. Once the DS appears at the parent and relevant caches age out, validators can chain trust. During a KSK rollover, publish the new KSK alongside the old, have the parent add a new DS, wait one full DNSKEY TTL, then remove the old DS and retire the old KSK. Many registrars support CDS/CDNSKEY, allowing the child to advertise desired DS changes that automated systems at the parent can apply, reducing manual error.

Validation: What Resolvers Actually Check

Validating resolvers set the DO (DNSSEC OK) bit to request DNSSEC data and return the AD (Authenticated Data) bit on successfully validated answers. They verify each RRSIG with the correct DNSKEY, confirm inception/expiration windows using local time, follow DS→DNSKEY links at delegations, and check NSEC/NSEC3 proofs for negative responses. If any step is missing or inconsistent, validators do not fall back to insecure data—they return an error.

Deploying DNSSEC Without Breaking Lookups

Most outages trace back to four themes: DS/DNSKEY mismatch, expired RRSIGs, oversized responses dropped by middleboxes, and bad clocks. A safe rollout plan makes each unlikely and easy to detect.

A Safe Rollout Plan

Generate KSK and ZSK with your signer; make KSK long-lived and ZSK shorter. Publish both DNSKEYs and enable online or offline signing so every RRset—including DNSKEY—has an RRSIG. Decide on NSEC (simpler) or NSEC3 (hashed denial); enable NSEC3 opt-out only when you operate a delegation-heavy zone with many unsigned children. Measure maximum response sizes for DNSKEY and typical large answers; set conservative EDNS UDP payload limits and confirm TCP reachability in case truncation occurs. Verify that all authoritative nameservers, across providers and anycast sites, serve identical keys and signatures before you add DS at the parent. After DS is visible at the parent, wait out at least one DNSKEY TTL and confirm that multiple public validators set AD on your names while returning SERVFAIL for intentionally broken test names. Announce completion only after these checks pass.

Common Failure Modes and Fast Fixes

DS does not match any active KSK: Validators cannot chain trust and return SERVFAIL. Keep the old KSK published until the new DS is visible and cached; then remove the old DS and retire the old KSK.

Expired signatures: Signatures with times in the past or future relative to the validator clock are rejected. Automate resigning with margin and alert well before expiration; keep NTP healthy on signers.

Oversized answers and fragmentation: DNSSEC inflates answers—particularly DNSKEY and NSEC3 responses. On some paths, fragments are filtered. Cap EDNS buffer sizes to conservative values and ensure DNS over TCP is permitted; monitor TCP rates after enabling DNSSEC.

Inconsistent anycast or multi-provider serving: A DS at the parent commits you to validity. If any authoritative node serves stale keys or unsigned data, only some users fail, making diagnosis harder. Deploy staging, use health checks that fetch DNSKEY and RRSIG, and gate production DS publication on green checks everywhere.

Operations: Monitoring and Key Rollovers

Track validation failure rates, signature age and remaining validity, maximum observed response sizes, and algorithm mix during rollovers. Export metrics from your signer and authoritative servers. Automate ZSK rollovers on a steady schedule that matches your risk tolerance; roll KSKs less often and with explicit change control. Keep a runbook for lost keys, compromised signers, or incorrect DS at the parent, with registrar contacts and emergency steps ready. If a third-party error at the registry creates a validation outage, a temporary negative trust anchor on your own recursive resolvers can restore local resolution while you coordinate a fix—treat this as a last resort and remove it promptly.

Benefits, Limits, and Practical Trade-Offs

DNSSEC prevents forged data from landing in caches and enables higher-layer protections such as TLSA for DANE and verifiable multi-provider setups. It does not encrypt queries or hide names; it proves authenticity and integrity. The trade-offs are larger packets, some additional CPU for signing and validation, and disciplined operations. For most public zones, the costs are predictable and the payoff is ending a class of off-path attacks that classic DNS cannot stop.

DNSSEC Basics: Signing Zones, DS Records, and Validation (FAQ)

No. It authenticates data but does not encrypt it; if you need confidentiality, pair it with DNS over TLS or DNS over HTTPS.

The KSK signs only the DNSKEY RRset and is referenced by the parent via DS, so it changes rarely; the ZSK signs all other RRsets and rotates more often.

Query the parent for DS and compare the key tag, algorithm, and digest to your KSK; if you prefer a browser tool, run a DNS Lookup and inspect the DS section.

Validators cannot build the chain of trust and will return SERVFAIL until you publish the matching KSK or correct the DS, then wait for caches to expire.

RSA-2048 is broadly supported; ECDSA P-256 or Ed25519 can shrink responses and reduce CPU if your registrar and tooling support them.

Query a validating resolver with DO set and check for AD on good answers; intentionally broken names should return SERVFAIL rather than insecure data.

Yes. in-addr.arpa and ip6.arpa can be signed; for quick inspection of pointer chains you can also use a Reverse DNS Lookup alongside command-line tests.

Yes. Publish CDS and CDNSKEY in the child and use a registrar that honors them so DS additions or removals happen automatically during KSK changes.