Subject: qemu, bridge and wireless
To: NetBSD/pkgsrc <pkgsrc-users@netbsd.org>
From: Joel CARNAT <joel@carnat.net>
List: pkgsrc-users
Date: 09/22/2007 12:10:34
--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 ?

TIA,
	Jo

PS: here's my configuration:

# ifconfig ####
wpi0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	media: IEEE802.11 autoselect (OFDM54 mode 11g)
	status: active
bridge0: flags=3D41<UP,RUNNING> mtu 1500
tap1: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
	address: f2:0b:a4:36:1a:09
	media: Ethernet autoselect
###############

# brconfig ####
bridge0: flags=3D41<UP,RUNNING>
	Configuration:
		priority 32768 hellotime 2 fwddelay 15 maxage 20
		ipfilter disabled flags 0x0
	Interfaces:
		tap1 flags=3D2<DISCOVER>
			port 6 priority 128
		wpi0 flags=3D2<DISCOVER>
			port 1 priority 128
	Address cache (max cache: 100, timeout: 1200):
###############

# script ######
# Common bridge creation
#
ifconfig bridge0 create
brconfig bridge0 add ${IF_PHYS}
brconfig bridge0 -learn ${IF_PHYS}
# Start the VM
#
cd `dirname $0`
case $1 in
	"debian")
		ifconfig tap1 create up
		brconfig bridge0 add tap1 up
		brconfig bridge0 -learn tap1
		brconfig bridge0 flush
		qemu -m 256 -boot d -cdrom /net/guarana/home/ptijo/iso/debian-40r1-i386-n=
etinst.iso -net tap,fd=3D3,ifname=3Dtap1 3<>/dev/tap1 -net nic,macaddr=3Dde=
:ad:be:ef:00:01,model=3Drtl8139 debian.img
		#qemu -m 256 -boot c -net tap,fd=3D3,ifname=3Dtap2 3<>/dev/tap2 -net nic,=
macaddr=3Dde:ad:be:ef:00:01 debian.img
		brconfig bridge0 delete tap1=20
		ifconfig tap1 destroy
	;;
esac
###############


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

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

iD8DBQFG9Ooa0/VH7L7F7Y4RAu2WAJwOxTB8WhwJzydnZWM8PApPAoleNwCfXcJN
b4Kt/96VelIw3MB30oxeRSM=
=PHTL
-----END PGP SIGNATURE-----

--Dxnq1zWXvFF0Q93v--