[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: multiple virtual network with qemu
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] Re: multiple virtual network with qemu |
Date: |
Fri, 07 Dec 2007 10:27:51 +0100 |
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 <address@hidden> 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
> >
>
>
>
--
------------- address@hidden --------------
"Any sufficiently advanced technology is
indistinguishable from magic." - Arthur C. Clarke
signature.asc
Description: Ceci est une partie de message numériquement signée