From: Laurent Vivier <Laurent.Vivier@bull.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: multiple virtual network with qemu
Date: Fri, 07 Dec 2007 10:27:51 +0100 [thread overview]
Message-ID: <1197019671.4397.14.camel@frecb07144> (raw)
In-Reply-To: <9469c3170712070114m4bdd788bj3724a5a6054a9f9f@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2078 bytes --]
I don't know if it is what you want, but I'm using this:
iptable-restore < my_iptable
where my_iptable is:
*filter
:INPUT ACCEPT [6242:8433725]
:FORWARD ACCEPT [8802:8139455]
:OUTPUT ACCEPT [4070:537046]
COMMIT
*nat
:PREROUTING ACCEPT [54:3534]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [1:60]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
and /etc/qemu-ifup is:
#!/bin/sh
echo "Configuring $1"
sudo /usr/sbin/tunctl -t $1
sudo /sbin/ip link set $1 up
sudo /sbin/ifconfig $1 192.168.1.1 broadcast 192.168.1.255 netmask
255.255.255.0
And I configure the guest with IP 192.168.1.2 and gateway 192.168.1.1.
Laurent
Le vendredi 07 décembre 2007 à 10:14 +0100, nik600 a écrit :
> any idea?
>
> On Nov 29, 2007 10:38 AM, nik600 <nik600@gmail.com> wrote:
> > Hi
> >
> > i'm trying to set up some virtual network with qemu but i'm
> > experiencing some problems:
> >
> > starting the hosted system with dhcp it gets the ip 10.0.2.15 and gw
> > 10.0.2.2, if i activate the forwarding ip on the hosting system all
> > works fine.
> >
> > But i'd like to do something like that:
> >
> >
> > - gw (192.168.1.1)
> > | -> hosting machine (192.168.1.2)
> > | -> virtual ip (192.168.1.3) -> NAT -> emulated system 1
> > (10.0.2.15)
> > | -> virtual ip (192.168.1.4) -> NAT -> emulated system 2
> > (10.0.2.16)
> >
> >
> > Or if it possible
> >
> >
> > - gw (192.168.1.1)
> > | -> hosting machine (192.168.1.2)
> > | -> virtual ip (192.168.1.3) -> emulated system 1 (192.168.1.3)
> > | -> virtual ip (192.168.1.4) -> emulated system 2 (192.168.1.4)
> >
> >
> > Can i do that?
> >
> > Thanks
> > --
> > /*************/
> > nik600
> > https://sourceforge.net/projects/ccmanager
> > https://sourceforge.net/projects/reportmaker
> > https://sourceforge.net/projects/nikstresser
> >
>
>
>
--
------------- Laurent.Vivier@bull.net --------------
"Any sufficiently advanced technology is
indistinguishable from magic." - Arthur C. Clarke
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-12-07 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 9:38 [Qemu-devel] multiple virtual network with qemu nik600
2007-12-07 9:14 ` [Qemu-devel] " nik600
2007-12-07 9:27 ` Laurent Vivier [this message]
2007-12-07 14:08 ` Sergey Bychkov
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=1197019671.4397.14.camel@frecb07144 \
--to=laurent.vivier@bull.net \
--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).