What is DNS debug log
DNS debug logging helps to collect and analysis all the critical and low level events happening with domain name system. For example it will log the time of query, context, whether it was TCP or UDP and response etc. All this information can be saved in single text file. Generally its not required, you may need to do this configuration for advance diagnostics purpose.
How to enable DNS logging
You need follow follow following steps.
- Open DNS servers console.
- Right click the DNS server name and go to properties.
- Go to debug logging tab.
- Check the option “Log packets for debugging”.
- Select other options according to your requirements.
- Give the log file path name. In our case its c:\dnsdebuglog.txt
- Specify dns debug log max size.
- Click apply and OK.
You will see a file is created on dnsdebuglog.txt is create on the mentioned path.
Fields of debug file
Once DNS debugging is enabled, you will find following fields in log file.
- Time
- Thread ID
- Context
- Internal packet identifier
- UDP/TCP indicator
- Send/Receive indicator
- Remote IP
- Xid (hex)
- Query/Response
- R = Response
- blank = Query
- Opcode
- Q = Standard Query
- N = Notify
- U = Update
- ? = Unknown
- [ Flags (hex)
- 13 Flags (char codes)
- A = Authoritative Answer
- T = Truncated Response
- D = Recursion Desired
- R = Recursion Available
- ResponseCode ]
- Question Type
- Question Name
DNS Debug Logging PowerShell Commands
“Get-DnsServerDiagnostics” command will show the current DNS debug settings.
“Set-DnsServerDiagnostics” command can be used to change the current debug settings. For example if you run the command “Set-DnsServerDiagnostics -Notifications $True“. This output can be observed in PowerShell command as wall as graphical user interface.
The article was written using Microsoft Windows Server 2019 operating system. If you want to learn more about DNS you can follow our article Introduction to DNS Server.
-
What Is DNS Ad Blocking
Learn how DNS ad blocking stops ads at the network level, boosting speed, protecting privacy, and improving browsing in your network.
-
What is DNS zone transfer AXFR and IXFR protocols
Insights of DNS zone transfer. How AXFR and IXFR work. Achieve high availability and redundancy for DNS infrastructure in a secure way.
Leave a Reply