From owner-freebsd-net Tue Oct 23 13:13:56 2001 Delivered-To: freebsd-net@freebsd.org Received: from smtp.noos.fr (zola.noos.net [212.198.2.76]) by hub.freebsd.org (Postfix) with ESMTP id 80EB737B403 for ; Tue, 23 Oct 2001 13:13:51 -0700 (PDT) Received: (qmail 8710899 invoked by uid 0); 23 Oct 2001 20:13:49 -0000 Received: from unknown (HELO gits.dyndns.org) ([212.198.229.145]) (envelope-sender ) by 212.198.2.76 (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 23 Oct 2001 20:13:49 -0000 Received: (from root@localhost) by gits.dyndns.org (8.11.6/8.11.6) id f9NKDmU27220; Tue, 23 Oct 2001 22:13:48 +0200 (CEST) (envelope-from root) Message-Id: <200110232013.f9NKDmU27220@gits.dyndns.org> Subject: Re: PXE boot vs. DHCP In-Reply-To: <200110231530.f9NFUwm46770@vashon.polstra.com> To: John Polstra Date: Tue, 23 Oct 2001 22:13:47 +0200 (CEST) Cc: net@freebsd.org Reply-To: clefevre@citeweb.net From: Cyrille Lefevre Organization: ACME X-Face: X-Mailer: ELM [version 2.4ME+ PL94c (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org John Polstra wrote: > In article , > John Polstra wrote: > > I've been setting up a 4.4-RELEASE system for net booting and diskless > > operation with pxeboot, and I've run into a minor but annoying > > problem. It seems that if you boot with PXE you can't use dhclient. > > pxeboot configures the relevant network interface (let's call it > > fxp0), NFS-mounts the root filesystem, boots the kernel, etc., and > > begins to enter multi-user mode. The rc.network script then runs > > dhclient, which tries to configure fxp0 (again). It apparently starts > > out by unconfiguring fxp0's IP address, because NFS immediately hangs > > with a "host unreachable" error. At that point I have to walk over > > and press the reset button. > > The patch below for dhclient-script fixes the problem for me. If the > script is about to change the IP address to 0.0.0.0 (in the PREINIT > phase), the patched version first checks to see if the interface is > already up. If it is up, there is no need to reset its IP address. > We are just trying to get the interface into a state where it > can send IP packets, and it is already in that state. Any > objections? IMHO, it would be better to provide a /etc/dhclient-enter-hooks while you are net installing the station, then remove it when finished. the dhclient-enter-hooks would be almost what you are doing : #!/bin/sh if [ x$reason = xPREINIT ]; then case `ifconfig $interface` in *flags=*[\<,]UP[\>,]*) exit 0 ;; esac fi Cyrille. -- Cyrille Lefevre mailto:clefevre@citeweb.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message