| 职责 | 转发查询、读取 /etc/hosts、按 nsswitch 顺序调用后端 |
|---|---|
| 常见实现 | glibc resolver、systemd-resolved(127.0.0.53)、Windows DNS Client |
排查看实际用的 DNS
排查看实际用的 DNS
resolvectl status 2>/dev/null | head -20
cat /etc/resolv.conf
getent hosts example.com # 走 NSS 全链路(含 hosts 文件)systemd-resolved 下 /etc/resolv.conf 常指向 127.0.0.53,真实上游在 resolvectl status 或 /run/systemd/resolve/ 里看。