The dnstracer command in Linux is a command-line tool that traces DNS (Domain Name System) queries from a host to the authoritative DNS server for a domain. It can be used to troubleshoot DNS issues by identifying any intermediate servers or routing problems that may be causing delays or errors in resolving DNS queries. The command is typically used in the format dnstracer domain.com, where “domain.com” is the domain for which you want to trace the DNS queries.
dnstracer Command Examples
1. Find out where your local DNS got the information on www.example.com:
# dnstracer www.example.com
2. Start with a [s]pecific DNS that you already know:
# dnstracer -s dns.example.org www.example.com
3. Only query IPv4 servers:
# dnstracer -4 www.example.com
4. Retry each request 5 times on failure:
# dnstracer -r 5 www.example.com
5. Display all steps during execution:
# dnstracer -v www.example.com
6. Display an [o]verview of all received answers after execution:
# dnstracer -o www.example.com