Network Troubleshooting
Problem-Solving Model
Work from bottom to top:
Quick Commands
ip -br a
ip r
ping -c 2 gateway
ping -c 2 1.1.1.1
dig example.com +short
nc -vz host 443
curl -vk https://example.com
ss -tulpn
tcpdump -nn -i any host 10.0.0.10
Common Cases
IP Works but the Domain Does Not
This usually points to:
- DNS
- TLS or SNI
- reverse proxy or virtual host config
Only One Subnet Is Broken
Check:
- routing
- ACLs or security groups
- VLAN
- DHCP options
TCP Timeout
This usually means:
- firewall drops the packet
- asymmetric routing
- the backend is not reachable
Connection Refused
This usually means:
- the process is not listening
- it listens on
127.0.0.1when an external interface was expected
Practice
timeoutandrefusedare different classes of problems.curl -vkoften tells you more thanping.- Use
tcpdumpwhen higher-level commands still do not explain where packets disappear.