Back to tree

🌐 域名系统:网络的电话簿🌐 DNS: The Phonebook of the Internet

上一片里,IP 地址是每台电脑的门牌号。可 203.0.113.8 谁记得住?小电脑想打开“张三家”,得先查号。 Last leaf, an IP address was each computer's house number. But who can remember 203.0.113.8? To visit "Zhangsan's place", the little computer must ask directory first.

第 1 步:名字换门牌号Step 1: Names become house numbers

小电脑只记得“张三家”,门牌号是多少?The little computer only remembers "Zhangsan's place" — what is its number?

小电脑抱着张三家包裹问查号台,阿姨查出幸福路8号
小电脑抱着“张三家”的包裹,来到查号台。阿姨翻开大电话簿,举起牌子:“幸福路 8 号”。域名系统(DNS)就是这本电话簿:把好记的名字,换成电脑能找的 IP。 Holding a parcel for "Zhangsan's place", the little computer visits the directory stand. The clerk opens the big phonebook and holds up a sign: "8 Happiness Road". DNS is that phonebook: it turns easy names into IPs computers can find.

电话簿这么厚,一个阿姨查得完吗?The phonebook is huge — can one clerk know it all?

第 2 步:一级一级往下问Step 2: Ask level by level

小电脑从根服务器问到.com服务器再到权威服务器拿回IP
小电脑查 zhangsan.com,先问根服务器。它指路:去问 .com 服务器。再指路:去问权威服务器。最后拿到门牌号 203.0.113.8。层层分工,谁都不累。 Looking up zhangsan.com, the little computer asks the root server first. It points on: ask the .com server. Then: ask the authoritative server. At last it gets 203.0.113.8. Levels share the work, so nobody is overloaded.

每次都问一圈,不嫌慢吗?Asking all around every time — isn't that slow?

第 3 步:查过就记小本Step 3: Write it down once asked

第一次问一圈很慢,第二次翻缓存小本秒出
第一次问一圈,又慢又等沙漏。第二次翻“缓存”小本,闪电一样快。查过的名字记下来,有空还会过期更新。下一片,我们看看查到门牌后怎么送货。 The first lookup tours every server, slow as an hourglass. The second time, the "cache" notebook answers fast as lightning. Asked names are kept, refreshed when they expire. Next leaf, we deliver goods to the number we found.

🎮 当一回查号员(60 秒)🎮 Be the resolver (60 seconds)

电脑报来一个网址,你去问对的服务器。新网址逐级问,查过的翻小本,共完成 4 次查询。The computer names a website, and you ask the right servers. New names go level by level, seen ones come from the notebook. Finish 4 lookups.

一句话记住它:域名是好记的名字,DNS 负责把它换成 IP;新名字逐级问,查过的翻小本。 Remember it in one line: a domain is an easy name; DNS turns it into an IP — new names go level by level, seen ones come from the notebook.
DNS 把域名翻译成 IP,人才记得住网DNS translates domains into IPs, so people can use the net 新域名从根到顶级域再到权威逐级问New names are asked level by level: root, top-level, authoritative 查过的记进缓存,下次直接翻小本Asked names live in the cache — next time just open the notebook
内容参考 OpenStax 等公开教材,多来源核对 · AI 生成、人工审核 · 发现错误欢迎指正,帮这片叶子长得更好。 Based on OpenStax and other open textbooks, cross-checked across sources · AI-generated, human-reviewed · Spotted a mistake? Tell us — help this leaf grow.