How exactly are you connecting to the net ? if your connecting through a ethernet cord, make sure it's not damaged or anything.
Also keep in mind even ethernet cords will wear out over a long use of time, try a different one and see what happens.
If you are connecting wirelessly which I am guessing make sure you connect to your router, not your neighbors house next door.
Make sure your router is firewalling you by accident, sometimes it will happen but you can always logon and fix the problem.
If you need help with your router and it's still under warranty give them a call as they love to talk to you to death until you slam the phone down....