5

Using VBox 5.02 OSE, host OS is Arch Linux 4.1.6-1-ARCH

I've configured Guest OS Ubuntu Minimal 14.04 with network adapter as "internal network" using the default name for the network (intnet).

Now I've enabled the Virtualbox dhcp server for the 'intnet' private network with the following command:

$  VBoxManage dhcpserver add --netname intnet --ip 10.10.10.1 --netmask 255.255.255.0 --lowerip 10.10.10.2 --upperip 10.10.10.12 --enable

I boot the guest OS and I see that it gets the IP 10.10.10.2 dynamically assigned by the dhcp server.

But if I try now to ping the dhcp server from my VM, I get no answer:

$  ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
^C
--- 10.10.10.1 ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 5005ms

Why is that?

1
  • 1
    For those of you coming here because of the title and are actually experiencing this problem, you may notice it's caused by the --netname parameter not actually setting up a DHCP server properly, even though you specify it explicitly using the same name from within your VM's network configuration. I was basically unable to get a real DHCP service working with Internal Networking (intnet) using any other name besides intnet.
    – Matt Borja
    Aug 31, 2016 at 18:34

2 Answers 2

4

"Internal networking" only allows connections between virtual guests, not the host. If you want connection with the host too, choose "host only networking" (the name is misleading a bit)

1

The reason you cannot ping your internal DHCP server is likely due to a minimalistic/hardened configuration for the service itself so you effectively have a "host" not configured to respond to pings.

You can, however, perform a port scan using nmap below which will help you to see if the host is up in your internal network (note that this type of scan requires sudo privileges):

sudo nmap -Pn -n -sU -p67-68 10.10.10.1 | grep Host

You should see the following output:

Host is up (0.00021s latency).

Try it against a non-existent IP address and you shouldn't get back anything.

1
  • When I tried this it said any IP address I entered was up. Maybe because I also had a NAT network configured?
    – ham1
    Feb 28, 2018 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .