Edit /etc/network/interfaces and put the following into it (I assume your network interface is eth0):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet dhcp
Then restart the network: