From: Stefan Hajnoczi <stefanha@gmail.com>
To: John Basila <jbasila@checkpoint.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Adding support for Stateless Static NAT for TAP devices
Date: Thu, 30 Aug 2012 10:14:16 +0100 [thread overview]
Message-ID: <20120830091416.GD6814@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <7F9A6D26EB51614FBF9F81C0DA4CFEC8026E2BC561E5@il-ex01.ad.checkpoint.com>
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 packets leave the Guest OS from the
> same IP and thus the Host OS will have difficulty returning the
> packets to the correct TAP device/Guest OS. Stateless Static
> Network Address Translation or SSNAT allows the QEMU to map the
> network of the Guest OS to the network of the TAP device allowing
> a unique IP address for each Guest OS that ease such case.
> The only mandatory argument to the SSNAT is the Guest OS network
> IP, the rest will be figured out from the underlying TAP device.
>
> Signed-off-by: John Basila <jbasila@checkpoint.com>
> ---
> net/tap.c | 369 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
> qapi-schema.json | 5 +-
> qemu-options.hx | 10 ++-
> 3 files changed, 381 insertions(+), 3 deletions(-)
This does not work with vhost=on because the host<->guest packet
processing happens in vhost_net.ko instead of in QEMU.
Use iptables on the host to NAT the tap interface.
Stefan
next prev parent reply other threads:[~2012-08-30 9:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 6:12 [Qemu-devel] Adding support for Stateless Static NAT for TAP devices John Basila
2012-08-30 9:14 ` Stefan Hajnoczi [this message]
2012-08-30 9:27 ` John Basila
2012-08-30 10:43 ` Stefan Hajnoczi
2012-08-30 10:58 ` John Basila
2012-08-30 11:43 ` Ivan Shmakov
2012-08-30 12:38 ` Dennis Jacobfeuerborn
2012-08-30 13:32 ` John Basila
2012-09-01 10:37 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120830091416.GD6814@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=jbasila@checkpoint.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).