I had installed Ubuntu server and had the router setup to assign the same IP Address (192.168.0.10) every time the machine powered on. Recently, I did a clean install of Ubuntu Server and now my machine won't connect to the Internet. I think this is because I mistakenly set it up with a static IP Address in the install process. How can I configure Ubuntu to always ask for an IP Address from the router?
While researching this, it seems like I need to configure my machine to use DHCP. My /etc/networking/interfaces file has this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static # This is why I think it's setup as a static IP
address 192.168.0.10
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# I'm pretty sure I typed these in during setup; they have nothing to do with a DNS
dns-nameservers 192.168.0.1
dns-search ironjack.spacetechnology.net
I tried to change the static to dhcp and restart the networking script (like this question suggested), but that didn't work.