Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

DNS EDNS(0) Evidence

Direct answer

EDNS extends DNS through an OPT record added to a message: it lets the sender state how large a UDP reply it accepts, carries the flag that requests DNSSEC data, and holds optional extras.

When to use this

Use it when large answers disappear, when a query works only without EDNS, or to read the OPT pseudosection in dig output.

First 30 seconds

1. dig <name> — is there an OPT pseudosection in the answer?

2. dig <name> +noedns — does it work without EDNS when it fails with?

3. Yes → a device on the path mishandles the extension.

4. Large answers lost → set the UDP size to 1232 on the resolver.

5. SERVFAIL → look for an extended error in the OPT section.

Operational verification

query carries OPT with the UDP size and flags → server answers with OPT → answer within the advertised size, or truncated → no fragmentation on the path

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commanddig example.com
Scope / prerequisiteUse it when large answers disappear, when a query works only without EDNS, or to read the OPT pseudosection in dig outp…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational verification Verify boundary
dig example.com
dig example.com +noedns
dig example.com +bufsize=1232
dig example.com +nsid @192.0.2.53
dig example.com +dnssec

dig prints the OPT record as a pseudosection:

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232

showing the version, the flags and the UDP size the server advertises. +noedns sends a plain query without the extension — useful to see whether EDNS itself is the problem. +bufsize sets the size offered. +nsid asks the server to name itself, and +dnssec sets the DO flag.

Known-good: the answer contains an OPT pseudosection with version 0, and the query works equally with and without EDNS.

Step 2 Failure isolation workflow Narrow the fault
  • A query works with +noedns and fails without it. A firewall or old server on the path mishandles queries that carry OPT.
  • Large answers disappear, small ones arrive. The advertised UDP size exceeds what the path carries unfragmented; set 1232 on the resolver.
  • The answer has no OPT section. The server does not support EDNS; large answers and DNSSEC are unavailable from it.
  • FORMERR in reply to ordinary queries. The server rejects the extension; resolvers retry without it, which slows every lookup.
  • Answers differ by the client's location. The client-subnet option is in use; that is by design.
  • SERVFAIL with no explanation. Look for an extended DNS error option in the reply; newer resolvers state the reason there.
  • Different replies from the same address. Several machines share it; +nsid shows which one answered.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

The advertised UDP size decides how big an answer may be; 1232 bytes avoids fragmentation, larger values invite lost replies. Old firewalls and servers sometimes mishandle queries that carry the extension — dig +noedns shows whether that is the problem.

Key checks
  • dig <name> — the OPT pseudosection: version, flags, udp: size.
  • dig <name> +noedns — a plain query without the extension.
  • dig <name> +bufsize=1232 — set the size offered.
  • dig <name> +nsid @<server> — which machine answered.
  • dig <name> +dnssec — sets the DO flag.
ReferenceWhat it is1 section · depth on demand

Mechanics & mental model

EDNS is the extension mechanism that lets DNS go beyond the limits of its original design: answers larger than 512 bytes over UDP, extra flags such as the one that requests DNSSEC data, and optional pieces of information attached to a query or answer. It is carried in a special record, OPT, added to the end of a message.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

Practically every query sent today uses EDNS, so its settings decide how large an answer may be and whether DNSSEC records come along. Its problems are of two kinds: an advertised size that is too large for the path, so answers are fragmented and lost; and old firewalls or servers that mishandle queries carrying the extension.

ReferenceHow it works1 section · depth on demand

How it works

The OPT record. It appears in the additional section and is not real zone data. It reuses the fields of an ordinary record for its own purposes:

Field of the recordUsed for
NameEmpty (the root)
Type41 = OPT
ClassThe largest UDP message the sender can receive, in bytes
TTLSplit into: an extension of the result code, the EDNS version (0), and flags — notably DO, "DNSSEC OK"
DataA list of options, each with a code, a length and a value

UDP size. The value tells the other side how big a UDP reply may be. For years 4096 was common, which invited fragmented replies that many networks drop. The current recommendation is 1232: it fits within the smallest IPv6 packet size, so it is never fragmented. Larger answers are truncated and fetched over TCP.

The DO flag asks the server to include DNSSEC records — signatures — in the answer. Resolvers that validate set it on all their queries.

Options in use.

CodeOptionPurpose
3NSIDAsks the server to identify itself; useful to see which machine behind a shared address answered
8Client subnetA resolver tells the server roughly where the client is, for location-dependent answers
10CookieA lightweight check that the sender's address is not forged
12PaddingHides message sizes on encrypted transports
15Extended DNS errorAdds a specific reason to a failure such as SERVFAIL

Negotiation. There is no handshake. A client includes OPT in its query; a server that supports EDNS includes OPT in its answer. A server that does not understand it answers with a format error or without OPT, and the client falls back. A server asked for a version it does not support answers BADVERS.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

EDNS(0) in packets

EDNS extends DNS without changing the header, by adding a pseudo-record to the additional section. RFC 6891 defines this OPT record (type 41). Its owner name is the root, and its CLASS field holds the requester's UDP payload size. Its TTL field holds an extended RCODE, the EDNS version and flags, including DO (DNSSEC OK). Payload sizes below 512 must be treated as 512, and 4096 is suggested as a starting point. Since then, operators have converged on about 1232 bytes to avoid fragmentation. A message must carry at most one OPT record.

OPT record fields (RFC 6891)

FieldNormal record meaningIn OPT
NAMEOwnerRoot (empty)
TYPERecord type41
CLASSClassUDP payload size the sender accepts
TTLCache timeExtended RCODE, version, DO bit, Z
RDATADataOptions (cookies, client subnet, padding, …)

Server behaviour (RFC 6891)

SituationResponse
The server doesn't support EDNSFORMERR without an OPT record; the client may retry without EDNS
Unsupported EDNS versionBADVERS (extended RCODE 16)
More than one OPT recordFORMERR
DNSSEC neededDon't fall back to non-EDNS queries

Choosing a buffer size

SizeConsequence
512Many answers truncated; more TCP
About 1232Fits in IPv6's minimum MTU without fragmentation
4096Large answers are fragmented; fragments are often dropped

RFC 6891 itself warns that very large values guarantee IP fragmentation and may stop answers arriving.

host$ dig @10.20.0.53 example.net A +noall +comments | grep -A1 "OPT PSEUDOSECTION"
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
host$ dig @10.20.0.53 example.net A +noedns +noall +comments | grep -c OPT
0
host$ dig @10.20.0.53 example.net A +edns=1 +noall +comments | grep status
;; ->>HEADER<<- opcode: QUERY, status: BADVERS, id: 5120
host$ tshark -r dns.pcap -Y "dns.rr.type == 41" -T fields -e dns.rr.udp_payload_size -e dns.resp.z.do | sort | uniq -c

The +edns=1 test checks whether a server handles unknown EDNS versions correctly, as RFC 6891 requires.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 1034

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → DNS EDNS(0) Evidence. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc1034.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
edns0dns opt recordedns udp size
Embedded quick reference

Operational notes

Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.

DNS EDNS Quick Reference

OPT record, UDP payload and DO flag.

OPT = EDNS metadata pseudo-record.

UDP payload = advertised receive size.

DO = DNSSEC OK request bit.

Version = EDNS version.

Compare behavior with/without EDNS when middleboxes or fragmentation are suspected.

Confirmation

Confirm action

Continue?