Find and fix network faults with a method, not guesswork — work the OSI layers, then wield the tools every engineer relies on: ping, traceroute and mtr, dig, ss and netstat, arp, and packet capture with tcpdump. Every command runs on any Linux, macOS, or Windows machine.
Before you start
Most commands are built into your OS. A few — mtr tcpdump iperf3 — install from your package manager. You just need a terminal and a network to poke at; no special hardware required.
A Troubleshooting Methodology
Random poking wastes hours. A structured method — work the OSI layers, isolate the fault, change one thing at a time — finds the cause fast and reliably.
Interfaces & Connectivity
Start at your own machine: is the interface up with the right IP and gateway? Then ping outward, reading exactly what each reply — or lack of one — means.
Tracing the Path
When a destination is unreachable or slow, traceroute shows every router along the way and where the packets stop — turning "the internet is broken" into a specific hop.
DNS: dig & nslookup
“It works by IP but not by name” means DNS. Query records directly with dig and nslookup to see exactly what a name resolves to — and whether it resolves at all.
Ports & Connections
The host is reachable but the app won’t connect. Is the service even listening? Is the port open? ss, netstat, and a raw TCP test answer in seconds.
Layer 2 & ARP
When even the gateway is unreachable, drop to Layer 2. The ARP table and MAC address tables reveal cabling, VLAN, and duplicate-IP problems ping can’t see.
Packet Capture
When higher-level tools disagree with reality, capture the actual packets. tcpdump and Wireshark show exactly what’s on the wire — the ultimate source of truth.