pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Re: Re: qemu, bridge and wireless



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,
> > > > 
> > > > 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".
> > > > 
> > > > 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.
> > > > 
> > > > Any idea on what I missed ?
> > > 
> > > 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.
> > > 
> > 
> > OK... and would it make sense to have all qemu interfaces in bridge0 and
> > do some NAT between wpi0 and bridge0 ?
> 
> Sure.  You affect an IP address to one of the tap interface and you make
> it the default route for the VMs.
> 

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=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        status: active
tap0: flags=8943<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=41<UP,RUNNING> mtu 1500
tap2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        media: Ethernet autoselect
# brconfig
bridge0: flags=41<UP,RUNNING>
        Configuration:
                priority 32768 hellotime 2 fwddelay 15 maxage 20
                ipfilter disabled flags 0x0
        Interfaces:
                tap2 flags=2<DISCOVER>
                        port 7 priority 128
                tap0 flags=2<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=3,ifname=tap2 -net 
nic,macaddr=de:ad:be:ef:00:02 win.img

Regards,
        Jo

Attachment: pgpfubHN3cdhT.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index