学习 DNS

写给真正要排障的人的 DNS 手册。

由 SRE 与 DNS 运维亲历者撰写的实战指南,没有“DNS 就是电话簿”这类比喻。讲解清晰,引用 RFC,并提供可直接复用的示例。

特别推荐 · 12 分钟阅读

SPF、DKIM、DMARC —— 实用指南

三种协议,一个目标:让你的邮件真正送达。本文从零开始为一个新域名配置三者,并解释 DMARC 报告中每一行的含义。

SPFDKIMDMARCBIMIMTA-STS
example.com TXT已验证
# SPF —— 谁被允许发送
"v=spf1"
include:_spf.google.com
ip4:192.0.2.0/24
~all
# DMARC —— 验证失败时的处理方式
"v=DMARC1"
p=reject
rua=mailto:dmarc@example.com

全部文章

12
记录类型4 分钟

什么是 A 记录?

DNS 中最基础的记录类型,把主机名映射到一个 IPv4 地址。

阅读全文
记录类型3 分钟

AAAA 记录详解

面向 DNS 的 IPv6 地址解析 —— 何时、为何、如何发布。

阅读全文
记录类型6 分钟

CNAME 记录与根域问题

为什么不能给一个区的根域配置 CNAME —— 以及替代方案。

阅读全文
邮件5 分钟

MX 记录与邮件路由

优先级如何工作,为什么 0 不是“最高”,为何备用 MX 已是上世纪做法。

阅读全文
邮件12 分钟

SPF、DKIM、DMARC —— 实用指南

三种协议,一个目标:让你的邮件真正送达。

阅读全文
邮件8 分钟

如何配置 MTA-STS

强制入站邮件使用 TLS —— 现代化的 SMTP 加固方案。

阅读全文
安全15 分钟

DNSSEC 逐 RFC 详解

信任链、NSEC 与 NSEC3、密钥滚动仪式,以及可能出错之处。

阅读全文
安全4 分钟

CAA 记录:谁有权为你签发 TLS 证书?

阻止未经授权的 CA 为你的域名签发证书。

阅读全文
安全9 分钟

子域名劫持攻击

悬挂的 CNAME 是攻击者夺取子域的入口,本文教你如何排查。

阅读全文
性能6 分钟

TTL 调优:长还是短

TTL 如何影响缓存命中率、故障切换速度与 DNS 账单。

阅读全文
性能7 分钟

Anycast 与 Unicast DNS

为什么严肃的 DNS 服务商都使用 Anycast —— 它究竟做了什么。

阅读全文
排障5 分钟

dig、host、nslookup:分别何时使用

DNS 命令行工具实战手册,含丰富示例。

阅读全文

记录类型速查

速查表 · 附 RFC 链接
A

Address (IPv4)

Points a hostname to an IPv4 address. The most common record on the internet.

AAAA

Address (IPv6)

The IPv6 equivalent of an A record. 128-bit addresses.

CNAME

Canonical Name

Alias one hostname to another. Cannot coexist with most other records.

MX

Mail Exchange

Directs email delivery to mail servers, ordered by priority.

TXT

Text

Arbitrary text. Used for SPF, DKIM, DMARC and domain verification.

NS

Name Server

Delegates a zone to the authoritative DNS servers for it.

SOA

Start of Authority

Administrative info about the zone — primary NS, contact, serial, timers.

CAA

Certificate Authority

Restricts which CAs can issue SSL certificates for the domain.

PTR

Pointer

Reverse mapping — IP address back to a hostname.

SRV

Service

Locates services on the network, used by VoIP, XMPP, Minecraft and more.

DS

Delegation Signer

Holds the hash of a DNSKEY in the parent zone, part of DNSSEC trust chain.

DNSKEY

DNS Key

Public keys used to verify DNSSEC signatures on records.