It is hard to write an answer for a question that is still stuck in the troubleshoot phase.
Normally a question like this would be closed as too broad, but I've decided to go with a different approach, and write a sort of checklist to troubleshoot the issue, because this checklist is more or less standard when it comes to troubleshooting network connectivity issues. For that reason, I'll be mentioning checks you already mentioned doing. Not to bash you, but to help others that are brought to this post through a search engine.
For the sake of not going too broad, I'll assume a simple home network is used, not a corporate network with a server. So modem -> router -> multiple clients.
Steps with a - are to be followed, numbers are questions with a yes/no answer. If you answer with what is written after the question, the a. b. c.... etc are to be followed next, or otherwise, they can be skipped.
Help, my computer does not connect to the internet. What can I do?
- Open a command prompt, and run the following command: IPConfig /all
Look at the result, and find the network card or wireless card, and look for its IPv4 address.
- Do you see a 169.254.xxx.xxx address? yes: your computer could not contact the DHCP server, or the DHCP server was unable to give you an IP Address. This means that either the device that gives an IP address (router) or the connection to it is not working properly.
1a. Check the connection to the router. If wired, make sure the lights on the back where you insert the cable are both on. Unplug and plug it back in if this fails, follow the wire all the way to the router and check every place it connects (including additional switches in its path)
1b. Check the connection to the router. If wireless, make sure you are connected. Disconnect, and forget the connection, then reconnect if necessary. You should have to re-enter your wireless password now if done correctly.
- If you can connect to LAN but not Wifi, or visa versa: keep in mind, if both connections are active at the same time, one of the two will automatically be ignored/disabled. Unplug the network cable if you want to test Wifi, and disable the wifi (usually on laptops there's a button to press) if you want to test the LAN)
1c. Make sure the DHCP server has enough IP addresses to hand out. If the DHCP server has set to give out ip addresses in range: 192.168.1.50 - 192.168.1.60, and 10 clients are connected, then the 11th client will simply not be able to get an ip address, and gets the 169.254.xxx.xxx address. If this is the case, increase the scope on the DHCP server to allow for more addresses.
- Every device with network capabilities is considered a client and thus will have an ip address handed out.
- Clients that have both LAN and Wifi with both enabled, may be given 2 IP Adresses, depending on how smart or dumb the drivers on that client are.
1d. Reboot the device that has the DHCP server. It is possible the software crashed and stopped responding. If this is the case, all devices that were connected prior to its crash will still have internet and network access, just new ones don't.
1e. See point 4d: may be a driver issue.
- Do you have a fixed IP Address? Yes: A fixed ip address will cloud any connectivity issues.
2a. Set it to dynamic so you can get an ipaddress from the server and check step 1. If all works, you can later set it back to the same fixed ip address as it was before.
- Assuming you have an ip address, look at the ipaddress that is listed as gateway. This should be the ip address of the router. Is it the ip address of the router? No: There is another device in the network that acts like a DHCP server, and now there are 2 DCHP servers. Your computer gets an ipaddress from another server but this device does not connect to the internet nor the rest of the network.
3a. Find this device and disable the DHCP server. This could be a 2nd router someone connected, or an apple device with router functionality buildin, and even software on one of the other computers.
3b. If you can't find any other DHCP server, disconnect all cables from the router except for your own and see if that fixes your issue. If not, change the wifi password and try again to rule out any wireless device. Once you find that the problem seems solved, add a device to the router and from your pc, refresh the network to get a new ip address. The moment it goes to the other network, look at the device that was connected last. This is the troublemaker.
- So the ip address of the gateway is the one from the router. Great! Can you ping it? No: Something blocks connection to the router.
4a. If you have a fixed ip address, this information is pre-entered, Make sure you follow step 2 and 1 accordingly.
4b. Do you have a firewall installed on your computer, or a virusscanner that has a firewall buildin? It is likely blocking the connection to the router. Disable it and see if your connection magically comes back. You can test this by pinging the router's ip address once more.
4c. Have you rebooted your computer? Even though you get an ipaddress, if the network card driver crashed, it may not be able to communicate, but only show cached information. A simple reboot should fix that.
4d. Have you tried to reinstall your networkcard drivers? If your network card driver keeps crashing, the problem seems to remain after a reboot. It may even fail to get an ip address at some point.
- So, you can ping the router. Great! Can you ping the internet by ip by typing
ping 8.8.8.8
in a command prompt window? No: Your internal network is fine, but you simply don't have connectivity to the internet
5a. Reboot your modem first, wait for the lights to return to normal state, then reboot the router and wait for the lights to return to normal state. After that, check to see if you have restored internet on your computer. If not, try to reboot your computer, just to be sure.
5b. Your internet is still not working after rebooting the modem, so its time to call your ISP. There could be a global internet issue, or it could be locally. In any case, they're the ones who can troubleshoot your connection from their end.
- Great, so you can ping the internet. How about perform a DNS translation? Can you ping a google domain by typing
ping google.com
in a command prompt window? No: You have a problem with DNS.
6a. In a command prompt window, type ipconfig /all and look for the ip addresses of the DNS servers. This usually are DNS servers provided by your ISP. Can you ping them?
6b. Go to your network settings and see if the DNS servers are set dynamic or manual. If DNS servers were already entered there, set it to dynamic. Then from a command prompt, type ipconfig /flushdns
Did this fix your issue? Can you now ping google.com?
6c. Go to your network settings, and set the DNS servers to 8.8.8.8
and 8.8.4.4
, then type ipconfig /flushdns
in a command prompt window and see if that fixes your issue temporarily. If so, something goes wrong with the DNS servers found in step 6a. If they are the ISP's DNS server, or if other DNS servers were already entered, contact whoever is responsible for the server.
6d. If you still can't ping google.com, can you ping another website? google.com might experience issues. Preferably ping a website located in your country, to rule out a problem at one of the internet junctions.
6e. If you can't ping any website, you could either have a problem in your hosts file or you could have malware and/or your computer connects to a proxy server that is not working that intercepts your DNS requests. Check your Internet Explorer LAN connection for a proxy server.
- If you reach this step without having solved your issue, you need to consult with an expert, because it becomes out of scope for SuperUser. At this point you should consider things like reinstalling windows, replacing faulty hardware, etc.