First of all: Thanks at you both!
Perryg wrote:Actually I misquoted. It is when you have more than 1 NAT Nic on a machine that you get the 10.0.2.* 10.0.3.* & so on.
It is actually possible to have 10.0.2.15 on multiple guests as long as they do not have more than one NAT Nic per machine.
This does not hold true to host only as these must have unique IPs, but this adapter is not used for the Internet.
You can set the host only up to use static as long as you remember that you do not use a gateway on host only. Since host only resembles a loopback and not a gateway connection, setting a gateway will stop the network from working.
Thank you for the detailed explanation! Now I have deactivated the gateway in the /etc/network/interfaces:
Code: Select all
# 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
# The primary network interface
auto eth0
#NetworkManager
iface eth0 inet dhcp
# The secondary network interface
auto eth1
iface eth1 inet static
address 192.168.56.102
netmask 255.255.255.0
# gateway 192.168.56.1
and voilà -- after restarting the network
I can conntect to the internet!
Some last questions...
@noteirak: You mean, those problems, as I had, should not appear by using one Host-Only adapter per VM, right? So, if I want to use three VMs with static IPs, the easies way would be to use three adapters ([VB menu] → File → Preferences… → Network) like "VirtualBox Host-Only Ethernet Adapter". Is it correctly?
@Perryg: You said "
You can set the host only up to use static as long as you remember that you do not use a gateway on host only." I've taken a look into the network settings of my other two VMs (Dev and Example). They use a gateway:

- Network-Settings-Eth1.png (33.79 KiB) Viewed 1667 times
Do you an idea, why they nevertheless work?