There is now an updated guide for Ubuntu 12.04: Change to static ip on the Ubuntu 12.04 (Precise Pangolin) server
1.1: Edit /etc/network/interfaces:
sudo nano /etc/network/interfaces
1.2: Change from dhcp to static:
- iface eth0 inet dhcp + iface eth0 inet static + address 10.10.10.1 + netmask 255.255.255.0 + gateway 10.10.10.10 + network 10.10.10.0 + broadcast 10.10.10.255
2: Make sure that the name server is specified in ‘/etc/resolv.conf’:
3: Uninstall the dhcp-client (otherwise it will overwrite your changes on the next renew cycle!):
sudo apt-get remove dhcp3-client
4: Restart the network to use the new settings:
sudo /etc/init.d/networking restart
Making any changes to /etc/network/interfaces file will cause the local area network to crash upon restart. Network will only start if the /etc/network/interfaces file contains the following two lines:
iface lo inet loopback
Adding lines to recognize eth1 (which normally works) crashes the network. The only way to restore network operation is to restore the /etc/network/interfaces to the condition as shown above.
Removing dhcp-client makes the computer station unable to access the Internet no matter what the condition of /etc/network/interaces is. Unless you have the Ubuntu disc on hand, the result is the need to reformat and reinstall Ubuntu.
Any clues? I have been working for many many hours trying to static address a computer on Ubuntu Intrepid running out of the box.
There are many many posts offering the instruction you offer or instruction with slight permutations, none of which are effective. What am I missing?
I can not get my Hardy workstation to take a static ip address. My /etc/network/interfaces file looks like this only:
iface lo inet loopback
There must be some other automagic program in Hardy that can only write changes to this file. I agree with E.Lewis that this file is talked about all over the Internet and changing it the way this small tutorial says may cause all kind of problems with my system. I run KDE 3.5.10 on my Hardy and tried KDE Control Module – Administrator Mode – to set a static address, but it seems not to let me back on the Internet after I set it static. My Windows XP computers were easily set up to be static address on the same subnet 192.168.0.x with my router ip address as 192.168.0.1. I am frustrated after 2 hours fighting this. I keep having to go back to DHCP automatic assign ip address.
I had the Same problem, and I could get ride of it and I will tell you what I have done, I hope it works for u guys as well:
sudo gedit /etc/resolv.conf
give your DNS as follows:
Have you ever considered about including a little bit more than just your articles?
I mean, what you say is important and all. But
imagine if you added some great graphics or videos
to give your posts more, “pop”! Your content
is excellent but with pics and video clips, this website could certainly be one
of the greatest in its niche. Great blog!