M31 - DNS Deep Dive
DNS Deep Dive
Inspect DNS resolution directly so you can separate naming problems from connectivity problems and understand local overrides such as the hosts file.
- Query DNS directly instead of relying on a browser or application.
- Understand basic record types such as A, AAAA, CNAME, and MX.
- Explain how local hosts-file overrides fit into the resolution path.
Why This Matters
A network can be up while name resolution is broken.
That is why DNS deserves its own checks instead of being treated as part of one blurry “internet problem.”
1. Query DNS Directly
nslookup google.com Resolve-DnsName google.com
dig google.com dig +short google.com
Direct queries help you check what the resolver is actually returning.
2. Understand a Few Core Record Types
You do not need the entire DNS universe at once. Start with a few common record types:
Afor IPv4 address answersAAAAfor IPv6 address answersCNAMEfor aliasesMXfor mail routing
That is enough to make many real DNS lookups understandable.
3. Remember the Local Override Layer
The hosts file can override what the OS believes about a name.
That can be useful for:
- testing a local or staging service
- temporarily forcing a name to a chosen address
It can also be confusing when the local machine behaves differently from everyone else.
Useful Distinction
If one machine resolves a name differently from the rest of the network, check the local hosts file before assuming public DNS is wrong.
4. Cache Can Delay the Truth
Resolvers and operating systems may cache results.
That means the answer you see right now may reflect a recent past state rather than the freshest state possible. You do not need to become a cache expert yet, but you do need to remember that DNS answers are not always instant reflections of changes.
What to Ignore for Now
- full recursive resolver internals
- DNSSEC depth
- large-scale zone administration
The important skill is separating naming from routing and connectivity.
Before You Move On
You are ready for network diagnostics when you can:
- query DNS directly
- name a few common record types
- explain how the hosts file can override expected answers
Next, we put connectivity, routing, DNS, and port inspection together into a calmer troubleshooting flow.