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.
-
DNS Port 53 TCP or UDP?
Ever wondered why DNS uses both TCP and UDP? Find out when DNS switches between TCP and UDP on port 53 and why it matters.
-
DNS Forwarder
Learn how a DNS forwarder can boost your network’s speed, improve security. Reduce load for better DNS management.
Leave a Reply