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. Nik Gare says:

    I don’t seem to be able to reproduce the bug here, using wireless & static at the same time.
    Which bug is this?

    [Reply]

  2. Al Biheiri says:

    dude this is a major bug. I produced this on all the machines Ive deployed…

    [Reply]

  3. Hawkfan79 says:

    thanks for this. i was just trying ubuntu again and ran into this problem. solution 1 worked for me, after having no luck with solution 3.

    [Reply]

  4. Nik Gare says:

    Dude,

    In both an upgrade from Hardy and a new installation of Ibex, using both static and dhcp received network addresses, I’ve been unable to reproduce this problem. What am I donig wrong?

    I did have this problem in one of the betas that I tested, but since the final version was released, have not encountered this problem, sorry.

    [Reply]

  5. Gonzo says:

    It could be internet provider dependent. Well, I can’t think of any other reason. I’ve always had problems with Network Manager and used to remove it completely from my system. Well, actually I always do this right after the installation ’cause I don’t like such apps loading my memory. I prefer the console :)

    [Reply]

  6. Roger Conant says:

    A much easier approach for those who have routers supporting the approach is to force the router’s DHCP server to assign a pre-specified IP address to the computer’s MAC address. On routers with the DD-WRT firmware, the option appears at the “Services” tab, under “Static Leases”.

    [Reply]

  7. Artist says:

    To set static IP:

    Need not to remove Network-Manager.

    First to edit (as root) /etc/NetworkManager/nm-system-settings.conf:

    [ifupdown]
    managed=true

    then edit your /etc/network/interfaces and /etc/resolv.conf for your IP and name server.

    Example for set a static IP:

    1. edit (as root) /etc/NetworkManager/nm-system-settings.conf:
    ———————————
    [ifupdown]
    managed=true
    ———————————

    2. edit (as root) /etc/network/interfaces
    ———————————
    auto lo
    iface lo inet loopback

    auto eth0

    iface eth0 inet static
    address 192.168.18.111 #(your IP instead)
    netmask 255.255.255.0
    gateway 192.168.18.1 #(your gateway instead)
    mtu 1400 #(option)
    ———————————-

    3. edit(as root) /etc/resolv.conf
    ———————————–
    # Generated by NetworkManager
    domain login
    search login
    nameserver 202.96.64.68 202.96.69.38 192.168.18.1 #(the name server your area)
    ———————————–

    Why do so, read /usr/share/doc/network-manager/README.Debian, please.

    then reboot.

    [Reply]

  8. Colypso says:

    Great workaround for this bug! Just followed this for wireless and now I have a static wireless ip. Thanks!

    [Reply]

  9. fincan says:

    well, I use another solution about static ip problem; just I change from “[ifupdown]managed=false” to “[ifupdown]managed=true” and then I can get a static ip with NetworkManager Applet. After this changing, when u set new ip or setting up ur network configuration with NetworkManager Applet, an authorization screen ll appear and with password u can get static ip.

    [Reply]

  10. ld says:

    i just tried solution 1 and it failed. now my wireless internet will not work at all because i can’t figure out how to re-enable network manager. can anyone help?

    [Reply]

  11. Kody says:

    Just like Roger said how to do this under the DD-WRT Firmware with a Linksys Ultra N WRT160N router goto Setup -> Basic Setup -> DHCP Reservation and select which Client you want to setup a staic IP for and save it and your done =P

    [Reply]

  12. man switching from XP to Ubuntu says:

    how to add additional ip like in microsoft windows XP??
    important
    Thx.

    [Reply]

    admin Reply:

    Try this to aasign additional ip address in ubuntu

    [Reply]

  13. yochai says:

    I too have this bug… but I just set my dd-wrt linksy router to set mac-assinged ips.

    [Reply]

  14. Avihai says:

    Fincan … thanks, works perfectly!

    [Reply]

  15. Manuel says:

    The solution given by the #8 is the best one.
    Thank one!
    Regards.

    [Reply]

  16. Ole says:

    Ld Says:
    December 24th, 2008 at 11:07 pm
    i just tried solution 1 and it failed. now my wireless internet will not work at all because i can’t figure out how to re-enable network manager. can anyone help?

    I have the same problem…
    Can anybody tell me/us how to get the networkmanager to work again (without an internet connection!)…

    [Reply]

  17. Zak says:

    #10 Fincan – Hit the nail on the head!! Awesome! Perfect!! Thanks!

    [Reply]

  18. Fabio says:

    Thank you very much for the tips. I tried the third solution but it did not work for me.. after re-booting the Auto Eth0 would always come back. I fidgeted around and I found a solution that works for me:

    1. create a second connection “Wired Connection 1″ (just a normal one, with DHCP and all) and change the connection in Network Manager (left click on Icon on top bar) from “Auto Eth0″ to “Wired Connection 1″

    2. select “Auto Eth0″, click “edit” and copy the “MAC address” line.

    3. delete the connection called “Auto Eth0″

    3. create a new connection and name it “Auto Eth0″ – give it the same “MAC address” as the previous one.

    4. check both “connect automatically” and “system settings”

    5. in the “IPv4 settings” set “Mehtod” to “manual” and insert the desired IP Address, Mask, Gateway and DNS server

    6. When you give the OK, it should ask you for the password (because you are changing a system setting). Put it in and you should be fine…

    Let me know if it works for you… I hope it does.

    [Reply]

  19. Ts says:

    I just started to become a linux fan. It’s a bummer to see this bug; you’d think things like this shouldn’t happen (at least in version 8 of a well-polished product!). Come on, Ubuntu team.
    Anyhow, Solution Number 20 (by Fabio) worked for me. Seems if you delete the default and recreate it, it’ll remember. This seems to be the easiest solution.

    [Reply]

  20. Kostas says:

    Hi, I tried the solution suggested by Fabio but it did not work.
    I check both “connect automatically” and “system settings”. When I give OK, I am not asked for a password. Then when I go to edit, “system settings” is not checked. Any idea why?

    [Reply]

  21. concertedrxn says:

    Kostas, I think you need to first do Artist’s step number 1 from post number 8. To make it easier, just copy the code below and paste it into a terminal and hit enter. Fabio’s instructions should then work for you. My static IP address settings now survive suspend/resume cycles and reboots.

    Code:
    sed ‘s/managed=false/managed=true/’ /etc/NetworkManager/nm-system-settings.conf | sudo tee /etc/NetworkManager/nm-system-settings.conf

    [Reply]

  22. concertedrxn says:

    Forget using copy and paste for the code I just posted. The comments editor here replaced the single quote character with a fancy apostrophe, so it won’t work. You can type it in, if you want, but it will be easier for you to use your favorite text editor to make the change manually instead. For instance:

    Code:
    sudo gedit /etc/NetworkManager/nm-system-settings.conf

    [Reply]

  23. BentFranklin says:

    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…

    I think the part where it says Restart you System is misleading and dangerous. I took that to mean reboot without Network Manager in place and before editing the etc files. If that is not correct, it needs to be removed.

    Now even though I edited the etc files, there is no eth0 so I have no network and /etc/init.d/networking restart runs but does not give eth0.

    [Reply]

  24. BentFranklin says:

    This may be why the people in Comments 11 and 18 also lost their connection.

    Please help me restore. Thanks.

    [Reply]

  25. BentFranklin says:

    Found the problem. I had failed to change “auto l0″ to “auto lo eth0″ on the first line. It’s easy to miss when you are focused on adding lines. That may be worth a mention. Also, if you don’t intend people to reboot, the heading above Step 2 should be removed. Or else bold it and add a bold setting above Step 1 as well.

    Regards,
    Bent

    [Reply]

  26. Korey says:

    To everyone who removed NetworkManager and screwed themselves:

    You can restore NM by using the following:

    sudo update-rc.d NetworkManager defaults

    [Reply]

  27. Greg says:

    Sure there seem to be a couple of different ways of getting Network Manager to let you have a static ip on eth0… but has anyone figured out a way to get Network Manager to stop blanking (well regenerating it, empty) your resolv.conf every time it’s restarted?

    [Reply]

  28. Desertblade says:

    Reply 20 worked!

    [Reply]

  29. Luciano says:

    Static IP ok with solution #8 BUT I would also like to know how to make resolv.conf stay the way we edit it.

    Anyone?

    [Reply]

Leave a Reply