You are not logged in.

#1 2015-03-10 23:46:35

RoguePerler
Member
Registered: 2015-02-06
Posts: 8

Can ping actual IP addresses but not hostnames (on VirtualBox)

I am able to ping Google's actual IP, which at the time was 74.125.196.101 (found using windows CMD shell) in my Arch Linux 64-bit VM. However, if I attempt to 'ping google.com' it simply throws the error 'ping: unknown host google.com', same with 'ping www.google.com'. I've used Arch on the same software (Oracle VirtualBox), and I believe it was booted off the exact same CD, before and not had this problem.

My thinking is there's some sort of issue with DNS. God knows what, but maybe you have encountered the same problem before and can help.

Other threads/sources have been unhelpful in resolving the issue.

Offline

#2 2015-03-10 23:52:37

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: Can ping actual IP addresses but not hostnames (on VirtualBox)

Did you configure your hostname   ?
Are you using a static address in your VM? Or did you configure it using DHCP?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-03-11 00:26:55

RoguePerler
Member
Registered: 2015-02-06
Posts: 8

Re: Can ping actual IP addresses but not hostnames (on VirtualBox)

ewaller wrote:

Did you configure your hostname   ?
Are you using a static address in your VM? Or did you configure it using DHCP?

I'm not too sure about how networking works when it's run on a VM rather than the actual machine. I assume it uses the same network cable but gets a different address? My machine is hooked up directly via ethernet cable.
I assume it's using DHCP because I haven't set up a static IP for it. Or maybe neither.

Offline

#4 2015-03-11 03:30:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,353

Re: Can ping actual IP addresses but not hostnames (on VirtualBox)

Realize that when running a virtual machine, everything, including the hardware, is virtual.  The VM emulates real hardware for the network interface.  That "NIC" is a wired connection that is  "plugged" into the virtual machine engine on the host.   VirtualBox then creates new "Interfaces" that appear on the host side.   There are effectively virtual networks between the guest machine's network interfaces and those new NICs that appear on the host.   The host then has the ability to bridge those new NICs;  if bridged, then the VM can see the real network to which real machine is connected.  The host also has the ability to do what is called Network Address Forwarding; basically the host will act as a router forwarding packets from the real world networks to the virtual networks.  Lastly, the host can do nothing with the packets in which case the guest OS will only be able to talk to the host OS, but not any of the host machine's real world interfaces.

How are you managing the interface on the VM?  Netctrl?  Did you enable the dhcpcd service? (or did you run dhcpcd by hand ?). 
How is VirtualBox configured.  Is the network configured for NAT?, Bridged?, Host Only?

What is the IP address of the guest machine?  What is the output (on the Arch guest) of ip addr   ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB