Skip to content

/flags/dns/dig-dnssec-do-bit

dig +dnssec: request RRSIG records and check whether a DNS answer is signed

The commands on this page have not been executed by our verification runner yet.updated
tool
DNS
command
dig
flag
+dnssec (+do)
default
+nodnssec (the DO bit is not set, so servers omit DNSSEC records)

dig +dnssec example.com A sets the DNSSEC OK (DO) bit in the EDNS OPT record of the query; the BIND manual describes it as requesting "that DNSSEC records be sent". A server that supports DNSSEC then includes the RRSIG signatures alongside the requested records (and NSEC/NSEC3 proofs for negative answers). Without the DO bit, servers leave all DNSSEC records out, so a plain dig cannot tell you whether a zone is signed. The DO bit is defined in RFC 3225; the records and the validation process in RFC 4035.

Typical commands

bash
dig +dnssec example.com A                           # A records plus RRSIG, header flags
dig +dnssec +noall +answer example.com A            # only the records and signatures
dig +dnssec @ns1.example.com example.com DNSKEY     # the zone's public keys from the authoritative server
dig +dnssec example.com DS @a.gtld-servers.net      # the delegation signer record in the parent zone
dig +dnssec nonexistent.example.com                 # NSEC/NSEC3 proof of non-existence

What to look for in the output

ItemWhereMeaning
ad flagflags line in the headerThe resolver validated the answer as secure
do flagOPT PSEUDOSECTION (EDNS: ... flags: do)The query asked for DNSSEC records
RRSIG recordsAnswer section, after the records they signSignature, algorithm, key tag, validity dates
DNSKEY / DSAnswers to those query typesKeys in the zone and their hash in the parent
NSEC / NSEC3Authority section of negative answersSigned proof that a name or type does not exist

The validity period in an RRSIG (inception and expiration timestamps) is a common source of outages: when signatures expire because re-signing stopped, validating resolvers return SERVFAIL for the whole zone.

Diagnosing a validation failure

  1. dig example.com returns SERVFAIL from a validating resolver.
  2. dig +cd example.com returns the records: validation is the problem, not the zone's availability; see dig +cd.
  3. dig +dnssec @ns1.example.com example.com DNSKEY and dig +dnssec example.com DS show whether the DS in the parent matches a key in the zone and whether the signatures are current.

Response codes such as SERVFAIL are explained in DNS RCODEs, and the record types in DNS record types.

Pitfalls

  • Large responses. DNSSEC answers are big and may be truncated over UDP; dig retries over TCP, but a firewall blocking TCP 53 breaks it.
  • The DO bit is not validation. dig itself does not validate; use delv from BIND for local validation, or rely on the ad flag from a validating resolver.
  • Propagation checks. After key rollovers, check several resolvers as in check DNS propagation.

FAQ

How do I know if the answer was validated?

Look at the flags line of the header. A validating resolver sets the ad (authenticated data) flag when every record in the answer was validated as secure. +dnssec makes the resolver return the RRSIG records; the ad flag is the validation result.

Why are there no RRSIG records with +dnssec?

The zone is not signed, or the resolver strips DNSSEC data. Query the authoritative server directly with @ns1.example.com +dnssec to see whether the zone itself publishes signatures.

Is +do the same as +dnssec?

Yes. The BIND manual lists +dnssec, +do, +nodnssec and +nodo as the same option: it sets the DNSSEC OK (DO) bit in the EDNS OPT record of the query.

Sources