December 4, 2008 · General · Email This Post

Sponsored Link
There seems to be a known bug with the Gnome Network Manager included with the Ubuntu 8.10 release that resets any static ip address settings that are set manually when the system is rebooted reverting back to a DHCP setup. These steps will remove the Gnome Network Manager and help you manually setup the required files for your static network configuration.

Solution 1

Step 1 – Remove the Gnome Network Manager: You need to complete this step first because if left installed this application will overwrite any changes you make to your configuration when the system is rebooted. This is apparently where the bug is located.
To remove the Gnome Network Manager issue the following command in the terminal:

sudo update-rc.d -f NetworkManager remove

This will disable and remove the Gnome Network Manager application. Now you will have to edit your configuration manually.

Restart your System

Step 2 – Manual configuration of your network interface: In this step you will manually configure your network interface by editing the following two files using your preferred text editor(nano gedit vi). For the purpose of this example I am using the nano editor.

Step 2.1 – Manually configure your network interface file: You can edit the appropriate file by entering the following command into the terminal:

sudo nano /etc/network/interfaces

Once your prefered editor opens the file you want to enter the following information (changing your addresses where necessary):

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address xxx.xxx.xxx.xxx(enter your ip here)
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx(enter gateway ip here)

Be sure to save your changes.

Step 2.2 – Manually configure your dns configuration file: You can edit the appropriate file by entering the following command into the terminal:

sudo nano /etc/resolv.conf

Once your preferred editor opens the file you want to enter the following information (changing your addresses where necessary):

# Generated by NetworkManager
nameserver xxx.xxx.xxx.xxx(enter your dns server ip)
nameserver xxx.xxx.xxx.xxx(enter your alt dns server ip)

Be sure to save your changes.

Step 2.3 – Manually restart your network interface with the new settings: Enter the following command in the terminal:

sudo /etc/init.d/networking restart

This should return a result that looks like the following:

*Reconfiguring network interfaces… [OK]

At this point in your terminal you should be able to run the ifconfig command and the results should reflect your new settings. If the addressing is correct you should have full network access, even after a system restart.

Haven't tried reinstalling the Network Manger after doing these steps to see if it still works.

Solution 2

Install Wicd if you need both wired and wireless connection

Solution 3

Also, it is said that adding a new config in networkmanager (instead of editing the system default ‘Auto eth0′ stuff) and assign the right MAC address (and the static ip) will fix it, every thing's fine even after reboot, and you can still use that gnome-networkmanager.

Check this simple guide

Credit Goes here

Sponsored Link

Incoming search terms:

Related posts

66 Comments to “How to Set a Static IP address in Ubuntu 8.10 (Intrepid Ibex)”

  1. Luciano says:

    I found here how to avoid your resolv.conf:

    sudo chattr +i /etc/resolv.conf

    Note: this locks the file so even as root you wont be able to edit it. To unlock it use: sudo chattr -i /etc/resolv.conf

    [Reply]

  2. OryK says:

    Artist, i did your solution steps, and works, I have two issues,
    1.- Network Manager doesnt start at Start Up.
    2.- I cant resolve DNS and Internet traficct doesnt Work.

    if somebody can help me.

    [Reply]

  3. Zilus says:

    Great dude, I was having this problem and now It’s fixed.

    [Reply]

  4. chak says:

    Reply 20 by Fabio worked for me. Thanks.

    [Reply]

  5. JBC says:

    # 20 worked for me too! Thanks Fabio Dude…

    [Reply]

  6. tauraz says:

    #8 and #32 makes my system with static IP thanks a lot.

    [Reply]

  7. Phil says:

    As soon as i disable the Gnome network manager my nic stops working and i cant seem to get Eth0 back

    [Reply]

  8. Lavi says:

    Thanx, it worked … :)

    [Reply]

  9. Peter Mercedes says:

    Hi Phil!

    I think you missed put eth0, after auto lo:
    auto lo eth0

    Your interfaces file at /etc/network/ must look like this:

    auto lo eth0

    iface lo inet loopback

    iface eth0 inet static
    address xxx.xxx.xxx.xxx(enter your ip here)
    netmask xxx.xxx.xxx.xxx(enter your netmask here)
    gateway xxx.xxx.xxx.xxx(enter gateway ip here)

    I hope you can solve your probem.

    [Reply]

  10. Stefan says:

    Hey, great thanks! Any word on whether it’s better practice to add eht0 after auto lo as Peter Mercedes suggested?

    [Reply]

  11. Stefan says:

    Just a quick one… this sometimes NEEDS a reboot to work… well it does with a VirtualBox Ubuntu 9 machine running on OSX. Otherwise.. works like a charm.

    [Reply]

  12. warttan says:

    i did all the steps bu it says :
    warttan@warttan-desktop:~$ sudo /etc/init.d/networking restart
    * Reconfiguring network interfaces…
    Don’t seem to be have all the variables for eth0/inet.
    Failed to bring up eth0.
    [ OK ]
    warttan@warttan-desktop:~$
    please help me

    [Reply]

  13. Stefan says:

    If you check the status of the network interface cards you should be able to see if they have been successfully been assigned a static ip at that point.. do ifconfig again and see. S

    [Reply]

  14. Stefan says:

    I was getting that too, but my statis IP was still working.. maybe its because we stopped the service or something.

    [Reply]

  15. Saif says:

    I used this when I had Ubuntu 8.10 but now that I’ve upgraded to Ubuntu 9.04 I want to undo this but couldn’t. I tried to reverse whatever I did but it doesn’t seem to work. Any tips?

    [Reply]

  16. bob says:

    Under Ubuntu 9.04 I simply disabled Network Manager from System|Preferences|Startup applications. Edit the two files as suggested and reboot and the PC came up answering at the new IP.

    [Reply]

  17. bob says:

    OK, after reboot I had to re-edit /etc/resolv.conf and put the name servers back as it dumped the info.

    [Reply]

  18. JeF says:

    i have one prob ,me i used the graphic way to assigned ip adress and i use my ubuntu 9.04 like web server so when somtimes i have electric prob the Server Shutdown so when reboot i can’t ping my web server and my web server loose internet but it keeps the same ip adresse

    [Reply]

  19. tebucky says:

    I followed the steps above and get this:

    root@chach:/etc# /etc/init.d/networking restart
    * Reconfiguring network interfaces…
    * Stopping the Firestarter firewall…
    …done.
    * Starting the Firestarter firewall…
    …done.
    RTNETLINK answers: No such process
    SIOCDELRT: No such process
    …done.

    the IP is still the old one that I’m trying to change

    [Reply]

  20. Sridhar Pandurangiah says:

    I tried this on Ubuntu 9.04 server. I get the following error when I run sudo /etc/init.d/networking restart

    * Reconfiguring network interfaces
    postconf: fatal: open /etc/postfix/main.cf: No such file or directory
    postconf: fatal: open /etc/postfix/main.cf: No such file or directory

    I looked for main.cf in the directory path. No such file existed.

    Can some suggest what could be wrong. I need to set this up so that I can connect to the internet to apt-get and install ubuntu-desktop and gdm.

    Regards

    Sridhar

    [Reply]

    admin Reply:

    Try one of these

    Method 1

    Create that file using the following command

    touch /etc/postfix/main.cf

    Method 2

    Run the following commands

    sudo apt-get remove postfix

    sudo dpkg --purge postfix

    sudo apt-get -V install postfix

    [Reply]

  21. Sridhar Pandurangiah says:

    Admin, Thanks Method 1 worked.

    Best regards

    Sridhar

    [Reply]

  22. Sridhar Pandurangiah says:

    I managed to install GDM and then ran the package manager during this time the UPS tripped and I did not have sufficient battery so the laptop crashed. I reinstalled Ubuntu from CD and then repeated the steps above to set the static IP. I get the following message

    Don’t seem to be have all the variables for eth0/inet
    Failed to bring up eth0

    Can somebody help me out.

    Best regards

    Sridhar

    [Reply]

  23. Sridhar Pandurangiah says:

    Managed to figure out the issue

    I had given “network” instead of “netmask”

    Best regards

    Sridhar

    [Reply]

  24. Darryl Kraemer says:

    Thx. Solution #1 worked like a charm.

    [Reply]

  25. Phil C says:

    Hello,

    After following the above I can no longer browse the internet?

    Many thanks!

    Phil

    [Reply]

  26. loop says:

    Hi,
    just to notice some things.
    If you edit /etc/network/interfaces so that eth0 would be static like above.

    Restarting networking will not give you a static address u put in interfaces.
    Because of a problem with network-manager!
    Like he is starting dhcp client or something before network script is invoke, it’s realy messy and that’s what is realy bad thing with ubuntu, this problem is old and it’s not fixed yet:(

    So, sudo apt-get purge network-manager network-manager-gnome
    then, edit interfaces.

    Well, if you install network-manager again you will see that it’s not working very well.

    But what if you are not advanced user and then you have to connect to wireless network with no gnome manager…problems realy. So “It’s just works” is not a good punchline.

    [Reply]

  27. John Bundy says:

    This workaround on 8.10 worked for me on one system. Others in my class did not have the issue. As loop says this is not the best if you also want to get on wifi sometimes with same PC.

    Is this fixed in 9.10?

    Regards,
    John Bundy

    [Reply]

  28. Dave Francis says:

    A word of warning! Before starting, check what your Network Manager has called your wired ethernet connection. The above assumes that it is eth0. Using eth0 on my system did not work. I checked the Network Manager and found that it was using eth1. When I changed the iface entry in /etc/network/interfaces to eth1, it worked perfectly.

    [Reply]

  29. John Bundy says:

    I agree with Dave that the Gnome Network Manager seems to randomly pick eth0, eth1 or eth2. On one PC I remember it didn’t always stay eth1.

    Back to my previous question – has this been fixed in a later Ubuntu release (picking up a newer Gnome network manager). On the same classroom PC I later used Fedora 12 and did not have any issues with the static IPs.

    [Reply]

  30. g says:

    can I know how about this case that a single
    PC may have 3 nameservers?

    look this internal network
    address

    [quote]

    /etc/resolve.cnf

    nameserver 192.168.1.231
    nameserver 7.7.7.7
    nameserver 7.7.3.3
    domain mine.local
    search mine.local

    [/quote]

    i dont get it, why we need to put 3 nameservers there?

    [Reply]

Leave a Reply