From owner-freebsd-questions@FreeBSD.ORG Mon May 7 15:15:08 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCFA216A408 for ; Mon, 7 May 2007 15:15:08 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail1.sea5.speakeasy.net (mail1.sea5.speakeasy.net [69.17.117.3]) by mx1.freebsd.org (Postfix) with ESMTP id ACDEB13C468 for ; Mon, 7 May 2007 15:15:08 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 5737 invoked from network); 7 May 2007 15:15:07 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail1.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 7 May 2007 15:15:07 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 46FC22843A; Mon, 7 May 2007 11:15:07 -0400 (EDT) To: "P.U.Kruppa" References: <20070505074459.E16532@small> From: Lowell Gilbert Date: Mon, 07 May 2007 11:15:07 -0400 In-Reply-To: <20070505074459.E16532@small> (P. U. Kruppa's message of "Sat\, 5 May 2007 08\:21\:47 +0200 \(CEST\)") Message-ID: <447irkpsw4.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.99 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Qemu Network with two virtual boxes 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: Mon, 07 May 2007 15:15:08 -0000 "P.U.Kruppa" writes: > Hi! > > I am trying to connect two virtual Qemu boxes to my "real" > network. This is what I would like to set up: > > > | DSL Bridge to Internet| > ----------------------- > | > ___________ _________________|_________________ > "Real" LAN |---| 192.168.10.1 | > ----------- | FreeBSD 6.2 | > | | | | > | ______|______ _______|______ | > | | 192.168.10.5| | 192.168.10.6 | | > | | Win2k on | | FreeBSD on | | > | | Qemu | | Qemu | | > | ------------- -------------- | > ----------------------------------- > > My real LAN uses 192.168.10.1 as gateway to the Internet. > > For now I can only connect one of the two virtual boxes to my real > network, but not both. This is how I do it: > > # kldload aio kqemu if_tap bridge > # sysctl net.link.ether.bridge_cfg=rl0,tap0 > # sysctl net.link.ether.bridge.enable=1 > # qemu-system-x86_64 -hda Win2k.img -m 512 -localtime \ > -net tap -net nic > > When now I try to connect the second virtual box, it will "steal" the > first box's network connection. > > Ah, yes: This is my /etc/qemu-ifup > #!/bin/sh > ifconfig ${1} 0.0.0.0 > > Thanks for your help, Connect the interfaces to a bridge interface, and connect that to the external interface you want. Sorry I can't give a full formula, but my lab configuration is down for, um, corporate restructuring. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/