unable to connect to network on ubuntu in virtualbox

1

When I do ping google.com on the host (Win7) I get 74.125.227.164 and am able to ping without issue.

When I do ping 74.125.227.164 on Ubuntu (my VirtualBox guest OS) I get a connect: Network is unreachable message.

Here's the output of ifconfig:

enter image description here

I've tried doing sudo ifconfig eth0 down and then sudo ifconfig eth0 up and they appear to run without issue. What's interesting is that ping 74.125.227.164 actually worked before I did the ifconfig stuff. Doing it in fact seems to have in fact made things worse - not better.

Doing cat /etc/resolv.conf gives me the following:

nameserver 10.128.128.128

Here's a copy of my virtualbox settings:

enter image description here

Any ideas?

neubert

Posted 2014-04-28T15:32:09.843

Reputation: 3 991

1Try sudo dhclient eth0, and see whether you can connect. – MariusMatutiae – 2014-04-28T16:33:51.673

Answers

1

I would recommend installing the VirtualBox additions inside the VM. This will provide drivers to the guest OS to use the adapters provided by VirtualBox.

Another option I'd recommend is using the "bridged adapter" instead of NAT.

It could also be that the ARP table got corrupted while you were changing settings. You can try clearing the ARP cache using THIS as a guide.

Since you're using a live CD, you can restart and the settings all revert back to normal.

Colyn1337

Posted 2014-04-28T15:32:09.843

Reputation: 1 191

I'm running an Ubuntu LiveCD. I'd have to eject the CD (which would probably kill the OS) to insert another one containing the VirtualBox additions.. – neubert – 2014-04-28T16:01:07.413

Then try the bridged adapter setting and see if that works. – Colyn1337 – 2014-04-28T16:07:55.527

I did - didn't help :( – neubert – 2014-04-28T16:14:32.530