事件 8038 和 8020。系统无法更新 DNS(错误 9701)

事件 8038 和 8020。系统无法更新 DNS(错误 9701)

当 PC 启动时,它无法更新其 DNS 记录。但是,如果您运行IPCONFIG /RENEWIPCONFIG /REGISTERDNS或将其放置一天,它就可以正常工作。

设置:

客户

  • 全新安装 Windows 10
  • 快速启动已禁用
  • 加入 (Synology) Active Directory
  • 计算机名:C0156B.code54.lan
  • IP: 10.254.3.98 (dhcp预留)
  • DNS 服务器:10.254.2.3

服务器

  • 主机名:(nasa.code54.lan 顺便说一句,我们不是 NASA,只是 NAS-A ;-))
  • IP地址:10.254.2.3
  • Synology 正在运行:
    • 最新的DSM 7.1.1-42962 Update 6
    • 最新Directory Server 4.15.9-0454(Linux SAMBA 的实现)
    • 最新的DNS server 9.16.23-6174

路由器 - DHCP:Draytek 路由器,没有任何选项。

我的测试

  1. PC 有 DHCP10.254.3.99
  2. DNS 注册成功
  3. PC已关机
  4. DHCP 注册更改为10.254.3.98在 PC 处于关闭状态时。
  5. 电脑已开机。

它无法将其 DNS 从 更新10.254.3.9910.254.3.98。它记录Events 80388020

事件查看器截图

第一个是Event 8038

The system failed to update and remove host (A or AAAA) resource records (RRs) for network adapter
with settings:

           Adapter Name : {DD45DC7D-BB94-493D-B734-BBF4A76B03D3}
           Host Name : C0156B
           Primary Domain Suffix : code54.lan
           DNS server list :
                10.254.2.3, 10.254.2.3
           Sent update to server : <?>
           IP Address(es) :
             10.254.3.99

The reason the update request failed was because of a system problem. See event details for specific error code information.

“具体错误代码”是9701

遵从Event 8020

The system failed to register host (A or AAAA) resource records (RRs) for network adapter
with settings:

           Adapter Name : {DD45DC7D-BB94-493D-B734-BBF4A76B03D3}
           Host Name : C0156B
           Primary Domain Suffix : code54.lan
           DNS server list :
                10.254.2.3, 10.254.2.3
           Sent update to server : <?>
           IP Address(es) :
             10.254.3.98

The reason the system could not register these RRs during the update request was because of a system problem. You can manually retry DNS registration of the network adapter and its settings by typing 'ipconfig /registerdns' at the command prompt. If problems still persist, contact your DNS server or network systems administrator. See event details for specific error code information.

“具体错误代码”是相同的:9701根据https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--9000-11999-意思是:DNS_ERROR_RECORD_DOES_NOT_EXIST。但是根本没有发出 DNS 查询。

这是 Wireshark 捕获的 DNS 流量。它显示没有动态更新,因此客户端不执行任何 DNS 查询。

Wireshark 捕获 DNS 流量

这是来自 Synology DNS 服务器的日志:

2023/09/06 12:35:47.271 queries client @0x7f796404bbb8 10.254.3.98#60421 (download.windowsupdate.com): query: download.windowsupdate.com IN A + (10.254.2.3)
2023/09/06 12:35:42.088 queries client @0x7f797004c388 10.254.3.98#53427 (wpad.code54.lan): query: wpad.code54.lan IN A + (10.254.2.3)
2023/09/06 12:35:30.989 queries client @0x7f796c000c88 10.254.3.98#56650 (_kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan): query: _kerberos._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan IN SRV + (10.254.2.3)
2023/09/06 12:35:28.588 queries client @0x7f796404bbb8 10.254.3.98#49343 (C0156B.code54.lan): query: C0156B.code54.lan IN SOA + (10.254.2.3)
2023/09/06 12:35:28.584 queries client @0x7f796c000c88 10.254.3.98#59276 (C0156B.code54.lan): query: C0156B.code54.lan IN SOA + (10.254.2.3)
2023/09/06 12:35:27.339 queries client @0x7f796c000c88 10.254.3.98#57615 (array506.prod.do.dsp.mp.microsoft.com): query: array506.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:27.331 queries client @0x7f796404bbb8 10.254.3.98#63469 (array511.prod.do.dsp.mp.microsoft.com): query: array511.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:27.328 queries client @0x7f7970010488 10.254.3.98#49646 (array502.prod.do.dsp.mp.microsoft.com): query: array502.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:26.947 queries client @0x7f796404bbb8 10.254.3.98#53062 (disc501.prod.do.dsp.mp.microsoft.com): query: disc501.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:26.874 queries client @0x7f7970010488 10.254.3.98#63048 (cp501.prod.do.dsp.mp.microsoft.com): query: cp501.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:26.797 queries client @0x7f79756a3958 10.254.3.98#51554 (kv501.prod.do.dsp.mp.microsoft.com): query: kv501.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:26.650 queries client @0x7f79756a3958 10.254.3.98#59659 (geo.prod.do.dsp.mp.microsoft.com): query: geo.prod.do.dsp.mp.microsoft.com IN A + (10.254.2.3)
2023/09/06 12:35:26.032 queries client @0x7f7970010488 10.254.3.98#64748 (_ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan): query: _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan IN SRV + (10.254.2.3)
2023/09/06 12:35:25.898 queries client @0x7f79756a3958 10.254.3.98#54455 (code54.lan): query: code54.lan IN A + (10.254.2.3)
2023/09/06 12:35:25.442 queries client @0x7f79756a3958 10.254.3.98#59318 (_ldap._tcp.Default-First-Site-Name._sites.code54.lan): query: _ldap._tcp.Default-First-Site-Name._sites.code54.lan IN SRV + (10.254.2.3)
2023/09/06 12:35:24.624 queries client @0x7f796c000c88 10.254.3.98#59053 (nasa.code54.lan): query: nasa.code54.lan IN A + (10.254.2.3)
2023/09/06 12:35:24.599 queries client @0x7f79756a3958 10.254.3.98#59868 (_ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan): query: _ldap._tcp.Default-First-Site-Name._sites.dc._msdcs.code54.lan IN SRV + (10.254.2.3)
2023/09/06 12:35:24.086 queries client @0x7f7970010488 10.254.3.98#49914 (dns.msftncsi.com): query: dns.msftncsi.com IN A + (10.254.2.3)
2023/09/06 12:35:23.576 queries client @0x7f796c000c88 10.254.3.98#64421 (wpad.code54.lan): query: wpad.code54.lan IN A + (10.254.2.3)

手动 IPCONFIG/REGISTERNDS

手动更新IPCONFIG /REGISTERDNS工作正常,并且确实显示在 Wireshark 中:

IPCONFIG /REGISTERDNS 的 Wireshark

这是成功手动更新的 DNS 日志:

2023/09/06 12:06:41.822 database    samba_dlz: added rdataset C0156B.code54.lan 'C0156B.code54.lan. 1200 IN A 10.254.3.99'
2023/09/06 12:06:41.817 update  client @0x7f14dc0228e8 10.254.3.99#55121/key C0156B\$\@CODE54.LAN: updating zone 'code54.lan/NONE': adding an RR at 'C0156B.code54.lan' A 10.254.3.99
2023/09/06 12:06:41.816 database    samba_dlz: subtracted rdataset C0156B.code54.lan 'C0156B.code54.lan. 1200 IN A 10.254.3.98'
2023/09/06 12:06:41.813 update  client @0x7f14dc0228e8 10.254.3.99#55121/key C0156B\$\@CODE54.LAN: updating zone 'code54.lan/NONE': deleting rrset at 'C0156B.code54.lan' A
2023/09/06 12:06:41.812 update  client @0x7f14dc0228e8 10.254.3.99#55121/key C0156B\$\@CODE54.LAN: updating zone 'code54.lan/NONE': deleting rrset at 'C0156B.code54.lan' AAAA
2023/09/06 12:06:41.812 database    samba_dlz: allowing update of signer=C0156B\$\@CODE54.LAN name=C0156B.code54.lan tcpaddr=10.254.3.99 type=A key=1468-ms-7.1-1d62d3.12f3b826-4c9d-11ee-8d50-d89ef33763c7/160/0
2023/09/06 12:06:41.810 database    samba_dlz: allowing update of signer=C0156B\$\@CODE54.LAN name=C0156B.code54.lan tcpaddr=10.254.3.99 type=A key=1468-ms-7.1-1d62d3.12f3b826-4c9d-11ee-8d50-d89ef33763c7/160/0
2023/09/06 12:06:41.808 database    samba_dlz: allowing update of signer=C0156B\$\@CODE54.LAN name=C0156B.code54.lan tcpaddr=10.254.3.99 type=AAAA key=1468-ms-7.1-1d62d3.12f3b826-4c9d-11ee-8d50-d89ef33763c7/160/0
2023/09/06 12:06:40.030 queries client @0x7f14e16a3958 10.254.3.99#53427 (C0156B.code54.lan): query: C0156B.code54.lan IN SOA + (10.254.2.3)

我还就此问题联系了 Synology 支持部门,他们调查了 Wireshark 文件和tcpdumpNAS 本身,并确认 Windows 没有进行 DNS 更新。因此,就他们而言,这是一个 Windows 问题。

我正在这样思考:Windows 启动时不知道它已更改 IP 地址。它以某种方式尝试在 DNS 服务器上查找其主机名和当前(新)IP 地址的组合,这会导致错误,DNS_ERROR_RECORD_DOES_NOT_EXIST因为 DNS 服务器仍然保存着主机名和旧 IP 地址的组合。也许 Windows 假设 DNS 记录已被另一台机器占用,而不是更新它,或者其他什么?

答案1

您的经历似乎与 Microsoft 文档有关 如何在 Windows 中配置 DNS 动态更新 尤其是从该部分开始的描述 DHCP 与 DNS 的集成

我引用这段文字:

DHCP 与 DNS 的集成

Windows DHCP 服务器可以为支持动态更新的任意一个客户端启用 DNS 命名空间中的动态更新。作用域客户端可以使用 DNS 动态更新协议,在 DHCP 分配的地址发生变化时更新其主机名到地址的映射信息。此映射信息存储在 DNS 服务器上的区域中。基于 Windows 的 DHCP 服务器可以代表其 DHCP 客户端对任何 DNS 服务器执行更新。

DHCP/DNS 更新交互的工作原理

您可以使用 DHCP 服务器代表服务器的启用 DHCP 的客户端注册和更新 PTR 和 A 资源记录。执行此操作时,您必须使用附加 DHCP 选项,即客户端 FQDN 选项(选项 81)。此选项允许客户端在 DHCPREQUEST 数据包中将其 FQDN 发送到 DHCP 服务器。这使客户端能够通知 DHCP 服务器其所需的服务级别。

从文本来看,Windows 似乎希望 DHCP 服务器参与 DNS 动态更新过程。它只会在执行ipconfig /registerdns命令后介入。

我无法进一步评论您的环境(不是我的),但您的经历可能是正常的。

相关内容