DHCP to static IP configuration in Ubuntu Server

by mtecheasy on January 16, 2011

If your running a server, you should have a static IP, yes this could be accomplished with DHCP, but what happens when the DHCP server goes down? That’s why I like to setup static IPs, especially on my servers!

Run the following command to open the interface config file:
# sudo vi /etc/network/interfaces

Replace this:
iface eth0 inet dhcp

With the following:
iface eth0 inet static

Then you have to restart your network adapter for the changes to take affect:
# sudo /etc/init.d/networking restart

Leave a Reply