Configure DHCP Interface in Ubuntu

Ubuntu supports configuring of DHCP interfaces via using a GUI, or by modifying the interfaces file directly. Make sure to automatically initialize the interface on boot time, then ensure it uses DHCP. Begin by editing the interfaces file:

root@computer:~# vi /etc/network/interfaces

Then add

auto eth1
iface eth1 inet dhcp

Note that you will need to specify the interface you want to use for this. If you want a full list of possible interfaces you can do

root@computer:~# ifconfig -a

After the file is adjusted to the way you want it, make sure to restart the networking service for your settings to take effect.

root@computer:~# /etc/init.d/networking restart

After this is complete, verify your settings using “ifconfig -a” once again.