If all else fails, try this:
Unplug both the modem and the router, if you have one. Most modems and routers do not include a power button, the easiest way to restart them is by unplugging the device.
Wait for 30 seconds. This allows the short-term memory of the devices to clear completely. Plug the modem back in first.
Wait another 10 to 20 seconds for the modem to connect before turning on the router. The "Internet" or "WAN" light on the modem should be green to indicate it is connected. Plug in the router's power cord.
Wait for the router to connect to the modem. If you computer still doesn't can't connect, try restarting the computer.
This is good software to use, too.
Please download and run CCleaner .