1

Currently my network is using the subnet 255.255.248.0 or /21. My DHCP Server is listing in the range 3.1-3.254.

Everytime I create a virtualbox the client get an IP from the DHCP Server, after I enable the network bridge in virtualbox.

Is it possible to enable a kind of a virtual dhcp server, so the virtual machiene get automatically an IP from another range in my subnet, which looks in the router like a static IP, without set the ip of every virtual machine to static? It should be possible to communicate with the VM from every network device, so NAT isn't a choice.

3
  • 1
    Have you considered using a bridged mode LAN adaptor so that it gets DHCP from your main physical router?
    – Daniel
    Oct 29, 2015 at 2:37
  • Yes, but I want to use a different IP-range for all VMs like 4.1-4.254
    – ForJ9
    Oct 29, 2015 at 2:38
  • superuser.com/questions/398478/…
    – mchid
    Oct 29, 2015 at 3:35

1 Answer 1

2

Is this what you are looking for.

Open up Virtual box then press Ctrl + G then Click on Network

enter image description here

Then add a new NAT network. then edit the network. by clicking on the screwdriver icon.

enter image description here

Type in your network range or leave as default then click ok

enter image description here

Then go to your VM Settings --> Network and change attached to: NAT NetWork. then pick the name of the NAT network you created

enter image description here

I booted into a DVD Live install of Xubuntu 15.10 on my VM as you can see I got an IP address from the NAT Network I created in Virtual Box. and I can ping out. But you will need to add a DNS server manually if you want resolve host names.

enter image description here

Hope this is what you are looking for.

2
  • Looks good, but I think its not possible to connect to this device from a computer in the local network
    – ForJ9
    Oct 30, 2015 at 1:18
  • Have you tried it.
    – Neil
    Oct 30, 2015 at 1:54

You must log in to answer this question.

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