Having a static IP address under Ubuntu 8.10

The Network Manager default for the Ubuntu distribution of Linux operating systems provides internet connectivity. The Network Manager cannot save a fixed IP address on Ubuntu Linux and the settings are lost when the system is rebooted. To have a static IP address on Ubuntu Linux,the Network Manager must be uninstalled before the network interfaces are configured manually. The network interfaces can be configured to have a static IP in Ubuntu Linux by editing the interfaces file to include the fixed IP address. The configuration would be retained even after the Linux system has been restarted.

NetworkManager is a program in Ubuntu 8.10, which aims to provide a simplified Internet connection. NetworkManager finds and maintains an internet connection at all costs. However it can cause a problem 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 time you reboot.
A straightforward approach is to uninstall NetworkManager:
  • sudo apt-get remove network-manager network-manager-gnome
  • Modify the following file: /etc/networks/interfaces.
    • gksudo gedit /etc/network/interfaces
  • keep the following lines
    • auto lo 
    • iface lo inet loopback

auto eth1     
iface eth1 inet static     

auto eth0     
iface eth0 inet dhcp
  • then enter :
    sudo /etc/init.d/networking restart 
    to validate the changes.
  • If you want to make use of specific DNS, modify the following file
    • 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
  • Add the following line:
    • prepend domain-name-servers,;
  • DNS returned by DHCP will be added after the DNS you specified.

Published by jak58. Latest update on February 16, 2012 at 11:55 PM by Paul Berentzen.
This document, titled "Having a static IP address under Ubuntu 8.10," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Ubuntu - Unzip rar, 7z, arj, lzh files
Compiling/testing in 32-bit on Ubuntu X86-64