204 lines
453 KiB
HTML
204 lines
453 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="zh"><head><title>DNS 域名系统</title><meta charset="utf-8"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com"/><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM Plex Mono&family=Noto Serif Simplified Chinese:wght@400;700&family=Source Sans Pro:ital,wght@0,400;0,600;1,400;1,600&display=swap"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta property="og:title" content="DNS 域名系统"/><meta property="og:description" content="DNS 域名系统概述."/><meta property="og:image" content="https://wiki.7wate.com/static/og-image.png"/><meta property="og:width" content="1200"/><meta property="og:height" content="675"/><link rel="icon" href="../../../static/icon.png"/><meta name="description" content="DNS 域名系统概述."/><meta name="generator" content="Quartz"/><link href="../../../index.css" rel="stylesheet" type="text/css" spa-preserve/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/katex.min.css" rel="stylesheet" type="text/css" spa-preserve/><script src="../../../prescript.js" type="application/javascript" spa-preserve></script><script type="application/javascript" spa-preserve>const fetchData = fetch("../../../static/contentIndex.json").then(data => data.json())</script></head><body data-slug="Technology/ComputerNetwork/网络协议/DNS-域名系统"><div id="quartz-root" class="page"><div id="quartz-body"><div class="left sidebar"><h2 class="page-title"><a href="../../..">🪴 X·Eden</a></h2><div class="spacer mobile-only"></div><div class="search"><button class="search-button" id="search-button"><p>搜索</p><svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.9 19.7"><title>Search</title><g class="search-path" fill="none"><path stroke-linecap="square" d="M18.5 18.3l-5.4-5.4"></path><circle cx="8" cy="8" r="7"></circle></g></svg></button><div id="search-container"><div id="search-space"><input autocomplete="off" id="search-bar" name="search" type="text" aria-label="搜索些什么" placeholder="搜索些什么"/><div id="search-layout" data-preview="true"></div></div></div></div><button class="darkmode" id="darkmode"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="dayIcon" x="0px" y="0px" viewBox="0 0 35 35" style="enable-background:new 0 0 35 35" xml:space="preserve" aria-label="暗色模式"><title>暗色模式</title><path d="M6,17.5C6,16.672,5.328,16,4.5,16h-3C0.672,16,0,16.672,0,17.5 S0.672,19,1.5,19h3C5.328,19,6,18.328,6,17.5z M7.5,26c-0.414,0-0.789,0.168-1.061,0.439l-2,2C4.168,28.711,4,29.086,4,29.5 C4,30.328,4.671,31,5.5,31c0.414,0,0.789-0.168,1.06-0.44l2-2C8.832,28.289,9,27.914,9,27.5C9,26.672,8.329,26,7.5,26z M17.5,6 C18.329,6,19,5.328,19,4.5v-3C19,0.672,18.329,0,17.5,0S16,0.672,16,1.5v3C16,5.328,16.671,6,17.5,6z M27.5,9 c0.414,0,0.789-0.168,1.06-0.439l2-2C30.832,6.289,31,5.914,31,5.5C31,4.672,30.329,4,29.5,4c-0.414,0-0.789,0.168-1.061,0.44 l-2,2C26.168,6.711,26,7.086,26,7.5C26,8.328,26.671,9,27.5,9z M6.439,8.561C6.711,8.832,7.086,9,7.5,9C8.328,9,9,8.328,9,7.5 c0-0.414-0.168-0.789-0.439-1.061l-2-2C6.289,4.168,5.914,4,5.5,4C4.672,4,4,4.672,4,5.5c0,0.414,0.168,0.789,0.439,1.06 L6.439,8.561z M33.5,16h-3c-0.828,0-1.5,0.672-1.5,1.5s0.672,1.5,1.5,1.5h3c0.828,0,1.5-0.672,1.5-1.5S34.328,16,33.5,16z M28.561,26.439C28.289,26.168,27.914,26,27.5,26c-0.828,0-1.5,0.672-1.5,1.5c0,0.414,0.168,0.789,0.439,1.06l2,2 C28.711,30.832,29.086,31,29.5,31c0.828,0,1.5-0.672,1.5-1.5c0-0.414-0.168-0.789-0.439-1.061L28.561,26.439z M17.5,29 c-0.829,0-1.5,0.672-1.5,1.5v3c0,0.828,0.671,1.5,1.5,1.5s1.5-0.672,1.5-1.5v-3C19,29.672,18.329,29,17.5,29z M17.5,7 C11.71,7,7,11.71,7,17.5S11.71,28,17.5,28S28,23.29,28,17.5S23.29,7,17.5,7z M17.5,25c-4.136,0-7.5-3.364-7.5-7.5 c0-4.136,3.364-7.5,7.5-7.5c4.136,0,7.5,3.364,7.5,7.5C25,21.636,21.636,25,17.5,25z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="nightIcon" x="0px
|
|||
|
<h3 id="定义和目的">定义和目的<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#定义和目的" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<p>**域名系统(Domain Name System,DNS)是一个用于将域名(如 <a href="http://www.example.com%EF%BC%89%E8%BD%AC%E6%8D%A2%E4%B8%BA" class="external">www.example.com)转换为<svg aria-hidden="true" class="external-icon" viewBox="0 0 512 512"><path d="M320 0H288V64h32 82.7L201.4 265.4 178.7 288 224 333.3l22.6-22.6L448 109.3V192v32h64V192 32 0H480 320zM32 32H0V64 480v32H32 456h32V480 352 320H424v32 96H64V96h96 32V32H160 32z"></path></svg></a> IP 地址的分布式数据库。**当我们在浏览器中输入一个网站的 URL 时,DNS 系统就会被调用,将 URL 中的域名转换为对应的 IP 地址,从而使用户能够访问到正确的网站。DNS 的存在使得用户无需记住复杂的 IP 地址,只需要记住易于理解和记忆的域名就可以访问互联网,大大提升了用户的使用体验。</p>
|
|||
|
<h3 id="发展历程">发展历程<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#发展历程" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<p>DNS 在 1980 年代由 Paul Mockapetris 发明,以解决当时互联网上主机名和 IP 地址管理的问题。原来的主机名和 IP 地址的对应关系是存储在一个叫做 HOSTS.TXT 的文件中,随着互联网的发展,这个文件变得越来越大,难以管理。</p>
|
|||
|
<p>因此,DNS 被设计出来,以提供一种可扩展的名称解析系统。DNS 提供了一种分布式的解决方案,允许主机名和 IP 地址的对应关系在各个服务器上进行存储和管理。</p>
|
|||
|
<h2 id="工作原理">工作原理<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#工作原理" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<pre><code class="mermaid">graph LR
|
|||
|
A[客户端] -->|DNS 请求| B[递归服务器]
|
|||
|
B -->|查找缓存| C{找到结果?}
|
|||
|
C -->|是| D[返回结果]
|
|||
|
C -->|否| E[向根服务器查询]
|
|||
|
E --> F[根服务器返回顶级服务器]
|
|||
|
F --> G[向顶级服务器查询]
|
|||
|
G --> H[顶级服务器返回权威服务器]
|
|||
|
H --> I[向权威服务器查询]
|
|||
|
I --> J[权威服务器返回IP]
|
|||
|
J --> K[缓存结果并返回给客户端]
|
|||
|
</code></pre>
|
|||
|
<p>当客户端发出域名解析请求时,DNS 服务器会响应这个请求,提供相应的 IP 地址。具体来说,<strong>这个过程涉及到递归查询和迭代查询两个步骤。</strong></p>
|
|||
|
<ol>
|
|||
|
<li>用户在浏览器中输入网址。</li>
|
|||
|
<li>客户端(你的计算机)向 DNS 递归服务器发送请求。</li>
|
|||
|
<li>递归服务器首先在缓存中查找结果。</li>
|
|||
|
<li>如果缓存中没有结果,递归服务器会向其他 DNS 服务器查询。</li>
|
|||
|
<li>服务器之间进行一系列查询,最后在权威服务器上找到正确的 IP 地址。</li>
|
|||
|
<li>权威服务器将 IP 地址返回给递归服务器。</li>
|
|||
|
<li>递归服务器将 IP 地址缓存并返回给客户端。</li>
|
|||
|
<li>客户端通过接收到的 IP 地址访问网站。</li>
|
|||
|
</ol>
|
|||
|
<h2 id="域名架构">域名架构<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#域名架构" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<p>DNS 的域名架构是分层次的,每个级别的域名都由特定的实体管理。例如,.com 是顶级域,由全球的域名系统管理;example.com 是二级域,可能由一个组织或个人管理。每个层级的域名管理者负责维护其域名下的所有记录。</p>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="table-container"><table><thead><tr><th>域名</th><th>描述</th></tr></thead><tbody><tr><td>.com</td><td>通用顶级域名,经常用于商业网站</td></tr><tr><td>.org</td><td>通用顶级域名,经常用于非营利组织</td></tr><tr><td>.net</td><td>通用顶级域名,经常用于互联网服务提供商</td></tr><tr><td>.edu</td><td>限制顶级域名,仅用于教育机构</td></tr><tr><td>.gov</td><td>限制顶级域名,仅用于美国政府</td></tr><tr><td>.mil</td><td>限制顶级域名,仅用于美国军事部门</td></tr><tr><td>.co.uk</td><td>英国的国家代码顶级域名</td></tr><tr><td>.de</td><td>德国的国家代码顶级域名</td></tr><tr><td>.ca</td><td>加拿大的国家代码顶级域名</td></tr><tr><td>.cn</td><td>中国的国家代码顶级域名</td></tr></tbody></table></div>
|
|||
|
<h2 id="系统组成">系统组成<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#系统组成" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<p>DNS 系统由多种服务器和各种类型的 DNS 记录组成。</p>
|
|||
|
<h3 id="服务器">服务器<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#服务器" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<ul>
|
|||
|
<li><strong>权威服务器</strong>:存储特定域名与其关联 IP 地址的服务器。权威服务器是 DNS 查询的最终目的地。</li>
|
|||
|
<li><strong>递归服务器</strong>:接收来自客户端的 DNS 查询,与其他服务器进行交流以解析查询。</li>
|
|||
|
<li><strong>缓存服务器</strong>:存储 DNS 查询结果,加快解析速度,减少网络延迟。</li>
|
|||
|
<li><strong>根服务器</strong>:全球仅有 13 组 IPv4 根服务器,它们知道所有顶级域的权威服务器的位置。</li>
|
|||
|
</ul>
|
|||
|
<h3 id="记录">记录<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#记录" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<p>DNS 记录是存储在 DNS 服务器上的数据,用于定义域名的各种属性。以下是一些常见的 DNS 记录类型:</p>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="table-container"><table><thead><tr><th style="text-align:left;">记录类型</th><th style="text-align:left;">使用目的</th></tr></thead><tbody><tr><td style="text-align:left;">A</td><td style="text-align:left;">将域名指向一个 IP 地址(外网地址)。</td></tr><tr><td style="text-align:left;">CNAME</td><td style="text-align:left;">将域名指向另一个域名,再由另一个域名提供 IP 地址(外网地址)。</td></tr><tr><td style="text-align:left;">MX</td><td style="text-align:left;">设置邮箱,让邮箱能收到邮件。</td></tr><tr><td style="text-align:left;">NS</td><td style="text-align:left;">将子域名交给其他 DNS 服务商解析。</td></tr><tr><td style="text-align:left;">SPF</td><td style="text-align:left;">将域名指向发送邮件的服务器,是一种以 IP 地址认证电子邮件发件人身份的技术,是非常高效的垃圾邮件解决方案。</td></tr><tr><td style="text-align:left;">AAAA</td><td style="text-align:left;">将域名指向一个 IPv6 地址。</td></tr><tr><td style="text-align:left;">SRV</td><td style="text-align:left;">用来标识某台服务器使用了某个服务,常见于微软系统的目录管理。</td></tr><tr><td style="text-align:left;">TXT</td><td style="text-align:left;">对域名进行标识和说明,绝大多数的 TXT 记录是用来做 SPF 记录(反垃圾邮件)。</td></tr><tr><td style="text-align:left;">CAA</td><td style="text-align:left;">授权指定 CA 机构为域名签发 SSL 证书,以防止 SSL 证书错误签发。</td></tr><tr><td style="text-align:left;">HTTPS</td><td style="text-align:left;">将域名指向另一个域名指定值,再由另一个域名提供 IP 地址,就需要添加 HTTPS 记录。</td></tr><tr><td style="text-align:left;">SVCB</td><td style="text-align:left;">新型服务绑定记录类型,允许服务指向多个客户端,并关联自定义参数值。</td></tr><tr><td style="text-align:left;">隐、显性 URL</td><td style="text-align:left;">将一个域名指向另外一个已经存在的站点。</td></tr></tbody></table></div>
|
|||
|
<h2 id="安全">安全<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#安全" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<h3 id="威胁">威胁<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#威胁" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<ul>
|
|||
|
<li><strong>欺骗和缓存污染</strong>:攻击者可能会伪造 DNS 响应,导致用户被重定向到恶意网站。如果递归服务器收到一个伪造的 DNS 响应并将其缓存,就会导致缓存污染,影响到所有使用这个递归服务器的用户。</li>
|
|||
|
<li><strong>针对基础设施的 DDoS 攻击</strong>:通过发送大量的查询请求,可以使 DNS 服务器瘫痪,影响用户访问互联网的能力。</li>
|
|||
|
</ul>
|
|||
|
<h3 id="措施">措施<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#措施" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h3>
|
|||
|
<ul>
|
|||
|
<li><strong>DNSSEC(域名系统安全扩展)</strong>:这是一种通过在 DNS 查询结果中添加数字签名的技术,可以保证 DNS 查询结果的真实性和完整性,防止 DNS 欺骗和缓存污染。</li>
|
|||
|
<li><strong>过滤和黑名单</strong>:通过设置过滤规则和黑名单,可以阻止恶意网站的 DNS 查询,保护用户免受恶意网站的攻击。</li>
|
|||
|
</ul>
|
|||
|
<h2 id="管理">管理<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#管理" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<p>配置和管理 DNS 服务器也是一个重要的工作。有很多种类型的 DNS 服务器软件可以选择,例如 BIND、Microsoft DNS、PowerDNS 等。不同的软件有不同的特点和优点,需要根据实际需要来选择。DNS 服务器可以通过命令行界面或基于 Web 的界面进行管理。命令行界面更灵活,但需要一定的技术知识;基于 Web 的界面更易于使用,但可能没有命令行界面那么强大。</p>
|
|||
|
<p>在管理 DNS 服务器时,保护服务器安全是非常重要的。定期更新软件,严格限制访问权限,可以有效地防止攻击。特别是在面对 DDoS 攻击时,限制查询的频率和数量是一种有效的防御手段。此外,实时监控 DNS 服务器的状态,可以及时发现和解决问题。使用一些专门的监控和故障排除工具,可以大大提高工作效率。</p>
|
|||
|
<h2 id="扩展">扩展<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#扩展" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<ul>
|
|||
|
<li><strong>DoH(DNS over HTTPS)和 DoT(DNS over TLS)</strong>:这两种新技术可以实现 DNS 查询的加密传输,从而提高用户的隐私保护。DoH 和 DoT 都可以防止 DNS 查询被窃听或篡改,保护用户的互联网使用安全。</li>
|
|||
|
<li><strong>国际化域名(IDNs)</strong>:国际化域名是一种新的域名类型,允许使用非拉丁字符的域名,如中文、阿拉伯文等。这大大扩展了域名的使用范围,使得更多的人可以方便地使用互联网。</li>
|
|||
|
<li><strong>基于 DNS 的服务发现(DNS-SD)</strong>:DNS-SD 是一种使用 DNS 协议在网络上自动发现可用服务的技术。例如,打印机、文件共享、网络摄像头等设备和服务,可以通过 DNS-SD 自动地在网络上宣告其存在,用户可以方便地发现和使用这些服务。</li>
|
|||
|
</ul>
|
|||
|
<h2 id="结论">结论<a role="anchor" aria-hidden="true" tabindex="-1" data-no-popover="true" href="#结论" class="internal"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg></a></h2>
|
|||
|
<p>**DNS 是互联网的基础设施之一,它将用户可以理解和记忆的域名转换为计算机可以理解的 IP 地址。**这个过程涉及到多个不同类型的服务器和记录,每一个部分都在整个解析过程中扮演着重要的角色。在 DNS 查询过程中,客户端发出请求,递归服务器处理这个请求,并从权威服务器获取响应,然后将响应返回给客户端。为了提高效率,这些查询结果会被缓存在各个层级的服务器上。</p>
|
|||
|
<p>尽管 DNS 已经有了几十年的历史,但它仍在不断发展和创新。新的技术如 DoH 和 DoT,使得 DNS 查询可以在加密的通道中传输,提高了用户的隐私保护。国际化域名则使得更多的人可以方便地使用互联网。同时,DNS 也面临着一些挑战,如安全威胁、管理复杂性等,这需要我们不断地学习和改进,以保护互联网的安全和稳定。</p></article><hr/><div class="page-footer"></div></div><div class="right sidebar"><div class="graph"><h3>关系图谱</h3><div class="graph-outer"><div id="graph-container" data-cfg="{"drag":true,"zoom":true,"depth":1,"scale":1.1,"repelForce":0.5,"centerForce":0.3,"linkDistance":30,"fontSize":0.6,"opacityScale":1,"showTags":true,"removeTags":[],"focusOnHover":false}"></div><button id="global-graph-icon" aria-label="Global Graph"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 55 55" fill="currentColor" xml:space="preserve"><path d="M49,0c-3.309,0-6,2.691-6,6c0,1.035,0.263,2.009,0.726,2.86l-9.829,9.829C32.542,17.634,30.846,17,29,17
|
|||
|
s-3.542,0.634-4.898,1.688l-7.669-7.669C16.785,10.424,17,9.74,17,9c0-2.206-1.794-4-4-4S9,6.794,9,9s1.794,4,4,4
|
|||
|
c0.74,0,1.424-0.215,2.019-0.567l7.669,7.669C21.634,21.458,21,23.154,21,25s0.634,3.542,1.688,4.897L10.024,42.562
|
|||
|
C8.958,41.595,7.549,41,6,41c-3.309,0-6,2.691-6,6s2.691,6,6,6s6-2.691,6-6c0-1.035-0.263-2.009-0.726-2.86l12.829-12.829
|
|||
|
c1.106,0.86,2.44,1.436,3.898,1.619v10.16c-2.833,0.478-5,2.942-5,5.91c0,3.309,2.691,6,6,6s6-2.691,6-6c0-2.967-2.167-5.431-5-5.91
|
|||
|
v-10.16c1.458-0.183,2.792-0.759,3.898-1.619l7.669,7.669C41.215,39.576,41,40.26,41,41c0,2.206,1.794,4,4,4s4-1.794,4-4
|
|||
|
s-1.794-4-4-4c-0.74,0-1.424,0.215-2.019,0.567l-7.669-7.669C36.366,28.542,37,26.846,37,25s-0.634-3.542-1.688-4.897l9.665-9.665
|
|||
|
C46.042,11.405,47.451,12,49,12c3.309,0,6-2.691,6-6S52.309,0,49,0z M11,9c0-1.103,0.897-2,2-2s2,0.897,2,2s-0.897,2-2,2
|
|||
|
S11,10.103,11,9z M6,51c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S8.206,51,6,51z M33,49c0,2.206-1.794,4-4,4s-4-1.794-4-4
|
|||
|
s1.794-4,4-4S33,46.794,33,49z M29,31c-3.309,0-6-2.691-6-6s2.691-6,6-6s6,2.691,6,6S32.309,31,29,31z M47,41c0,1.103-0.897,2-2,2
|
|||
|
s-2-0.897-2-2s0.897-2,2-2S47,39.897,47,41z M49,10c-2.206,0-4-1.794-4-4s1.794-4,4-4s4,1.794,4,4S51.206,10,49,10z"></path></svg></button></div><div id="global-graph-outer"><div id="global-graph-container" data-cfg="{"drag":true,"zoom":true,"depth":-1,"scale":0.9,"repelForce":0.5,"centerForce":0.3,"linkDistance":30,"fontSize":0.6,"opacityScale":1,"showTags":true,"removeTags":[],"focusOnHover":true}"></div></div></div><div class="toc desktop-only"><button type="button" id="toc" class aria-controls="toc-content" aria-expanded="true"><h3>目录</h3><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="fold"><polyline points="6 9 12 15 18 9"></polyline></svg></button><div id="toc-content" class><ul class="overflow"><li class="depth-0"><a href="#简介" data-for="简介">简介</a></li><li class="depth-1"><a href="#定义和目的" data-for="定义和目的">定义和目的</a></li><li class="depth-1"><a href="#发展历程" data-for="发展历程">发展历程</a></li><li class="depth-0"><a href="#工作原理" data-for="工作原理">工作原理</a></li><li class="depth-0"><a href="#域名架构" data-for="域名架构">域名架构</a></li><li class="depth-0"><a href="#系统组成" data-for="系统组成">系统组成</a></li><li class="depth-1"><a href="#服务器" data-for="服务器">服务器</a></li><li class="depth-1"><a href="#记录" data-for="记录">记录</a></li><li class="depth-0"><a href="#安全" data-for="安全">安全</a></li><li class="depth-1"><a href="#威胁" data-for="威胁">威胁</a></li><li class="depth-1"><a href="#措施" data-for="措施">措施</a></li><li class="depth-0"><a href="#管理" data-for="管理">管理</a></li><li class="depth-0"><a href="#扩展" data-for="扩展">扩展</a></li><li class="depth-0"><a href="#结论" data-for="结论">结论</a></li></ul></div></div><div class="explorer mobile-only"><button type="button" id="explorer" data-behavior="collapse" data-collapsed="collapsed" data-savestate="true" data-tree="[{"path":"Personal","collapsed":true},{"path":"Personal/Blog","collapsed":true},{"path":"Personal/Blog/2018","collapsed":true},{"path":"Personal/Blog/2020","collapsed":true},{"path":"Personal/Blog/2021","collapsed":true},{"path":"Personal/Blog/2022","collapsed":true},{"path":"Personal/Blog/2023","collapsed":true},{"path":"Personal/Blog/2024","collapsed":true},{"path":"Personal/Book","collapsed":true},{"path":"Personal/Book/个人成长","collapsed":true},{"path":"Personal/Book/医学健康","collapsed":true},{"path":"Personal/Book/历史","collapsed":true},{"path":"Personal/Book/哲学宗教","collapsed":true},{"path":"Personal/Book/心理","collapsed":true},{"path":"Personal/Book/政治军事","collapsed":true},{"path":"Personal/Book/教育学习","collapsed":true},{"path":"Personal/Book/文学","collapsed":true},{"path":"Personal/Book/生活百科","collapsed":true},{"path":"Personal/Book/社会文化","collapsed":true},{"path":"Personal/Book/科学技术","collapsed":true},{"path":"Personal/Book/经济理财","collapsed":true},{"path":"Personal/Book/艺术","collapsed":true},{"path":"Personal/Book/计算机","collapsed":tr
|
|||
|
</script><script type="module">
|
|||
|
let mermaidImport = undefined
|
|||
|
document.addEventListener('nav', async () => {
|
|||
|
if (document.querySelector("code.mermaid")) {
|
|||
|
mermaidImport ||= await import('https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.7.0/mermaid.esm.min.mjs')
|
|||
|
const mermaid = mermaidImport.default
|
|||
|
const darkMode = document.documentElement.getAttribute('saved-theme') === 'dark'
|
|||
|
mermaid.initialize({
|
|||
|
startOnLoad: false,
|
|||
|
securityLevel: 'loose',
|
|||
|
theme: darkMode ? 'dark' : 'default'
|
|||
|
})
|
|||
|
|
|||
|
await mermaid.run({
|
|||
|
querySelector: '.mermaid'
|
|||
|
})
|
|||
|
}
|
|||
|
});
|
|||
|
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.9/contrib/copy-tex.min.js" type="application/javascript"></script><script src="../../../postscript.js" type="module"></script></html>
|