First thing to check is that it is not a name server issue. Can you ping an ip address (rather than hostname)? What is in /etc/resolv.conf?
Next just try to bring down the interface and then bring it back up again. eg
sudo ifdown eth0
sudo ifup eth0
Where I'm assuming that eth0 is the name of your interface.