Explore plans starting at ₹699/mo →
Networking

Network Troubleshooting: A Practical Step-by-Step Method

S
ServerRaja
9 min read
#Troubleshooting#Linux#Networking#Guide#Best Practices#System Administration
Network Troubleshooting: A Practical Step-by-Step Method

Network connectivity issues are among the most common problems server administrators face. A systematic troubleshooting approach identifies the problem quickly rather than making random configuration changes.

Step 1: Verify Local Interface

Check that the network interface is up and has an IP address: ip addr show

Look for: - Interface state: should show UP - IP address: should be assigned and correct - No error flags on the interface

If the interface is down: sudo ip link set eth0 up If no IP is assigned: check DHCP or static configuration

Step 2: Test Local Connectivity

Ping the default gateway to verify local network connectivity: ping -c 3 gateway-ip

If this fails: - Verify the gateway IP is correct - Check ARP resolution: arp -n - Verify the interface subnet mask matches the gateway's subnet - Check for VLAN misconfiguration

Step 3: Test External Connectivity

Ping an external IP address (bypassing DNS): ping -c 3 8.8.8.8

If this works but DNS resolution fails, the problem is DNS-specific.

If this fails: - Check the routing table: ip route show - Verify the default route exists - Trace the packet path: traceroute 8.8.8.8 - Check firewall rules (iptables -L or nft list ruleset)

Step 4: Test DNS Resolution

Test name resolution: nslookup example.com or: dig example.com

If DNS fails: - Check /etc/resolv.conf for nameserver configuration - Try alternative DNS servers: dig @8.8.8.8 example.com - Verify DNS server reachability: ping nameserver-ip

Step 5: Test Application Connectivity

Test the specific application port: curl -v http://target-host:port or: ss -tnp | grep port-number

Check if the application is listening: ss -tlnp Check firewall rules for the specific port

Step 6: Check for Packet Loss and Latency

Extended ping test: ping -c 100 target-host

traceroute shows the path and per-hop latency: traceroute target-host

mtr combines ping and traceroute for continuous monitoring: mtr target-host

Step 7: Inspect Firewall Rules

Verify no firewall rules are blocking traffic: iptables -L -n -v (legacy) nft list ruleset (modern)

Check both input and output chains. Cloud platform security groups may also block traffic at the hypervisor level.

Common Issues

  • Wrong default gateway: after server migration or network change
  • DNS misconfiguration: /etc/resolv.conf overwritten by DHCP
  • Firewall blocking: new rule added that blocks required traffic
  • MTU mismatch: causes intermittent failures with large packets
  • Routing loop: packets cycling between routers

Conclusion

Follow the OSI layers from bottom up: physical connectivity, IP configuration, routing, DNS, and finally application-layer issues. This systematic approach resolves most network problems efficiently.

Network Troubleshooting: Step-by-Step Method | ServerRaja