Inspect network state

To troubleshoot a Linux server, inspect interface state, routes, DNS and sockets step by step.

ip addr
ip route
ping -c 4 1.1.1.1
getent hosts example.com
ss -tulpn
traceroute example.com

ping tests ICMP reachability, which may be blocked. A successful ping to an IP does not prove DNS works. getent hosts helps test name resolution.

Troubleshooting sequence

1. Check link and interface state.

2. Verify the IP address and subnet.

3. Check the default route and gateway.

4. Test DNS resolution.

5. Inspect firewall rules and service ports.