Network configuration under ubuntu
Enter command 1: sudo vi /etc/network/interfaces
#DHCP gets ip configuration automatically
auto lo #boot auto lo interface
iface lo inet loopback #configure lo interface as loop loopback
auto eth0 #Start automatically activates eth0 interface
iface eth0 inet dhcp #configure eth0 interface for DHCP autofetch
#statically assign IP address configuration
auto lo #boot auto lo interface
iface lo inet loopback #configure lo interface as loop loopback
auto eth0 #Start automatically activates eth0 interface
iface eth0 inet static #Configure eth0 interface as static Set IP address
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
#DNS Configuration
sudo vi /etc/resolv.conf
nameserver 192.168.1.1
Enter command 2: sudo /etc/init.d/networking restart #Restart the network