Can't connect to wired internet

Okay, so I recently installed Ubuntu on an old laptop and now it won't connect to the internet. When I plug in the Ethernet cord is says connecting and the little icon things moves but after a minute or so it says disconnected and repeats.

Before I installed Ubuntu it worked fine using Win XP so it's not the port or anything and besides, it recognizes the cord is there, it just won't fully connect. I don't have wireless so I;m not sure if that works or not but I can view the networks around my place. Any ideas? I really need to get this working. Thanks.

TL;DR LAN says connecting and then says disconnected.


start the terminal and type

gksu gedit /etc/network/interfaces

File will opened in gedit. It will be empty or should contain

auto lo
iface lo inet loopback

In gedit add following lines and save it and close

auto eth0
iface eth0 inet dhcp

and restart the network manager: sudo service network-manager restart It works fine with my case