This page is the basic steps to diagnose networking problems. For a intro on networking, see: Computer Networking, TCP/IP Basics.
Steps to diagnose.
ping loopback address.
ping 127.0.0.1
If good, then the TCP/IP stack is probably working. Else, you probably have misconfig somewhere.
Find your machine's local IP address then ping it. Example:
ping 192.168.1.3
If good, your network adapter is working.
you can find your IP address on Linux by ip addr or ipconfig on Microsoft Windows.
for detail, see:
Find the IP address of your router then ping it. Example:
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”)
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)