Visual RFC.
ALL RFCs / RFC 7828
Read the RFC ↗
RFC 7828 / SIGNAL DNS IDLE TIME

Encode the timeout option

01

EDNS(0), the Extension Mechanisms for DNS, carries options inside an OPT pseudo-record. The keepalive option carries a server-selected idle timeout for an existing TCP connection.

RFC 7828 · § 3.1EXAMPLE
4 / 4
Encode the timeout optionCode 11 identifies the keepalive option within OPT. Client bytes 00 0b 00 00 omit TIMEOUT. Server example bytes 00 0b 00 02 02 58 carry data length two and TIMEOUT 600 units. High byte 02 and low byte 58 decode to 600, then 60000 milliseconds or 60 seconds. Separate endpoint values zero and 65535 mean close request and maximum encoding 6553.5 seconds. Widths are schematic; these are option bytes, not an entire DNS message or TCP frame.Inside OPT · keepalive option bytes only00 00 → TIMEOUT 0Request prompt closure after repliesff ff → TIMEOUT 655356553.5 seconds · encoding ceilingZero does not mean an infinite idle lifetimeNeither endpoint value is a recommended default
04
Keep zero and the largest value distinct.

Zero requests that the connection be closed after outstanding answers arrive. Hexadecimal ff ff represents 65535 units = 6553.5 seconds, the field’s encoding ceiling rather than a recommended policy.

Source for this drawing: RFC 7828 · Read RFC section 3.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Use code 11 and count timeout units correctly.

  • OPTION-CODE is 11. OPTION-LENGTH counts only the option data: 0 when TIMEOUT is omitted, 2 when the two-byte TIMEOUT is present.
  • Clients MUST use length 0 and omit TIMEOUT. Servers including this option MUST specify the TIMEOUT currently associated with the TCP session.
  • TIMEOUT is an unsigned two-byte value in network byte order, measured in units of 100 milliseconds: ten units make one second. The drawings show this option alone, not a complete DNS message or TCP length prefix.
DETAILS

Hexadecimal bytes use digits 0–9 and a–f. Network byte order places the high byte first. A timeout of 600 is a chosen example, not an RFC default. The maximum encoded value is 65535 units, or 6553.5 seconds; zero has a distinct close-request meaning. This option is carried with ordinary DNS traffic; it does not specify periodic TCP probe packets.

Read the RFC section ↗

All chapters in RFC 7828

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗