From owner-freebsd-emulation@FreeBSD.ORG Mon Jun 1 16:42:35 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 356CD106564A for ; Mon, 1 Jun 2009 16:42:35 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id EA8838FC21 for ; Mon, 1 Jun 2009 16:42:34 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id A355A1E001D1; Mon, 1 Jun 2009 18:42:33 +0200 (CEST) Received: from triton.kn-bremen.de (noident@localhost [127.0.0.1]) by triton.kn-bremen.de (8.14.3/8.14.3) with ESMTP id n51GaCwh007209; Mon, 1 Jun 2009 18:36:12 +0200 (CEST) (envelope-from nox@triton.kn-bremen.de) Received: (from nox@localhost) by triton.kn-bremen.de (8.14.3/8.14.3/Submit) id n51GaCbJ007208; Mon, 1 Jun 2009 18:36:12 +0200 (CEST) (envelope-from nox) Date: Mon, 1 Jun 2009 18:36:12 +0200 (CEST) From: Juergen Lock Message-Id: <200906011636.n51GaCbJ007208@triton.kn-bremen.de> To: kalinoj1@iem.pw.edu.pl X-Newsgroups: local.list.freebsd.emulation In-Reply-To: <20090523223024.GA93488@volt.iem.pw.edu.pl> Organization: home Cc: freebsd-emulation@freebsd.org Subject: Re: Qemu: Assigning two tap devices to one virtual machine 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, 01 Jun 2009 16:42:35 -0000 In article <20090523223024.GA93488@volt.iem.pw.edu.pl> you write: >Hello all, > >I'm running qemu 0.10.5 on CURRENT machine and experienced an >interesting problem. > >I try to run a single qemu machine with two network interfaces (tap's) >connected to the same bridge - I need this for playing with m0n0wall for >example. > >The qemu launch looks similiar to this: > >qemu -net nic -net tap -net nic -net tap -cdrom cdrom.iso -curses > >What happens is that when qemu starts up - my machine locks (sometimes I >manage to kill qemu and recover it, sometimes not). I see that it's a >problem with network bridge - looks like the infitine loop of arp >requests that get replicated infinitely (it also kills/floods my real network >that is connected through the bridge to the tap devices). > >My question is - have any of You tried to use multiple tap devices within >one qemu machine? Can you replicate this problem in your environments? > >One note: there is no problem if I run two qemus and each of them has a >tap device connected to bridge0. They coexist and I have no network >issues in both guests. I can post qemu-if{up,down} scripts if needed. Ok just in case this hasn't been resolved yet... Try something like qemu -net nic -net tap -net nic,vlan=1,macaddr=52:54:00:12:34:57 -net tap,vlan=1 -cdrom cdrom.iso -curses and if you want you can also add `,model=e1000' to the -net nic parameters, that one (em(4) on FreeBSD) should perform a little better than the default ne2kpci (ed(4) on FreeBSD.) Explanation: vlan= is used to associate -net nic with -net tap/user/pcap connections (default is vlan=0), and macaddr= you need because qemu uses one single default macaddress (52:54:00:12:34:56 atm) for all -net nic and you can't have two nics with identical macs on the same network. Good luck, :) Juergen