启用 DNS 日志记录和诊断

了解如何在 Windows Server 中为 DNS 服务器角色启用增强的 DNS 日志记录、审核和分析事件。 DNS 日志记录和诊断提供有关 DNS 服务器操作的详细信息,包括区域更改、动态更新和 DNSSEC 操作。 DNS 日志记录和诊断可帮助监视 DNS 服务器性能、排查 DNS 问题以及跟踪 DNS 服务器活动。

先决条件

在启用 DNS 日志记录和诊断之前,请确保具备:

  • 安装了 DNS 服务器角色的 Windows Server,包括 DNS 远程服务器管理工具 (RSAT)。

  • 服务器上的管理权限。

  • 基本了解 DNS 服务器的运作。

查看 DNS 服务器日志

默认情况下启用 DNS 审核日志,不会显著影响 DNS 服务器性能。 DNS 服务器审核事件允许对 DNS 服务器进行更改跟踪。 每次更改服务器、区域或资源记录设置时,都会记录审核事件。 审核事件包括操作性事件,例如动态更新、区域传输和 DNSSEC 区域签名与解除签名。 若要查看 DNS 服务器日志,请执行以下作:

  1. 选择 “开始”按钮,键入 事件查看器,从最佳匹配列表中打开 事件查看器

  2. 在事件查看器中,导航到 应用程序和服务 > 日志 > Microsoft > Windows > DNS-Server

  3. 从导航窗格中选择审核以查看 DNS 审核日志。

审核事件

下表汇总了 DNS 服务器审核事件。

事件 ID 类型 类别 Level 事件文本
513 Zone delete 区域操作 信息性 The zone %1 was deleted.
514 Zone updated 区域操作 信息性 The zone %1 was updated. The %2 setting has been set to %3.
515 Record create 区域操作 信息性 A resource record of type %1, name %2, TTL %3 and RDATA %5 was created in scope %7 of zone %6.
516 Record delete 区域操作 信息性 A resource record of type %1, name %2 and RDATA %5 was deleted from scope %7 of zone %6.
517 RRSET delete 区域操作 信息性 All resource records of type %1, name %2 were deleted from scope %4 of zone %3.
518 Node delete 区域操作 信息性 All resource records at Node name %1 were deleted from scope %3 of zone %2.
519 Record create - dynamic update 动态更新 信息性 A resource record of type %1, name %2, TTL %3 and RDATA %5 was created in scope %7 of zone %6 via dynamic update from IP Address %8.
520 Record delete - dynamic update 动态更新 信息性 A resource record of type %1, name %2 and RDATA %5 was deleted from scope %7 of zone %6 via dynamic update from IP Address %8.
521 Record scavenge 老化 信息性 A resource record of type %1, name %2, TTL %3 and RDATA %5 was scavenged from scope %7 of zone %6.
522 Zone scope create 区域操作 信息性 The scope %1 was created in zone %2.
523 Zone scope delete 区域操作 信息性 The scope %1 was created in zone %2.
525 Zone sign 联机签名 信息性 The zone %1 was signed with following properties...
526 Zone unsign 联机签名 信息性 The zone %1 was unsigned.
527 Zone re-sign 联机签名 信息性 The zone %1 was re-signed with following properties...
528 Key rollover start DNSSEC操作 信息性 Rollover was started on the type %1 with GUID %2 of zone %3.
529 Key rollover end DNSSEC操作 信息性 Rollover was completed on the type %1 with GUID %2 of zone %3.
530 Key retire DNSSEC操作 信息性 The type %1 with GUID %2 of zone %3 was marked for retiral. The key will be removed after the rollover completion.
531 Key rollover triggered DNSSEC操作 信息性 Manual rollover was triggered on the type %1 with GUID %2 of zone %3.
533 Key poke rollover DNSSEC操作 警告 The keys signing key with GUID %1 on zone %2 that was waiting for a Delegation Signer(DS) update on the parent has been forced to move to rollover completion.
534 Export DNSSEC DNSSEC操作 信息性 DNSSEC setting metadata was exported %1 key signing key metadata from zone %2.
535 Import DNSSEC DNSSEC操作 信息性 DNSSEC setting metadata was imported on zone %1.
536 Cache purge DNSSEC操作 信息性 A record of type %1, QNAME %2 was purged from scope %3 in cache.
537 Forwarder reset 缓存操作 信息性 The forwarder list on scope %2 has been reset to %1.
540 Root hints 配置 信息性 The root hints have been modified.
541 Server setting 配置 信息性 The setting %1 on scope %2 has been set to %3.
542 Server scope create 配置 信息性 The scope %1 of DNS server was created.
543 Server scope delete 配置 信息性 The scope %1 of DNS server was deleted.
544 Add trust point DNSKEY 配置 信息性 The DNSKEY with Key Protocol %2, Base64 Data %4 and Crypto Algorithm %5 has been added at the trust point %1.
545 Add trust point DS 配置 信息性 The DS with Key Tag: %2, Digest Type: %3, Digest: %5 and Crypto Algorithm: %6 has been added at the trust point %1.
546 Remove trust point 配置 信息性 The trust point at %1 of type %2 has been removed.
547 Add trust point root DNSSEC操作 信息性 The trust anchor for the root zone has been added.
548 Restart server DNSSEC操作 信息性 A request to restart the DNS server service has been received.
549 Clear debug logs DNSSEC操作 信息性 The debug logs have been cleared from %1 on DNS server.
550 Write dirty zones DNSSEC操作 信息性 The in-memory contents of all the zones on DNS server have been flushed to their respective files.
551 Clear statistics 服务器操作 信息性 All the statistical data for the DNS server has been cleared.
552 Start scavenging 服务器操作 信息性 A resource record scavenging cycle has been started on the DNS Server.
553 Enlist directory partition 服务器操作 信息性 1%
554 Abort scavenging 服务器操作 信息性 The resource record scavenging cycle has been terminated on the DNS Server.
555 Prepare for demotion 服务器操作 信息性 The DNS server has been prepared for demotion by removing references to it from all zones stored in the Active Directory.
556 Write root hints 服务器操作 信息性 The information about the root hints on the DNS server has been written back to the persistent storage.
557 Listen address 服务器操作 信息性 The addresses on which DNS server will listen has been changed to %1.
558 Active refresh trust points 服务器操作 信息性 An immediate RFC 5011 active refresh has been scheduled for all trust points.
559 Pause zone 服务器操作 信息性 The zone %1 is paused.
560 Resume zone 服务器操作 信息性 The zone %1 is resumed.
561 Reload zone DNSSEC操作 信息性 The data for zone %1 has been reloaded from %2.
562 Refresh zone 区域操作 信息性 The data for zone %1 has been refreshed from the primary server %2.
563 Expire zone 区域操作 信息性 The secondary zone %1 has been expired and new data has been requested from the primary server %2.
564 Update from DS 区域操作 信息性 The zone %1 has been reloaded from the Active Directory.
565 Write and notify 区域操作 信息性 The content of the zone %1 has been written to the disk and the notification has been sent to all the notify servers.
566 Force aging 区域操作 信息性 All DNS records at the node %1 in the zone %2 will have their aging time stamp set to the current time.%3
567 Scavenge servers 区域操作 信息性 The Active Directory-integrated zone %1 has been updated. Only %2 can run scavenging.
568 Transfer primary key server 区域操作 信息性 The key management role for zone %1 has been %2.%3
569 Add SKD 区域操作 信息性 A %1 singing key (%2) descriptor has been added on the zone %3 with following properties: KeyId=%4; KeyType=%5; CurrentState=%6; KeyStorageProvider=%7; StoreKeysInAD=%8; CryptoAlgorithm=%9; KeyLength=%10; DnsKeySignatureValidityPeriod=%11; DSSignatureValidityPeriod=%12; ZoneSignatureValidityPeriod=%13; InitialRolloverOffset=%14; RolloverPeriod=%15; RolloverType=%16; NextRolloverAction=%17; LastRolloverTime=%18; NextRolloverTime=%19; CurrentRolloverStatus=%20; ActiveKey=%21; StandbyKey=%22; NextKey=%23. The zone will be resigned with the %2 generated with these properties.
570 Modify SKD 区域操作 信息性 A %1 singing key (%2) descriptor with GUID %3 has been updated on the zone %4. The properties of this %2 descriptor have been set to: KeyId=%5; KeyType=%6; CurrentState=%7; KeyStorageProvider=%8; StoreKeysInAD=%9; CryptoAlgorithm=%10; KeyLength=%11; DnsKeySignatureValidityPeriod=%12; DSSignatureValidityPeriod=%13; ZoneSignatureValidityPeriod=%14; InitialRolloverOffset=%15; RolloverPeriod=%16; RolloverType=%17; NextRolloverAction=%18; LastRolloverTime=%19; NextRolloverTime=%20; CurrentRolloverStatus=%21; ActiveKey=%22; StandbyKey=%23; NextKey=%24. The zone will be resigned with the %2 generated with these properties.
571 Delete SKD DNSSEC操作 信息性 A %1 singing key (%2) descriptor %4 has been removed from the zone %3.
572 Modify SKD state DNSSEC操作 信息性 The state of the %1 signing key (%2) %3 has been modified on zone %4. The new active key is %5, standby key is %6 and next key is %7.
573 Add delegation DNSSEC操作 信息性 A delegation for %1 in the scope %2 of zone %3 with the name server %4 has been added.
574 Create client subnet record DNSSEC操作 信息性 The client subnet record with name %1 value %2 has been added to the client subnet map.
575 Delete client subnet record DNSSEC 操作 信息性 The client subnet record with name %1 has been deleted from the client subnet map.
576 Update client subnet record 区域操作 信息性 The client subnet record with name %1 has been updated from the client subnet map. The new client subnets that it refers to are %2.
577 Create server level policy 政策操作 信息性 A server level policy %6 for %1 has been created on server %2 with following properties: ProcessingOrder:%3; Criteria:%4; Action:%5.
578 Create zone level policy 策略操作 信息性 A zone level policy %8 for %1 has been created on zone %6 on server %2 with following properties: ProcessingOrder:%3; Criteria:%4; Action:%5; Scopes:%7.
579 Create forwarding policy 政策操作 信息性 A forwarding policy %6 has been created on server %2 with following properties: ProcessingOrder:%3; Criteria:%4; Action:%5; Scope:%1.
580 Delete server level policy 政策操作 信息性 The server level policy %1 has been deleted from server %2.
581 Delete zone level policy 政策操作 信息性 The zone level policy %1 has been deleted from zone %3 on server %2.
582 Delete forwarding policy 政策操作 信息性 The forwarding policy %1 has been deleted from server %2.

启用分析事件日志记录

Windows Server 中的增强型 DNS 日志记录和诊断包括 DNS 审核事件和 DNS 分析事件。 默认情况下启用 DNS 审核日志,不会显著影响 DNS 服务器性能。

默认情况下不会启用 DNS 分析日志,通常只会以较高的 DNS 查询速率影响 DNS 服务器性能。 例如,运行在现代硬件上的 DNS 服务器在启用分析日志时,每秒接收 100,000 个查询 (QPS) 时,其性能可能会降低 5%。 对于查询速率在 50,000 QPS 及以下的情况,性能没有明显影响。 但是,我们建议在启用日志记录时监视 DNS 服务器性能。

若要启用 DNS 诊断日志记录,请执行以下作:

  1. 应用程序和服务 > 日志 > Microsoft > Windows > DNS-Server 节点,右键单击 DNS-Server,选择 视图,然后选择 显示分析和调试日志。 将显示分析日志。

  2. 右键单击分析,然后选择属性

  3. 如果要从事件查看器查询和查看日志,请选择当达到最大事件日志大小时,选择不覆盖事件(手动清除日志),选中启用日志记录复选框,然后在系统询问是否启用此日志时选择确定

  4. 如果要启用循环日志记录,请选择根据需要覆盖(最先从旧事件开始),然后选择启用日志记录。 选择 确定后,将显示 查询错误。 即使显示此错误,也会进行日志记录。 此错误仅表示无法查看当前正在事件查看器中记录的事件。

  5. 选择 “确定” 以启用 DNS 服务器分析事件日志。

    显示 DNS 服务器分析日志的“日志属性”窗口的屏幕截图,其中显示了启用日志时可能丢失事件的警告消息。

分析日志默认写入文件 %SystemRoot%\System32\Winevt\Logs\Microsoft-Windows-DNSServer%4Analytical.etl。 下一部分将处理 DNS 服务器审核和分析事件日志中显示的事件。

分析事件

DNS 服务器分析事件允许对 DNS 服务器进行活动跟踪。 每次服务器发送或接收 DNS 信息时都会记录分析事件。 下表汇总了 DNS 服务器分析事件。

事件 ID 类型 类别 Level 事件文本
257 Response success 查找 信息性 RESPONSE_SUCCESS: TCP=%1; InterfaceIP=%2; Destination=%3; AA=%4; AD=%5; QNAME=%6; QTYPE=%7; XID=%8; DNSSEC=%9; RCODE=%10; Port=%11; Flags=%12; Scope=%13; Zone=%14; PolicyName=%15; PacketData=%17
258 Response failure 查找 错误 RESPONSE_FAILURE: TCP=%1; InterfaceIP=%2; Reason=%3; Destination=%4; QNAME=%5; QTYPE=%6; XID=%7; RCODE=%8; Port=%9; Flags=%10; Zone=%11; PolicyName=%12; PacketData=%14
259 Ignored query 查找 错误 IGNORED_QUERY: TCP=%1; InterfaceIP=%2; Reason=%3; QNAME=%4; QTYPE=%5; XID=%6; Zone=%7; PolicyName=%8
260 Query out 递归查询 信息性 RECURSE_QUERY_OUT: TCP=%1; Destination=%2; InterfaceIP=%3; RD=%4; QNAME=%5; QTYPE=%6; XID=%7; Port=%8; Flags=%9; ServerScope=%10; CacheScope=%11; PolicyName=%12; PacketData=%14
261 Response in 递归查询 信息性 RECURSE_RESPONSE_IN: TCP=%1; Source=%2; InterfaceIP=%3; AA=%4; AD=%5; QNAME=%6; QTYPE=%7; XID=%8; Port=%9; Flags=%10; ServerScope=%11; CacheScope=%12; PacketData=%14
262 Recursive query 错误 RECURSE_QUERY_TIMEOUT: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; QTYPE=%5; XID=%6; Port=%7; Flags=%8; ServerScope=%9; CacheScope=%10
263 Update in 动态更新 信息性 DYN_UPDATE_RECV: TCP=%1; InterfaceIP=%2; Source=%3; QNAME=%4; XID=%5; Port=%6; Flags=%7; SECURE=%8; PacketData=%10
264 Update response 动态更新 信息性 DYN_UPDATE_RESPONSE: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8; PolicyName=%9; PacketData=%11
265 IXFR request out 区域 XFR 信息性 IXFR_REQ_OUT: TCP=%1; InterfaceIP=%2; Source=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; PacketData=%9
266 IXFR request in 区域 XFR 信息性 IXFR_REQ_RECV: TCP=%1; InterfaceIP=%2; Source=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; PacketData=%9
267 267 IXFR response out 区域 XFR 信息性 IXFR_RESP_OUT: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8; PacketData=%10
268 IXFR response in 区域 XFR 信息性 IXFR_RESP_RECV: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8; PacketData=%10
269 AXFR request out 区域 XFR 信息性 AXFR_REQ_OUT: TCP=%1; Source=%2; InterfaceIP=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; PacketData=%9
270 AXFR request in 区域 XFR 信息性 AXFR_REQ_RECV: TCP=%1; Source=%2; InterfaceIP=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; PacketData=%9
271 AXFR response out 区域 XFR 信息性 AXFR_RESP_OUT: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8
272 AXFR response in 区域 XFR 信息性 AXFR_RESP_RECV: TCP=%1; InterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8
273 XFR notification in Zone XFR 信息性 XFR_NOTIFY_RECV: Source=%1; InterfaceIP=%2; QNAME=%3; ZoneScope=%4; Zone=%5; PacketData=%7
274 XFR notification out 区域 XFR 信息性 XFR_NOTIFY_OUT: Destination=%1; InterfaceIP=%2; QNAME=%3; ZoneScope=%4; Zone=%5; PacketData=%7
275 XFR notify ACK in 区域 XFR 信息性 XFR_NOTIFY_ACK_IN: Source=%1; InterfaceIP=%2; PacketData=%4
276 XFR notify ACK out 区域 XFR 信息性 XFR_NOTIFY_ACK_OUT: Destination=%1; InterfaceIP=%2; Zone=%3; PacketData=%5
277 Update forward 动态更新 信息性 DYN_UPDATE_FORWARD: TCP=%1; ForwardInterfaceIP=%2; Destination=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8; PacketData=%10
278 Update response in 动态更新 信息性 DYN_UPDATE_RESPONSE_IN: TCP=%1; InterfaceIP=%2; Source=%3; QNAME=%4; XID=%5; ZoneScope=%6; Zone=%7; RCODE=%8; PacketData=%10
279 Internal lookup CNAME 查找 信息性 INTERNAL_LOOKUP_CNAME: TCP=%1; InterfaceIP=%2; Source=%3; RD=%4; QNAME=%5; QTYPE=%6; Port=%7; Flags=%8; XID=%9; PacketData=%11
280 Internal lookup 查找 信息性 INTERNAL_LOOKUP_ADDITIONAL: TCP=%1; InterfaceIP=%2; Source=%3; RD=%4; QNAME=%5; QTYPE=%6; Port=%7; Flags=%8; XID=%9; PacketData=%11

事件跟踪

DNS 日志与 Windows 事件跟踪(ETW)使用者应用程序(如 logman、tracelog 和消息分析器)兼容。 有关使用事件跟踪的详细信息,请参阅 关于事件跟踪

可以通过指定 {EB79061A-A566-4698-9119-3ED2807060E7} 的 GUID,将 ETW 使用者(例如 tracelog.exe)与 DNS 服务器审核和分析事件配合使用。

可以通过下载和安装 Windows 驱动程序工具包(WDK)来获取 tracelog.exe。 安装适用于桌面应用的 WDK、Visual Studio 和 Windows SDK 时,将包含 Tracelog.exe。 有关下载工具包的信息,请参阅 Windows 硬件下载。 例如,下载并安装 Windows 驱动程序工具包(WDK)并接受默认安装路径时,tracelog.exe 位于:C:\Program Files (x86)\WindowsKits\10\bin\10.0.26100.0\x64\tracelog.exe

有关使用 tracelog.exe的详细信息,请参阅 Tracelog 命令语法

以下示例演示如何将 tracelog.exe 与 DNS 审核和分析事件日志配合使用:

以下命令同时启用分析和审核日志记录:


tracelog.exe -start Dns -guid #{EB79061A-A566-4698-9119-3ED2807060E7} -level 5 -matchanykw 0xFFFFFFFF -f C:\analytic_audit.etl

当跟踪处于活动状态时,所有分析和审核事件都会记录在命令行上指定的 C:\analytic_audit.etl 文件中。 可以通过发出停止命令来停止跟踪:


tracelog –stop Dns

停止跟踪后,可以通过选择 操作,然后选择 打开保存的日志来查看事件查看器中的 .etl 文件。

显示事件查看器 DNS 服务器日志的屏幕截图,其中包含有关区域委派的详细信息,包括事件 ID、任务类别和特定的 DNS 查询信息。

以下示例仅启用分析频道,并且只匹配 0x7FFFF 的关键字:

tracelog.exe -start Dns -guid #{EB79061A-A566-4698-9119-3ED2807060E7} -level 5 -matchanykw 0x7FFFF -f C:\analytic.etl

在前面的示例中使用了 5 的日志记录级别。 下表显示了可用的日志记录级别。

日志记录级别 说明
0 (无) 日志记录 OFF
1 (严重) 仅记录关键事件,例如进程退出或终止。 如果未指定日志记录级别,则默认使用级别 1。
2 (错误) 仅记录严重的错误事件,例如无法完成所需的任务。
3 (警告) 可能导致服务问题但可接受或可恢复的错误。 例如,第一次尝试联系转发器失败。
4(信息性) 高级事件记录在事件日志中。 这些事件可能包含服务执行的每个主要任务的一条消息。 如果问题所在位置存在疑问,请使用此设置开始调查。 例如,已启动寻宝游戏线程。
5(详细) 记录所有事件。 级别 5 提供有关服务运行的完整日志。 当问题跟踪到特定类别或少数几个类别时,请使用此级别。

性能注意事项

启用日志记录时,DNS 服务器性能可能会受到影响,但 Windows Server 中的增强型 DNS 日志记录和诊断功能旨在降低对性能的影响。 本文讨论启用日志记录时的 DNS 服务器性能注意事项。

调试日志记录

在引入 DNS 分析日志之前,DNS 调试日志记录是监视 DNS 事务的可用方法。 DNS 调试日志记录与本文中讨论的增强型 DNS 日志记录和诊断功能不同。 调试日志记录是一种工具,也可用于 DNS 日志记录和诊断。 DNS 调试日志提供有关 DNS 服务器发送和接收的所有 DNS 信息的详细信息。 收集的信息类似于可以使用数据包捕获工具(如网络监视器)收集的数据。

调试日志记录可能会影响服务器的整体性能,也占用磁盘空间。 建议仅在需要详细的 DNS 事务信息时暂时启用调试日志记录。

若要在 DNS 服务器上选择和启用调试日志记录选项,请执行以下步骤:

  1. 选择 “开始”,键入 DNS 管理器,然后从最佳匹配列表中选择 DNS 管理器

  2. 在控制台树中,右键单击适用的 DNS 服务器,然后选择 属性

  3. 选择 调试日志记录 选项卡。

  4. 在“属性”对话框中,选中 日志数据包以调试 框,然后选择希望 DNS 服务器记录用于调试日志记录的事件。

以下 DNS 调试日志记录选项可用:

  • 数据包的方向

    发送 - DNS 服务器发送的数据包将记录在 DNS 服务器日志文件中。

    接收 - DNS 服务器收到的数据包将记录在日志文件中。

  • 数据包的内容

    标准查询 - 指出在 DNS 服务器日志文件中记录符合 RFC 1034 标准的标准查询的数据包。

    更新 - 指定包含动态更新的(根据 RFC 2136)数据包记录在 DNS 服务器日志文件中。

    通知 - 指定在 DNS 服务器日志文件中记录包含通知信息的数据包(根据 RFC 1996 规定)。

  • 传输协议

    UDP - 指定通过 UDP 发送和接收的数据包将记录在 DNS 服务器日志文件中。

    TCP - 指定通过 TCP 发送和接收的数据包将记录在 DNS 服务器日志文件中。

  • 数据包类型

    请求 - 指定请求数据包记录在 DNS 服务器日志文件中(请求数据包的特点是 DNS 消息标头中设置为 0 的 QR 位)。

    响应 - 指定响应数据包记录在 DNS 服务器日志文件中(响应数据包的特点是 DNS 消息标头中的 QR 位设置为 1)。

  • 启用基于 IP 地址的筛选 提供对 DNS 服务器日志文件中记录的数据包的筛选。 此选项允许记录从特定 IP 地址发送到 DNS 服务器或从 DNS 服务器发送到特定 IP 地址的数据包。

    • 文件名 - 允许指定 DNS 服务器日志文件的名称和位置。

      例如:

      • dns.log 指定 DNS 服务器日志文件应保存为 <systemroot>zSystem32Dns directory中的 dns.log。 记住,要将 <systemroot> 替换为计算机上 Windows 目录的实际路径。

      • temp\dns.log指定 DNS 服务器日志文件应另存为 <systemroot>\Temp directory中的 dns.log。 请将 <systemroot> 替换为计算机上 Windows 目录的实际路径。

  • 日志文件最大大小限制 允许为 DNS 服务器日志文件设置最大文件大小。 达到指定的 DNS 服务器日志文件最大大小时,DNS 服务器会用新信息覆盖最早的数据包内容。 注意:如果未指定,则 DNS 服务器日志文件的大小可能会占用大量硬盘空间。

默认情况下,所有调试日志记录选项都处于禁用状态。 选择性地启用后,DNS 服务器服务可以执行所选类型的事件或消息的跟踪级别日志记录,以便对服务器进行常规故障排除和调试。

调试日志记录可能占用大量资源、影响服务器整体性能以及占用磁盘空间。 因此,仅当需要有关服务器性能的更多详细信息时,才应暂时使用它。

Dns.log 包含调试日志记录活动。 默认情况下,日志位于 <windir>\System32\Dns 文件夹中。