Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-09-01 Thread Blue Swirl
On Thu, Aug 30, 2012 at 6:12 AM, John Basila wrote: > When running multiple instances of QEMU from the same image file > (using -snapshot) and connecting each instance to a dedicated TAP > device, the Guest OS will most likely not be able to communicate > with the outside world as all packets leav

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread John Basila
I have a setup that requires to run virtual machines using QEMU. All these machines will be executed from the same snapshot thus giving them the save same state when they come to life, this is why they all will have the same source IP, the only difference between them is that each one is connect

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread Dennis Jacobfeuerborn
On 08/30/2012 12:58 PM, John Basila wrote: > Please allow me to add a few comments: > > The problem here is related to the fact that QEMU is executed with multiple > instances and all instances start from the same snapshot, thus if they all > send a UDP DNS query, they will all create a packet -

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread John Basila
I have tried NAT and this is why I came up with this feature. When starting multiple QEMU instances from the same snapshot image, the Guest OS in all instances from the same state and if they start a connection to the DNS server for example, they will all use the same source port. The iptables

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread John Basila
Please allow me to add a few comments: The problem here is related to the fact that QEMU is executed with multiple instances and all instances start from the same snapshot, thus if they all send a UDP DNS query, they will all create a packet - for example - 10.0.0.2:2345 -> DNSERVER:53. The sou

[Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread John Basila
When running multiple instances of QEMU from the same image file (using -snapshot) and connecting each instance to a dedicated TAP device, the Guest OS will most likely not be able to communicate with the outside world as all packets leave the Guest OS from the same IP and thus the Host OS will hav

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread Ivan Shmakov
> John Basila writes: […] > The problem here is related to the fact that QEMU is executed with > multiple instances and all instances start from the same snapshot, Isn't it possible to resolve such an issue using, e. g., DHCPv6 or DHCP? All the QEMU instances will (AIUI)

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread Stefan Hajnoczi
On Thu, Aug 30, 2012 at 10:27 AM, John Basila wrote: > I have tried NAT and this is why I came up with this feature. QEMU's net/tap.c is the wrong place to add NAT code. The point of tap is to use the host network stack. If you want userspace networking, use -netdev user or -netdev socket. Ple

Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices

2012-08-30 Thread Stefan Hajnoczi
On Thu, Aug 30, 2012 at 09:12:19AM +0300, John Basila wrote: > When running multiple instances of QEMU from the same image file > (using -snapshot) and connecting each instance to a dedicated TAP > device, the Guest OS will most likely not be able to communicate > with the outside world as all pack