is it possible to retrieve two or more IP's from different subnets over one network interface?
Server has a default IP address of 192.168.178.50/24
. Servers network interface eth0 is bridged on br0 together with some ve*
interfaces from virtual machines. Now I will assign a static IP address for each of the VM's but not inside the 192.168.178.0/24
network.
Let's imagine I have several IP pools available (192.168.10.0/24
and 192.168.20.0/24
).
The VM's /etc/network/interfaces
will look almost like this (VM's interface is internally called eth0):
auto eth0
iface eth0 inet static
address 192.168.10.10/24
gateway 192.168.178.1
dns-nameservers 8.8.8.8
My networks skills aren't that good that I can confirm myself that this could be working. Will the VM find the route through the standard gateway of the parent host that is also inside an "other" network range? Or is it required to edit hosts routing table? Furthermore packets should also be able to pass from the router to the VM.
Thanks for your help! (I'm using Ubuntu if this helps)