From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HJVtG-0001o8-71 for qemu-devel@nongnu.org; Tue, 20 Feb 2007 09:22:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HJVtE-0001nw-Dw for qemu-devel@nongnu.org; Tue, 20 Feb 2007 09:22:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HJVtE-0001nt-8W for qemu-devel@nongnu.org; Tue, 20 Feb 2007 09:22:44 -0500 Received: from ms-smtp-02.texas.rr.com ([24.93.47.41]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HJVtD-0006HY-SE for qemu-devel@nongnu.org; Tue, 20 Feb 2007 09:22:44 -0500 Received: from vaio (cpe-66-68-31-100.austin.res.rr.com [66.68.31.100]) by ms-smtp-02.texas.rr.com (8.13.6/8.13.6) with ESMTP id l1KEMMOc012332 for ; Tue, 20 Feb 2007 08:22:25 -0600 (CST) Subject: Re: [Qemu-devel][PATCH] Built-in DHCP server From: Lonnie Mendez In-Reply-To: <001301c754a4$f10d5120$0464a8c0@athlon> References: <001301c754a4$f10d5120$0464a8c0@athlon> Content-Type: text/plain Date: Tue, 20 Feb 2007 08:22:14 -0600 Message-Id: <1171981334.4091.55.camel@vaio> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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 Tue, 2007-02-20 at 13:09 +0900, Kazu wrote: > Hi, > > After I used TAP device by -net nic -net tap,ifname=mytap and I tried to use > user mode network by -net nic -net user, a Windows XP guest doesn't get > IP address from a built-in DHCP server. > > It is fixed by an attached patch. > > DHCPRELEASE and DHCPNACK are introduced. > > DHCPRELEASE code is borrowed from VirtualBox. Windows 2000/XP tries to call > DHCPREQUEST and get old IP address when it boots. I made a code to reply > DHCPNACK to the request. Then the Win2k/XP called DHCPDISCOVER and try to > get a new IP address. > > I tested Windows 98SE/2000/XP, Knoppix 3.8, Morphix, Fedora Core 3 and > RedHat 7.2 guest. > There is not problem except RH7.2. It can get IP address but it is > 10.0.2.16. dhcpcd in RH7.2 tries to call DHCPDISCOVER two times. So it > consumes two entries in the built-in DHCP server. It seems that it is a bug > of dhcpcd in RH7.2. This is nice. One regression noticed is windows 98 SE with the ne2k_isa card. It used to obtain an ip address at boot time without this patch - now it obtains a garbage address 169.x.x.x. Works great with ne2k_pci.