Bottom-up¶
- Physical (cable, link) -> 2. L2 (ARP, MAC) -> 3. L3 (IP, routing, ping) -> 4. L4 (TCP/UDP, ports) -> 5. L7 (DNS, HTTP, TLS)
Commands¶
ping -c 4 8.8.8.8 mtr -r google.com dig example.com ss -tlnp nc -zv server 80 curl -v https://example.com openssl s_client -connect example.com:443 tcpdump -i any port 80 -nn
Common Problems¶
- DNS failure -> dig @8.8.8.8, resolv.conf
- Connection refused -> service not running, firewall
- Connection timeout -> routing, firewall, host down
- SSL error -> certificate, hostname
- Intermittent -> MTU, packet loss (mtr)
Systematically L1 -> L7¶
Ping, traceroute, dig, curl — solves 90% of problems.
troubleshootingnetworkingdiagnostika