Middle
What tools do you use for diagnosing network problems? How does dig differ from nslookup?
sobes.tech AI
Answer from AI
For diagnosing network issues, I usually use the following tools:
- ping — checks the availability of a host and measures response time.
- traceroute (tracert in Windows) — determines the route to a node and identifies bottlenecks.
- netstat — views open network connections and ports.
- tcpdump / Wireshark — captures and analyzes network traffic.
- dig and nslookup — diagnose DNS queries.
Difference between dig and nslookup:
-
dig (Domain Information Groper) — a more modern and powerful tool for DNS queries. It allows flexible request configuration, provides detailed information, and is convenient for scripting and automation.
-
nslookup — an older, simpler tool, but less flexible. Considered deprecated in some systems.
Example of using dig:
dig example.com A
Example of using nslookup:
nslookup example.com
Overall, for in-depth DNS analysis, dig is preferable, while nslookup is convenient for quick checks.