How to fix ip address on Ubuntu OS

Ubuntu OS have some different file path to configuring network parameter from the other Linux. You can fix ip address and apply new configuration on ubuntu by following these command instruction

$sudo vi /etc/network/interfaces < <<< or your can use other editor program to

and edit some parameter in this file like

==================================================

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address xxx.xxx.xxx.xxx (enter your ip address here example 192.168.1.1)
netmask xxx.xxx.xxx.xxx (enter your subnetmask here example 255.255.255.0)
gateway xxx.xxx.xxx.xxx (enter your gateway here example 192.168.1.254)

==================================================

and fix DNS Parameter by edit the parameter in /etc/resolv.conf file

$sudo vi /etc/resolv.conf

and edit some parameter in this file like

=======================================================

nameserver xxx.xxx.xxx.xxx(enter your dns server ip)
nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)

=======================================================

notice:You can put many DNS server as many as you want.
after you fixed the new ip address, you have to restart network service by

$sudo /etc/init.d/networking restart

finished!!