Network Diagnostics & Troubleshooting
Module 8 · Networking & Security

Network Diagnostics & Troubleshooting

ping, traceroute, ss, dig, tcpdump, and the rest of the toolkit for proving exactly where a connection is breaking.

Connectivity and Path Testing

TaskCommand
Send test packets to check basic reachabilityping host
Report the network path (hop by hop) between source and destinationtraceroute host (or tracepath, which doesn’t need elevated privileges)
A single tool combining continuous ping and traceroute in one live viewmtr host
Discover MAC addresses the system already knows about on the local networkarp -a (or ip neigh on modern systems)
Look up ownership/registration info for a domainwhois domain.com

Connection and Port Inspection

TaskCommand
Gather info about TCP connections to the system (legacy)netstat -tuln
The modern, faster replacement for netstat — simpler syntax, same purposess -tuln
Test connectivity and send arbitrary data across a network connectionnc (netcat) — nc -zv host port to test whether a port is open
Explore a network environment, discovering hosts and open portsnmap
⚠️ Common Pitfall: netstat Is Deprecated, Same as ifconfig

Like ifconfig, netstat comes from the old net-tools package and is being phased out in favor of iproute2’s ss. ss -tuln gives you the same “what’s listening on what port” answer faster and is what current distributions ship by default — recognize both, default to ss.


Name Resolution Testing

TaskCommand
Powerful, detailed DNS query tool (the one most admins reach for)dig domain.com
Simple name resolution tool, available on both Linux and Windowshost domain.com
Another simple resolution tool, installed on most Linux distributionsnslookup domain.com

Packet Capture and Bandwidth Testing

TaskCommand
Command-line packet sniffer — the most popular one, installed by default on most distributionstcpdump -i eth0
Full GUI packet sniffer and protocol analyzerWireshark
Display current bandwidth usage per process/connection, liveiftop
Test the maximum throughput an interface can actually supportiperf (or iperf3)

Bandwidth is the theoretical, potential amount of data that could move through a network connection. Throughput is the amount of data that actually moves through it in practice, in a given time — always less than or equal to bandwidth, due to overhead, congestion, and real-world conditions.

⚠️ Common Pitfall: A Working ping Doesn't Prove the Application Works

ping only confirms basic Layer 3 (ICMP) reachability. A host can respond to ping while the actual service you care about is down, firewalled, or unreachable on its specific port. The correct escalation when ping succeeds but the application still fails: ss/netstat to confirm the service is listening, then nc -zv or nmap against the specific port to confirm it’s reachable from the client’s side, then check for a firewall in between.


🧠 Knowledge Check

1. A user can ping a web server successfully, but their browser still can't load the site. What should you check next?

2. Which modern command replaces the deprecated netstat for viewing listening ports and connections?

3. What's the difference between bandwidth and throughput?


What’s Next

Lesson 3 shifts from getting the network working to locking it down — authentication, access control, and SELinux.