Network issues can disrupt connectivity and communication, impacting productivity and system operations. Basic network troubleshooting involves systematic steps and tools to identify and resolve common network problems effectively.
Linux provides several powerful command-line utilities that help diagnose physical connections, IP addressing, routing, and service availability, enabling administrators and users to restore network functionality promptly.
Network Troubleshooting Steps
Below is a structured approach to diagnosing and resolving network problems. Each step builds on the previous one to isolate and fix connectivity failures.
1. Check cables and devices: Ensure all cables, switches, routers, and network cards are properly connected and powered.
2. Check interface status: Use commands to verify interfaces are active and operational.
ip link showLook for “UP” status; if an interface is “DOWN,” bring it up:
sudo ip link set eth0 up3. Check negotiated link speed and duplex:
ethtool eth0Confirm expected speed and duplex to avoid performance issues.
1. View assigned IP addresses and subnet masks:
ip addr show2. Verify static or dynamic (DHCP) assignment as expected.
3. Check for IP conflicts by ensuring no duplicates on the network.
1. Ping local gateway to confirm local network reachability:
ping -c 4 192.168.1.12. Ping external IP (e.g., Google DNS) to check internet access:
ping -c 4 8.8.8.83. If ping by IP works but not by domain name, suspect DNS issues.
1. Use nslookup or dig to verify DNS resolving:
nslookup google.com
dig google.com2. If DNS queries fail, check /etc/resolv.conf for correct DNS server entries.
1. Display routing table:
ip route show2. Verify existence of default gateway route, e.g.:
default via 192.168.1.1 dev eth03. Add or fix gateway if missing:
sudo ip route add default via 192.168.1.11. Use ss or netstat to verify required services and ports are active:
ss -tunlp
netstat -tuln2. Confirm no port conflicts or firewall rules blocking traffic.
Use traceroute to identify bottlenecks or failures along route:
traceroute google.com1. Review system logs for network-related errors:
journalctl -u NetworkManager
tail /var/log/syslog2. Analyze ARP cache to verify MAC address mappings:
arp -n
We have a sales campaign on our promoted courses and products. You can purchase 1 products at a discounted price up to 15% discount.