Offer persistence only on an eligible response
02A DNS client sends a query; the server may reply with its current idle timeout. OPT support in that query gives the server room to signal the option.
Separate query: no OPT is present. The server can answer the DNS question, but cannot add an OPT record or this option to that response. Earlier keepalive use does not override this rule.
Source for this drawing: RFC 7828 · Read RFC section 3.2.1 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
The server selects the timeout and needs request OPT.
- A client MAY include the empty option in the first or later TCP queries. A server receiving it over TCP MAY adjust local idle time if resources permit.
- A TCP query containing OPT, with or without the keepalive option, permits the server to include keepalive in its response. This is a MAY, not a requirement to accept a client’s preference.
- Without OPT in the query, the server MUST NOT put OPT in the response, even on a previously negotiated persistent connection. A client that initially asks for keepalive SHOULD periodically include OPT in subsequent queries so updates can be signalled; no interval algorithm is specified.
OPT is an EDNS pseudo-record that extends one DNS message; it is not an ordinary cached answer record. The response and timeout concern the same TCP connection. Ordinary DNS answers can still be returned when this option is absent or ineligible. Periodic OPT inclusion means using later DNS queries, not manufacturing heartbeat probes. A successful signal is permission for possible persistence, not a connection-lifetime guarantee.
Read the RFC section ↗