Having a static IP address under Ubuntu 8.10
NetworkManager is a program default to Ubuntu 8.10, aiming to provide a simplified Internet connection. NetworkManager at all costs find and maintain an internet connection. The main problem will be,if you want to use a fixed IP address. Settings made in NetworkManager will not be applicable at the next restart. Ultimately if you assign a fixed IP address in NetworkManager, this setting will be forgotten the next reboot.
To have a fixed IP persistent:
Uninstall NetworkManager
A straightforward approach is to uninstall NetworkManager:
sudo apt-get remove network-manager network-manager-gnome
Configure manually the interfaces
Modify the following file: /etc/networks/interfaces.
gksudo gedit /etc/network/interfaces
keep the following lines
auto lo
iface lo inet loopback
For a fix IP (10.0.0.1 on your eth1 interface) use:
auto eth1
iface eth1 inet static
address 10.0.0.1
netmask 255.255.255.0
To make use of dynamic IP (e.g eth0):
auto eth0
iface eth0 inet dhcp
then enter : sudo /etc/init.d/networking restart
to take changes in consideration.
DNS
If you want to make use of specific DNS, modify the following file /etc/resolv.conf
Note that if you are using DHCP on one of your interfaces, the contents of this file will be overwritten by the DHCP client.
To force the DHCP client to use a specific DNS, edit the file /etc/dhcp3/dhclient.conf
Add the following line:
prepend domain-name-servers 208.67.222.222,208.67.220.220;
DNS returned by DHCP are will be added after the DNS you specified.