From owner-freebsd-questions@FreeBSD.ORG Thu May 14 08:29:23 2009 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 850FB1065670 for ; Thu, 14 May 2009 08:29:23 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mail.gmx.com (unknown [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id DCFA18FC1A for ; Thu, 14 May 2009 08:29:22 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: (qmail invoked by alias); 14 May 2009 08:29:21 -0000 Received: from ipa142.9.107.79.tellas.gr (EHLO [192.168.254.1]) [79.107.9.142] by mail.gmx.com (mp-eu004) with SMTP; 14 May 2009 10:29:21 +0200 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18uPCQmdPYu4DAJA7WBmwsFouweeCcaQ3PyPj1a9S 2W+kVjAcbWAcaT Message-ID: <4A0BD64B.6010406@gmx.com> Date: Thu, 14 May 2009 11:28:59 +0300 From: Nikos Vassiliadis User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: "marco.borsatino@poste.it" References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 Cc: freebsd-questions@freebsd.org Subject: Re: virtual network with qemu 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, 14 May 2009 08:29:23 -0000 marco.borsatino@poste.it wrote: > When the installation program asked for information about network configuration, as a > first step, I chose DHCP configuration and, as usualy, the network has been set > like this: > IP 10.0.2.15/255.255.255.0 If I recall correctly qemu has a built-in DHCP server. That's the one that served you, not a "real" DHCP server running on your LAN, that is, you are not in any way connected to the "real" network. > #qemu -L /usr/local/share/qemu -localtime -net nic,macaddr=00:15:f2:44:2d:01 -net socket,mcast=230.0.0.1:1234 -hda pc01.img -cdrom /dev/acd0 & > but the network in the guest system does not work. It makes sense, that the multicast option will work between virtual hosts only. That is, it uses multicast to provide a virtual broadcast domain, which appears to the host operating system as a ethernet device. > ifconfig in the guest system tells: > #ifconfig -a > ed0: flags=8843 metric 0 mtu 1500 > ether 00:15:f2:44:2d:01 > media: Ethernet 10baseT/UTP > plip0: ... > lo0: ... > If I try: > #ping 10.0.2.2 (the gateway) > all packets are lost. For this reason, I've tryed a static IP configuration like this: > IP 10.0.2.4/255.255.255.0 > gateway 10.0.2.2 > nameserver 10.0.2.3 > but the gateway does not respond. So it is useless to try with a second guest system. No, infact it's the exact opposite. This type of device will work *only* if you add another virtual system. To get connected to the "real" network, you must use tap devices. Correction: Browsing the qemu's wiki I found out that there is a newer and simpler approach that I am not familiar with: http://calamari.reverse-dns.net:980/cgi-bin/moin.cgi/user-net So, if you do want internet access, just remove all network associated options and it will work automagically. If you just want to connect guest systems together use multicast or socket or ... HTH, Nikos