From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 14 05:38:56 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AAD106566B for ; Mon, 14 Sep 2009 05:38:56 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id AAE278FC12 for ; Mon, 14 Sep 2009 05:38:55 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e21so366496fga.13 for ; Sun, 13 Sep 2009 22:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject :message-id:mime-version:content-type:content-disposition; bh=jOs5ERVLtzNBLRv8rqkhACH7t0PKaD8gxPy2t54FINA=; b=mY31Nmx81S6LG3X3eUy7kqXBL97/yVJU6FQGEp2BjwQ91JZUgIklDfgKLnLEiB0oAm 8bfaw1eW4BBudUhVQnZdnC/cc5Ow09BUgEwgGiG+KowarAtlX5Ctk5196VAkPOT4v9ch MYwQGt6ba8KTDqVn/yXrZAAliAkXm6M6X73IY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition; b=oub17rjtzTOPk2SEMb9vUDWYvTJi2RZR7f8cWVov3F5BME/i7x4FjTZcsGGJy6iMJM 0UtpvdcGUH29XUZ48GL3wr5jeFeASk0V2OdFqB4NyTi7NZcF70nwRcNO8Q1JPSFAZlJv FNrCGRG/kOK70chb1RpGEcXLtKnDLzM0NAFU8= Received: by 10.86.13.36 with SMTP id 36mr4564928fgm.25.1252905283301; Sun, 13 Sep 2009 22:14:43 -0700 (PDT) Received: from viper.internal.network (dsl78-143-222-147.in-addr.fast.co.uk [78.143.222.147]) by mx.google.com with ESMTPS id e20sm636730fga.25.2009.09.13.22.14.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Sep 2009 22:14:42 -0700 (PDT) Received: by viper.internal.network (Postfix, from userid 11001) id 422904AC57; Mon, 14 Sep 2009 06:14:02 +0100 (BST) Date: Mon, 14 Sep 2009 06:14:02 +0100 From: xorquewasp@googlemail.com To: freebsd-emulation@freebsd.org Message-ID: <20090914051402.GB44046@logik.internal.network> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: Problems with qemu networking on 7.2-RELEASE-amd64? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Sep 2009 05:38:56 -0000 Hello. I'm having horrendous trouble getting qemu to do networking on 7.2-RELEASE-amd64. I've not had any trouble on previous versions of FreeBSD and qemu so this comes as a bit of a surprise. The setup is a simple bridge between my main physical NIC (re0) and a tap device (tap0). I use PF to filter on the bridge for basic access control. # ifconfig bridge0 create # ifconfig tap0 create # ifconfig bridge0 addm tap0 # ifconfig bridge0 addm re0 # chmod 660 /dev/tap0 # chown root:devel /dev/tap0 # sysctl net.link.tap.up_on_open=1 # sysctl net.link.tap.user_open=1 $ cat if-up #!/bin/sh info() { echo "if-up: info: $1" 1>&2 } info "bringing up $1" sudo /sbin/ifconfig $1 0.0.0.0 promisc up exit 0 $ ifconfig bridge0 bridge0: flags=8802 metric 0 mtu 1500 ether de:38:3c:f6:8a:a9 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0 member: re0 flags=143 ifmaxaddr 0 port 1 priority 128 path cost 200000 member: tap0 flags=143 ifmaxaddr 0 port 9 priority 128 path cost 2000000 $ ifconfig re0 re0: flags=8943 metric 0 mtu 1500 options=3898 ether 00:e0:4d:b3:5b:bd inet 10.1.3.1 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.2 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.3 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.4 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.5 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.6 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.7 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.8 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.9 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.10 netmask 0xffff0000 broadcast 10.1.255.255 inet 10.1.3.11 netmask 0xffff0000 broadcast 10.1.255.255 media: Ethernet autoselect (100baseTX ) status: active $ qemu -snapshot -hda image -net nic -net tap,ifname=tap0,script=if-up $ ifconfig tap0 tap0: flags=28943 metric 0 mtu 1500 ether 00:bd:bd:41:18:00 inet 0.0.0.0 netmask 0xff000000 broadcast 0.255.255.255 Opened by PID 21860 At this point, the guest in the qemu VM has the correct TCP/IP settings: host: 10.1.3.12 mask: 255.255.0.0 dns: 10.2.1.7 gate: 10.1.0.1 The ability for various guests to see the network interface is varied. NetBSD 5.0.1 x86 sees no network interface at all (nothing in dmesg). OpenBSD 4.5 x86 sees a network interface but at some point during boot, it'll state something along the lines of "ne3: device timeout" and networking doesn't work. Windows XP x86 seems to be able to see a network interface and can apparently send outgoing packets for DNS resolution but appears to never receive any data in return. NetBSD 5.0.1 SPARC can see an interface and can apparently send packets and not receive. I've intermittently been able to connect in via SSH, however. Currently, as I write, the NetBSD SPARC guest can neither send nor receive any data on the network interface (watching the bridge, tap and pflog devices shows no connections being made). Is anyone else having trouble? xw PS: Please CC as I'm not subscribed.