0

I'm working on an assignment that asks me to connect 2 VMs to each other.

The first (king) functions as a DHCP server using dnsmasq. The second (queen) is supposed to be provided with a reserved IP address from the DHCP server.

I've configured dnsmasq as instructed, along with port forwarding through NAT, however, queen is still grabbing its IP address automatically from my physical network, not the DHCP server on king.

Both VMs are set up using Virtual Box. They are both Debian-64bit. king uses a Bridged Adapter. queen uses a Host-Only Adapter.

If more info is needed, I can post the conf files for dnsmasq and resolv to possibly identify other issues.

Any help is appreciated!

3
  • Change your Host Only to NAT to permit interconnections. Interconnections certainly work on VMware Workstation with NAT connections
    – anon
    Commented Mar 2, 2023 at 20:05
  • Also remember that Host Only only allows connections to the host. Is this a hacking exercise?
    – anon
    Commented Mar 2, 2023 at 20:10
  • You can only have one DHCP server on a network. DHCP is a broadcast based protocol, so you don't get to specify what server it should use. it will send a broadcast request for DHCP servers and the first to respond wins. as the others have said, restricting your VMs so that they cannot connect to your physical LAN is key. Commented Mar 2, 2023 at 20:33

1 Answer 1

0

I solved it! Turns out they both needed Internal Network adapters. I kept king's bridged adapter so it could still use the internet on it's own. After that, it just came down to updating my dnsmasq conf file with the new adapter.

You must log in to answer this question.

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