Network Troubleshooting Tools

💤0
Lv 10 XP
← 🧱 Foundations · Networking Basics

Network Troubleshooting Tools

Intermediate ⭐ 80 XP ⏱ 18 min #networking#troubleshooting#tools

A toolbox for diagnosing connectivity, routing, DNS, and port problems.

📖Theory

When a service is unreachable, work the layers bottom-up and isolate where it breaks before guessing:

  1. Reachabilityping (is the host up and routable?)
  2. Pathtraceroute / mtr (where does it stop?)
  3. Name resolutiondig / nslookup (does DNS resolve?)
  4. Transport/appcurl -v, nc, telnet (is the port open and answering?)
  5. Local listenersss -tlnp (is anything bound to the port here?)

Each tool answers one question. The discipline is to confirm each layer works before moving up, so you find the first broken link instead of chasing symptoms.

🌍Real-World Example
ping -c 4 example.com           # reachable? round-trip times
mtr example.com                 # live traceroute + loss per hop
dig +short example.com          # does DNS resolve?
nc -zv example.com 443          # is port 443 open?
curl -v https://example.com     # full app-level request/response
ss -tlnp                        # local listening sockets + PIDs
ip addr ; ip route              # my addresses and routing table
✍️Hands-On Exercise
  1. Ping a host and a made-up name; explain the difference in the errors.
  2. Use nc -zv to test whether a known port is open on a server.
  3. Run ss -tlnp and identify which process owns a listening port.
  4. Given “ping works but the website won’t load”, list your next two checks.
🧾Cheat Sheet
QuestionTool
Is the host reachable?ping
Where does the path break?traceroute / mtr
Does DNS resolve?dig / nslookup
Is the port open?nc -zv host port
Does the app respond?curl -v
What’s listening here?ss -tlnp
My IP / routes?ip addr / ip route
💬Common Interview Questions
A service is unreachable — what's your approach?

Work the layers bottom-up: ping for reachability, traceroute/mtr for the path, dig for DNS, nc/curl for the port and app, and ss locally. Confirm each layer before moving up to isolate the first failure.

ping succeeds but curl to the site fails. What does that tell you?

IP-level connectivity is fine, so the issue is higher up — DNS, a closed/filtered port, a firewall, TLS, or the application itself.

📚Official Documentation

📝 My notes on this topic

Auto-saves as you type