MyDLP Easy, Simple, Open
Setting Permanent Static IP in Ubuntu
Introduction
This document describes how to assign a permanent static IP address for a network interface on Ubuntu.
Howto
Open the file /etc/network/interfaces ;.
sudo vi /etc/network/interfaces
If you are using DHCP for your primary network card which is usually eth0, you will see the following lines;
auto eth0
iface eth0 inet dhcp
As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should add and here is the example and you can change these settings according to your network settings.
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Restart the neworking service using the following command;
sudo /etc/init.d/networking restart
and it is done...
References
For original document, check out here.