How to Diagnose Computer Networking Problems

By Xah Lee. Date: . Last updated: .

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.

ping 127.0.0.1

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.

ping 192.168.1.3

If good, your network adapter is working.

for detail, see:

Step 3: Ping Your Router

Ping your router.

# find router ip address
ip route
ping 192.168.1.1

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

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)