Network Troubleshooting Guide
This guide provides a structured approach to diagnosing and resolving common network connectivity issues, from basic to advanced problems.
Troubleshooting Methodology
The OSI Model Approach
A systematic way to troubleshoot network issues is to work through the OSI model layers from bottom to top:
Physical Layer (Layer 1)
- Check physical connections (cables, ports)
- Verify power and link lights
- Test alternative cables/ports
Data Link Layer (Layer 2)
- Check interface status
- Verify MAC addresses
- Examine for switching loops
Network Layer (Layer 3)
- Verify IP configuration
- Check routing tables
- Test basic connectivity
Transport Layer (Layer 4)
- Verify port availability
- Check for port filtering
- Test service responsiveness
Session/Presentation/Application Layers (Layers 5-7)
- Check application configurations
- Verify DNS resolution
- Test application-specific requirements
Common Network Issues and Solutions
Connectivity Problems
No Network Access
Symptoms:
- Unable to access any network resources
- "No internet" error messages
Diagnostic Steps:
Check physical connections (cables, Wi-Fi signal)
Verify network interface status:
# Linux/macOS ifconfig # or ip addr show # Windows ipconfig /all
Test loopback interface:
ping 127.0.0.1
Common Solutions:
Reconnect or replace network cables
Restart network interface
Reset network adapter:
# Linux sudo ifdown eth0 && sudo ifup eth0 # or sudo ip link set eth0 down && sudo ip link set eth0 up # Windows ipconfig /release ipconfig /renew
Local Network Access Only
Symptoms:
- Can access local resources but not internet
- Ping to local IPs works but not to external domains
Diagnostic Steps:
Check default gateway configuration:
# Linux/macOS ip route | grep default # Windows ipconfig | findstr Gateway
Try pinging the gateway:
ping 192.168.1.1 # Replace with your gateway
Check DNS settings:
# Linux cat /etc/resolv.conf # Windows ipconfig /all | findstr DNS
Common Solutions:
Reset router/modem
Correct gateway settings
Set alternative DNS servers:
# Linux echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf # Windows netsh interface ip set dns "Wi-Fi" static 8.8.8.8
DNS Issues
Cannot Resolve Domain Names
Symptoms:
- IP addresses work but domain names don't
- "DNS server not responding" errors
Diagnostic Steps:
Test DNS resolution:
nslookup google.com # or dig google.com
Check DNS server configuration
Try alternative DNS servers
Common Solutions:
Switch to public DNS servers (8.8.8.8, 1.1.1.1)
Flush DNS cache:
# Linux sudo systemd-resolve --flush-caches # macOS sudo killall -HUP mDNSResponder # Windows ipconfig /flushdns
Check firewall rules for DNS traffic (port 53)
Performance Issues
Slow Network Performance
Symptoms:
- High latency
- Slow file transfers
- Intermittent connectivity
Diagnostic Steps:
Test network speed:
speedtest-cli
Check for network congestion:
ping -c 100 8.8.8.8 | grep time
Monitor bandwidth usage:
# Linux iftop # or nethogs # Windows netstat -e -t 5
Common Solutions:
- Identify and limit bandwidth-heavy applications
- Update network drivers
- Check for interference (Wi-Fi channels)
- Implement QoS settings on router
Advanced Troubleshooting Tools
Network Diagnostics
Traceroute
Traces the path packets take to a destination:
# Linux/macOS
traceroute google.com
# Windows
tracert google.com
MTR (My Traceroute)
Combines ping and traceroute functionality:
mtr google.com
Netstat
Displays network connections and routing tables:
# Show all connections
netstat -a
# Show listening ports
netstat -l
# Show statistics by protocol
netstat -s
Packet Analysis
Tcpdump
Capture and analyze network traffic:
# Capture packets on interface eth0
sudo tcpdump -i eth0
# Capture packets to/from specific host
sudo tcpdump host 192.168.1.10
# Capture specific protocol
sudo tcpdump tcp port 80
Wireshark
For GUI-based packet analysis:
- Capture traffic on the relevant interface
- Apply display filters (e.g.,
http
,dns
,ip.addr==192.168.1.10
) - Inspect packet details and conversations
Network Configuration Validation
Interface Configuration
Verify interface settings:
# Linux
ethtool eth0
# Windows
netsh interface show interface
Routing Table
Check routing configuration:
# Linux/macOS
ip route
# or
route -n
# Windows
route print
Firewall Rules
Verify firewall settings:
# Linux (iptables)
sudo iptables -L
# Linux (firewalld)
sudo firewall-cmd --list-all
# Windows
netsh advfirewall show allprofiles
Related Topics
- Unifi Configuration Guide - For Unifi-specific troubleshooting
- VLAN Setup and Configuration - For segmentation issues
- 802.1x Authentication - For network access control problems
- Network Security - For security-related network issues