From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EL74U-0007fh-4w for qemu-devel@nongnu.org; Thu, 29 Sep 2005 18:40:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EL74M-0007ah-CH for qemu-devel@nongnu.org; Thu, 29 Sep 2005 18:40:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EL74K-0007TK-5i for qemu-devel@nongnu.org; Thu, 29 Sep 2005 18:40:00 -0400 Received: from [128.8.10.163] (helo=po1.wam.umd.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EL70P-00086a-2a for qemu-devel@nongnu.org; Thu, 29 Sep 2005 18:35:57 -0400 Received: from jbrown.mylinuxbox.org (jma-box.student.umd.edu [129.2.253.219]) by po1.wam.umd.edu (8.12.10/8.12.10) with ESMTP id j8TMZtN3012123 for ; Thu, 29 Sep 2005 18:35:55 -0400 (EDT) Date: Thu, 29 Sep 2005 18:14:06 -0400 From: "Jim C. Brown" Subject: Re: [Qemu-devel] about DHCP server in qemu Message-ID: <20050929221406.GA6019@jbrown.mylinuxbox.org> References: <1128006042.433c019a295a8@webmail.alinto.com> <20050929203431.GA4684@jbrown.mylinuxbox.org> <433C61B7.6070804@wasp.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <433C61B7.6070804@wasp.net.au> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Sep 30, 2005 at 01:50:47AM +0400, Brad Campbell wrote: > >No. In fact, the server is set up to always return the same IP in response > >to > >a request. > err.. it works for me... Yes, it seems that Fabrice has slipped in a few changes since I last looked at the slirp code. :) The internal DHCP server can now support 16 dhcp clients. That's for multiple clients within a single qemu guest though (think multiple NICs here). I don't see any way for qemu guests to be able to ping each other (for example) if they are both using user-net. > Even if it worked like a full fledged DHCP server, there's no > >way to > >connect multiple guests together. The best you can do is slirpvde. > > > This gives me 9 qemu sessions that all get different 10.x.x.x ip addresses > via dhcp > > #!/bin/sh > rm /tmp/qemu-irc-* > for i in 1 2 3 4 5 6 7 8 9 ; do > qemu-img create -b /tracks/lin.img -f qcow /tmp/qemu-irc-$i > qemu -fda /tracks/floppy.img -hda /tmp/qemu-irc-$i -boot a -user-net > -macaddr C0:0F:FE:01:01:9$i -m32 & > done > > Regards, > Brad I find it suprising that this works. From the code in slirp/bootp.c it looks like qemu's dhcp server will give out 10.0.2.15 first, then 10.0.2.16, and so on (so it goes in sequential order). But thats within a single qemu session. Theres no way for multiple user-net qemu guests to communicate (at least on the ethernet level) so the guests should have the same ip address. Very strange. -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.