Virtual box cant ping anything

Discussions related to using VirtualBox on Windows hosts.
Post Reply
merijndk
Posts: 2
Joined: 12. Dec 2014, 00:37

Virtual box cant ping anything

Post by merijndk »

Hello,

I'm a total newby with virtual box and to nearly everything server related. Since a few weeks some school projects require me to run virtual box and install some stuff on it. I also need cURL. To install this I try to give my virtual box an internet connection so it can download the needed software. To do so I do the following:

I start up my server with the network settings:
adapter 1:
Host only adapter

Adapter 2:
Nat
All the other fields on nat are gray so I didnt fill in anything else.

I start the server and log in with my name and password. all works fine.
I type 'sudo su' to login on the root and fill in my password. No error message so I asume it good.
I type 'ifconfig eth1 up' to enable the network. no error message
I type 'dhclient eth1' no error message,

Now when I try to ping google it says:
ping: unknown host google (cant spell out the domain name because im new on the form but you get the . com ;))

It all works fine for my classmates and we have the same settings. Does anyone knows what could be wrong?

NOTE: running virtual box 4.3.18

Hope to hear soon! Greetings,
Merijn de Klerk
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Virtual box cant ping anything

Post by mpack »

Ping doesn't always work reliably over NAT. Also not all host respond to a ping. E.g. Win7+ hosts don't. If this answer isn't appropriate then try to narrow your question.
merijndk
Posts: 2
Joined: 12. Dec 2014, 00:37

Re: Virtual box cant ping anything

Post by merijndk »

Thanx for the reply.

Well I want to connect virtual box to the internet to install cURL. The above works for all my clasmmates but not for me. Should I set the network setting to something else than NAT or?
I have no clue what I have to do so im wondering what I could be doing wrong. Also tried disabling my firewall but doesnt work either.

Hope anyone has a suggestion of what to do.

Thanx!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Virtual box cant ping anything

Post by socratis »

You haven't said anything about your host or your guest as per the Minimum information needed for assistance (please read it). On top of what's asked for in the link, I'd like to see the output from the following commands.
  • Host
    Open a Command Prompt window. Navigate to the VBox installation directory (typically "C:\Program Files\Oracle\VirtualBox\"). Run:
    VBoxManage list dhcpservers
  • Guest
    You don't mention the guest type, but I assume it's a Linux based one, since you used the 'ifconfig' command. Open a terminal and run:
    ifconfig
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply