From owner-freebsd-questions@FreeBSD.ORG Thu May 14 13:38:14 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 D31B91065672 for ; Thu, 14 May 2009 13:38:14 +0000 (UTC) (envelope-from marco.borsatino@poste.it) Received: from relay-pt3.poste.it (relay-pt3.poste.it [62.241.4.129]) by mx1.freebsd.org (Postfix) with ESMTP id 8F5FF8FC1E for ; Thu, 14 May 2009 13:38:14 +0000 (UTC) (envelope-from marco.borsatino@poste.it) Received: from poste.it (192.168.44.16) by relay-pt3.poste.it (7.3.122) id 4A0B5172000048C8; Thu, 14 May 2009 15:38:12 +0200 Date: Thu, 14 May 2009 15:38:12 +0200 Message-Id: MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: "marco\.borsatino\@poste\.it" To: nvass9573@gmx.com X-XaM3-API-Version: 5.0(R1) X-SenderIP: 79.25.226.154 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 13:38:15 -0000 Thank you twice: the communication between 2 virtual PCs works. Now should I configure another virtual PC as a gateway with a netmask, sa= y, 255.0.0.0? The virtual PC have a calss B netmask. I will also try the tools I've suggested to me. Marco ---------- Original Header ----------- >From : "Nikos Vassiliadis" nvass9573@gmx.com To : "marco.borsatino@poste.it" marco.borsatino@poste.it Cc : freebsd-questions@freebsd.org Date : Thu, 14 May 2009 16:08:01 +0300 Subject : Re: virtual network with qemu > marco.borsatino@poste.it wrote: > > First, thank you. You are right, qemu has an internal DHCP server, > > which should be perfect for me, becuse I would like to emulate a > > network without any contact with external (real) world. The problem > > is that my virtual PC can't ping the gateway. For my idea (this is > > just a way to study a project for a network without a real network) > > the communication is intended only among virtual PCs. But If I can't > > contact the (virtual) gateway will it be possible to contact another > > virtual PC on a different subnet? Or even on the same subnet? In my > > idea I would like to create a little but complex net with one master > > controller, a slave controller, a little number of client belonging > > to different subnets. Maybe with or without a DHCP server. > > Yes, hosts on the same IP network, which of course are on the same > broadcast domain, are able to communicate with each other with no > other intermediates. A gateway is required only if you want to > communicate with other networks. So, you have to create, let's say, > 3 virtual PCs: > 1) host_a on network A > 2) host_b on network B > 3) router_a on both networks A and B > > That's all. > > I guess, qemu uses the multicast solution to create virtual > broadcast domains, like a switch does. qemu, I guess, has no > knowledge of what happens on these ethernets, like a real ethernet > switch. It's a real cool solution, since the user is able to > create networks than can span several physical machines. > > Maybe you should use socket instead of mcast, don't really > know the pros and cons of those two. > > Last but not least, since you seem to look for a learning tool, let > me suggest two great ones: > 1) imunes, you need vmware player for a quick start. > http://www.imunes.net/virtnet/ > 2) netkit > http://wiki.netkit.org/index.php/Download_Official > > I have extensively used imunes and it's great. > You should also check netkit. In case, it matters, the latter > is GNU/Linux based. > > HTH, Nikos >