0

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 (8.8.8.8)

but when i put static IP and configure resolv.conf

My interfaces file:

auto eth0
iface eth0 inet static
address 192.168.1.54
gateway 192.168.1.1
netmask 255.255.255.0

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

Thanks a lot

1 Answer 1

0

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 192.168.1.1 or could it be 192.168.1.254 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 8.8.8.8, 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.

You must log in to answer this question.