Configure Static IP on Ubuntu

I been used with RedHat for quite long time.. But when I first touch Ubuntu, I have a lot difficulty to adapt with it. File system location had been slightly changes but overall is easier than RedHat. Due to Ubuntu can easily install any package you prefer without searching "howto" or "sop" at google.

Suddenly I face some difficulty in Ubuntu.. HOW TO CONFIGURE STATIC IP..
Shitzzz... I not even know where the interfaces config file locate. HAHA XDD

Anyway.. I found the way and here it go:

1. Edit the interface config file which located at "/etc/network/interfaces".

File to edit Interfaces Settings

2. If the network interface is not configure with static IP, the config file will be as below.

Defaults Interfaces Config

3. To make static IP. Edit the file and change the "dhcp" to "static". Then add few new value to the config file as below.

Change DHCP to Static Settings

4. Once done, save the config and restart the network with "sudo /etc/init.d/networking restart"

Restart Network

5. Remember to set the DNS for the server. To set DNS, edit the resolv.conf file.

File name for edit DNS Server IP

6. Follow by "nameserver", type the DNS Server IP. Just add as many DNS Server as you like. Then save the file.

Add DNS Server IP

That all the step to configure Ubuntu IP Address.


For some user, they may prefer to configure a secondary IP to their server. With the same step, edit the "/etc/network/interfaces". Add the secondary IP setting at the bottom.

Add secondary IP Address (eth0:1)

Then restart the network. Everything will work perfectly.

Comments :

0 comments to “Configure Static IP on Ubuntu”