If you create TAP/TUN interface and network bridge using /etc/network/interfaces, uml_proxy* lines are not needed.
My /etc/network/interfaces looks like this.
Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
auto tap0
iface tap0 inet manual
tunctl_user myusername
auto br0
iface br0 inet dhcp
bridge_ports eth0 tap0
bridge_maxwait 0
The TUN/TAP interface must be created before the bridge starts ('auto tap0' before 'auto br0').
The user account (myusername) must be a member of vboxusers and uml-net groups to be able to use tap0 wtith VirtualBox.
My br0 get an IP address (192.168.x.x) automatically from DHCP server on another computer. My guest OS also gets an IP address (192.168.x.x) automatically from the DHCP server and can communicate well with other computers on the network.
My network use 2 subnet on the same LAN hardware, so I added another IP address from different subnet to the bridge interface by editing /etc/network/interfaces file and add these lines.
Code:
auto br0:1
iface br0:1 inet static
address 10.0.0.99
netmask 255.0.0.0
gateway 10.0.0.9
Now my computer has 2 IP addresses and can communicate with both subnet. The virtual machine still communicates well like before.
To allow multiple users to run virtual machine with host network bridge, the file /etc/network/interfaces can be written like this.
Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
auto tap0 tap1 tap2 tap3
iface tap0 inet manual
tunctl_user cid
iface tap1 inet manual
tunctl_user barret
iface tap2 inet manual
tunctl_user cloud
iface tap3 inet manual
tunctl_user cid
auto br0
iface br0 inet dhcp
bridge_ports eth0 tap0 tap1 tap2 tap3
bridge_maxwait 0
cid, barret, cloud must be members of vboxusers and uml-net groups to use these TUN/TAP interface with VirtualBox.
In this example, cid will be able to run 2 virtual machines that can communicate with each other, host machine, and other computers in the network (using tap0, tap3).
While one of cid's virtual machine is running, if cloud comes and logon to his account, then starts his virtual machine (using tap2), his virtual machine will be able to can communicate with cid's virtual machine, host machine, and other machines on the network as well.
I have not tried running more than 2 virtual machines at the same time.
Bookmarks