Troubleshooting Scenarios
This page outlines a systematic approach to troubleshooting common network issues.
No Internet Access
- Check Physical Connection: Ensure network cables are properly connected and that the network interface is enabled (
ip link show). - Check IP Address: Verify that the device has a valid IP address (
ip addr show). If not, check DHCP. - Check Default Gateway: Use
ip route showto ensure a default gateway is configured. - Test Local Connectivity: Ping the default gateway to check if the local network is reachable.
- Test DNS Resolution: Use
digornslookupto see if domain names are resolving correctly. - Test External Connectivity: Ping a public IP address (e.g.,
8.8.8.8) to check for internet connectivity beyond your local network.
DNS Not Resolving
- Check DNS Server Configuration: Look at
/etc/resolv.confto see which DNS servers are being used. - Test DNS Server Reachability: Ping the DNS servers listed in
/etc/resolv.conf. - Query a Specific DNS Server: Use
dig @<dns-server> <domain-name>to test a specific server. - Check for Firewall Rules: Ensure that firewall rules are not blocking DNS traffic (port 53).
Interface Down or Link Flap
- Check Interface Status: Use
ip link showorethtool <interface-name>to check the status of the network interface. - Check Physical Layer: Inspect cables and switch ports for issues.
- Check System Logs: Look for relevant error messages in
dmesgorjournalctl. - Check for Duplex Mismatch: A duplex mismatch between the device and the switch can cause link flapping.
MTU / Packet Loss Issues
- Check for Packet Loss: Use
pingwith a large number of packets (ping -c 100 <host>) to check for packet loss. - Check MTU Size: The Maximum Transmission Unit (MTU) is the size of the largest packet that can be transmitted over a network. You can use
pingwith the "don't fragment" bit set to find the optimal MTU size.Start with a large packet size and gradually decrease it until the packets are no longer fragmented.ping -s <packet-size> -M do <host> - Check for Network Congestion: Use tools like
mtrortracerouteto identify potential points of congestion in the network path.