I'm using libvirt, and currently have a NAT based network setup where each host has a static IP. The network config looks like this:
<network connections='4'> <name>default</name> <uuid>d5a1865e-fd35-4b15-994b-8c5f098e0b5a</uuid> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr0' stp='on' delay='0'/> <mac address='52:54:00:59:68:25'/> <ip address='10.0.0.1' netmask='255.255.255.0'> <dhcp> <range start='10.0.0.2' end='10.0.0.254'/> <host mac='52:54:00:18:41:51' name='host0' ip='10.0.0.2'/> <host mac='52:54:00:0a:20:20' name='host1' ip='10.0.0.3'/> <host mac='52:54:00:f1:05:fd' name='host2' ip='10.0.0.4'/> <host mac='52:54:00:de:74:22' name='host3' ip='10.0.0.5'/> </dhcp> </ip> </network>
However, I would like to assign an internal subnet to each VM where every IP in that subnet will route to the VM. The only traffic to and from these addresses will be the VMs.
Is this possible with the default libvirt networking at all, and if it is, is it possible to do it on top of the existing network (aka not need to create a new network)?