Ubuntu network configuration 1. dhcp automatically obtains IP address editing/etc/network/interfaces www.2cto.com auto lo # enable The auto lo interface iface lo inet loopback # configure The lo interface as The loopback port # The primary network interface (configure the main network interface) auto eth0 # enable the eth0 interface iface eth0 inet dhcp # configure the eth0 interface as DHCP to automatically obtain and restart the network: sudo/etc/init. d/networking restart 2. Configure static IP address edit/etc/network/interfaces # The loopback network interface (configure The loopback interface) auto lo # activate The lo interface iface lo inet loopback # configure The lo interface as The loopback interface # The primary network interface (configure The main network interface) auto eth0 # enable eth0 interface iface eth0 inet static # configure eth0 interface to set IP address 10.16.3.99 netmask 255.255.255.0 gateway 10.16.3.1 restart Network: sudo/etc/init. d/networking restart