Workshop

DNSSEC Part 2: The Nuts and Bolts

Published on: 2025-05-03

By: Ian McCutcheon

Part 2: Understanding the Nuts and Bolts of DNSSEC

1. Introduction

In Part 1, we laid the foundation, establishing that DNSSEC provides essential authenticity and integrity for your domain's records. We saw how modern authoritative DNS providers automate the cryptographic heavy lifting (key management, signing, rollovers) and how crucial your registrar's role is in publishing the DS record to connect your zone to the global chain of trust. We ended with a safe pattern for enabling DNSSEC and verifying its operation.

Now, it's time to look under the hood a bit more. While your provider handles much of the automation, understanding the key components – especially the DS record – and the operational realities is crucial for maintaining confidence and navigating potential issues or changes smoothly.

In this part, we'll dissect the Delegation Signer (DS) record, explaining why things like algorithms and multiple DS records matter. We'll confront the real impact of DNS Time-To-Live (TTL) values and discuss operational responsibility – who does what, especially when things go wrong, and what the correct recovery steps are. We'll also cover the safe (and preferably rare) procedure for disabling DNSSEC entirely, delve into the practical considerations of NSEC vs. NSEC3, and briefly revisit subdomain delegation. The goal is to build upon the foundation with practical operational knowledge, even when relying on automated systems.

2. Deep Dive: The Delegation Signer (DS) Record

We introduced the DS record in Part 1 as the "fingerprint" of your Key Signing Key (KSK) published in the parent zone. It's the critical link that allows validating resolvers to connect the trust anchored at the root to your specific domain. Given its importance, let's examine its components and related operational aspects more closely.

A DS record typically contains four pieces of information provided by your authoritative DNS provider:

  1. Key Tag: A 16-bit numerical identifier derived from the KSK. It acts as a quick way for resolvers to find the matching DNSKEY record within your zone, especially when multiple keys are present. It's not strictly unique but helps narrow down the possibilities quickly.
  2. Algorithm: A number specifying the public key cryptographic algorithm used by the KSK. This tells the resolver how the key was generated and how signatures should be verified.
  3. Digest Type: A number specifying the cryptographic hash algorithm used to create the Digest. This tells the resolver how the KSK's fingerprint was generated.
  4. Digest: The actual cryptographic hash (the fingerprint) of your KSK record (specifically, a hash of the KSK's owner name + the key's data: flags, protocol, algorithm, and public key). This is the core data the resolver uses to verify that the KSK presented by your nameserver matches the one authorized by the parent zone.

Let's look at a real-world example using dig. We query for the DS record of esoup.net specifically asking a known validating resolver, Cloudflare's 1.1.1.1, using the @1.1.1.1 syntax. We also use +multiline for readability:

$ dig @1.1.1.1 esoup.net DS +multiline

; <<>> DiG 9.10.6 <<>> @1.1.1.1 esoup.net DS +multiline
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57329
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;esoup.net.             IN DS

;; ANSWER SECTION:
esoup.net.              86400 IN DS 35341 8 2 (
                                C55AB664AD6BA37B7BC625772C9E8B12EE9D0BD04975
                                6A3444E28678E6BE37CE )

;; Query time: 10 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Sat Apr 12 10:44:51 PDT 2025 ;; Example timestamp
;; MSG SIZE  rcvd: 86

Why @1.1.1.1? Because we want to see the response from a resolver that performs DNSSEC validation. This allows us to check if the record itself is considered authentic.

Notice the flags line in the header: ;; flags: qr rd ra ad;. The presence of the ad (Authenticated Data) flag here is key. It confirms that the validating resolver (1.1.1.1) successfully verified the authenticity of this DS record based on the signatures from the parent zone (the .net TLD in this case). We are receiving trusted information.

Now let's break down the ANSWER SECTION:

Seeing this structure, especially with the ad flag confirming authenticity from a trusted resolver, helps visualize how the abstract pieces of information translate into a verifiable, concrete DNS record linking your zone to the parent TLD.

Algorithms Matter: Why Your Provider (Likely) Uses Algorithm 13

You'll frequently see Algorithm 13 (ECDSA Curve P-256 with SHA-256) and Digest Type 2 (SHA-256) used by modern DNSSEC providers, and for good reason: * Strong Cryptography: ECDSA (Elliptic Curve Digital Signature Algorithm) provides high cryptographic strength with relatively short key lengths compared to older RSA algorithms like Algorithm 8 shown in the example. SHA-256 is a robust and widely trusted hash algorithm. * Efficiency: Shorter keys and signatures mean smaller DNS responses. This reduces bandwidth consumption and processing overhead for both authoritative servers and resolvers, and decreases the chances of UDP fragmentation issues.

So, are you at risk if your provider uses something else? * Not necessarily, but it depends. Algorithm 8 (RSA/SHA-256), as seen in the example, is also considered secure and widely deployed. Algorithms 10 (RSA/SHA-512) and 14 (ECDSA Curve P-384 with SHA-384) offer even higher theoretical strength but are less common and have larger signature sizes. * The main concern is with older, deprecated algorithms. Algorithms 5 and 7 (RSA/SHA-1 variants) use the SHA-1 hash function, which is considered cryptographically weak and should absolutely be avoided. If your provider is still using these, migration to a stronger algorithm (and likely a new provider) is highly recommended. * The most critical factor is consistency: The Algorithm and Digest Type listed in the DS record at your registrar must accurately reflect the KSK being used and presented by your authoritative DNS provider. A mismatch guarantees validation failures (SERVFAIL). Trust your modern provider if they are using Algorithm 13 (or perhaps 8, 10, 14) and ensure your registrar supports publishing DS records with those corresponding algorithm numbers and digest types (especially Type 2 for SHA-256).

Multiple DS Records: Normal and Necessary for KSK Rollovers

Sometimes, when you check your DS records at the registrar or your provider gives you DS data, you might see two distinct DS records listed, often with different Key Tags and Digests but possibly the same Algorithm. Should this worry you?

No, this is perfectly normal and, in fact, essential for seamless Key Signing Key (KSK) rollovers.

Here's why: * The KSK is the trust anchor for your zone, linked via the DS record. Changing it requires updating the DS record at the registrar. * To avoid breaking validation during the transition (while DNS caches around the world still hold the old DS record), providers use rollover schemes. A common method ("Double-Signature" or "Double-DS") involves: 1. Introducing the new KSK into the zone's DNSKEY set alongside the old one. 2. Generating the DS record for the new KSK. 3. Instructing you (the domain owner) to ADD the new DS record at the registrar, alongside the existing old DS record. 4. Waiting for the new DS record to propagate globally. During this time, resolvers can validate your zone using either the old KSK (matching the old DS record) or the new KSK (matching the new DS record). 5. Once the provider is confident the new DS record is sufficiently propagated, they can start signing the DNSKEY set with only the new KSK. 6. Later, they instruct you to REMOVE the old DS record from the registrar. 7. Finally, the old KSK can be removed from the zone's DNSKEY set. * Therefore, seeing two DS records published simultaneously usually just means your provider is executing a KSK rollover according to best practices. Resolvers are designed to handle this; they will consider the zone valid if the signatures trace back successfully to a KSK that matches any of the DS records published in the parent zone. Don't panic if you see two – just ensure you follow your provider's instructions for adding the new one and eventually removing the old one at the correct times.

3. The Real Impact of TTLs and Operational Responsibility: Where Mistakes Hurt

We've established that the DS record at your registrar is the vital link in the DNSSEC chain. While modern providers and registrars make management easier, this link is also where operational errors can have the most significant and prolonged impact, primarily due to DNS Time-To-Live (TTL) values and caching. Understanding this relationship, and knowing who is responsible for what, is key to preventing and recovering from DNSSEC issues.

Key TTLs to Understand:

While every DNS record has a TTL (how long resolvers are suggested to cache the data), a few are particularly important in the context of DNSSEC problems:

  1. DS Record TTL (at the Parent Zone): As seen in our dig example (86400 seconds, or 24 hours), the TTL for your DS record itself, as published by the TLD (.com, .net, .org, etc.), is often quite long. This means resolvers worldwide might cache this record for a full day.
  2. NS Record TTL (at the Parent Zone): Similarly, the NS records pointing to your authoritative nameservers, also published by the TLD, often have long TTLs (e.g., 24-48 hours).
  3. DNSKEY Record TTL (within your zone): The TTL for the DNSKEY records within your zone (controlled by your provider) also plays a role, as resolvers cache these public keys.

Why Long TTLs Make DS Mistakes Painful:

Imagine this scenario:

The Recovery Delay:

Now, you realize the mistake. You log back into the registrar and fix the DS record, publishing the correct one. But the damage isn't instantly undone.

This delay, caused by the long TTLs on critical delegation records, is why DS record mistakes are the most common source of DNSSEC "nightmares." It's not that DNSSEC itself is inherently fragile day-to-day; it's that errors at this critical junction have prolonged consequences due to standard DNS caching behaviour.

Operational Responsibility: Who Fixes What?

Knowing where the responsibility lies helps in quickly diagnosing and fixing issues:

The Correct Recovery Playbook (Avoiding the "Deer in Headlights" Syndrome):

Imagine your monitoring alerts scream SERVFAIL for your domain from validating resolvers. What's the first thing you do?

  1. Verify the Failure: Use dig @1.1.1.1 yourdomain.com A +dnssec (or similar) and online tools (DNSViz, Verisign Debugger – remember to hit "Analyze"!) to confirm the validation failure. Note the specific errors reported.
  2. Check the DS Record: Immediately query the published DS record (dig yourdomain.com DS @a.gtld-servers.net. or use online tools). Compare this published data meticulously against the DS data your authoritative provider says should be active. Is there a typo? Is it the wrong key tag? Is the algorithm/digest type correct? Is a required DS record missing (e.g., the new one for a rollover)?
  3. Check Provider Status: Briefly check if your authoritative provider has any status alerts or known issues impacting signing. (This is usually less likely than a registrar-side issue if things were working previously).
  4. FIX THE DS RECORD FIRST: If you identify a mismatch or error in the published DS record (Step 2), your absolute priority is to log into your REGISTRAR and correct the DS record immediately.
    • If it's a typo, fix it.
    • If the wrong one was added, delete it and add the right one.
    • If you deleted the old one too soon during a rollover, re-add it alongside the new one (assuming the old key is still valid at the provider).
    • Do NOT immediately jump to disabling DNSSEC signing at the provider – this often makes recovery harder. Fix the link in the chain first.
  5. Wait and Monitor: Understand that due to TTL caching, the fix will take time to propagate globally. Monitor using dig and online tools, watching for the ad flag to return and SERVFAIL errors to subside across different resolvers. Propagation time depends heavily on the DS record's TTL.
  6. Only Escalate to Provider if Necessary: If the published DS record is correct according to the provider, and validation is still failing after sufficient time, then investigate potential issues with the provider's signing or key status.

Preparedness Builds Confidence:

By understanding the role of TTLs and having a clear plan for diagnosing and fixing DS record issues at the registrar level first, you can approach DNSSEC with confidence, knowing how to handle the most common failure scenario effectively.

4. Safely Disabling DNSSEC (When Absolutely Necessary)

While we strongly recommend keeping DNSSEC enabled and advocate against disabling it for routine tasks like migrations (as covered in Part 3), acknowledging reality means providing a safe procedure for situations where disabling is deemed unavoidable. Perhaps you're facing complex troubleshooting or integration challenges.

Doing this wrong will cause outages. Validating resolvers rely on the DS record as the signal to expect signatures. If you remove the signatures from your zone before the DS record has vanished from the parent zone and its caches, resolvers will fetch unsigned data, compare it against the still-present DS record expectation, and return SERVFAIL.

The cardinal rule remains: Remove the proof of the key (DS record) before you remove the lock (signatures). When signed subdomains are involved, this means carefully managing the order to avoid breaking validation prematurely.

Procedure for a Domain Without Signed Delegated Subdomains:

(This is the simple case)

  1. Registrar First: Log in to your registrar and DELETE ALL DS Records for the domain (e.g., esoup.net).
  2. WAIT (Critically): Wait at least the full TTL of the deleted DS record (often 24+ hours). Verify removal using dig and online tools. Resolvers need to see the DS record is gone from the TLD (.net).
  3. Provider Last: After the wait, log in to your authoritative provider for esoup.net and disable zone signing.
  4. Verify: Check resolution works, expect NOERROR status but no ad flag from validating resolvers.

Procedure for a Domain With Signed Delegated Subdomains (Example: esoup.net with signed workshop.esoup.net)

Imagine esoup.net is DNSSEC-signed, and you have also delegated workshop.esoup.net to nameservers (potentially the same provider or different ones) and enabled DNSSEC signing for workshop.esoup.net as well. This means there's a DS record for workshop.esoup.net within the esoup.net zone, and a DS record for esoup.net at the registrar (in the .net TLD zone).

To disable DNSSEC safely for both, you must proceed in this specific order:

Phase 1: Disable the Child (workshop.esoup.net) Linkage First

  1. Target: Link from Parent to Child. Identify the DS record for workshop.esoup.net that exists within the esoup.net zone configuration.
  2. Action: Delete Child's DS from Parent Zone. Log in to the authoritative DNS provider managing the esoup.net zone. Find and delete the DS record specifically for the workshop.esoup.net delegation.
  3. WAIT for Child DS TTL: Determine the TTL of the workshop.esoup.net DS record within the esoup.net zone (you might find this in your provider's interface or by querying the esoup.net nameservers directly: dig workshop.esoup.net DS @ns1.esoup.net). Wait at least this full TTL for the removal to propagate from the esoup.net nameservers.
  4. Action: Unsign Child Zone. After the wait in Step 3, log in to the authoritative DNS provider managing the workshop.esoup.net zone (this might be the same or different provider). Disable DNSSEC signing for workshop.esoup.net.
  5. Verify Child: Check that workshop.esoup.net resolves correctly using dig @1.1.1.1 workshop.esoup.net A +dnssec. You should get NOERROR but no ad flag.

(Repeat Phase 1 steps for any other signed subdomains of esoup.net)

Phase 2: Disable the Parent (esoup.net) Linkage Last

  1. Target: Link from TLD to Parent. Only after confirming Phase 1 is complete for all signed children.
  2. Action: Delete Parent's DS from Registrar. Log in to your registrar for esoup.net. DELETE ALL DS records for esoup.net. These are the records published in the .net TLD zone.
  3. WAIT (Critically): Wait at least the full TTL of the esoup.net DS record that was just deleted (often 24+ hours). Verify removal using dig @1.1.1.1 esoup.net DS +multiline. The goal is an empty answer section for the DS query.
  4. Action: Unsign Parent Zone. After the wait in Step 8, log in to the authoritative DNS provider managing the esoup.net zone. Disable DNSSEC signing for esoup.net.
  5. Final Verification: Check that both esoup.net and workshop.esoup.net resolve correctly from validating resolvers (@1.1.1.1), returning NOERROR status and no ad flag.

Why this Order? By removing the child's DS record from the parent zone first (Step 2) and waiting (Step 3), you tell validating resolvers "stop expecting signatures for workshop.esoup.net" before you actually stop signing workshop.esoup.net (Step 4). Similarly, you remove the parent's DS record from the TLD (Step 7) and wait (Step 8) before you stop signing the parent zone esoup.net (Step 9). Each step breaks the expectation of trust before removing the corresponding cryptographic proof, preventing SERVFAIL errors down the chain.

If you must disable DNSSEC, follow the correct procedure for your situation meticulously, paying close attention to the required waiting periods based on TTLs at each stage.

5. NSEC vs. NSEC3: Practical Considerations & Zone Enumeration

A crucial, but often overlooked, function of DNSSEC is providing authenticated denial of existence. When a resolver asks for a record that doesn't exist (e.g., nonexistent.yourdomain.com), DNSSEC needs a secure way to prove that it truly doesn't exist, preventing attackers from falsely injecting NXDOMAIN responses. This is achieved using either NSEC or NSEC3 records, which are automatically generated and signed by your authoritative provider when DNSSEC is enabled.

NSEC (Next Secure): The Simple Approach

NSEC3 (Next Secure, Version 3): The Obfuscation Approach

Practical Considerations: Is Zone Walking Really a Problem?

While NSEC3 was designed specifically to prevent zone enumeration, it's worth considering the practical risk versus the added complexity, especially for typical public-facing domains:

Conclusion on NSEC/NSEC3:

Ultimately, both NSEC and NSEC3 provide the core DNSSEC benefit of authenticated denial of existence. The choice often comes down to a trade-off between operational simplicity/performance (NSEC) and enhanced hostname obfuscation (NSEC3).

6. DNSSEC for Subdomains (Briefly)

So far, we've focused primarily on securing your main domain (e.g., yourdomain.com). But what about subdomains like www.yourdomain.com or shop.yourdomain.com? How does DNSSEC apply to them? The answer depends on how the subdomain is managed in DNS.

Scenario 1: Subdomain Records within the Parent Zone

This is the most common scenario. Records like www in www.yourdomain.com, mail in mail.yourdomain.com, or api in api.yourdomain.com are typically just standard records (A, AAAA, CNAME, etc.) directly within the main yourdomain.com zone file.

Scenario 2: Delegated Subdomains

Sometimes, you might delegate authority for a subdomain to a different set of nameservers. For example, you might want dept.yourdomain.com to be managed entirely by a specific department using their own DNS servers (or a separate zone instance at your main provider). This is done using NS (Name Server) records within the yourdomain.com zone that point requests for dept.yourdomain.com to those different nameservers.

The Chain of Trust Continues Downwards:

When a validating resolver looks up secure.dept.yourdomain.com: 1. It gets the DS record for .com from the root. 2. It gets the DS record for yourdomain.com from the .com servers and verifies yourdomain.com's KSK. 3. It gets the DS record for dept.yourdomain.com from the yourdomain.com servers (which must be signed by yourdomain.com's keys) and verifies dept.yourdomain.com's KSK. 4. It finally gets the A record for secure.dept.yourdomain.com from the dept.yourdomain.com servers and verifies its signature using dept.yourdomain.com's keys.

Failure at any step breaks the chain. Therefore, managing DNSSEC for delegated subdomains requires ensuring the DS record is correctly placed and maintained in the immediate parent zone.

7. Part 2 Conclusion: Confidence Through Understanding

We've now journeyed deeper into the operational heart of DNSSEC. While modern automation handles much of the day-to-day cryptographic work, understanding the components, particularly the crucial Delegation Signer (DS) record and its lifecycle, is key to maintaining control and confidence.

We dissected the DS record, clarifying why specific algorithms like ECDSA (Algorithm 13) are preferred and why seeing multiple DS records during a KSK rollover is normal, not cause for alarm. We confronted the "danger zone" of DNSSEC – the impact of long TTLs on DS record mistakes – and laid out the clear operational responsibilities and the correct recovery playbook to follow if validation errors occur. Knowing who fixes what, and that the first step is almost always correcting the DS record at the registrar, transforms potential panic into a manageable procedure.

We also provided the safe, step-by-step process for disabling DNSSEC (including the necessary handling for signed subdomains) for those rare situations where it might be unavoidable, emphasizing the critical waiting periods required. We explored the practical trade-offs between NSEC and NSEC3 for proving non-existence, considering real-world factors like Certificate Transparency logs. Finally, we clarified how DNSSEC applies seamlessly to records within your zone versus the explicit steps needed to maintain the chain of trust for delegated subdomains.

Armed with this deeper operational knowledge, the seemingly complex world of DNSSEC should feel significantly more grounded. You understand the critical touchpoints, the potential pitfalls, and crucially, how to navigate them.

In Part 3, we'll put this understanding into action. We'll tackle the often-feared scenarios of migrating your DNS provider or changing registrars without breaking DNSSEC validation, busting the myth that you need to disable it first. We'll also look beyond basic validation to explore how the foundation of trust provided by DNSSEC enables other powerful security features for your domain.