Subject: Re: Re: Re: qemu, bridge and wireless
To: Quentin Garnier <cube@cubidou.net>
From: Joel CARNAT <joel@carnat.net>
List: pkgsrc-users
Date: 09/24/2007 23:25:42
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Sep 22 2007 - 18:43, Quentin Garnier wrote:
> On Sat, Sep 22, 2007 at 06:19:38PM +0200, Joel CARNAT wrote:
> > On Sat, Sep 22 2007 - 14:25, Quentin Garnier wrote:
> > > On Sat, Sep 22, 2007 at 12:10:34PM +0200, Joel CARNAT wrote:
> > > > Hello,
> > > >=20
> > > > I have installed qemu 0.9.0 on NetBSD 4.99.30.
> > > > My network card is a wireless "Intel PRO/Wireless LAN 3945ABG Mini-=
PCI
> > > > Adapter".
> > > >=20
> > > > I have check the Makefile that ships with qemu but my VM can't ping=
 the
> > > > external network. The VM can ping my laptop's IP and my laptop can =
ping
> > > > the VM's IP. I have enabled IP forwarding on the laptop but paquets
> > > > don't seem to go out the bridge.
> > > >=20
> > > > Any idea on what I missed ?
> > >=20
> > > You can't bridge a wpi.  I don't think you can bridge with any of
> > > NetBSD's wireless drivers:  not only you need a card that supports
> > > having as many associations to the AP as required, but of course you
> > > need the software support.
> > >=20
> >=20
> > OK... and would it make sense to have all qemu interfaces in bridge0 and
> > do some NAT between wpi0 and bridge0 ?
>=20
> Sure.  You affect an IP address to one of the tap interface and you make
> it the default route for the VMs.
>=20

Using PF, the VM now can go to the Internet.
The thing is I'm not able to ping/TSE from the "real" workstation to the
VM. Is this expected as I am using on a tap interface ?

Here's what I did :
# ifconfig
wpi0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        status: active
tap0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	media: Ethernet autoselect
	inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.25
bridge0: flags=3D41<UP,RUNNING> mtu 1500
tap2: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	media: Ethernet autoselect
# brconfig
bridge0: flags=3D41<UP,RUNNING>
	Configuration:
		priority 32768 hellotime 2 fwddelay 15 maxage 20
		ipfilter disabled flags 0x0
	Interfaces:
		tap2 flags=3D2<DISCOVER>
			port 7 priority 128
		tap0 flags=3D2<DISCOVER>
			port 5 priority 128
	Address cache (max cache: 100, timeout: 1200):
# qemu command (running Windows XP, NIC configured as 192.168.0.20)
qemu -m 512 -boot c -net tap,fd=3D3,ifname=3Dtap2 -net nic,macaddr=3Dde:ad:=
be:ef:00:02 win.img

Regards,
	Jo


--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFG+CtW0/VH7L7F7Y4RAhloAJ0awxOknw0Ty3keF3EFFHBB6QyxoACeI+JM
v1ZilxyjZTSZE1/UrG5TZdY=
=SIdS
-----END PGP SIGNATURE-----

--BXVAT5kNtrzKuDFl--