From owner-freebsd-emulation@FreeBSD.ORG Mon Jun 18 13:48:19 2007 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5EF5416A41F for ; Mon, 18 Jun 2007 13:48:19 +0000 (UTC) (envelope-from ulrich@pukruppa.net) Received: from pukruppa.net (pukruppa.net [213.146.114.24]) by mx1.freebsd.org (Postfix) with ESMTP id B1AFA13C468 for ; Mon, 18 Jun 2007 13:48:18 +0000 (UTC) (envelope-from ulrich@pukruppa.net) Received: from pukruppa.net (localhost [127.0.0.1]) by pukruppa.net (8.14.1/8.14.1) with ESMTP id l5IDHnWN001133 for ; Mon, 18 Jun 2007 15:17:49 +0200 (CEST) (envelope-from ulrich@pukruppa.net) Received: from localhost (ulrich@localhost) by pukruppa.net (8.14.1/8.14.1/Submit) with ESMTP id l5IDHmQV001130 for ; Mon, 18 Jun 2007 15:17:49 +0200 (CEST) (envelope-from ulrich@pukruppa.net) Date: Mon, 18 Jun 2007 15:17:48 +0200 (CEST) From: "P.U.Kruppa" X-X-Sender: ulrich@small To: freebsd-emulation@freebsd.org Message-ID: <20070618150834.I9390@small> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Virtual network with qemu 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, 18 Jun 2007 13:48:19 -0000 Hi, I posted this question a while ago to freebsd-questions - without any success. I hope this list is more suitable. For some network experiments I would like to set up two virtual machines with qemu inside my freebsd box. I tried to draw the situation: | 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 far I get: # 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, Uli. Peter Ulrich Kruppa Wuppertal Germany