3 ms·
> This does the exact same thing so it will always give you the right answer, but the output is a bit confusing to read so I’m a bit more hesitant to recommend
by zokier 5y ago
> This does the exact same thing so it will always give you the right answer, but the output is a bit confusing to read so I’m a bit more hesitant to recommend it.
I constantly get indications that dig is this really powerful tool, but I must say I always find its output baffling. Granted I'm not expert on DNS but I know the basics and its still pretty damn arcane. I usually can decipher it in the end (assuming nothing too weird is going on) but I can't shake the feeling that my understanding is being obstructed by the tool here.
- winthrowe 5y agoTrace output was easier to read in the days when everybody trusted and there was no security. Try reading this, with just the tool output, A and NS records, like the old days: dig +trace jvns.ca | egrep ";|IN\s+A|IN\s+NS\s"
- jlgaddis 5y ago> I always find its output baffling. I'm gonna fathom a guess that this is likely because you aren't aware that tha output returned by dig is (by default) valid BIND zonefile format/syntax, and/or you aren't very familiar with the BIND zonefile format/syntax itself. Regardless, though, dig has a number of query options you might like to use that will suppress much of the (redundant and/or unwanted) output that's shown by default, such as "+noadditional", "+noauthority", "+nocmd", "+nocomments", "+noquestion", "+norrcomments", or "+nostats". You can even put all of those those (on a single line) in a "$HOME/.digrc" file and they'll be used automatically everytime you run "dig". See dig(1) for details. Alternatively, you might find it easier to simply get into the habit of using (only) the "+short" query option everytime you run "dig" (or put that in .digrc). Just at the output of these queries, for example: $ dig +short ns example.com $ dig +short a google.com The output quite possibly contains exactly what you want to know and nothing more -- including, especially, all of the extraneous output that often just gets in the way and leaves you constantly baffled!