From owner-freebsd-questions@FreeBSD.ORG Tue Nov 4 01:18:01 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 DFF16106567E for ; Tue, 4 Nov 2008 01:18:01 +0000 (UTC) (envelope-from mlobo@digiart.art.br) Received: from smtp1.brturbo.com.br (smtp1.brte.com.br [200.199.201.162]) by mx1.freebsd.org (Postfix) with ESMTP id 612EC8FC0A for ; Tue, 4 Nov 2008 01:18:01 +0000 (UTC) (envelope-from mlobo@digiart.art.br) Received: from lobo (unknown [189.70.97.38]) by smtp1.brturbo.com.br (Postfix) with ESMTP id 738BC3402 for ; Mon, 3 Nov 2008 23:17:32 -0200 (BRST) From: Mario Lobo Organization: DigiArt Systems Date: Mon, 3 Nov 2008 22:18:31 -0300 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Disposition: inline To: freebsd-questions@freebsd.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200811032218.32267.mlobo@digiart.art.br> Subject: Qemu network question 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: Tue, 04 Nov 2008 01:18:02 -0000 Hi: Please use a fixed font to see the diagram bellow: FBSD HOST(7.1-PRERELEASE) +-----------------+ | 10.10.10.1 |=20 LAN -+----- re0 |=20 | |=20 | +-----+ | +---+----+tap0 | | =20 | ++----+tap1 | |=20 | || +-----+ | =20 | || bridge0 | (if_bridge) | || 192.168.100.254 | =20 | |+-----------------+ | | | | QEMU GUEST 1 (linux Fedora core 5) | | +-----------------+ | | | | | +---+---- eth0 |=20 | | 192.168.100.1 |=20 | | |=20 | +-----------------+=20 | QEMU GUEST 2 (windows XP) | +-----------------+ | | | +------+--- realtek |=20 | 192.168.100.2 |=20 | |=20 +-----------------+=20 It's working like a charm !=20 I turned my FBSD desktop into a router/gateway, put pf to nat everything an= d=20 set up an independent smb server on the host. Pings travel on any direction= !.=20 The guests have access to ALL the host's files and vice versa, BOTH guests= =20 have internet access and best of all, I can access the linux guest through = an=20 ssh shell and the windows guest through vncviewer, and, of course, the 2=20 guests see each other ! Imagine how happy I am ! I tried this without turning my desktop into a gateway. The guests had=20 internet access but the host was invisible to them and I got tired of tryin= g=20 to make qemu's -smb option work, so I adapted this "a-bit radical" approach= I=20 saw on a how-to for Sun OS I found on the net. I'm really impressed with qemu performance !. I=B4ve compiled kernels, buil= t=20 RPMs and the reduction in performance from doing these things in a separate= =20 machine is really endurable. My question is: If I don't put re0 into promiscous mode, all of this falls= =20 apart ! The network goes totally down for the host<->guests, but the host=20 retains its internet conectivity. I discovered that by chance! I was trying= =20 to find out what was happening with conectivity so I tried pinging the host= =20 from the linux guest. As soon as I started tcpdump on the host, the pings=20 went through so I found out what I needed from there. Is this normal or is there something wrong with my NIC? setup? Thanks, =2D-=20 Mario Lobo http://www.mallavoodoo.com.br =46reeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winedows FRE= E)