Currently I am trying to integrate my virtual machine(s) into my existing network. I will first outline my current setup:
- eth1 is directly connected to the internet using a public ip (using dhcp).
- eth0 has a static ip (192.168.1.1) and is connected to a switch/AP (actually, it's a wireless router-switch with router functionality disabled but that doesn't really matter)
- The switch connects devices like my iPod, notebook and XBox 360 to eth0
- All my devices get an ip assigned by dhcpd3.
So basically, my PC functions as a router with DHCP server:
inet <---> PC w/DHCP <--> Switch <---> My devices
Configuration wise, this translates into this:
/etc/network/interfaces:
Code: Select all
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
Code: Select all
# ...
# eth0 subnet configuration
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.101 192.168.1.120;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
}
Pretty straightforward if you ask me.
My problem is as follows: I would like to properly integrate my virtual machines into my current network. In other words, every vm should get an ip from dhcp3-server instead of the built-in dhcp server in vbox. Right now, I am forced to use both dhcp servers and subnets (192.168.1.x and 10.x.x.x or whatever vbox uses by default). This is highly inconvenient, because I have to maintain two separate subnets.
If I select Host Interface my guest OS'es do not get an IP at all, which I think is correct. After all, if I bridge the guest networks over eth1, my ISP will probably receive the DHCP request, which will of course be denied, since I'm only granted one public IP. If I bridge the network over eth0 my iPod probably receives the DHCP request. Since I have not jailbroken my iPod, I don't have a dhcp server running there either
Hopefully you get my problem. Any help would be appreciated!
Host: Ubuntu Ibex Intrepid 8.10 all updates
Guest: Windows XP SP3 all updates
Virtualbox: 2.1 using the "deb http://download.virtualbox.org/virtualbox/debian intrepid non-free" repo