A layered methodology for diagnosing Linux network issues by isolating failures from physical connectivity through upstream path analysis and name resolution. This is a systems model — not a reaction guide.
Network problems are rarely “the internet.” They are almost always a failure at a specific layer. Stability comes from structured isolation and repeatable tests.
Diagnose in order. Never skip layers.
Physical / Link
ethtool eth0 iw dev wlan0 link
Local IP
ping -c 50 192.168.1.1
Upstream Path Analysis (mtr)
# Snapshot report (preferred for logging / watch) mtr -rwzbc 100 1.1.1.1 # Live monitor (run directly, not inside watch) mtr -ezbw 1.1.1.1
DNS
getent hosts google.com ping -c 5 google.com
Truth Observation
tcpdump -e -i eth0
Consumer routers often deprioritize or rate-limit ICMP replies (especially under load).
This can make mtr show dramatic loss at hop 1 (your gateway) even while your
real traffic is forwarded normally.
# Gateway validation (gentle but meaningful) ping -c 200 -i 0.2 192.168.1.1
This is a lightweight harness you can run under watch.
It locates mtr and runs a single monitoring command.
Prefer the -r report form if you want stable snapshots.
#!/usr/bin/env bash
### Universal SHMOD
### Run it like this:
### /usr/bin/watch -n 180 -t /usr/local/bin/mtr--monitor.sh
## Find mtr location on any distro
MTR="$(/usr/bin/which mtr)"
if [ -z "$MTR" ]; then
/usr/bin/echo "mtr not found. Exiting."
exit 1
fi
/usr/bin/echo "=== $(/usr/bin/date '+%F %T %z') ==="
/usr/bin/echo "${MTR} -rwzbc 100 1.1.1.1"
"${MTR}" -rwzbc 100 1.1.1.1
/usr/bin/echo
/usr/bin/echo "========================================"watch, use report mode (-r) so each run terminates cleanly.
Use -ezbw only when running mtr directly (interactive/live view).
Never debug “the internet.” Debug the layer.
Tools serve the model — not the other way around. When diagnostics conflict, trust end-to-end results (destination loss/latency) and validate locally with controlled tests.