From owner-freebsd-questions@FreeBSD.ORG Thu Apr 17 18:06:52 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 8E316106566B for ; Thu, 17 Apr 2008 18:06:52 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: from ipad.com.br (recife.ipad.com.br [200.249.204.129]) by mx1.freebsd.org (Postfix) with SMTP id 732068FC0A for ; Thu, 17 Apr 2008 18:06:50 +0000 (UTC) (envelope-from mario.lobo@ipad.com.br) Received: (qmail 7498 invoked by uid 1008); 17 Apr 2008 17:40:07 -0000 Received: from unknown (HELO lobo.ipad.com.br) (mario.lobo@ipad.com.br@192.168.64.1) by ipad.com.br with SMTP; 17 Apr 2008 17:40:07 -0000 From: Mario Lobo Organization: IPAD To: freebsd-questions@freebsd.org Date: Thu, 17 Apr 2008 14:40:42 -0300 User-Agent: KMail/1.9.7 References: <80f4f2b20804081710k5af28466k17f3d38cdd6e344a@mail.gmail.com> <80f4f2b20804121013y5d980abereb05e4aa2a1a1b77@mail.gmail.com> <80f4f2b20804170809y1ae79a3dg2fb24346b132ea74@mail.gmail.com> In-Reply-To: <80f4f2b20804170809y1ae79a3dg2fb24346b132ea74@mail.gmail.com> X-Face: ,55PTLsK{\?org*WH[[%>IJpi}pb?lwVxsDL<:}(Ti2yN(w/k\"enXx"?CbN[hp Cc: Jim Stapleton 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, 17 Apr 2008 18:06:52 -0000 On Thursday 17 April 2008, Jim Stapleton wrote: > Sorry for the delayed reply, I didn't see this sent. > > On Thursday 10 April 2008 22:01:32 Mario Lobo wrote > > > 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=3D"up polling" <- no IP here ! > > autobridge_interfaces=3D"bridge0" > > autobridge_bridge0=3D"tap0 re0" <- important even if tap0 does not > > exist yet cloned_interfaces=3D"bridge0" > > # the bridge gets the IP > > ifconfig_bridge0=3D"inet 10.10.10.2 netmask 255.255.255.0" > > To verify, the 10.10.10.2 is the IP that everyone sees my host as on > the network, correct? That's the IP that used to be set on re0? exactly ! > > > 2) tell QEMU launch to open a tap device > > Open a TUN/TAP interface in the network interface configuration yes > > > 3) tap up script to run when invoking the machine(s). > > > > # qemu-net > > > > #!/usr/local/bin/bash > > $1 =3D tap ifac created > > /sbin/ifconfig $1 up > > # test if tap is already added > > TEST=3D`ifconfig -a | grep -A 6 bridge | grep $1` > > if [ "$TEST" =3D=3D "" ]; then > > /sbin/ifconfig bridge0 addm $1 > > fi > > # add a route to the virtual machine > > /sbin/route add -host 10.10.10.100 -iface bridge0 > > This is the tun/tap configuration script, the IP on the last line is > the IP I want the guest to look like to the network (i.e. > 192.168.1.85)? correct ! You will configure the guest's network interface with this IP. > > > Thanks, I'll play with this more when I get home (I don't want to mess > with my machine's network configuration while I've only got network > access). > This worked so fine fine for me that I left the bridge as my main interface= =20 for good. Even if QEMU is not up. It works just as well as re0 itself. > > Thanks, > -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" You're welcome ! =2D-=20 Mario Lobo Seguran=E7a de Redes - Desenvolvimento e An=E1lise IPAD - Instituto de Pesquisa e Apoio ao Desenvolvimento Tecnol=F3gico e=20 Cient=EDfico