How to Diagnose Computer Networking Problems
This page is a tutorial on how to diagnose networking problems. For a intro on networking, see: TCP/IP Tutorial for Beginner .
Step 1: Check TCP/IP Stack: Ping Loopback Address
Ping the loopback address.
This checks if the TCP/IP stack is working. If not good, you probably have misconfiguration somewhere.
Step 2: Ping Your Own IP Address
Find your machine's local IP address then ping it.
# find your ip address on linux ip addr
you can find your IP address on Linux by
ip addr or
ipconfig on Microsoft Windows.
then, ping your own IP address.
If good, your network adapter is working.
for detail, see:
- Linux: Networking Commands
- Windows: Networking Commands
- Windows: How to Find My IP Address, MAC Address?
Step 3: Ping Your Router
Ping your router.
# find router ip address ip route
If good, link layer and lower layer of TCP/IP stack is working, and your router is working.
you can find your router IP address on Linux by
ip route (look for “default via”) or on Microsoft Windows by
ipconfig (look for “Default Gateway”)
Step 4: Ping Local/Remote Host
Ping local host and a remote host. This is to check if DNS is working properly.
ping localhost ping yahoo.com
sample ping output on local host.
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.021 ms 64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.038 ms 64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.042 ms 64 bytes from 127.0.0.1: icmp_req=4 ttl=64 time=0.041 ms
- check ttl (time to live). Longer, is healthier. Near 0 means many hops. Also note the miliseconds.
- note the request sequence. If missing some, it means packets are dropped.
use ifconfig to check config info. The IP address, netmask. Also, can release/renew request to DHCP.
if a network used to work and stopped working, it's probably a line problem. (cable, physical connection, hardware)