11.12How To Set A Static IP On Ubuntu 8.10
Known network manager bug https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/284298
Under review
Due to a bug if you want to assign a static IP on Ubuntu 8.10 Desktop your setting will be overwritten after the next reboot because of a bug that escaped the Ubuntu team. The bug is annoying and silly that something so basic would escape the development team.
Any way there are two solutions one uses the command line and the second one the GUI.
First Solution
First solution is to get down and dirty with the command line, it takes less than 2 minutes. Edit /etc/network/interfaces and enter the following values.
sudo nano /etc/network/interfaces
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.3
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
And save it.
Now move on to edit the /etc/resolv.conf. And add the name server.
sudo nano /etc/resolv.conf
nameserver 192.168.1.1
If you don’t want to reboot the system restart the networking service instead.
sudo /etc/init.d/networking restart
Second Solution
- Right click on the network icon located in the top panel. Select Edit Connections…

- Right click on Add. This is when we add the new configuration.

- Now you are presented with empty fields. Check Connect automatically at the top, otherwise the older configuration will take over. For the configuration to work you need to provide the MAC address of your network interface card in my case it’s eth0.Tip : Issue ifconfig in the command line and copy and paste the resulting MAC address.

- In the same windows select the IPv4 Setting tab, the drop down menu will offer various option select Manual.

- After selecting Manual you have to provide the IP Address, Netmask, Gateway and DNS Server. Now click OK to save the settings.

- Now the new connection named “Wired connection 1″ is available.

- Go back to the network icon located in the top panel and right click on it. Wired Connection 1 is now an option right click on it. The system will now change from the previous interface configuration the the new one.Tip : To verify the changes issue the ifconfig command.

- The last and perhaps most important step is to go back in to Edit Connections… and unchecked the Connect automatically option on Auto eth0 which is the previous faulty Ubuntu configuration. Failure to do so will result in the Auto eth0 taking over the new configuration on the next reboot.

Drop me a line if this was of any help to you.
Support Linhost by donating to keep this service online

Looks like the problem will be solved by this. Thanks and let’s hope it works. I’ll give you another thanks if it really works.
November 13th, 2008 at 4:12 am
The second method didn’t work for me. When I next reboot I get an extra Auto eth0 which then take precedence over my static entry.
November 13th, 2008 at 11:46 am
same as pannerrammer. the 2nd method not work.
it always make a new “Auto eth0″ after reboot even the “Auto eth0″ has been deleted.
it should be chosen manually to “Wired connection 1″.
November 15th, 2008 at 6:17 am
Thanks, both methods worked fine for me. My particular machine is an NFS file server among other things, so the “interfaces” solution is more appropriate since it works without having to login after power failure reboot.
November 15th, 2008 at 11:11 am
Thanks a lot………….. for such helpful tutorial.
I am new to ubuntu…….installed just to experience it. After installing main problem i faced in connecting to network. After spending a lot of time in google I came across this helpful tutorial. and finally I could connect to internet.
As I am new to ubuntu pictorial tutorial helped me a lot, instead of writing so much complex commands.
Thanks a lot again.
November 19th, 2008 at 1:14 pm
Hi,
Thanks for the tutorial. Mine failed. When I tried to uncheck “connect automatically” for etho0, it pops up with this error message:
Updating connection failed: nm-ifupdown-connection.c.82 – connection update not supported (read-only)..
John
November 20th, 2008 at 8:10 pm
John hope this helps.
http://ubuntuforums.org/showthread.php?t=963869&page=2
November 20th, 2008 at 10:41 pm
Your secon solution is very simple and works perfectly. It is not necessary to remove anything.
You save my day. Thank you very much.
November 21st, 2008 at 6:05 am
Can this be applied on the wireless connection? I tried your steps and created a new string “eth1″ along with the original one “eth0″, but it didnt work. Any suggestion?
November 22nd, 2008 at 4:49 am
Hakam you have a good question. Remember that wireless adapters appear under different names. For example “rausb0″ or “wlan0″ instead of “eth0″. I suggest you first issue the “iwconfig” command to see if your adapter is visible, if so my only recommendation is to change the string “eth” to the name that appears under the command line.
I would like to help you more but at the moment I am too having an unrelated problem with this server. Good luck!.
November 22nd, 2008 at 10:16 pm
Hey Man,
Either solutions didn’t work for me. When I restart, I get new Interfaces listes (the originals, Auto eth0 and Auto eth1).
Have you heard about another method?
Cheers
November 24th, 2008 at 9:11 pm
[...] i followed what appeared to be a good blog post on fixing this issue. it was very straight forward and i followed the given instructions in that [...]
November 27th, 2008 at 11:36 am
great!! nice and simple, you rock!
December 8th, 2008 at 5:55 pm
I used the first solution, did reboot and i get the expected result. Is working great.
Thanks
December 10th, 2008 at 5:35 pm
I have an HP Pavilion DV6500CTO Notebook. I installed Ubuntu V8.10 from its factory loaded Vista environment. I followed your Second Solution through GUI. It did not work initially because the default Auto eth0 kept on taking over, even with it deleted then power cycled. However, I then found that I could simply pull down the Network list and clicked on the “Wired connection 1″ entry, it would switch! I verified this through ifconfig as well PINGing with other interconnected PCs. This is just fine for my purpose of testing behaviors of my HAN (Home Area Network) that is based on static IP address. Thanks a lot!
December 11th, 2008 at 11:38 am
Thanks, I had to use the first method to get this working. Cheers, Mike.
December 20th, 2008 at 9:42 pm
Second solution did not work. I tried exactly what you said, but as the others reported, it kept adding back a Auto eth0 entry and that took precedence. After trying this a few times and making sure I followed your instructions, I started experimenting with settings to try to make it stick. It never would. I can’t try the first solution at the moment, because I need to specify the DNS servers and I’m not sure of that syntax. Plus, others said it did not work. Here is a possible solution (I have not tried it, but I probably will soon): http://ubuntuforums.org/showthread.php?t=974382
December 20th, 2008 at 10:58 pm
[...] am using a static IP. Due to a bug in the GNOME Network Manager (described here and here, I edited the network interfaces as follows: pgadmin@pgfs:/etc$ cat /etc/network/interfaces auto lo [...]
December 30th, 2008 at 4:40 am
Note on the second solution, I tried it and was still getting eth0 coming back up after a reboot. There appears to be a config file in your home directory that tells the network manager what to do. I deleted my gnome config files, and it seems to be working now. If anyone knows where that config file is, it may help others.
December 30th, 2008 at 7:37 pm
[...] Link a la guia. [...]
January 5th, 2009 at 8:12 pm
I too had problems with Network Manager overwriting /etc/resolv.conf, so I got around that setting the immutable bit on that file:
sudo chattr +i /etc/resolv.conf
just for good measure I did the same to /etc/network/interfaces. No problems now.
January 5th, 2009 at 8:27 pm
None of these two approaches works for me in Ubuntu 8.10 – I have to following instructions here
http://ubuntuforums.org/showthread.php?t=974382
to remove the Network Manager to get the static IP without breaking the internet connection.
January 7th, 2009 at 2:32 am
Thank you very much for the tips. I tried the second 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 change the connection in Network Manager (left click on Icon on top bar) from “Auto Eth0″ to “Wired Connection 1″ (like in step 7 above”
2. select “Auto Eth0″ and click “edit” – copy the “MAC address” line content
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.
January 13th, 2009 at 12:10 pm
Second Solution didn’t work for me, no idea why. So I tried the first one, i.e. going back to good ol’ config file hacking. Guess what: this did the trick! So thanks for pointing out both solutions.
BTW, this seems to be a known bug of network manager:
https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/284298
January 24th, 2009 at 10:31 am
The second solution did not work at first, but I combined it with a suggestion I found elsewhere into a working solution on two different Ubuntu 8.10 (server) machines.
The problem is that no matter what you do to disable/delete the “Auth eth0″ connection in the Network Connections dialog, that connection will get recreated/re-enabled on reboot, and it insists on using DHCP. The solution is to ALSO remove the DHCP package from Ubuntu: sudo apt-get remove dhcp3-client. When rebooting, Ubuntu will first try the “Auth eth0″ connection, and then after a few seconds fail over to the other “Wired Connection 1″ connection that you created. Hope this helps someone.
January 31st, 2009 at 4:28 am
Hey, you`re greate man
You save my problem.
It works perfect for me second solution…
Regards,
Mumun
February 1st, 2009 at 10:36 pm
[...] sugiren desinstarlo, pero yo no buscaba una solución tan drástica. Afortunamente encontré un workaround. Aún no reinicio mi computadora para ver si realmente funciona, pero todo indica que [...]
February 5th, 2009 at 12:57 am
[...] Comment! How To Set A Static IP On Ubuntu 8.10 [...]
February 13th, 2009 at 3:40 am
thank you, it is very helpful. My computer is working with a new static ip.
February 22nd, 2009 at 11:08 pm
Thanks, this worked for me on my wireless connection.
Running the iwconfig command showed me that the name for my wireless USB adapter was “ra0″.
February 23rd, 2009 at 7:13 am
Well, creating a new network connection via the manager worked perfectly. It is brilliantly easy solution for a small and nasty problem. Thanks a lot.
February 23rd, 2009 at 8:50 am
Thanks a lot. It works nicely. Solution 2
I was having always he ETH0 again and again, so I have re-done this tutorial, and I’ve follow, LINE BY LINE, LETTER BY LETTER, (don’t pay attention the the images, just FOLLOW THE TEXT, and the order in the text AND, you will get it to work.
Regards,
Márcio
March 19th, 2009 at 11:31 am
Fabio’s trick works perfectly for me also (on Intrepid Ibex 8.10), in my case, it was not necessary to delete and re-create the connection called “Auto Eth0″ as described @ 3.
I just edited the “Auto Eth0″ created by NM
Thanks a lot!
March 19th, 2009 at 5:23 pm
I have installed Ubuntu 8.10 in VMware 6.5, both these method are not working.How can I run internet?
March 26th, 2009 at 7:25 pm
I did 2nd method and it keep going back to default. I am using Vmware (Window) on Ubuntu 8.10.
I follow Fabian advice above and I got it to work.
Thanks!
April 4th, 2009 at 7:48 pm
[...] means that after a reboot the network reverts to the automatic settings. There are a couple of workaround suggestions here, but they didn’t work on my system. Instead, the following workaround from the official bug [...]
April 5th, 2009 at 7:52 am
Followed method 2 using the GUI… didn’t work. THEN followed Fabio’s suggestion to delete and re-create Auto eth0… didn’t work.
Finally, leaving both the manual “wired connection 1″ and the re-created “Auto eth0″ … then edited the re-created Auto eth0 to UNCHECK connect automatically and system setting… ka-ching!
strange how things seem to work differently on different ubuntu installations. what’s up with that?
April 12th, 2009 at 10:06 am
Ubuntu 9.04
Used your method to set static address except in step 5 had to press enter before ok.(apply)
Otherwise gateway would revert to all zeros.
Thank you for the help.
Jim
May 3rd, 2009 at 2:58 pm
was able to make changes to assign static ip. but my router is showing the computer with MAC address. if I use hostname to connect its referring to old ip address. any ideas what would be the issue?
THanks
May 8th, 2009 at 12:20 pm
thanks guys.. i hope this simple bugs will surely be fix in update.
May 11th, 2009 at 9:19 am
thanxxxx, i just found the way to connect with internet at my office which was impossible for me since 7 days ago.
May 29th, 2009 at 5:31 am
I am having intermittent connection failures booting into Ubuntu 9.04. Also if my connection drops whilst working out on the web and connects again then Ubuntu will not auto connect. Would the above instructions perhaps solve the problem too?
June 1st, 2009 at 5:46 am
Drifter, I’m having the same problem. NetworkManager will remove static IP assignments and associated routes when an interface loses its connection – which can be for instance because a switch or hub goes down for a moment. Then although it recognizes when the connection is back, it doesn’t restore the IP assignments or routes.
IMHO it is a serious error to have NetworkManager installed on anything but a notebook, or to use DHCP instead of static addresses for workstations. But getting Ubuntu to work correctly without NetworkManager is a pain; they’ve really built the system around it.
June 16th, 2009 at 3:52 pm