KNOWLEDGE WHY 13 ROOT NAMESERVERS

Why Are There Only 13 Root Nameserver Groups Worldwide?

The hard 512-byte UDP constraint in DNS sets a mathematical ceiling of 13 groups — fixed since 1997, now served by well over a thousand anycast mirrors worldwide.

TL;DR

The DNS protocol was originally designed to run over IPv4 + UDP, where the maximum unfragmented UDP payload is 512 bytes. The root nameserver list must fit inside a single UDP response packet (to avoid falling back to TCP, which adds latency and complexity). Working backward from the DNS wire-format layout, the maximum number of root servers that fits is 13. This isn't a number picked because it was "just enough" — it's a hard protocol ceiling from 1995, kept unchanged ever since for compatibility with billions of endpoints.

1. The Hard Protocol Constraint: 512 Bytes

1.1 IPv4 MTU and unfragmented UDP

Early ARPANET / IPv4 networks mandated a minimum MTU of 576 bytes. Every host had to be able to receive packets of this size, or even basic reachability couldn't be guaranteed (RFC 791).

RFC 791 — Internet Protocol, 1981, § 3.1 Total Length
Total Length is the length of the datagram, measured in octets,
including internet header and data.  This field allows the length of
a datagram to be up to 65,535 octets.  Such long datagrams are
impractical for most hosts and networks.  All hosts must be prepared
to accept datagrams of up to 576 octets (whether they arrive whole
or in fragments).  It is recommended that hosts only send datagrams
larger than 576 octets if they have assurance that the destination
is prepared to accept the larger datagrams.
  • 576-byte total length − typical 20-byte IP header − 8-byte UDP header ≈ 548 bytes usable (with IP options the header can reach 60 bytes, leaving less)
  • RFC 1035 § 4.2.1 settled on the more conservative power of two, 512 bytes, as the hard ceiling for DNS over UDP — safe even when the IP header carries full options
  • If a UDP response exceeds 512 bytes, it must be truncated with the TC flag set, forcing the client to fall back to TCP — and the TCP three-way handshake multiplies first-resolution latency

In other words, "the full root server list must fit in a single 512-byte UDP packet" — otherwise every root query worldwide would have to go over TCP, which would have been close to catastrophic on 1980s hardware.

1.2 Byte layout of the DNS message

The full response structure for a query of the NS records for . (the server returns all root NS records plus glue A records):

Header   (12 bytes)

Total length formula:

L(N) = 12 + 5 + 31 + 15(N-1) + 16N = 31N + 33

Substituting the 512-byte limit:

31N + 33 ≤ 512 ⇒ N ≤ 15.45

In theory this allows up to 15 groups, but headroom is needed for DNSSEC signatures, the EDNS0 OPT pseudo-record, and field padding, so it settled at 13 groups — RFC 2010 (1996) laid out the operational criteria for root servers, and the count has not changed since M-root came online the following year.

1.3 Test it yourself — <code>dig +noedns -t ns .</code> returns roughly 490–510 bytes

That's the theory. Now let's actually query a root server with dig and see how large the real response is:

terminal — dig +noedns -t ns .
$ dig +noedns -t ns .

; <<>> DiG 9.10.6 <<>> +noedns -t ns .
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35973
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 15

;; QUESTION SECTION:
;.                                IN      NS

;; ANSWER SECTION:
.                       430502  IN      NS      a.root-servers.net.
.                       430502  IN      NS      b.root-servers.net.
…  (共 13 条 NS, c ~ l 略)
.                       430502  IN      NS      m.root-servers.net.

;; ADDITIONAL SECTION:
a.root-servers.net.     516909  IN      A       198.41.0.4
b.root-servers.net.     562547  IN      A       170.247.170.2
…  (13 条 A 胶水记录全部塞进来了)
m.root-servers.net.     516941  IN      A       202.12.27.33
a.root-servers.net.     516930  IN      AAAA    2001:503:ba3e::2:30
b.root-servers.net.     562547  IN      AAAA    2801:1b8:10::b
↑ AAAA 只塞下 2 条 — 包已经到顶了

;; Query time: 8 msec
;; SERVER: 192.168.1.1#53
;; MSG SIZE  rcvd: 492

The key line at the end — a total response of roughly 490–510 bytes, comfortably under 512 (the exact figure depends on which root you ask and how many IPv6 glue records come back) — matches the byte budget above. Note the +noedns flag: dig sends EDNS0 by default, which returns well over 800 bytes. That is precisely why 512 bytes stopped being a hard limit once EDNS0 became universal — but 13 was already locked in by then.

2. Where Does 13 Come From? A Brief History

This number wasn't fixed from the start. The root server count went through several expansions; after M-root (WIDE, Japan) came online in 1997 it never changed again:

YearCountKey Event
19844Initial DNS protocol design, all servers located in the US
19917Added academic / US Department of Defense nodes
19959RIPE NCC joins (K-root) — Europe's first
199713WIDE Project joins (M-root) — Asia's first, count locked in
200713IPv6 dual-stack support added, but the IP "group count" stays unchanged
202313USC-ISI migrates the B-root IP to 170.247.170.2 (old IP 199.9.14.201 retired)

Once locked at 13, the letter names A through M never change — only hardware gets upgraded and anycast mirrors get added. The Internet's root hint file (named.root) has long been baked into the code of billions of recursive resolvers and stub clients; changing a single number would mean upgrading the entire Internet.

3. But Are There Really Only 13 Machines Worldwide?

No. This is the most common misconception. "13 root server groups" refers to 13 NS names (a–m.root-servers.net), each mapping to one IPv4 and one IPv6 address — not 13 physical machines.

Behind each IP is an anycast cluster — the same IP address is announced via BGP simultaneously by hundreds of datacenters worldwide, and a user's DNS query is routed to the nearest mirror by RTT. When a root server "goes down," it usually just means one city's mirror is under maintenance — global resolution is unaffected.

Status of the 13 Root Server Groups in 2024

LetterOperatorIPv4IPv6Anycast Mirrors
AVerisign, Inc.198.41.0.42001:503:ba3e::2:3053
BInformation Sciences Institute (USC)170.247.170.22801:1b8:10::b6
CCogent Communications192.33.4.122001:500:2::c12
DUniversity of Maryland199.7.91.132001:500:2d::d187
ENASA Ames Research Center192.203.230.102001:500:a8::e254
FInternet Systems Consortium192.5.5.2412001:500:2f::f274
GUS DOD Network Information Center192.112.36.42001:500:12::d0d6
HUS Army Research Laboratory198.97.190.532001:500:1::5317
INetnod192.36.148.172001:7fe::5375
JVerisign, Inc.192.58.128.302001:503:c27::2:30168
KRIPE NCC193.0.14.1292001:7fd::1113
LICANN199.7.83.422001:500:9f::42218
MWIDE Project202.12.27.332001:dc3::3512
Total anycast mirrors (2024)1395

Mainland China (Beijing, Shanghai, Shenzhen, Guangzhou, Hefei, and more) hosts anycast mirror nodes for several root servers including F / I / J / K / L; measured RTT to root servers from within China is typically under 20ms.

4. After EDNS0, 512 Bytes Stopped Being a Real Limit

You might ask: DNS packets of 4KB or more are common these days, so why not just "break past 13"?

  • EDNS0 (RFC 2671 in 1999, currently RFC 6891) — negotiates a larger UDP payload (commonly 4096 bytes), supported by every modern resolver
  • DNSSEC mandates EDNS0, since signature data alone far exceeds 512 bytes
  • TCP fallback — modern TCP three-way handshakes plus TLS / cookies are already cheap

But the root server list is now a network-wide consensus: every recursive resolver on earth hardcodes these 13 groups in its hint file (named.root), and behind those resolvers sit billions of endpoints. The incentive to change is zero, and the risk is a fractured global Internet, so this number will almost certainly stay 13 forever.

In short: "13 groups" became physically obsolete long ago, but is engineering-wise impossible to overturn.

5. Key Takeaways

  1. Historical reason: the 512-byte DNS-over-UDP limit → a mathematical ceiling of 15 groups → 13 chosen with headroom, fixed once M-root came online in 1997
  2. Protocol inertia: upgrading the hint files on billions of endpoints is impractical, so it never changes
  3. Real capacity: 1395+ anycast mirror nodes, making single-point failure risk near zero
  4. Reachable from China: multiple root servers including F / I / J / K / L have mirrors in mainland China, with measured RTT < 20ms

Further Reading

mimetic
mimetic
mimetic