dnstrace(1)

πŸ’– dnstrace β€” the dns lookup tool, bestie edition πŸ’–

okay so real talk, this one lives in the General Commands Manual section of your man pages, and it's called dnstrace (1). it's giving detective energy for DNS and honestly? iconic. let's get into it πŸ•΅οΈβ™€οΈβœ¨


✨ SYNOPSIS ✨

dnstrace t fqdn r

that's it. three little args. so simple. so powerful. πŸ’…


🌸 DESCRIPTION 🌸

so what does dnstrace actually do? bestie, it goes on a whole quest. πŸ” it searches for all the DNS servers that can affect the resolution of records of type t under the domain name fqdn, starting from the root server r.

and like β€” you can list more than one root server. yes, plural. go off. πŸ‘‘

dnstrace uses the standard DNS resolution algorithm, but here's the twist that makes it the main character: it follows all possible paths in the algorithm. every single one. it's thorough like that. 🌈

it prints all the responses it receives from DNS servers β€” all of them, no crumbs left behind. and it also prints warnings about:

  • slow servers 🐒
  • dead servers πŸ’€
  • misdelegated (``lame'') servers πŸ™ˆ
  • misformatted packets πŸ“¦

fr fr, dnstrace is similar in spirit to DOC and dnswalk, but it is much more effective than those tools at debugging resolution problems. not to be shady but... it ate. πŸ”₯


πŸŽ€ the version 1.03 and above glow-up πŸŽ€

In versions 1.03 and above: you can pipe dnstrace through dnstracesort(1) for human-friendly output. obsessed.

also important: dnstrace can take a long time to run (she's thorough, okay??), so the standard procedure is to save its output in a file:

dnstrace any www.aol.com a.root-servers.net > AOL &

then you can run dnstracesort(1) to see the results so far:

dnstracesort < AOL | less

and psst β€” the dnstracesort(1) output uses ul codes for boldface and underline; these codes are displayed properly by less(1). cute little detail, yw. πŸ’–

⚠️ okay bestie, gentle warning time: beware that, as of January 2001, dnstrace produces more than 5 megabytes of output for the complete trace of cr.yp.to starting from all the root servers. it ends up sending more than 6000 queries to more than 200 different servers. that's not a typo. hydrate before you run this. 🚰😭

πŸ¦‹ SEE ALSO πŸ¦‹

and if you wanna go straight to the source: http://cr.yp.to/djbdns.html ⭐


and that's the whole vibe, bestie β€” this lil page is part of the General Commands Manual and signs off as dnstrace(1). go trace some DNS, slay, and remember to redirect your output to a file before your terminal gets humbled. πŸ’œπŸ«Ά bye!!

πŸ“¦ where this page comes from