From owner-freebsd-questions@FreeBSD.ORG Thu Apr 10 22:01:32 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACC67106566C for ; Thu, 10 Apr 2008 22:01:32 +0000 (UTC) (envelope-from mlobo@digiart.art.br) Received: from ipad.com.br (recife.ipad.com.br [200.249.204.129]) by mx1.freebsd.org (Postfix) with SMTP id DECA28FC20 for ; Thu, 10 Apr 2008 22:01:31 +0000 (UTC) (envelope-from mlobo@digiart.art.br) Received: (qmail 25991 invoked by uid 79); 10 Apr 2008 22:01:28 -0000 Received: from 189.70.225.156 by recife.ipad.com.br (envelope-from , uid 1008) with qmail-scanner-1.25-st-qms (clamdscan: 0.92rc2/6692. spamassassin: 3.1.8. perlscan: 1.25-st-qms. Clear:RC:0(189.70.225.156):SA:0(0.1/2.9):. Processed in 4.194282 secs); 10 Apr 2008 22:01:28 -0000 X-Spam-Status: No, hits=0.1 required=2.9 X-Spam-Report: SA TESTS 0.1 TW_QE BODY: Odd Letter Triples with QE 0.0 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL [189.70.225.156 listed in zen.spamhaus.org] X-Antivirus-IPAD-Mail-From: mlobo@digiart.art.br via recife.ipad.com.br X-Antivirus-IPAD: 1.25-st-qms (Clear:RC:0(189.70.225.156):SA:0(0.1/2.9):. Processed in 4.194282 secs Process 25980) Received: from unknown (HELO lobo) (mlobo@digiart.art.br@189.70.225.156) by ipad.com.br with SMTP; 10 Apr 2008 22:01:24 -0000 From: Mario Lobo Organization: DigiArt Systems To: freebsd-questions@freebsd.org Date: Thu, 10 Apr 2008 19:08:13 -0300 User-Agent: KMail/1.9.7 References: <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <20080410093625.GA95076@farnborough.darq.net> <80f4f2b20804100833v3fdc2f79ufcf6b109ddd4ae9b@mail.gmail.com> In-Reply-To: <80f4f2b20804100833v3fdc2f79ufcf6b109ddd4ae9b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804101908.14015.mlobo@digiart.art.br> Subject: Re: QEMU networking quirkiness on 7.0 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2008 22:01:32 -0000 On Thursday 10 April 2008 12:33:29 Jim Stapleton wrote: > > Yes, this needs to be setup on the host system. The way a bridge is > > configured has changed on 7. Here are the steps assuming that your > > external interface is em0: > > Well, it seems pretty calm, and hasn't tried to cut itself yet... But > I think I can adapt. > > > # ifconfig tap0 create > > # ifconfig tap0 up > > # ifconfig em0 up > > # ifconfig bridge0 create > > # ifconfig bridge0 addm tap0 addm em0 > > Could I mimic this in RC.conf? Or is this saved between restarts? > > > Also, for the bridge, could I do this, correct? > > #existing rc.conf > hostname="elrond.var-dev.net" > ifconfig_re0="inet 192.168.1.84 netmask 255.255.255.0" > ifconfig_re0_alias0="192.168.1.85 netmask 255.255.255.255" > defaultrouter="192.168.1.1" > #adding... Should I use an IP not aliased by re0? > ifconfig_bridge0="inet 192.168.1.85 netmask 255.255.255.0" > > > > > Thanks for your help, > -Jim Stapleton > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" I have a virtual Linux (Fedora 5) and winedows (XP) machines in QEMU and they are both network functional. I use qemu-launch because it does everything you need to create a virtual machine. Here are my pertinent configs: ------------------------------------------------ 1) # rc.conf ifconfig_re0="up polling" <- no IP here ! autobridge_interfaces="bridge0" autobridge_bridge0="tap0 re0" <- important even if tap0 does not exist yet cloned_interfaces="bridge0" # the bridge gets the IP ifconfig_bridge0="inet 10.10.10.2 netmask 255.255.255.0" 2) tell QEMU launch to open a tap device 3) tap up script to run when invoking the machine(s). # qemu-net #!/usr/local/bin/bash $1 = tap ifac created /sbin/ifconfig $1 up # test if tap is already added TEST=`ifconfig -a | grep -A 6 bridge | grep $1` if [ "$TEST" == "" ]; then /sbin/ifconfig bridge0 addm $1 fi # add a route to the virtual machine /sbin/route add -host 10.10.10.100 -iface bridge0 ------------------------------------------------ Set the gateway on both machines to the same gateway of the host. That's all. This works perfectly for me. If I want both virtual machines up, I have to add another route to the IP of the second machine through the bridge. I did not need to set up samba to access the local drives because I already have a samba server on the gateway and both the host and the guests can see it, and of course, is one less thing to set up at the host. My 2 cents. Hope it helps ! -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FREE)