Docs / Networking / Troubleshooting Network Connectivity on Linux

Troubleshooting Network Connectivity on Linux

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 203 views · 1 min read

Systematic Approach

When diagnosing network issues, work from the bottom up: physical → IP → routing → DNS → application.

Step 1: Check Interface Status

# Is the interface up?
ip link show

# Check IP addresses
ip addr show

# Check for errors
ip -s link show eth0

Step 2: Test Local Connectivity

# Ping the gateway
ip route show default
ping -c 3 198.48.63.1

# Check ARP table
ip neigh show

Step 3: Test External Connectivity

# Ping a public IP (bypasses DNS)
ping -c 3 1.1.1.1

# Trace the route
traceroute 1.1.1.1
# or with MTR for continuous monitoring
mtr 1.1.1.1

Step 4: Test DNS Resolution

# Test DNS
dig example.com
nslookup example.com

# Check DNS configuration
cat /etc/resolv.conf

# Test specific DNS server
dig @1.1.1.1 example.com

Step 5: Test Application Layer

# Test HTTP
curl -v http://example.com

# Test specific port
nc -zv example.com 443
ss -tlnp | grep :80

Common Issues and Fixes

SymptomLikely CauseFix
No IP addressDHCP failuredhclient eth0
Can ping IP, not hostnameDNS issueCheck /etc/resolv.conf
Connection refusedService not runningCheck with ss -tlnp
Connection timed outFirewall blockingCheck iptables -L or nft list ruleset
Packet lossNetwork congestionUse mtr to find the hop

Useful Diagnostic Tools

# Show all listening ports
ss -tlnp

# Monitor bandwidth
iftop -i eth0

# Capture packets
tcpdump -i eth0 port 80 -c 100

# Check firewall rules
iptables -L -n -v
nft list ruleset

Was this article helpful?