I'm aware that VirtualBox assigns the same IP to different VMs (by default, however I have a case where I have a VM with a single vNIC, and a Linux namespace inside the VM attempts to get an IP from DHCP, and it gets the same IP from VirtualBox. So both eth0 and the other interface inside my network namespace have the same IP address, which is obviously wrong.

Is there a way to have VirtualBox correctly return different DHCP responses or is it a limitation of VirtualBox that it doesn't correctly handle DHCP requests coming from different source MAC addresses from the same VM?


In NAT networking mode, VirtualBox machines can talk to the Internet, but not to each other.

In host-only networking mode, the virtual machines can talk to each other, but not to the Internet. (Though you could NAT them manually if you are on a Linux or FreeBSD host.)

Another option is VDE networking; this is only available in the community edition, and not the Oracle edition of VirtualBox, and only on Linux and FreeBSD hosts. It's much more involved to set up, but would do what you want once done.

The fastest and easiest way to set this up is, of course, bridged mode.

  • 1
    Thanks but this isn't very relevant to my question. I said I have only one VM involved. I want that single VM, which has a single vNIC, to be assigned two IP addresses by VirtualBox's DHCP.
    – tsuna
    Jan 24 '13 at 7:12
  • tsuna@ Yes. And a bridged interface can be assigned multiple IPs. Does not answer your question, but points you in the right direction. Sep 26 '20 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.