Recently, I came across a very strange problem on my laptop (xubuntu 12.04). I wasn't able to visit any websites and download software via ubuntu software center. In fact my internet didn't work (although the network-manager said there is a connection). I replaced the default network-manager with wicd and all seemed to work again, but after a while I had the same problem again. Then I discovered that I can connect to and use the internet when any other computer (connected to the same lan) is turned on. I have absolutely no idea how to solve the problem, so thanks to everyone who tries to help me.
If you need more/specific information, please tell me.
I'm sorry, it turned out that the working/not working of the internet doesn't depend on whether another pc is turned on or not. There has to be another reason, I'll try to find out more about it and post a new question anytime soon.