Interview Prep/Networking/Command-Line Tools & Diagnostics

How do you query DNS with dig and read the answer?

BeginnerConceptCommand-Line Tools & Diagnostics
Answer
dig example.com A
dig +noall +answer +ttlid example.com
dig @1.1.1.1 example.com AAAA
dig -x 10.0.1.5
dig +short NS example.com

Look at status: (NOERROR, NXDOMAIN, SERVFAIL, REFUSED), the flags (aa authoritative, ra recursion available, tc truncated), the TTL in the answer, and Query time.

All Networking questions Roadmap: Networking for DevOps

More on Command-Line Tools & Diagnostics