two virtualbox (internal-network) setup
compdoc
compdoc at hotrodpc.com
Thu Mar 12 21:24:59 UTC 2015
> Thanks for your messages
>This is what I did
>In each vm I gave it the following ip
>192.168.1.1 vm1 eth2
>192.168.1.2 vm2 eth2
>However, my host machine is also Ubuntu and its IP is 10.68.21.7
I normally use two network cards in the host. One for the host to use, and one for the guests. But you can share a single nic. When you create a VM, have it use interface 'br0' as shown below, and use dhcp in the guests if possible, or set their addresses manually to match your 10.68.21.0 network.
Save this existing file to your desktop: /etc/network/interfaces
Then edit the file:
sudo nano /etc/network/interfaces
or:
gksu gedit /etc/network/interfaces &
Replace the contents with the following and reboot: (you need to use your actual addresses, so please tweak as needed)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# I disable ipv6 on mine, so change as needed...
# The primary network interface
#iface eth0 inet6 auto
auto eth0
iface eth0 inet static
address 10.68.21.7
netmask 255.255.255.0
gateway 10.68.21.1
dns-nameservers 10.68.21.1 8.8.8.8
dns-domain domain.lan
dns-search domain.lan
auto br0
iface br0 inet manual
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150312/e9283195/attachment.html>
More information about the ubuntu-users
mailing list