Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a virtual machine on Vsphere 5.0 running Ubuntu 12.04 when i put dinamic IP (/etc/network/interfaces) iface eth0 inet dhcp Ubuntu have network and i can do ping to google for example (

but when i put static IP and configure resolv.conf

My interfaces file:

auto eth0
iface eth0 inet static

it lost the network and i cant do ping to anything...i dont understand where is the problem...

Thanks a lot

share|improve this question

migrated from Dec 17 '12 at 10:27

This question came from our site for professional and enthusiast programmers.

This seems very weird... The fact you are doing this makes me think you are not a novice, but, it looks like it should be correct... so, all I can think of is:

Double check your gateway - is it or could it be or something else?

In addition, I would not manually edit resolv.conf - add the following line:

dns-nameservers x.x.x.x where x is the ip of the DNS server.

That being said, this shouldn't affect pinging, so I would also recommend trying to type:

sudo ifconfig eth0 down
sudo ifconfig eth0 up
sudo /etc/init.d/networking restart

and see if you get anywhere...

...If you don't, please set to DHCP, type ifconfig and paste the full output here, followed by making the changes, typing ifconfig and pasting the output here again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.