Forcing DHCP on Ubuntu Server

Avi Greenbury avismailinglistaccount at
Wed Jun 11 15:13:33 UTC 2008

Robert Dailey wrote:
> Hi,
> I'm using Ubuntu Server 8.04. I configured my router's DHCP to always
> give my router a static IP. Because of this, I need to configure my
> server to always bind its domain name to the DHCP acquired IP address.
> Is there a way to do this? Currently I am not sure if it is using
> DHCP, I think it's using a static IP (which I don't want).
> Thanks for your time.

Edit the line in /etc/network/interfaces for whatever interface you want 
to DHCP (eth0 usually) to read:

iface eth0 inet dhcp

rather than

iface eth0 inet static

You'll also want to remove (or # out) the below settings (address, 
subnet-mask etc.)

then run
# ifdown eth0 ; ifup eth0

Avi Greenbury

More information about the ubuntu-users mailing list