Fundamentals 4 min read

Why Do Root DNS Servers Return Only 13 IP Addresses? Understanding DNS Packet Limits

This article explains why a single recursive DNS query to a root server returns only 13 IP addresses by examining DNS packet structure, MTU constraints, UDP/TCP transport limits, and the 512‑byte size restriction that governs DNS responses.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Why Do Root DNS Servers Return Only 13 IP Addresses? Understanding DNS Packet Limits

DNS Recursive Query Overview

A recursive DNS query first contacts the root name servers, then proceeds to top‑level domains such as .com and .edu. Although root servers store many IPv4 addresses, a single query to a root server returns only 13 IP addresses. To understand why, we need to look at the DNS packet structure and transmission limits.

1. DNS Packet Transmission Limits

The Ethernet maximum transmission unit (MTU) is 1500 bytes. Subtracting the IP header (20 bytes) and the UDP header (8 bytes) leaves 1472 bytes for the DNS payload, but DNS imposes a stricter limit.

DNS primarily uses UDP, which is an unreliable protocol without the timeout and retransmission mechanisms of TCP. To avoid IP fragmentation, UDP services enforce a maximum packet length.

In practice, DNS limits the message size to 512 bytes . This limit originates from the original IP specification, which requires hosts to handle at least 576 bytes; DNS applications therefore cap their payload to 512 bytes to stay safely within that bound.

2. TCP MSS Negotiation (Illustration)

During the TCP three‑way handshake, the MSS (Maximum Segment Size) field in the SYN packet indicates the largest segment the sender can accept. Typically, MSS = MTU - 20 (IP header) - 20 (TCP header). Both ends announce their MSS, and the smaller value is used for the connection, preventing fragmentation.

3. DNS UDP and TCP Transport

DNS can operate over both UDP and TCP. In most captures (e.g., with Wireshark), DNS queries are sent via UDP. An example packet is shown below.

4. DNS Response Fields and Truncation

The Truncated flag in a DNS response indicates whether the reply exceeded the 512‑byte limit. If the flag is set (value 1), only the first 512 bytes are returned, and the client must retry the request over TCP, which adds latency.

When querying root NS records, the 512‑byte limit is only sufficient to include the NS and A records of the 13 root name servers. Therefore, even though more root server addresses exist, a single response can contain at most those 13 IP addresses.

In summary, DNS packet size limits—driven by MTU, UDP constraints, and the historic 512‑byte restriction—explain why a root DNS server returns only 13 IP addresses in a single query.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

TCPDNSMTUUDPPacket SizeRoot Servers
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.